]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2443 Remove indicator from suggest field to prevent "shaking"
authorFabrice Bellingard <bellingard@gmail.com>
Thu, 26 May 2011 12:46:11 +0000 (14:46 +0200)
committerFabrice Bellingard <bellingard@gmail.com>
Thu, 26 May 2011 12:46:11 +0000 (14:46 +0200)
FI: the display of the indicator is handle by the scriptaculous
component, which uses the "display" property instead of the
"visibility" one to hide/show the indicator. This is what causes
the "shaking" of elements placed on the right side of the component
while waiting for the answer from the server.

sonar-server/src/main/webapp/WEB-INF/app/views/autocomplete/_text_field.html.erb

index 5f37632ba08e14598368d0dd041e5f322b05fdb6..8675ee22515510ed6cbf5cba523186f43cfffdc4 100644 (file)
@@ -1,14 +1,10 @@
   <input type="text" id="autocompleteText-<%= param_id_name -%>" value="<%= param_displayed_value -%>" onfocus="$('<%= param_id_name -%>').value=''; this.value=''"/>
   <input type="hidden" id="<%= param_id_name -%>" name="<%= param_id_name -%>" value="<%= param_id_value -%>"/>
-  <span id="load-<%= param_id_name -%>" style="display: none">
-    <%= image_tag("loading.gif") -%>
-  </span>
   <div id="autocomplete-<%= param_id_name -%>" class="autocomplete"></div>
   <script>
     new Ajax.Autocompleter("autocompleteText-<%= param_id_name -%>", "autocomplete-<%= param_id_name -%>", "<%= server_url -%>", {
       paramName: "user_name_start", 
-      minChars: 2, 
-      indicator: 'load-<%= param_id_name -%>',
+      minChars: 2,
       afterUpdateElement : getSelection<%= param_id_name -%>
     });
     function getSelection<%= param_id_name -%>(text, li) {