diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/users/users.js')
-rw-r--r-- | server/sonar-web/src/main/js/apps/users/users.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/server/sonar-web/src/main/js/apps/users/users.js b/server/sonar-web/src/main/js/apps/users/users.js index e9140fc39bb..8759d700c5a 100644 --- a/server/sonar-web/src/main/js/apps/users/users.js +++ b/server/sonar-web/src/main/js/apps/users/users.js @@ -23,33 +23,33 @@ import User from './user'; export default Backbone.Collection.extend({ model: User, - url: function () { + url () { return '/api/users/search'; }, - parse: function (r) { + parse (r) { this.total = +r.total; this.p = +r.p; this.ps = +r.ps; return r.users; }, - fetch: function (options) { - var d = (options && options.data) || {}; + fetch (options) { + const d = (options && options.data) || {}; this.q = d.q; return Backbone.Collection.prototype.fetch.call(this, options); }, - fetchMore: function () { - var p = this.p + 1; - return this.fetch({ add: true, remove: false, data: { p: p, ps: this.ps, q: this.q } }); + fetchMore () { + const p = this.p + 1; + return this.fetch({ add: true, remove: false, data: { p, ps: this.ps, q: this.q } }); }, - refresh: function () { + refresh () { return this.fetch({ reset: true, data: { q: this.q } }); }, - hasMore: function () { + hasMore () { return this.total > this.p * this.ps; } |