From b58f55353ac5bc22df57ec4cff5eddc3e1fae14e Mon Sep 17 00:00:00 2001 From: Connor Turland Date: Tue, 16 Aug 2016 10:25:07 -0400 Subject: [PATCH] switch so that backbone router is opt-in, not opt-out (#610) --- app/assets/javascripts/src/Metamaps.Router.js | 2 +- app/views/admin/_adminpanel.html.erb | 8 +++---- .../doorkeeper/applications/_form.html.erb | 2 +- .../doorkeeper/applications/index.html.erb | 4 ++-- .../doorkeeper/applications/new.html.erb | 2 +- .../doorkeeper/applications/show.html.erb | 6 ++--- app/views/layouts/_account.html.erb | 9 ++++--- app/views/layouts/_lightboxes.html.erb | 2 +- app/views/layouts/_mobilemenu.html.erb | 18 +++++++------- app/views/layouts/_templates.html.erb | 6 ++--- app/views/layouts/_upperelements.html.erb | 4 ++-- app/views/main/home.html.erb | 4 ++-- app/views/metacode_sets/_form.html.erb | 2 +- app/views/metacode_sets/index.html.erb | 4 ++-- app/views/metacodes/_form.html.erb | 2 +- app/views/metacodes/index.html.erb | 2 +- app/views/shared/_cheatsheet.html.erb | 24 +++++++++---------- app/views/shared/_switchmetacodes.html.erb | 4 ++-- app/views/users/registrations/new.html.erb | 2 +- app/views/users/sessions/new.html.erb | 3 +-- frontend/src/components/Header.js | 6 +++-- 21 files changed, 58 insertions(+), 58 deletions(-) diff --git a/app/assets/javascripts/src/Metamaps.Router.js b/app/assets/javascripts/src/Metamaps.Router.js index 145210ba..a037d169 100644 --- a/app/assets/javascripts/src/Metamaps.Router.js +++ b/app/assets/javascripts/src/Metamaps.Router.js @@ -263,6 +263,6 @@ pushState: true, root: '/' }) - $(document).on('click', 'a:not([data-bypass])', Metamaps.Router.intercept) + $(document).on('click', 'a[data-router="true"]', Metamaps.Router.intercept) } })() diff --git a/app/views/admin/_adminpanel.html.erb b/app/views/admin/_adminpanel.html.erb index 7733824f..c34c6cc6 100644 --- a/app/views/admin/_adminpanel.html.erb +++ b/app/views/admin/_adminpanel.html.erb @@ -1,6 +1,6 @@ -<%= link_to 'Metacode Sets', metacode_sets_path, { :class => 'button', 'data-bypass' => 'true' }%> -<%= link_to 'New Set', new_metacode_set_path, { :class => 'button', 'data-bypass' => 'true' }%> -<%= link_to 'Metacodes', metacodes_path, { :class => 'button', 'data-bypass' => 'true' }%> -<%= link_to 'New Metacode', new_metacode_path, { :class => 'button', 'data-bypass' => 'true' }%> +<%= link_to 'Metacode Sets', metacode_sets_path, { :class => 'button' }%> +<%= link_to 'New Set', new_metacode_set_path, { :class => 'button' }%> +<%= link_to 'Metacodes', metacodes_path, { :class => 'button' }%> +<%= link_to 'New Metacode', new_metacode_path, { :class => 'button' }%>

diff --git a/app/views/doorkeeper/applications/_form.html.erb b/app/views/doorkeeper/applications/_form.html.erb index dd8bec62..7810805d 100644 --- a/app/views/doorkeeper/applications/_form.html.erb +++ b/app/views/doorkeeper/applications/_form.html.erb @@ -30,7 +30,7 @@
<%= f.submit t('doorkeeper.applications.buttons.submit'), class: "btn btn-primary" %> - <%= link_to t('doorkeeper.applications.buttons.cancel'), oauth_applications_path, :class => "button link-button red-button", :data => { :bypass => 'true' } %> + <%= link_to t('doorkeeper.applications.buttons.cancel'), oauth_applications_path, :class => "button link-button red-button" %>
<% end %> diff --git a/app/views/doorkeeper/applications/index.html.erb b/app/views/doorkeeper/applications/index.html.erb index 449d5f5e..25a94572 100644 --- a/app/views/doorkeeper/applications/index.html.erb +++ b/app/views/doorkeeper/applications/index.html.erb @@ -15,14 +15,14 @@ <% @applications.each do |application| %> - <%= link_to application.name, oauth_application_path(application), :data => { :bypass => 'true' } %> + <%= link_to application.name, oauth_application_path(application) %> <%= application.redirect_uri %> <%= render 'delete_form', application: application %> <% end %> -<%= link_to t('.new'), new_oauth_application_path, class: 'button link-button', :data => { :bypass => 'true' } %> +<%= link_to t('.new'), new_oauth_application_path, class: 'button link-button' %> <%= render 'script' %> diff --git a/app/views/doorkeeper/applications/new.html.erb b/app/views/doorkeeper/applications/new.html.erb index ef864959..698dc25e 100644 --- a/app/views/doorkeeper/applications/new.html.erb +++ b/app/views/doorkeeper/applications/new.html.erb @@ -1,6 +1,6 @@
-<%= link_to t('doorkeeper.applications.buttons.back'), oauth_applications_path(), class: 'button link-button button-margin', :data => { :bypass => 'true' } %> +<%= link_to t('doorkeeper.applications.buttons.back'), oauth_applications_path(), class: 'button link-button button-margin' %> diff --git a/app/views/doorkeeper/applications/show.html.erb b/app/views/doorkeeper/applications/show.html.erb index 045d16a0..3030960c 100644 --- a/app/views/doorkeeper/applications/show.html.erb +++ b/app/views/doorkeeper/applications/show.html.erb @@ -1,7 +1,7 @@
- <%= link_to t('doorkeeper.applications.buttons.back'), oauth_applications_path(), class: 'button link-button button-margin', :data => { :bypass => 'true' } %> + <%= link_to t('doorkeeper.applications.buttons.back'), oauth_applications_path(), class: 'button link-button button-margin' %> diff --git a/app/views/layouts/_account.html.erb b/app/views/layouts/_account.html.erb index 1f228481..0b20cf4c 100644 --- a/app/views/layouts/_account.html.erb +++ b/app/views/layouts/_account.html.erb @@ -10,12 +10,12 @@
  • - <%= link_to "Account", edit_user_url(account), :data => { :bypass => 'true'} %> + <%= link_to "Account", edit_user_url(account) %>
  • <% if account.admin %>
  • - <%= link_to "Admin", metacodes_path, :data => { :bypass => 'true'} %> + <%= link_to "Admin", metacodes_path %>
  • <% end %>
  • @@ -24,7 +24,7 @@
  • - <%= link_to "Sign Out", "/logout", id: "Logout", :data => { :bypass => 'true'} %> + <%= link_to "Sign Out", "/logout", id: "Logout" %>
<% else %> @@ -47,8 +47,7 @@
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %> - <%= link_to "Forgot password?", new_password_path(resource_name), - :data => { :bypass => 'true'} %> + <%= link_to "Forgot password?", new_password_path(resource_name) %> <% end -%>
<% end %> diff --git a/app/views/layouts/_lightboxes.html.erb b/app/views/layouts/_lightboxes.html.erb index 55ca9eb6..aefc4e1f 100644 --- a/app/views/layouts/_lightboxes.html.erb +++ b/app/views/layouts/_lightboxes.html.erb @@ -57,7 +57,7 @@
  • - +
    terms
    diff --git a/app/views/layouts/_mobilemenu.html.erb b/app/views/layouts/_mobilemenu.html.erb index f51694e8..1042e8de 100644 --- a/app/views/layouts/_mobilemenu.html.erb +++ b/app/views/layouts/_mobilemenu.html.erb @@ -8,7 +8,7 @@
      <% if not current_user %>
    • - <%= link_to "Home", root_path, :data => { :bypass => 'true'} %> + <%= link_to "Home", root_path %>
    • <% end %> <% if current_user %> @@ -18,34 +18,34 @@ <%= current_user.name %>
    • - <%= link_to "My Maps", explore_mine_path %> + <%= link_to "My Maps", explore_mine_path, :data => { :router => 'true'} %>
    • - <%= link_to "Shared With Me", explore_shared_path %> + <%= link_to "Shared With Me", explore_shared_path, :data => { :router => 'true'} %>
    • <% end %>
    • - <%= link_to "Recently Active", explore_active_path %> + <%= link_to "Recently Active", explore_active_path, :data => { :router => 'true'} %>
    • <% if not current_user %>
    • - <%= link_to "Featured Maps", explore_featured_path %> + <%= link_to "Featured Maps", explore_featured_path, :data => { :router => 'true'} %>
    • <% end %> <% if not current_user %>
    • - <%= link_to "Request Invite", request_path, :data => { :bypass => 'true'} %> + <%= link_to "Request Invite", request_path %>
    • - <%= link_to "Login", new_user_session_path, :data => { :bypass => 'true'} %> + <%= link_to "Login", new_user_session_path %>
    • <% end %> <% if current_user %>
    • - <%= link_to "Account", edit_user_url(current_user), :data => { :bypass => 'true'} %> + <%= link_to "Account", edit_user_url(current_user) %>
    • - <%= link_to "Sign Out", "/logout", id: "Logout", :data => { :bypass => 'true'} %> + <%= link_to "Sign Out", "/logout", id: "Logout" %>
    • <% end %>
    diff --git a/app/views/layouts/_templates.html.erb b/app/views/layouts/_templates.html.erb index 7e5a6293..dd9c2634 100644 --- a/app/views/layouts/_templates.html.erb +++ b/app/views/layouts/_templates.html.erb @@ -47,7 +47,7 @@