From b8a80269e55fee3e0590c925a5c37f8d18c5c932 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Tue, 29 Sep 2015 15:22:40 +0200 Subject: migrate js components to es2015 modules --- .../main/js/components/issue/views/issue-popup.js | 48 +++++++++++----------- 1 file changed, 23 insertions(+), 25 deletions(-) (limited to 'server/sonar-web/src/main/js/components/issue/views/issue-popup.js') diff --git a/server/sonar-web/src/main/js/components/issue/views/issue-popup.js b/server/sonar-web/src/main/js/components/issue/views/issue-popup.js index 9c36ad104b5..e8160c8ef66 100644 --- a/server/sonar-web/src/main/js/components/issue/views/issue-popup.js +++ b/server/sonar-web/src/main/js/components/issue/views/issue-popup.js @@ -1,33 +1,31 @@ -define([ - 'components/common/popup' -], function (PopupView) { +import PopupView from 'components/common/popup'; - return PopupView.extend({ - className: 'bubble-popup issue-bubble-popup', +export default PopupView.extend({ + className: 'bubble-popup issue-bubble-popup', - template: function () { - return '
'; - }, + template: function () { + return '
'; + }, - events: function () { - return { - 'click .js-issue-form-cancel': 'destroy' - }; - }, + events: function () { + return { + 'click .js-issue-form-cancel': 'destroy' + }; + }, - onRender: function () { - PopupView.prototype.onRender.apply(this, arguments); - this.options.view.$el.appendTo(this.$el); - this.options.view.render(); - }, + onRender: function () { + PopupView.prototype.onRender.apply(this, arguments); + this.options.view.$el.appendTo(this.$el); + this.options.view.render(); + }, - onDestroy: function () { - this.options.view.destroy(); - }, + onDestroy: function () { + this.options.view.destroy(); + }, - attachCloseEvents: function () { - - } - }); + attachCloseEvents: function () { + } }); + + -- cgit v1.2.3