From 0c758f6e4042ef843ba52c43219f1effe6eeddb5 Mon Sep 17 00:00:00 2001 From: Lee Lawlor Date: Fri, 1 Aug 2014 15:57:02 -0400 Subject: [PATCH] turbolinks fixes --- app/assets/javascripts/channels.js | 14 ++--- app/views/apps/index.html.erb | 4 +- app/views/channels/_edit.html.erb | 2 +- app/views/channels/_private_show.html.erb | 9 +-- app/views/channels/social_new.html.erb | 31 +++++----- app/views/channels/social_show.html.erb | 57 +++++++++--------- app/views/maps/channel_show.html.erb | 11 ++-- app/views/maps/show.html.erb | 21 ++++--- app/views/plugins/edit.html.erb | 2 +- app/views/status/_recent.html.erb | 17 +++--- app/views/windows/_hidden_windows.html.erb | 3 +- public/assets/active_admin.css | 2 +- public/assets/active_admin.css.gz | Bin 8687 -> 8652 bytes ...cation-acf65447ac760ab7c9d4797a529315a8.js | 2 + ...ion-acf65447ac760ab7c9d4797a529315a8.js.gz | Bin 0 -> 21971 bytes public/assets/application.js | 2 +- public/assets/application.js.gz | Bin 21972 -> 21971 bytes ...fest-27c2ec8d97bd8487cae01bba17cdddb9.json | 2 +- 18 files changed, 91 insertions(+), 88 deletions(-) create mode 100644 public/assets/application-acf65447ac760ab7c9d4797a529315a8.js create mode 100644 public/assets/application-acf65447ac760ab7c9d4797a529315a8.js.gz diff --git a/app/assets/javascripts/channels.js b/app/assets/javascripts/channels.js index 1a63fd6..1167a95 100644 --- a/app/assets/javascripts/channels.js +++ b/app/assets/javascripts/channels.js @@ -1,11 +1,7 @@ -$(function () { - $("div.progressbar").each ( - function () { - var element = this; - $(element).progressbar( - { - value: parseInt($(element).attr("rel")) - }); - }); +$(document).on('page:load ready', function() { + $("div.progressbar").each(function() { + var element = this; + $(element).progressbar({ value: parseInt($(element).attr("rel")) }); + }); }); diff --git a/app/views/apps/index.html.erb b/app/views/apps/index.html.erb index f3a287a..27d0bdb 100644 --- a/app/views/apps/index.html.erb +++ b/app/views/apps/index.html.erb @@ -111,8 +111,8 @@ diff --git a/app/views/channels/_edit.html.erb b/app/views/channels/_edit.html.erb index 6c7a509..a79f946 100644 --- a/app/views/channels/_edit.html.erb +++ b/app/views/channels/_edit.html.erb @@ -141,7 +141,7 @@ // remember default field label var default_label = '<%= t(:channel_default_field) %>'; // when document is ready - $(function() { + $(document).on('page:load ready', function() { // iterate through each field textbox $('.field').each(function() { // if a value is present, show the 'remove' checkbox diff --git a/app/views/channels/_private_show.html.erb b/app/views/channels/_private_show.html.erb index 148b4f6..e4cc172 100644 --- a/app/views/channels/_private_show.html.erb +++ b/app/views/channels/_private_show.html.erb @@ -12,15 +12,15 @@
+ diff --git a/app/views/channels/social_new.html.erb b/app/views/channels/social_new.html.erb index 1ff78c4..96863c4 100644 --- a/app/views/channels/social_new.html.erb +++ b/app/views/channels/social_new.html.erb @@ -3,7 +3,7 @@ <%= link_to t(:channels), channels_path %> » <%= t(:social_channel_new) %> - + <%= form_for @channel, :url => { :action => 'social_create' } do |c| %> <%= error_messages_for 'channel', :header_message => t(:try_again), :message => t(:channel_error) %> @@ -18,49 +18,49 @@ <%= t(:channel_directions) %> - <%= c.text_area :description, :cols => 30, :rows => 4 %> + <%= c.text_area :description, :cols => 30, :rows => 4 %> <%= fields_for :tags do |t| %> <%= t(:tags) %> - <%= t.text_area :name, :cols => 30, :rows => 2, :value => @channel.list_tags %> + <%= t.text_area :name, :cols => 30, :rows => 2, :value => @channel.list_tags %> <% end %> <%= t(:field) %> 1 - <%= c.text_field :field1 %> + <%= c.text_field :field1 %> <%= t(:field) %> 2 - <%= c.text_field :field2 %> + <%= c.text_field :field2 %> <%= t(:field) %> 3 - <%= c.text_field :field3 %> + <%= c.text_field :field3 %> <%= t(:field) %> 4 - <%= c.text_field :field4 %> + <%= c.text_field :field4 %> <%= t(:field) %> 5 - <%= c.text_field :field5 %> + <%= c.text_field :field5 %> <%= t(:field) %> 6 - <%= c.text_field :field6 %> + <%= c.text_field :field6 %> <%= t(:field) %> 7 - <%= c.text_field :field7 %> + <%= c.text_field :field7 %> <%= t(:field) %> 8 - <%= c.text_field :field8 %> + <%= c.text_field :field8 %> <%= t(:message_field) %> - <%= c.text_field :status %> + <%= c.text_field :status %> @@ -68,7 +68,7 @@ <% end %> - +