aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/update-center/header-view.js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-09-17 16:15:28 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-09-18 10:47:27 +0200
commit890ab0b59cdb3902f4869eabf8ca534814f1b3dd (patch)
tree0ed74726957e590f6506e378366ea15bf21bfcbd /server/sonar-web/src/main/js/apps/update-center/header-view.js
parentce60ac8d2e137f33bb111668e54e78c195c73d79 (diff)
downloadsonarqube-890ab0b59cdb3902f4869eabf8ca534814f1b3dd.tar.gz
sonarqube-890ab0b59cdb3902f4869eabf8ca534814f1b3dd.zip
migrate js apps to es2015 modules
Diffstat (limited to 'server/sonar-web/src/main/js/apps/update-center/header-view.js')
-rw-r--r--server/sonar-web/src/main/js/apps/update-center/header-view.js44
1 files changed, 22 insertions, 22 deletions
diff --git a/server/sonar-web/src/main/js/apps/update-center/header-view.js b/server/sonar-web/src/main/js/apps/update-center/header-view.js
index 99e1095ad7f..1a78ad8533b 100644
--- a/server/sonar-web/src/main/js/apps/update-center/header-view.js
+++ b/server/sonar-web/src/main/js/apps/update-center/header-view.js
@@ -1,28 +1,28 @@
-define([
- './templates'
-], function () {
+import _ from 'underscore';
+import Marionette from 'backbone.marionette';
+import './templates';
- return Marionette.ItemView.extend({
- template: Templates['update-center-header'],
+export default Marionette.ItemView.extend({
+ template: Templates['update-center-header'],
- collectionEvents: {
- all: 'render'
- },
+ collectionEvents: {
+ all: 'render'
+ },
- events: {
- 'click .js-cancel-all': 'cancelAll'
- },
+ events: {
+ 'click .js-cancel-all': 'cancelAll'
+ },
- cancelAll: function () {
- this.collection.cancelAll();
- },
-
- serializeData: function () {
- return _.extend(this._super(), {
- installing: this.collection._installedCount,
- uninstalling: this.collection._uninstalledCount
- });
- }
- });
+ cancelAll: function () {
+ this.collection.cancelAll();
+ },
+ serializeData: function () {
+ return _.extend(this._super(), {
+ installing: this.collection._installedCount,
+ uninstalling: this.collection._uninstalledCount
+ });
+ }
});
+
+