diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/groups/users-view.js')
-rw-r--r-- | server/sonar-web/src/main/js/apps/groups/users-view.js | 74 |
1 files changed, 36 insertions, 38 deletions
diff --git a/server/sonar-web/src/main/js/apps/groups/users-view.js b/server/sonar-web/src/main/js/apps/groups/users-view.js index de5901fc5f1..8c815ff2e4d 100644 --- a/server/sonar-web/src/main/js/apps/groups/users-view.js +++ b/server/sonar-web/src/main/js/apps/groups/users-view.js @@ -1,42 +1,40 @@ -define([ - 'components/common/modals', - 'components/common/select-list', - './templates' -], function (Modal) { +import Modal from 'components/common/modals'; +import 'components/common/select-list'; +import './templates'; - return Modal.extend({ - template: Templates['groups-users'], +export default Modal.extend({ + template: Templates['groups-users'], - onRender: function () { - this._super(); - new window.SelectList({ - el: this.$('#groups-users'), - width: '100%', - readOnly: false, - focusSearch: false, - format: function (item) { - return item.name + '<br><span class="note">' + item.login + '</span>'; - }, - queryParam: 'q', - searchUrl: baseUrl + '/api/usergroups/users?ps=100&id=' + this.model.id, - selectUrl: baseUrl + '/api/usergroups/add_user', - deselectUrl: baseUrl + '/api/usergroups/remove_user', - extra: { - id: this.model.id - }, - selectParameter: 'login', - selectParameterValue: 'login', - parse: function (r) { - this.more = false; - return r.users; - } - }); - }, - - onDestroy: function () { - this.model.collection.refresh(); - this._super(); - } - }); + onRender: function () { + this._super(); + new window.SelectList({ + el: this.$('#groups-users'), + width: '100%', + readOnly: false, + focusSearch: false, + format: function (item) { + return item.name + '<br><span class="note">' + item.login + '</span>'; + }, + queryParam: 'q', + searchUrl: baseUrl + '/api/usergroups/users?ps=100&id=' + this.model.id, + selectUrl: baseUrl + '/api/usergroups/add_user', + deselectUrl: baseUrl + '/api/usergroups/remove_user', + extra: { + id: this.model.id + }, + selectParameter: 'login', + selectParameterValue: 'login', + parse: function (r) { + this.more = false; + return r.users; + } + }); + }, + onDestroy: function () { + this.model.collection.refresh(); + this._super(); + } }); + + |