From: John Firebaugh Date: Thu, 3 Oct 2013 23:56:48 +0000 (-0700) Subject: Eliminate edit.js X-Git-Tag: live~5182^2~229 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/85e6bbde9bd5c9140dd32c1f8c3306dd8f34accb?ds=inline Eliminate edit.js --- diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index a0ddcf9c2..493c03d91 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -116,6 +116,14 @@ function escapeHTML(string) { }); } +function maximiseMap() { + $("#content").addClass("maximised"); +} + +function minimiseMap() { + $("#content").removeClass("maximised"); +} + /* * Forms which have been cached by rails may have the wrong * authenticity token, so patch up any forms with the correct diff --git a/app/assets/javascripts/edit.js b/app/assets/javascripts/edit.js deleted file mode 100644 index 8800195b3..000000000 --- a/app/assets/javascripts/edit.js +++ /dev/null @@ -1,7 +0,0 @@ -function maximiseMap() { - $("#content").addClass("maximised"); -} - -function minimiseMap() { - $("#content").removeClass("maximised"); -} diff --git a/app/views/site/edit.html.erb b/app/views/site/edit.html.erb index 030775fe6..ae313e1f2 100644 --- a/app/views/site/edit.html.erb +++ b/app/views/site/edit.html.erb @@ -8,10 +8,6 @@

<%= raw t 'site.edit.not_public_description', :user_page => (link_to t('site.edit.user_page_link'), {:controller => 'user', :action => 'account', :display_name => @user.display_name, :anchor => 'public'}) %>

<%= raw t 'site.edit.anon_edits', :link => link_to(t('site.edit.anon_edits_link_text'), t('site.edit.anon_edits_link')) %>

<% else %> - <% content_for :head do %> - <%= javascript_include_tag "edit" %> - <% end %> - <%= render :partial => preferred_editor %> <% end %> <% end %> diff --git a/config/environments/production.rb b/config/environments/production.rb index 74cdcee41..bbb1c55ef 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -69,7 +69,7 @@ OpenStreetMap::Application.configure do # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. - config.assets.precompile += %w( index.js edit.js browse.js changeset.js welcome.js ) + config.assets.precompile += %w( index.js browse.js changeset.js welcome.js ) config.assets.precompile += %w( user.js diary_entry.js pngfix.js swfobject.js ) config.assets.precompile += %w( large-ltr.css small-ltr.css print-ltr.css ) config.assets.precompile += %w( large-rtl.css small-rtl.css print-rtl.css )