Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iD 1.8.2 #1106

Merged
merged 3 commits into from
Dec 11, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -435,10 +435,6 @@ def preferred_editor
DEFAULT_EDITOR
end

if request.env["HTTP_USER_AGENT"] =~ /MSIE|Trident/ && editor == "id"
editor = "potlatch2"
end

editor
end

Expand Down
4 changes: 2 additions & 2 deletions app/views/site/id.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<body>
<div id='id-container'></div>
<script>
if (typeof iD == 'undefined') {
if (typeof iD == 'undefined' || !iD.detect().support) {
document.getElementById('id-container').innerHTML = 'This editor is supported ' +
'in Firefox, Chrome, Safari, Opera, and Internet Explorer 9 and above. ' +
'in Firefox, Chrome, Safari, Opera, and Internet Explorer 11 and above. ' +
'Please upgrade your browser or use Potlatch 2 to edit the map.';
document.getElementById('id-container').className = 'unsupported';
} else {
Expand Down
27 changes: 0 additions & 27 deletions test/controllers/site_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,33 +236,6 @@ def test_edit_with_override
assert_template "index"
end

# Test the right editor gets used when the browser is IE
def test_edit_with_ie
@request.env["HTTP_USER_AGENT"] = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)"

get :edit, {}, { :user => users(:public_user).id }
assert_response :success
assert_template "edit"
assert_template :partial => "_potlatch2", :count => 1

get :edit, { :editor => "id" }, { :user => users(:public_user).id }
assert_response :success
assert_template "edit"
assert_template :partial => "_potlatch2", :count => 1

@request.env["HTTP_USER_AGENT"] = "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko"

get :edit, {}, { :user => users(:public_user).id }
assert_response :success
assert_template "edit"
assert_template :partial => "_potlatch2", :count => 1

get :edit, { :editor => "id" }, { :user => users(:public_user).id }
assert_response :success
assert_template "edit"
assert_template :partial => "_potlatch2", :count => 1
end

# Test editing a specific node
def test_edit_with_node
user = users(:public_user)
Expand Down
Loading