]> source.dussan.org Git - sonarqube.git/commitdiff
Remove the autofocus from search field
authorStas Vilchik <vilchiks@gmail.com>
Mon, 14 Apr 2014 12:26:15 +0000 (18:26 +0600)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 14 Apr 2014 12:26:41 +0000 (18:26 +0600)
sonar-server/src/main/coffee/quality-gate/views/quality-gate-detail-projects-view.coffee
sonar-server/src/main/js/common/select-list.js

index afa85c6bad7207ecc440bf02d23a409c18bc1e63..90b3abb97738500804936a90b66e08181a4a1c2d 100644 (file)
@@ -17,6 +17,7 @@ define [
           el: @$('#select-list-projects')
           width: '100%'
           readOnly: !@options.app.canEdit
+          focusSearch: false
           format: (item) -> item.name
           searchUrl: "#{baseUrl}/api/qualitygates/search?gateId=#{@options.gateId}"
           selectUrl: "#{baseUrl}/api/qualitygates/select"
index 8d91dc39dcaace8634ae93cd4828690b0db67928..36dd95cbab116efe67558b6ada0193ebdfd70fe7 100644 (file)
@@ -199,9 +199,11 @@ requirejs(['backbone'], function (Backbone) {
         var searchInput = this.$('.select-list-search-control input')
             .on('keyup', _.debounce(keyup, 250));
 
-        setTimeout(function () {
-          searchInput.focus();
-        }, 250);
+        if (this.settings.focusSearch) {
+          setTimeout(function () {
+            searchInput.focus();
+          }, 250);
+        }
 
         this.listItemViews = [];
 
@@ -403,6 +405,7 @@ requirejs(['backbone'], function (Backbone) {
       height: 400,
 
       readOnly: false,
+      focusSearch: true,
 
       format: function (item) {
         return item.value;