]> source.dussan.org Git - redmine.git/commitdiff
Hide the role forms when editing or adding Project members. #5452
authorEric Davis <edavis@littlestreamsoftware.com>
Sat, 19 Jun 2010 19:51:43 +0000 (19:51 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Sat, 19 Jun 2010 19:51:43 +0000 (19:51 +0000)
Contributed by Yuki Kita

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3784 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/members_controller.rb
public/javascripts/application.js

index a84cf50db9cdefd5a8cd6c4d55d2460f0603b5d8..795709a483a2489baf420f47690ee38560ecbf05 100644 (file)
@@ -43,6 +43,7 @@ class MembersController < ApplicationController
         format.js { 
           render(:update) {|page| 
             page.replace_html "tab-content-members", :partial => 'projects/settings/members'
+            page << 'hideOnLoad()'
             members.each {|member| page.visual_effect(:highlight, "member-#{member.id}") }
           }
         }
@@ -69,6 +70,7 @@ class MembersController < ApplicationController
         format.js { 
           render(:update) {|page| 
             page.replace_html "tab-content-members", :partial => 'projects/settings/members'
+            page << 'hideOnLoad()'
             page.visual_effect(:highlight, "member-#{@member.id}")
           }
         }
@@ -82,7 +84,11 @@ class MembersController < ApplicationController
     end
     respond_to do |format|
       format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project }
-      format.js { render(:update) {|page| page.replace_html "tab-content-members", :partial => 'projects/settings/members'} }
+      format.js { render(:update) {|page|
+          page.replace_html "tab-content-members", :partial => 'projects/settings/members'
+          page << 'hideOnLoad()'
+        }
+      }
     end
   end
   
index 745125047df861f507de9d4931b4e741e43efc45..612739f5c6fbc031ef8fc7dc0dc7fc7e2e214bdc 100644 (file)
@@ -226,8 +226,10 @@ Ajax.Responders.register({
     }
 });
 
-Event.observe(window, 'load', function() {
+function hideOnLoad() {
   $$('.hol').each(function(el) {
        el.hide();
        });
-});
+}
+
+Event.observe(window, 'load', hideOnLoad);