diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-10-02 15:51:15 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-10-14 10:28:59 +0200 |
commit | 15b2160babc5c35ede960b7d0e133acbec8c6c51 (patch) | |
tree | 6475ad0602bbe4d6dae895aae43d331726ab8c33 /server/sonar-web/src/main/js/apps/groups | |
parent | e51e9c9eb0145ea5e9d40453554c456585b79936 (diff) | |
download | sonarqube-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/groups')
10 files changed, 27 insertions, 27 deletions
diff --git a/server/sonar-web/src/main/js/apps/groups/app.js b/server/sonar-web/src/main/js/apps/groups/app.js index 8965f3ecea7..6f9bfd0c44f 100644 --- a/server/sonar-web/src/main/js/apps/groups/app.js +++ b/server/sonar-web/src/main/js/apps/groups/app.js @@ -5,9 +5,12 @@ import HeaderView from './header-view'; import SearchView from './search-view'; import ListView from './list-view'; import ListFooterView from './list-footer-view'; +import '../../helpers/handlebars-helpers'; var App = new Marionette.Application(), - init = function (options) { + init = function () { + let options = window.sonarqube; + // Layout this.layout = new Layout({ el: options.el }); this.layout.render(); @@ -35,12 +38,10 @@ var App = new Marionette.Application(), this.groups.fetch(); }; -App.on('start', function (options) { - window.requestMessages().done(function () { - init.call(App, options); - }); +App.on('start', function () { + init.call(App); }); -export default App; +window.sonarqube.appStarted.then(options => App.start(options)); diff --git a/server/sonar-web/src/main/js/apps/groups/delete-view.js b/server/sonar-web/src/main/js/apps/groups/delete-view.js index 272a0a85bbc..6192a4dd153 100644 --- a/server/sonar-web/src/main/js/apps/groups/delete-view.js +++ b/server/sonar-web/src/main/js/apps/groups/delete-view.js @@ -1,8 +1,8 @@ -import ModalForm from 'components/common/modal-form'; -import './templates'; +import ModalForm from '../../components/common/modal-form'; +import Template from './templates/groups-delete.hbs'; export default ModalForm.extend({ - template: Templates['groups-delete'], + template: Template, onFormSubmit: function (e) { this._super(e); diff --git a/server/sonar-web/src/main/js/apps/groups/form-view.js b/server/sonar-web/src/main/js/apps/groups/form-view.js index 5b541f1ae12..abd64842d3c 100644 --- a/server/sonar-web/src/main/js/apps/groups/form-view.js +++ b/server/sonar-web/src/main/js/apps/groups/form-view.js @@ -1,8 +1,8 @@ -import ModalForm from 'components/common/modal-form'; -import './templates'; +import ModalForm from '../../components/common/modal-form'; +import Template from './templates/groups-form.hbs'; export default ModalForm.extend({ - template: Templates['groups-form'], + template: Template, onRender: function () { this._super(); diff --git a/server/sonar-web/src/main/js/apps/groups/header-view.js b/server/sonar-web/src/main/js/apps/groups/header-view.js index bd7226176b2..e4a118f2822 100644 --- a/server/sonar-web/src/main/js/apps/groups/header-view.js +++ b/server/sonar-web/src/main/js/apps/groups/header-view.js @@ -1,9 +1,9 @@ import Marionette from 'backbone.marionette'; import CreateView from './create-view'; -import './templates'; +import Template from './templates/groups-header.hbs'; export default Marionette.ItemView.extend({ - template: Templates['groups-header'], + template: Template, events: { 'click #groups-create': 'onCreateClick' diff --git a/server/sonar-web/src/main/js/apps/groups/layout.js b/server/sonar-web/src/main/js/apps/groups/layout.js index ba1f58e81fc..52e9e96901d 100644 --- a/server/sonar-web/src/main/js/apps/groups/layout.js +++ b/server/sonar-web/src/main/js/apps/groups/layout.js @@ -1,8 +1,8 @@ import Marionette from 'backbone.marionette'; -import './templates'; +import Template from './templates/groups-layout.hbs'; export default Marionette.LayoutView.extend({ - template: Templates['groups-layout'], + template: Template, regions: { headerRegion: '#groups-header', diff --git a/server/sonar-web/src/main/js/apps/groups/list-footer-view.js b/server/sonar-web/src/main/js/apps/groups/list-footer-view.js index 53dc3e7acaa..74953a7a601 100644 --- a/server/sonar-web/src/main/js/apps/groups/list-footer-view.js +++ b/server/sonar-web/src/main/js/apps/groups/list-footer-view.js @@ -1,9 +1,9 @@ import _ from 'underscore'; import Marionette from 'backbone.marionette'; -import './templates'; +import Template from './templates/groups-list-footer.hbs'; export default Marionette.ItemView.extend({ - template: Templates['groups-list-footer'], + template: Template, collectionEvents: { 'all': 'render' diff --git a/server/sonar-web/src/main/js/apps/groups/list-item-view.js b/server/sonar-web/src/main/js/apps/groups/list-item-view.js index 43278c2ac6e..968218d1c4c 100644 --- a/server/sonar-web/src/main/js/apps/groups/list-item-view.js +++ b/server/sonar-web/src/main/js/apps/groups/list-item-view.js @@ -3,12 +3,12 @@ import Marionette from 'backbone.marionette'; import UpdateView from './update-view'; import DeleteView from './delete-view'; import UsersView from './users-view'; -import './templates'; +import Template from './templates/groups-list-item.hbs'; export default Marionette.ItemView.extend({ tagName: 'li', className: 'panel panel-vertical', - template: Templates['groups-list-item'], + template: Template, events: { 'click .js-group-update': 'onUpdateClick', diff --git a/server/sonar-web/src/main/js/apps/groups/list-view.js b/server/sonar-web/src/main/js/apps/groups/list-view.js index 695bf2ac034..699e9c76a85 100644 --- a/server/sonar-web/src/main/js/apps/groups/list-view.js +++ b/server/sonar-web/src/main/js/apps/groups/list-view.js @@ -1,6 +1,5 @@ import Marionette from 'backbone.marionette'; import ListItemView from './list-item-view'; -import './templates'; export default Marionette.CollectionView.extend({ tagName: 'ul', diff --git a/server/sonar-web/src/main/js/apps/groups/search-view.js b/server/sonar-web/src/main/js/apps/groups/search-view.js index db3d4d8bb18..442c5533904 100644 --- a/server/sonar-web/src/main/js/apps/groups/search-view.js +++ b/server/sonar-web/src/main/js/apps/groups/search-view.js @@ -1,9 +1,9 @@ import _ from 'underscore'; import Marionette from 'backbone.marionette'; -import './templates'; +import Template from './templates/groups-search.hbs'; export default Marionette.ItemView.extend({ - template: Templates['groups-search'], + template: Template, events: { 'submit #groups-search-form': 'onFormSubmit', diff --git a/server/sonar-web/src/main/js/apps/groups/users-view.js b/server/sonar-web/src/main/js/apps/groups/users-view.js index fa8e632ef07..4c6643a8cc8 100644 --- a/server/sonar-web/src/main/js/apps/groups/users-view.js +++ b/server/sonar-web/src/main/js/apps/groups/users-view.js @@ -1,9 +1,9 @@ -import Modal from 'components/common/modals'; -import 'components/common/select-list'; -import './templates'; +import Modal from '../../components/common/modals'; +import '../../components/common/select-list'; +import Template from './templates/groups-users.hbs'; export default Modal.extend({ - template: Templates['groups-users'], + template: Template, onRender: function () { this._super(); |