diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-09-17 16:15:28 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-09-18 10:47:27 +0200 |
commit | 890ab0b59cdb3902f4869eabf8ca534814f1b3dd (patch) | |
tree | 0ed74726957e590f6506e378366ea15bf21bfcbd /server/sonar-web/src/main/js/apps/quality-profiles/router.js | |
parent | ce60ac8d2e137f33bb111668e54e78c195c73d79 (diff) | |
download | sonarqube-890ab0b59cdb3902f4869eabf8ca534814f1b3dd.tar.gz sonarqube-890ab0b59cdb3902f4869eabf8ca534814f1b3dd.zip |
migrate js apps to es2015 modules
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-profiles/router.js')
-rw-r--r-- | server/sonar-web/src/main/js/apps/quality-profiles/router.js | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/router.js b/server/sonar-web/src/main/js/apps/quality-profiles/router.js index 1854fe66b22..c672f5b3418 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/router.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/router.js @@ -1,37 +1,37 @@ -define(function () { - - return Backbone.Router.extend({ - routes: { - '': 'index', - 'index': 'index', - 'show?key=:key': 'show', - 'changelog*': 'changelog', - 'compare*': 'compare' - }, - - initialize: function (options) { - this.app = options.app; - }, - - index: function () { - this.app.controller.index(); - }, - - show: function (key) { - this.app.controller.show(key); - }, - - changelog: function () { - var params = window.getQueryParams(); - this.app.controller.changelog(params.key, params.since, params.to); - }, - - compare: function () { - var params = window.getQueryParams(); - if (params.key && params.withKey) { - this.app.controller.compare(params.key, params.withKey); - } - } - }); +import Backbone from 'backbone'; + +export default Backbone.Router.extend({ + routes: { + '': 'index', + 'index': 'index', + 'show?key=:key': 'show', + 'changelog*': 'changelog', + 'compare*': 'compare' + }, + + initialize: function (options) { + this.app = options.app; + }, + + index: function () { + this.app.controller.index(); + }, + + show: function (key) { + this.app.controller.show(key); + }, + changelog: function () { + var params = window.getQueryParams(); + this.app.controller.changelog(params.key, params.since, params.to); + }, + + compare: function () { + var params = window.getQueryParams(); + if (params.key && params.withKey) { + this.app.controller.compare(params.key, params.withKey); + } + } }); + + |