diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2014-04-14 18:26:15 +0600 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2014-04-14 18:26:41 +0600 |
commit | c0d5d5a2c119e79c153798af9881830278bc0374 (patch) | |
tree | 2ba4042b01002f6b83d1cd2befc4534d95692d94 | |
parent | 0aea85c8dc437d31e330ef4f44a4ff60ad67ccd0 (diff) | |
download | sonarqube-c0d5d5a2c119e79c153798af9881830278bc0374.tar.gz sonarqube-c0d5d5a2c119e79c153798af9881830278bc0374.zip |
Remove the autofocus from search field
-rw-r--r-- | sonar-server/src/main/coffee/quality-gate/views/quality-gate-detail-projects-view.coffee | 1 | ||||
-rw-r--r-- | sonar-server/src/main/js/common/select-list.js | 9 |
2 files changed, 7 insertions, 3 deletions
diff --git a/sonar-server/src/main/coffee/quality-gate/views/quality-gate-detail-projects-view.coffee b/sonar-server/src/main/coffee/quality-gate/views/quality-gate-detail-projects-view.coffee index afa85c6bad7..90b3abb9773 100644 --- a/sonar-server/src/main/coffee/quality-gate/views/quality-gate-detail-projects-view.coffee +++ b/sonar-server/src/main/coffee/quality-gate/views/quality-gate-detail-projects-view.coffee @@ -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" diff --git a/sonar-server/src/main/js/common/select-list.js b/sonar-server/src/main/js/common/select-list.js index 8d91dc39dca..36dd95cbab1 100644 --- a/sonar-server/src/main/js/common/select-list.js +++ b/sonar-server/src/main/js/common/select-list.js @@ -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; |