diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-07-22 13:29:26 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-07-22 13:29:26 +0000 |
commit | 6a2ca5e0342751b6d38a1a05ad25b5c0002d6e46 (patch) | |
tree | af09ea2d29ce61690b656be91fbf82a3009ea1ed /app/views/groups | |
parent | 387836f8aa736eba4dfe0da879ad71bbc19dd224 (diff) | |
download | redmine-6a2ca5e0342751b6d38a1a05ad25b5c0002d6e46.tar.gz redmine-6a2ca5e0342751b6d38a1a05ad25b5c0002d6e46.zip |
JQuery in, Prototype/Scriptaculous out (#11445).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10068 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/groups')
-rw-r--r-- | app/views/groups/_memberships.html.erb | 4 | ||||
-rw-r--r-- | app/views/groups/_users.html.erb | 10 | ||||
-rw-r--r-- | app/views/groups/add_users.js.erb | 4 | ||||
-rw-r--r-- | app/views/groups/destroy_membership.js.erb | 2 | ||||
-rw-r--r-- | app/views/groups/edit_membership.js.erb | 4 | ||||
-rw-r--r-- | app/views/groups/remove_user.js.erb | 2 |
6 files changed, 9 insertions, 17 deletions
diff --git a/app/views/groups/_memberships.html.erb b/app/views/groups/_memberships.html.erb index 1b72f0d81..295f7fc3d 100644 --- a/app/views/groups/_memberships.html.erb +++ b/app/views/groups/_memberships.html.erb @@ -25,14 +25,14 @@ <p><%= submit_tag l(:button_change) %> <%= link_to_function( l(:button_cancel), - "$('member-#{membership.id}-roles').show(); $('member-#{membership.id}-roles-form').hide(); return false;" + "$('#member-#{membership.id}-roles').show(); $('#member-#{membership.id}-roles-form').hide(); return false;" ) %></p> <% end %> </td> <td class="buttons"> <%= link_to_function( l(:button_edit), - "$('member-#{membership.id}-roles').hide(); $('member-#{membership.id}-roles-form').show(); return false;", + "$('#member-#{membership.id}-roles').hide(); $('#member-#{membership.id}-roles-form').show(); return false;", :class => 'icon icon-edit' ) %> <%= delete_link({:controller => 'groups', :action => 'destroy_membership', :id => @group, :membership_id => membership}, diff --git a/app/views/groups/_users.html.erb b/app/views/groups/_users.html.erb index 58d328814..8bd76e90e 100644 --- a/app/views/groups/_users.html.erb +++ b/app/views/groups/_users.html.erb @@ -29,15 +29,7 @@ <fieldset><legend><%=l(:label_user_new)%></legend> <p><%= label_tag "user_search", l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p> - <%= observe_field(:user_search, - :frequency => 0.5, - :update => :users, - :url => autocomplete_for_user_group_path(@group), - :method => :get, - :before => '$("user_search").addClassName("ajax-loading")', - :complete => '$("user_search").removeClassName("ajax-loading")', - :with => 'q') - %> + <%= javascript_tag "observeSearchfield('user_search', 'users', '#{ escape_javascript autocomplete_for_user_group_path(@group) }')" %> <div id="users"> <%= principals_check_box_tags 'user_ids[]', users %> diff --git a/app/views/groups/add_users.js.erb b/app/views/groups/add_users.js.erb index 35d432760..460527b6c 100644 --- a/app/views/groups/add_users.js.erb +++ b/app/views/groups/add_users.js.erb @@ -1,4 +1,4 @@ -Element.update('tab-content-users', '<%= escape_javascript(render :partial => 'groups/users') %>'); +$('#tab-content-users').html('<%= escape_javascript(render :partial => 'groups/users') %>'); <% @users.each do |user| %> - new Effect.Highlight('user-<%= user.id %>'); + $('#user-<%= user.id %>').effect("highlight"); <% end %> diff --git a/app/views/groups/destroy_membership.js.erb b/app/views/groups/destroy_membership.js.erb index 3e03eb817..30ab3b081 100644 --- a/app/views/groups/destroy_membership.js.erb +++ b/app/views/groups/destroy_membership.js.erb @@ -1 +1 @@ -Element.update('tab-content-memberships', '<%= escape_javascript(render :partial => 'groups/memberships') %>'); +$('#tab-content-memberships').html('<%= escape_javascript(render :partial => 'groups/memberships') %>'); diff --git a/app/views/groups/edit_membership.js.erb b/app/views/groups/edit_membership.js.erb index b693a7f90..6df0fbba9 100644 --- a/app/views/groups/edit_membership.js.erb +++ b/app/views/groups/edit_membership.js.erb @@ -1,6 +1,6 @@ <% if @membership.valid? %> - Element.update('tab-content-memberships', '<%= escape_javascript(render :partial => 'groups/memberships') %>'); - new Effect.Highlight('member-<%= @membership.id %>'); + $('#tab-content-memberships').html('<%= escape_javascript(render :partial => 'groups/memberships') %>'); + $('#member-<%= @membership.id %>').effect("highlight"); <% else %> alert('<%= escape_javascript(l(:notice_failed_to_save_members, :errors => @membership.errors.full_messages.join(', '))) %>'); <% end %> diff --git a/app/views/groups/remove_user.js.erb b/app/views/groups/remove_user.js.erb index b383830b2..88daa8f58 100644 --- a/app/views/groups/remove_user.js.erb +++ b/app/views/groups/remove_user.js.erb @@ -1 +1 @@ -Element.update('tab-content-users', '<%= escape_javascript(render :partial => 'groups/users') %>'); +$('#tab-content-users').html('<%= escape_javascript(render :partial => 'groups/users') %>'); |