aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/account
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-10-02 15:51:15 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-10-14 10:28:59 +0200
commit15b2160babc5c35ede960b7d0e133acbec8c6c51 (patch)
tree6475ad0602bbe4d6dae895aae43d331726ab8c33 /server/sonar-web/src/main/js/apps/account
parente51e9c9eb0145ea5e9d40453554c456585b79936 (diff)
downloadsonarqube-15b2160babc5c35ede960b7d0e133acbec8c6c51.tar.gz
sonarqube-15b2160babc5c35ede960b7d0e133acbec8c6c51.zip
improve the web build system, introduce gulp and browserify
Diffstat (limited to 'server/sonar-web/src/main/js/apps/account')
-rw-r--r--server/sonar-web/src/main/js/apps/account/app.js9
-rw-r--r--server/sonar-web/src/main/js/apps/account/change-password-view.js4
2 files changed, 8 insertions, 5 deletions
diff --git a/server/sonar-web/src/main/js/apps/account/app.js b/server/sonar-web/src/main/js/apps/account/app.js
index 0f441abacca..f552632c5f8 100644
--- a/server/sonar-web/src/main/js/apps/account/app.js
+++ b/server/sonar-web/src/main/js/apps/account/app.js
@@ -1,5 +1,6 @@
import $ from 'jquery';
import ChangePasswordView from './change-password-view';
+import '../../helpers/handlebars-helpers';
var shouldShowAvatars = window.SS && window.SS.lf && window.SS.lf.enableGravatar;
var favorites = $('.js-account-favorites tr');
@@ -8,8 +9,8 @@ function showExtraFavorites () {
favorites.removeClass('hidden');
}
-export default {
- start: function () {
+class App {
+ start () {
$('html').addClass('dashboard-page');
if (shouldShowAvatars) {
@@ -28,4 +29,6 @@ export default {
new ChangePasswordView().render();
});
}
-};
+}
+
+window.sonarqube.appStarted.then(options => new App().start(options));
diff --git a/server/sonar-web/src/main/js/apps/account/change-password-view.js b/server/sonar-web/src/main/js/apps/account/change-password-view.js
index e8f825f57b4..6bd5d992b21 100644
--- a/server/sonar-web/src/main/js/apps/account/change-password-view.js
+++ b/server/sonar-web/src/main/js/apps/account/change-password-view.js
@@ -1,9 +1,9 @@
import $ from 'jquery';
import ModalForm from '../../components/common/modal-form';
-import './templates';
+import Template from './templates/account-change-password.hbs';
export default ModalForm.extend({
- template: Templates['account-change-password'],
+ template: Template,
onFormSubmit: function (e) {
this._super(e);