]> source.dussan.org Git - redmine.git/commitdiff
Restyles user search fields and ajax indicator.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 14 Feb 2012 15:34:27 +0000 (15:34 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 14 Feb 2012 15:34:27 +0000 (15:34 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8874 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/groups/_users.html.erb
app/views/projects/settings/_members.html.erb
app/views/watchers/_new.html.erb
public/javascripts/application.js
public/stylesheets/application.css

index 3d4820f59164c068f6b304d328b76f3972dbf25b..d265c751f892b6c929a72e9bfe5eb448e457408c 100644 (file)
@@ -38,6 +38,8 @@
                  :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')
                   %>
 
index 5cd3afd3238cbc7812fcf27def7af43b1c233354..2710fa82a8d1663b4476fc5aaab439c83b7a6bc6 100644 (file)
@@ -70,6 +70,8 @@
                  :update => :principals,
                  :url => autocomplete_project_memberships_path(@project),
                  :method => :get,
+                 :before => '$("principal_search").addClassName("ajax-loading")',
+                 :complete => '$("principal_search").removeClassName("ajax-loading")',
                  :with => 'q')
                   %>
 
index 56a122a51a86786b602e864e92db7000419f2287..9b4227ad72cc051f3c4bbfa3b041d563f7b15556 100644 (file)
@@ -12,6 +12,8 @@
                :frequency => 0.5,
                :update => :users_for_watcher,
                :method => :get,
+               :before => '$("user_search").addClassName("ajax-loading")',
+               :complete => '$("user_search").removeClassName("ajax-loading")',
                :url => {
                  :controller => 'watchers',
                  :action => 'autocomplete_for_user',
index fdafc9899905b48e21f03cc394a87f5de068b84f..483bc1a68ce1470e1e844665986210472d6c8392 100644 (file)
@@ -503,7 +503,7 @@ Ajax.Responders.register({
             request.options.requestHeaders[header] = token;
           }
 
-        if ($('ajax-indicator') && Ajax.activeRequestCount > 0) {
+        if ($('ajax-indicator') && Ajax.activeRequestCount > 0 && $$('input.ajax-loading').size() == 0) {
             Element.show('ajax-indicator');
         }
     },
index 2048ab7c4a6586e07f95819bb9d40017c63deef2..65cdb5159a4fe0f5a8c01589898a3ca669201727 100644 (file)
@@ -517,6 +517,13 @@ div#tab-content-members fieldset div, div#tab-content-users fieldset div { max-h
 table.members td.group { padding-left: 20px; background: url(../images/group.png) no-repeat 0% 50%; }
 
 input#principal_search, input#user_search {width:100%}
+input#principal_search, input#user_search {
+  background: url(../images/magnifier.png) no-repeat 2px 50%; padding-left:20px;
+  border:1px solid #9EB1C2; border-radius:3px; height:1.5em; width:95%;
+}
+input#principal_search.ajax-loading, input#user_search.ajax-loading {
+ background-image: url(../images/loading.gif);
+}
 
 * html div#tab-content-members fieldset div { height: 450px; }