diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps')
78 files changed, 114 insertions, 106 deletions
diff --git a/server/sonar-web/src/main/js/apps/api-documentation/actions-view.js b/server/sonar-web/src/main/js/apps/api-documentation/actions-view.js index 099e1ea73d0..683485c101b 100644 --- a/server/sonar-web/src/main/js/apps/api-documentation/actions-view.js +++ b/server/sonar-web/src/main/js/apps/api-documentation/actions-view.js @@ -24,7 +24,7 @@ define([ var $ = jQuery; return Marionette.CollectionView.extend({ - itemView: ActionView, + childView: ActionView, scrollToTop: function () { var parent = this.$el.scrollParent(); diff --git a/server/sonar-web/src/main/js/apps/api-documentation/layout.js b/server/sonar-web/src/main/js/apps/api-documentation/layout.js index 64f17b220ed..ae4ce851798 100644 --- a/server/sonar-web/src/main/js/apps/api-documentation/layout.js +++ b/server/sonar-web/src/main/js/apps/api-documentation/layout.js @@ -23,7 +23,7 @@ define([ var $ = jQuery; - return Marionette.Layout.extend({ + return Marionette.LayoutView.extend({ template: Templates['api-documentation-layout'], regions: { diff --git a/server/sonar-web/src/main/js/apps/api-documentation/list-view.js b/server/sonar-web/src/main/js/apps/api-documentation/list-view.js index a833cf7b48b..b90ba7f725a 100644 --- a/server/sonar-web/src/main/js/apps/api-documentation/list-view.js +++ b/server/sonar-web/src/main/js/apps/api-documentation/list-view.js @@ -23,9 +23,9 @@ define([ return Marionette.CollectionView.extend({ className: 'list-group', - itemView: ItemView, + childView: ItemView, - itemViewOptions: function (model) { + childViewOptions: function (model) { return { collectionView: this, highlighted: model.get('path') === this.highlighted, diff --git a/server/sonar-web/src/main/js/apps/coding-rules/facets-view.js b/server/sonar-web/src/main/js/apps/coding-rules/facets-view.js index b9c2a7f4921..cf9e8d92bc5 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/facets-view.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/facets-view.js @@ -68,7 +68,7 @@ define([ return FacetsView.extend({ - getItemView: function (model) { + getChildView: function (model) { var view = viewsMapping[model.get('property')]; return view ? view : BaseFacet; } diff --git a/server/sonar-web/src/main/js/apps/coding-rules/layout.js b/server/sonar-web/src/main/js/apps/coding-rules/layout.js index 87ec56e9694..238db774707 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/layout.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/layout.js @@ -23,7 +23,7 @@ define([ var $ = jQuery; - return Marionette.Layout.extend({ + return Marionette.LayoutView.extend({ template: Templates['coding-rules-layout'], regions: { diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule-details-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule-details-view.js index 941cfc42912..05856342aa4 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/rule-details-view.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/rule-details-view.js @@ -41,7 +41,7 @@ define([ var $ = jQuery; - return Marionette.Layout.extend({ + return Marionette.LayoutView.extend({ className: 'coding-rule-details', template: Templates['coding-rules-rule-details'], @@ -99,7 +99,7 @@ define([ this.$el.scrollParent().scrollTop(0); }, - onClose: function () { + onDestroy: function () { this.unbindShortcuts(); }, diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-creation-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-creation-view.js index 5c3829854a6..e15a1149e69 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-creation-view.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-creation-view.js @@ -51,7 +51,7 @@ define([ 'keydown @ui.customRuleCreationKey': 'flagKey', 'keyup @ui.customRuleCreationKey': 'flagKey', - 'click #coding-rules-custom-rule-creation-cancel': 'close', + 'click #coding-rules-custom-rule-creation-cancel': 'destroy', 'click @ui.customRuleCreationCreate': 'create', 'click @ui.customRuleCreationReactivate': 'reactivate' }); @@ -168,7 +168,7 @@ define([ } else { that.options.app.controller.showDetails(that.model); } - that.close(); + that.destroy(); }).fail(function (jqXHR) { if (jqXHR.status === 409) { that.existingRule = jqXHR.responseJSON.rule; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-view.js index 98d9634516e..e50b7c11005 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-view.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-view.js @@ -45,7 +45,7 @@ define([ options = { key: that.model.id }; $.post(url, options).done(function () { that.model.collection.remove(that.model); - that.close(); + that.destroy(); }); } }); diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rules-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rules-view.js index 3785b8ed6b6..56ae2a95833 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rules-view.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rules-view.js @@ -25,10 +25,10 @@ define([ return Marionette.CompositeView.extend({ template: Templates['coding-rules-custom-rules'], - itemView: CustomRuleView, - itemViewContainer: '#coding-rules-detail-custom-rules', + childView: CustomRuleView, + childViewContainer: '#coding-rules-detail-custom-rules', - itemViewOptions: function () { + childViewOptions: function () { return { app: this.options.app, templateRule: this.model diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/manual-rule-creation-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/manual-rule-creation-view.js index 6417beb3c8a..66617fc33ed 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/rule/manual-rule-creation-view.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/manual-rule-creation-view.js @@ -115,7 +115,7 @@ define([ r = JSON.parse(r); } that.options.app.controller.showDetails(r.rule.key); - that.close(); + that.destroy(); }).fail(function (jqXHR) { if (jqXHR.status === 409) { that.existingRule = jqXHR.responseJSON.rule; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/profile-activation-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/profile-activation-view.js index e12c4730469..a310ce97674 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/rule/profile-activation-view.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/profile-activation-view.js @@ -111,7 +111,7 @@ define([ 400: null } }).done(function () { - that.close(); + that.destroy(); that.trigger('profileActivated', severity, params); }).fail(function (jqXHR) { that.enableForm(); diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-filter-mixin.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-filter-mixin.js index 839e1743af0..5bbe6a2d3cd 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-filter-mixin.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-filter-mixin.js @@ -38,7 +38,7 @@ define([ var obj = {}; obj[property] = '' + value; that.options.app.state.updateFilter(obj); - popup.close(); + popup.destroy(); }); popup.render(); } diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-meta-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-meta-view.js index 1a4cb4c3f7e..d8565818c52 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-meta-view.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-meta-view.js @@ -51,7 +51,7 @@ define([ }); }, - onClose: function () { + onDestroy: function () { this.$('[data-toggle="tooltip"]').tooltip('destroy'); }, diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profiles-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profiles-view.js index 7c3dc3df275..fc7662e5073 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profiles-view.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profiles-view.js @@ -25,10 +25,10 @@ define([ return Marionette.CompositeView.extend({ template: Templates['coding-rules-rule-profiles'], - itemView: ProfileView, - itemViewContainer: '#coding-rules-detail-quality-profiles', + childView: ProfileView, + childViewContainer: '#coding-rules-detail-quality-profiles', - itemViewOptions: function () { + childViewOptions: function () { return { app: this.options.app, rule: this.model diff --git a/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-view.js b/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-view.js index e5f1ac02eb2..e77a504fa7f 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-view.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-view.js @@ -26,8 +26,8 @@ define([ return WorkspaceListView.extend({ template: Templates['coding-rules-workspace-list'], - itemView: WorkspaceListItemView, - itemViewContainer: '.js-list', + childView: WorkspaceListItemView, + childViewContainer: '.js-list', emptyView: WorkspaceListEmptyView, bindShortcuts: function () { diff --git a/server/sonar-web/src/main/js/apps/computation/layout.js b/server/sonar-web/src/main/js/apps/computation/layout.js index f747efea06c..2e7edcd22bf 100644 --- a/server/sonar-web/src/main/js/apps/computation/layout.js +++ b/server/sonar-web/src/main/js/apps/computation/layout.js @@ -2,7 +2,7 @@ define([ './templates' ], function () { - return Marionette.Layout.extend({ + return Marionette.LayoutView.extend({ template: Templates['computation-layout'], regions: { diff --git a/server/sonar-web/src/main/js/apps/computation/list-item-view.js b/server/sonar-web/src/main/js/apps/computation/list-item-view.js index e457b39c2f3..afcf2f15d3f 100644 --- a/server/sonar-web/src/main/js/apps/computation/list-item-view.js +++ b/server/sonar-web/src/main/js/apps/computation/list-item-view.js @@ -13,7 +13,7 @@ define([ this.$('[data-toggle="tooltip"]').tooltip({ container: 'body', placement: 'bottom' }); }, - onClose: function () { + onDestroy: function () { this.$('[data-toggle="tooltip"]').tooltip('destroy'); }, diff --git a/server/sonar-web/src/main/js/apps/computation/list-view.js b/server/sonar-web/src/main/js/apps/computation/list-view.js index 138c36b7619..24878864d30 100644 --- a/server/sonar-web/src/main/js/apps/computation/list-view.js +++ b/server/sonar-web/src/main/js/apps/computation/list-view.js @@ -5,7 +5,7 @@ define([ return Marionette.CollectionView.extend({ tagName: 'ul', - itemView: ListItemView + childView: ListItemView }); }); diff --git a/server/sonar-web/src/main/js/apps/groups/create-view.js b/server/sonar-web/src/main/js/apps/groups/create-view.js index 8d5cfce55aa..cddde867a99 100644 --- a/server/sonar-web/src/main/js/apps/groups/create-view.js +++ b/server/sonar-web/src/main/js/apps/groups/create-view.js @@ -19,7 +19,7 @@ define([ } }).done(function () { that.collection.refresh(); - that.close(); + that.destroy(); }).fail(function (jqXHR) { that.enableForm(); that.showErrors(jqXHR.responseJSON.errors, jqXHR.responseJSON.warnings); 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 05e07c0d032..85b33a632b5 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 @@ -22,7 +22,7 @@ define([ } }).done(function () { collection.total--; - that.close(); + that.destroy(); }).fail(function (jqXHR) { that.showErrors(jqXHR.responseJSON.errors, jqXHR.responseJSON.warnings); }); 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 e79ea6eec65..7e3c26b98ee 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 @@ -11,7 +11,7 @@ define([ this.$('[data-toggle="tooltip"]').tooltip({ container: 'body', placement: 'bottom' }); }, - onClose: function () { + onDestroy: function () { this._super(); this.$('[data-toggle="tooltip"]').tooltip('destroy'); }, 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 a60fb06f35f..18f6c7738d1 100644 --- a/server/sonar-web/src/main/js/apps/groups/layout.js +++ b/server/sonar-web/src/main/js/apps/groups/layout.js @@ -2,7 +2,7 @@ define([ './templates' ], function () { - return Marionette.Layout.extend({ + return Marionette.LayoutView.extend({ template: Templates['groups-layout'], regions: { 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 43eaa5b0d24..c09af127003 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 @@ -21,7 +21,7 @@ define([ this.$('[data-toggle="tooltip"]').tooltip({ container: 'body', placement: 'bottom' }); }, - onClose: function () { + onDestroy: function () { this.$('[data-toggle="tooltip"]').tooltip('destroy'); }, 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 138c36b7619..24878864d30 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 @@ -5,7 +5,7 @@ define([ return Marionette.CollectionView.extend({ tagName: 'ul', - itemView: ListItemView + childView: ListItemView }); }); diff --git a/server/sonar-web/src/main/js/apps/groups/update-view.js b/server/sonar-web/src/main/js/apps/groups/update-view.js index 71383a1793d..850ddb7510f 100644 --- a/server/sonar-web/src/main/js/apps/groups/update-view.js +++ b/server/sonar-web/src/main/js/apps/groups/update-view.js @@ -18,7 +18,7 @@ define([ } }).done(function () { that.collection.refresh(); - that.close(); + that.destroy(); }).fail(function (jqXHR) { that.enableForm(); that.showErrors(jqXHR.responseJSON.errors, jqXHR.responseJSON.warnings); 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 25db7e80158..de5901fc5f1 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 @@ -33,7 +33,7 @@ define([ }); }, - onClose: function () { + onDestroy: function () { this.model.collection.refresh(); this._super(); } diff --git a/server/sonar-web/src/main/js/apps/issues/component-viewer/main.js b/server/sonar-web/src/main/js/apps/issues/component-viewer/main.js index f138a860d30..1e79d92e45d 100644 --- a/server/sonar-web/src/main/js/apps/issues/component-viewer/main.js +++ b/server/sonar-web/src/main/js/apps/issues/component-viewer/main.js @@ -73,8 +73,8 @@ define([ return key.deleteScope('componentViewer'); }, - onClose: function () { - SourceViewer.prototype.onClose.apply(this, arguments); + onDestroy: function () { + SourceViewer.prototype.onDestroy.apply(this, arguments); this.unbindScrollEvents(); return this.unbindShortcuts(); }, diff --git a/server/sonar-web/src/main/js/apps/issues/facets-view.js b/server/sonar-web/src/main/js/apps/issues/facets-view.js index eb5b4e127fa..26477d4788c 100644 --- a/server/sonar-web/src/main/js/apps/issues/facets-view.js +++ b/server/sonar-web/src/main/js/apps/issues/facets-view.js @@ -41,7 +41,7 @@ define([ }; return FacetsView.extend({ - getItemView: function (model) { + getChildView: function (model) { var view = viewsMapping[model.get('property')]; return view ? view : BaseFacet; } diff --git a/server/sonar-web/src/main/js/apps/issues/facets/base-facet.js b/server/sonar-web/src/main/js/apps/issues/facets/base-facet.js index 1376e8b6611..4f7d9d8ea55 100644 --- a/server/sonar-web/src/main/js/apps/issues/facets/base-facet.js +++ b/server/sonar-web/src/main/js/apps/issues/facets/base-facet.js @@ -11,7 +11,7 @@ define([ return this.$('[data-toggle="tooltip"]').tooltip({ container: 'body' }); }, - onClose: function () { + onDestroy: function () { return this.$('[data-toggle="tooltip"]').tooltip('destroy'); } }); diff --git a/server/sonar-web/src/main/js/apps/issues/layout.js b/server/sonar-web/src/main/js/apps/issues/layout.js index 06b2f893af6..13a71301a24 100644 --- a/server/sonar-web/src/main/js/apps/issues/layout.js +++ b/server/sonar-web/src/main/js/apps/issues/layout.js @@ -3,7 +3,7 @@ define([ ], function () { var $ = jQuery; - return Marionette.Layout.extend({ + return Marionette.LayoutView.extend({ template: Templates['issues-layout'], regions: { diff --git a/server/sonar-web/src/main/js/apps/issues/workspace-header-view.js b/server/sonar-web/src/main/js/apps/issues/workspace-header-view.js index c301c40e872..928b4b42c5f 100644 --- a/server/sonar-web/src/main/js/apps/issues/workspace-header-view.js +++ b/server/sonar-web/src/main/js/apps/issues/workspace-header-view.js @@ -23,7 +23,7 @@ define([ window.onBulkIssues = _.bind(this.afterBulkChange, this); }, - onClose: function () { + onDestroy: function () { this._super(); window.onBulkIssues = this._onBulkIssues; }, diff --git a/server/sonar-web/src/main/js/apps/issues/workspace-list-item-view.js b/server/sonar-web/src/main/js/apps/issues/workspace-list-item-view.js index 510f26c63ea..28a6eb7e433 100644 --- a/server/sonar-web/src/main/js/apps/issues/workspace-list-item-view.js +++ b/server/sonar-web/src/main/js/apps/issues/workspace-list-item-view.js @@ -68,7 +68,7 @@ define([ }); } that.options.app.state.updateFilter(obj); - that.popup.close(); + that.popup.destroy(); }); this.popup.render(); }, diff --git a/server/sonar-web/src/main/js/apps/issues/workspace-list-view.js b/server/sonar-web/src/main/js/apps/issues/workspace-list-view.js index d4bdad5f65b..5734479fc36 100644 --- a/server/sonar-web/src/main/js/apps/issues/workspace-list-view.js +++ b/server/sonar-web/src/main/js/apps/issues/workspace-list-view.js @@ -12,10 +12,18 @@ define([ return WorkspaceListView.extend({ template: Templates['issues-workspace-list'], componentTemplate: Templates['issues-workspace-list-component'], - itemView: IssueView, - itemViewContainer: '.js-list', + childView: IssueView, + childViewContainer: '.js-list', emptyView: EmptyView, + collectionEvents: { + 'all': 'log' + }, + + log: function () { + console.log(arguments); + }, + bindShortcuts: function () { var that = this; var doAction = function (action) { @@ -82,8 +90,8 @@ define([ } }, - appendHtml: function (compositeView, itemView, index) { - var $container = this.getItemViewContainer(compositeView), + attachHtml: function (compositeView, childView, index) { + var $container = this.getChildViewContainer(compositeView), model = this.collection.at(index); if (model != null) { var prev = this.collection.at(index - 1), @@ -99,11 +107,11 @@ define([ $container.append(this.componentTemplate(model.toJSON())); } } - $container.append(itemView.el); + $container.append(childView.el); }, - closeChildren: function () { - WorkspaceListView.prototype.closeChildren.apply(this, arguments); + destroyChildren: function () { + WorkspaceListView.prototype.destroyChildren.apply(this, arguments); this.$('.issues-workspace-list-component').remove(); } }); diff --git a/server/sonar-web/src/main/js/apps/metrics/create-view.js b/server/sonar-web/src/main/js/apps/metrics/create-view.js index 0db9fa70f11..5be34dac1ec 100644 --- a/server/sonar-web/src/main/js/apps/metrics/create-view.js +++ b/server/sonar-web/src/main/js/apps/metrics/create-view.js @@ -22,7 +22,7 @@ define([ } }).done(function () { that.collection.refresh(); - that.close(); + that.destroy(); }).fail(function (jqXHR) { that.enableForm(); that.showErrors([{ msg: jqXHR.responseJSON.err_msg }]); diff --git a/server/sonar-web/src/main/js/apps/metrics/delete-view.js b/server/sonar-web/src/main/js/apps/metrics/delete-view.js index 0acc3c055a9..8719b9fdb3a 100644 --- a/server/sonar-web/src/main/js/apps/metrics/delete-view.js +++ b/server/sonar-web/src/main/js/apps/metrics/delete-view.js @@ -22,7 +22,7 @@ define([ } }).done(function () { collection.refresh(); - that.close(); + that.destroy(); }).fail(function (jqXHR) { that.showErrors(jqXHR.responseJSON.errors, jqXHR.responseJSON.warnings); }); diff --git a/server/sonar-web/src/main/js/apps/metrics/form-view.js b/server/sonar-web/src/main/js/apps/metrics/form-view.js index 77b5f2a54a5..03e66f715b6 100644 --- a/server/sonar-web/src/main/js/apps/metrics/form-view.js +++ b/server/sonar-web/src/main/js/apps/metrics/form-view.js @@ -35,7 +35,7 @@ define([ this.$('#create-metric-type').select2({ width: '250px' }); }, - onClose: function () { + onDestroy: function () { this._super(); this.$('[data-toggle="tooltip"]').tooltip('destroy'); }, diff --git a/server/sonar-web/src/main/js/apps/metrics/layout.js b/server/sonar-web/src/main/js/apps/metrics/layout.js index 812212a42fa..9575307d96f 100644 --- a/server/sonar-web/src/main/js/apps/metrics/layout.js +++ b/server/sonar-web/src/main/js/apps/metrics/layout.js @@ -2,7 +2,7 @@ define([ './templates' ], function () { - return Marionette.Layout.extend({ + return Marionette.LayoutView.extend({ template: Templates['metrics-layout'], regions: { diff --git a/server/sonar-web/src/main/js/apps/metrics/list-item-view.js b/server/sonar-web/src/main/js/apps/metrics/list-item-view.js index 6328aea11d5..c6989e3b7b3 100644 --- a/server/sonar-web/src/main/js/apps/metrics/list-item-view.js +++ b/server/sonar-web/src/main/js/apps/metrics/list-item-view.js @@ -21,7 +21,7 @@ define([ this.$('[data-toggle="tooltip"]').tooltip({ container: 'body', placement: 'bottom' }); }, - onClose: function () { + onDestroy: function () { this.$('[data-toggle="tooltip"]').tooltip('destroy'); }, diff --git a/server/sonar-web/src/main/js/apps/metrics/list-view.js b/server/sonar-web/src/main/js/apps/metrics/list-view.js index 27060bbe7d4..b015c65d966 100644 --- a/server/sonar-web/src/main/js/apps/metrics/list-view.js +++ b/server/sonar-web/src/main/js/apps/metrics/list-view.js @@ -5,9 +5,9 @@ define([ return Marionette.CollectionView.extend({ tagName: 'ul', - itemView: ListItemView, + childView: ListItemView, - itemViewOptions: function () { + childViewOptions: function () { return { types: this.options.types, domains: this.options.domains diff --git a/server/sonar-web/src/main/js/apps/metrics/update-view.js b/server/sonar-web/src/main/js/apps/metrics/update-view.js index c4edec81a8d..3dfea4a584e 100644 --- a/server/sonar-web/src/main/js/apps/metrics/update-view.js +++ b/server/sonar-web/src/main/js/apps/metrics/update-view.js @@ -21,7 +21,7 @@ define([ } }).done(function () { that.collection.refresh(); - that.close(); + that.destroy(); }).fail(function (jqXHR) { that.enableForm(); that.showErrors(jqXHR.responseJSON.errors, jqXHR.responseJSON.warnings); diff --git a/server/sonar-web/src/main/js/apps/nav/context-navbar-view.js b/server/sonar-web/src/main/js/apps/nav/context-navbar-view.js index 07eb0cd159a..2ff9d41d518 100644 --- a/server/sonar-web/src/main/js/apps/nav/context-navbar-view.js +++ b/server/sonar-web/src/main/js/apps/nav/context-navbar-view.js @@ -68,7 +68,7 @@ define([ return href.indexOf(url) !== -1; }), isOverviewActive = !isMoreActive && href.indexOf('/dashboard') !== -1 && search.indexOf('did=') === -1; - return _.extend(Marionette.Layout.prototype.serializeData.apply(this, arguments), { + return _.extend(Marionette.LayoutView.prototype.serializeData.apply(this, arguments), { canManageContextDashboards: !!window.SS.user, contextKeyEncoded: encodeURIComponent(this.model.get('componentKey')), diff --git a/server/sonar-web/src/main/js/apps/nav/global-navbar-view.js b/server/sonar-web/src/main/js/apps/nav/global-navbar-view.js index 5a0915e7b20..b4d8dd76f95 100644 --- a/server/sonar-web/src/main/js/apps/nav/global-navbar-view.js +++ b/server/sonar-web/src/main/js/apps/nav/global-navbar-view.js @@ -23,7 +23,7 @@ define([ './templates' ], function (SearchView, ShortcutsHelpView) { - return Marionette.Layout.extend({ + return Marionette.LayoutView.extend({ template: Templates['nav-global-navbar'], modelEvents: { @@ -82,7 +82,7 @@ define([ }, serializeData: function () { - return _.extend(Marionette.Layout.prototype.serializeData.apply(this, arguments), { + return _.extend(Marionette.LayoutView.prototype.serializeData.apply(this, arguments), { user: window.SS.user, userName: window.SS.userName, userEmail: window.SS.userEmail, diff --git a/server/sonar-web/src/main/js/apps/nav/search-view.js b/server/sonar-web/src/main/js/apps/nav/search-view.js index 09c7468851e..da26004aa57 100644 --- a/server/sonar-web/src/main/js/apps/nav/search-view.js +++ b/server/sonar-web/src/main/js/apps/nav/search-view.js @@ -55,11 +55,11 @@ define([ SearchResultsView = SelectableCollectionView.extend({ className: 'menu', tagName: 'ul', - itemView: SearchItemView, + childView: SearchItemView, emptyView: SearchEmptyView }); - return Marionette.Layout.extend({ + return Marionette.LayoutView.extend({ className: 'navbar-search', tagName: 'form', template: Templates['nav-search'], diff --git a/server/sonar-web/src/main/js/apps/provisioning/bulk-delete-view.js b/server/sonar-web/src/main/js/apps/provisioning/bulk-delete-view.js index 91d09a12ee7..731e3e163d2 100644 --- a/server/sonar-web/src/main/js/apps/provisioning/bulk-delete-view.js +++ b/server/sonar-web/src/main/js/apps/provisioning/bulk-delete-view.js @@ -21,7 +21,7 @@ define([ } }).done(function () { that.collection.refresh(); - that.close(); + that.destroy(); }).fail(function (jqXHR) { that.showErrors(jqXHR.responseJSON.errors, jqXHR.responseJSON.warnings); }); diff --git a/server/sonar-web/src/main/js/apps/provisioning/create-view.js b/server/sonar-web/src/main/js/apps/provisioning/create-view.js index 2f7d3b3965c..2aba2786c3c 100644 --- a/server/sonar-web/src/main/js/apps/provisioning/create-view.js +++ b/server/sonar-web/src/main/js/apps/provisioning/create-view.js @@ -20,7 +20,7 @@ define([ } }).done(function () { that.collection.refresh(); - that.close(); + that.destroy(); }).fail(function (jqXHR) { that.enableForm(); that.showErrors([{ msg: jqXHR.responseJSON.err_msg }]); diff --git a/server/sonar-web/src/main/js/apps/provisioning/delete-view.js b/server/sonar-web/src/main/js/apps/provisioning/delete-view.js index 7797227aa40..dd503c4b1a4 100644 --- a/server/sonar-web/src/main/js/apps/provisioning/delete-view.js +++ b/server/sonar-web/src/main/js/apps/provisioning/delete-view.js @@ -22,7 +22,7 @@ define([ } }).done(function () { collection.refresh(); - that.close(); + that.destroy(); }).fail(function (jqXHR) { that.showErrors(jqXHR.responseJSON.errors, jqXHR.responseJSON.warnings); }); diff --git a/server/sonar-web/src/main/js/apps/provisioning/form-view.js b/server/sonar-web/src/main/js/apps/provisioning/form-view.js index ce359c6fa07..bb0fc0bcef5 100644 --- a/server/sonar-web/src/main/js/apps/provisioning/form-view.js +++ b/server/sonar-web/src/main/js/apps/provisioning/form-view.js @@ -11,7 +11,7 @@ define([ this.$('[data-toggle="tooltip"]').tooltip({ container: 'body', placement: 'bottom' }); }, - onClose: function () { + onDestroy: function () { this._super(); this.$('[data-toggle="tooltip"]').tooltip('destroy'); }, diff --git a/server/sonar-web/src/main/js/apps/provisioning/layout.js b/server/sonar-web/src/main/js/apps/provisioning/layout.js index d0627a1e5b8..31b67e8b774 100644 --- a/server/sonar-web/src/main/js/apps/provisioning/layout.js +++ b/server/sonar-web/src/main/js/apps/provisioning/layout.js @@ -2,7 +2,7 @@ define([ './templates' ], function () { - return Marionette.Layout.extend({ + return Marionette.LayoutView.extend({ template: Templates['provisioning-layout'], regions: { diff --git a/server/sonar-web/src/main/js/apps/provisioning/list-item-view.js b/server/sonar-web/src/main/js/apps/provisioning/list-item-view.js index 2b03660b698..ead9b009ca3 100644 --- a/server/sonar-web/src/main/js/apps/provisioning/list-item-view.js +++ b/server/sonar-web/src/main/js/apps/provisioning/list-item-view.js @@ -22,7 +22,7 @@ define([ this.$('[data-toggle="tooltip"]').tooltip({ container: 'body', placement: 'bottom' }); }, - onClose: function () { + onDestroy: function () { this.$('[data-toggle="tooltip"]').tooltip('destroy'); }, diff --git a/server/sonar-web/src/main/js/apps/provisioning/list-view.js b/server/sonar-web/src/main/js/apps/provisioning/list-view.js index 138c36b7619..24878864d30 100644 --- a/server/sonar-web/src/main/js/apps/provisioning/list-view.js +++ b/server/sonar-web/src/main/js/apps/provisioning/list-view.js @@ -5,7 +5,7 @@ define([ return Marionette.CollectionView.extend({ tagName: 'ul', - itemView: ListItemView + childView: ListItemView }); }); diff --git a/server/sonar-web/src/main/js/apps/quality-gates/delete-view.js b/server/sonar-web/src/main/js/apps/quality-gates/delete-view.js index 793934460ca..d142b883c84 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/delete-view.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/delete-view.js @@ -22,7 +22,7 @@ define([ }; return this.model.destroy(options) .done(function () { - that.close(); + that.destroy(); }).fail(function (jqXHR) { that.enableForm(); that.showErrors(jqXHR.responseJSON.errors, jqXHR.responseJSON.warnings); diff --git a/server/sonar-web/src/main/js/apps/quality-gates/details-view.js b/server/sonar-web/src/main/js/apps/quality-gates/details-view.js index df054717447..9af1b38e65e 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/details-view.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/details-view.js @@ -5,7 +5,7 @@ define([ './templates' ], function (Conditions, DetailConditionsView, ProjectsView) { - return Marionette.Layout.extend({ + return Marionette.LayoutView.extend({ template: Templates['quality-gate-detail'], regions: { diff --git a/server/sonar-web/src/main/js/apps/quality-gates/form-view.js b/server/sonar-web/src/main/js/apps/quality-gates/form-view.js index 5da9dfd05a2..9b61f400bf3 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/form-view.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/form-view.js @@ -24,7 +24,7 @@ define([ }); return Backbone.ajax(opts) .done(function () { - that.close(); + that.destroy(); }).fail(function (jqXHR) { that.enableForm(); that.showErrors(jqXHR.responseJSON.errors, jqXHR.responseJSON.warnings); diff --git a/server/sonar-web/src/main/js/apps/quality-gates/gate-condition-view.js b/server/sonar-web/src/main/js/apps/quality-gates/gate-condition-view.js index 49797716adf..0dfbea0ab17 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/gate-condition-view.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/gate-condition-view.js @@ -68,7 +68,7 @@ define([ }, cancelAddCondition: function () { - this.close(); + this.destroy(); }, enableUpdate: function () { diff --git a/server/sonar-web/src/main/js/apps/quality-gates/gate-conditions-delete-view.js b/server/sonar-web/src/main/js/apps/quality-gates/gate-conditions-delete-view.js index 83e32ee2455..c8ed23a2883 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/gate-conditions-delete-view.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/gate-conditions-delete-view.js @@ -22,7 +22,7 @@ define([ }; return this.model.destroy(options) .done(function () { - that.close(); + that.destroy(); }).fail(function (jqXHR) { that.enableForm(); that.showErrors(jqXHR.responseJSON.errors, jqXHR.responseJSON.warnings); diff --git a/server/sonar-web/src/main/js/apps/quality-gates/gate-conditions-view.js b/server/sonar-web/src/main/js/apps/quality-gates/gate-conditions-view.js index 5ec13c6734a..b0c0857cc95 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/gate-conditions-view.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/gate-conditions-view.js @@ -7,9 +7,9 @@ define([ return Marionette.CompositeView.extend({ template: Templates['quality-gate-detail-conditions'], - itemView: ConditionView, + childView: ConditionView, emptyView: ConditionsEmptyView, - itemViewContainer: '.js-conditions', + childViewContainer: '.js-conditions', ui: { metricSelect: '#quality-gate-new-condition-metric' @@ -20,7 +20,7 @@ define([ 'change @ui.metricSelect': 'addCondition' }, - itemViewOptions: function () { + childViewOptions: function () { return { canEdit: this.options.canEdit, gate: this.model, diff --git a/server/sonar-web/src/main/js/apps/quality-gates/gates-view.js b/server/sonar-web/src/main/js/apps/quality-gates/gates-view.js index 6c05b728d55..cd36c381a39 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/gates-view.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/gates-view.js @@ -6,10 +6,10 @@ define([ return Marionette.CompositeView.extend({ className: 'list-group', template: Templates['quality-gates-gates'], - itemView: ItemView, - itemViewContainer: '.js-list', + childView: ItemView, + childViewContainer: '.js-list', - itemViewOptions: function (model) { + childViewOptions: function (model) { return { collectionView: this, highlighted: model.id === this.highlighted diff --git a/server/sonar-web/src/main/js/apps/quality-gates/layout.js b/server/sonar-web/src/main/js/apps/quality-gates/layout.js index e9ae08550c4..791ba30ae83 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/layout.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/layout.js @@ -5,7 +5,7 @@ define([ var $ = jQuery; - return Marionette.Layout.extend({ + return Marionette.LayoutView.extend({ template: Templates['quality-gates-layout'], regions: { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/change-profile-parent-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/change-profile-parent-view.js index e3c30699fe7..a0813a661c9 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/change-profile-parent-view.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/change-profile-parent-view.js @@ -60,7 +60,7 @@ define([ }).done(function () { that.model.collection.fetch(); that.model.trigger('select', that.model); - that.close(); + that.destroy(); }).fail(function (jqXHR) { that.showErrors(jqXHR.responseJSON.errors, jqXHR.responseJSON.warnings); that.enableForm(); diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/copy-profile-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/copy-profile-view.js index 446254c1c4c..307a904e192 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/copy-profile-view.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/copy-profile-view.js @@ -52,7 +52,7 @@ define([ } }).done(function (r) { that.addProfile(r); - that.close(); + that.destroy(); }).fail(function (jqXHR) { that.enableForm(); that.showErrors(jqXHR.responseJSON.errors, jqXHR.responseJSON.warnings); diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/create-profile-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/create-profile-view.js index ec5a0923d4b..531edc0f342 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/create-profile-view.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/create-profile-view.js @@ -74,7 +74,7 @@ define([ that.showErrors(r.errors, r.warnings); } else { that.addProfile(r.profile); - that.close(); + that.destroy(); } }); }, diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/delete-profile-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/delete-profile-view.js index 3b2ccee277a..e58f870c672 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/delete-profile-view.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/delete-profile-view.js @@ -28,7 +28,7 @@ define([ template: Templates['quality-profiles-delete-profile'], modelEvents: { - 'destroy': 'close' + 'destroy': 'destroy' }, onFormSubmit: function () { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/layout.js b/server/sonar-web/src/main/js/apps/quality-profiles/layout.js index 9099a11fa78..7ec62799470 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/layout.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/layout.js @@ -24,7 +24,7 @@ define([ var $ = jQuery; - return Marionette.Layout.extend({ + return Marionette.LayoutView.extend({ template: Templates['quality-profiles-layout'], regions: { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js index ede00f14d73..3f9d16f7ea2 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js @@ -28,7 +28,7 @@ define([ var $ = jQuery; - return Marionette.Layout.extend({ + return Marionette.LayoutView.extend({ template: Templates['quality-profiles-profile-details'], regions: { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/profile-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/profile-view.js index 03e5352e2d0..34de0a2d0c0 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/profile-view.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/profile-view.js @@ -41,7 +41,7 @@ define([ this.$('[data-toggle="tooltip"]').tooltip({ container: 'body' }); }, - onClose: function () { + onDestroy: function () { this.$('[data-toggle="tooltip"]').tooltip('destroy'); }, diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/profiles-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/profiles-view.js index 2a433476dcd..ae40ab623a5 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/profiles-view.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/profiles-view.js @@ -26,14 +26,14 @@ define([ className: 'list-group', template: Templates['quality-profiles-profiles'], languageTemplate: Templates['quality-profiles-profiles-language'], - itemView: ProfileView, - itemViewContainer: '.js-list', + childView: ProfileView, + childViewContainer: '.js-list', collectionEvents: { 'filter': 'filterByLanguage' }, - itemViewOptions: function (model) { + childViewOptions: function (model) { return { collectionView: this, highlighted: model.get('key') === this.highlighted @@ -45,8 +45,8 @@ define([ this.render(); }, - appendHtml: function (compositeView, itemView, index) { - var $container = this.getItemViewContainer(compositeView), + attachHtml: function (compositeView, childView, index) { + var $container = this.getChildViewContainer(compositeView), model = this.collection.at(index); if (model != null) { var prev = this.collection.at(index - 1), @@ -62,7 +62,7 @@ define([ $container.append(this.languageTemplate(model.toJSON())); } } - return $container.append(itemView.el); + compositeView._insertAfter(childView); }, closeChildren: function () { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/rename-profile-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/rename-profile-view.js index b61d9d8a794..1091198d747 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/rename-profile-view.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/rename-profile-view.js @@ -50,7 +50,7 @@ define([ } }).done(function () { that.model.set({ name: name }); - that.close(); + that.destroy(); }).fail(function (jqXHR) { that.showErrors(jqXHR.responseJSON.errors, jqXHR.responseJSON.warnings); }); diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/restore-built-in-profiles-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/restore-built-in-profiles-view.js index 645197f7b55..bd223c261f3 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/restore-built-in-profiles-view.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/restore-built-in-profiles-view.js @@ -58,7 +58,7 @@ define([ }).done(function () { that.collection.fetch({ reset: true }); that.collection.trigger('destroy'); - that.close(); + that.destroy(); }).fail(function (jqXHR) { that.showErrors(jqXHR.responseJSON.errors, jqXHR.responseJSON.warnings); that.enableForm(); diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/restore-profile-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/restore-profile-view.js index fca5b66476f..09b8feeb812 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/restore-profile-view.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/restore-profile-view.js @@ -37,7 +37,7 @@ define([ that.showErrors(r.errors, r.warnings); } else { that.addProfile(r.profile); - that.close(); + that.destroy(); } }); }, diff --git a/server/sonar-web/src/main/js/apps/users/change-password-view.js b/server/sonar-web/src/main/js/apps/users/change-password-view.js index 6187333c9e6..659d3012a79 100644 --- a/server/sonar-web/src/main/js/apps/users/change-password-view.js +++ b/server/sonar-web/src/main/js/apps/users/change-password-view.js @@ -26,7 +26,7 @@ define([ 400: null } }).done(function () { - that.close(); + that.destroy(); }).fail(function (jqXHR) { that.enableForm(); that.showErrors(jqXHR.responseJSON.errors, jqXHR.responseJSON.warnings); diff --git a/server/sonar-web/src/main/js/apps/users/create-view.js b/server/sonar-web/src/main/js/apps/users/create-view.js index 026f8095056..562e41e8d5d 100644 --- a/server/sonar-web/src/main/js/apps/users/create-view.js +++ b/server/sonar-web/src/main/js/apps/users/create-view.js @@ -22,7 +22,7 @@ define([ } }).done(function () { that.collection.refresh(); - that.close(); + that.destroy(); }).fail(function (jqXHR) { that.enableForm(); that.showErrors(jqXHR.responseJSON.errors, jqXHR.responseJSON.warnings); diff --git a/server/sonar-web/src/main/js/apps/users/deactivate-view.js b/server/sonar-web/src/main/js/apps/users/deactivate-view.js index 37c71d4a94b..000a350ea57 100644 --- a/server/sonar-web/src/main/js/apps/users/deactivate-view.js +++ b/server/sonar-web/src/main/js/apps/users/deactivate-view.js @@ -22,7 +22,7 @@ define([ } }).done(function () { collection.total--; - that.close(); + that.destroy(); }).fail(function (jqXHR) { that.showErrors(jqXHR.responseJSON.errors, jqXHR.responseJSON.warnings); }); diff --git a/server/sonar-web/src/main/js/apps/users/form-view.js b/server/sonar-web/src/main/js/apps/users/form-view.js index f1c7f602d14..50b18c1d237 100644 --- a/server/sonar-web/src/main/js/apps/users/form-view.js +++ b/server/sonar-web/src/main/js/apps/users/form-view.js @@ -19,7 +19,7 @@ define([ this.$('[data-toggle="tooltip"]').tooltip({ container: 'body', placement: 'bottom' }); }, - onClose: function () { + onDestroy: function () { this._super(); this.$('[data-toggle="tooltip"]').tooltip('destroy'); }, diff --git a/server/sonar-web/src/main/js/apps/users/groups-view.js b/server/sonar-web/src/main/js/apps/users/groups-view.js index 8fb864add9d..09a127fc6fd 100644 --- a/server/sonar-web/src/main/js/apps/users/groups-view.js +++ b/server/sonar-web/src/main/js/apps/users/groups-view.js @@ -34,9 +34,9 @@ define([ }); }, - onClose: function () { + onDestroy: function () { this.model.collection.refresh(); - Modal.prototype.onClose.apply(this, arguments); + Modal.prototype.onDestroy.apply(this, arguments); } }); diff --git a/server/sonar-web/src/main/js/apps/users/layout.js b/server/sonar-web/src/main/js/apps/users/layout.js index d2b625162e0..9acb054bdad 100644 --- a/server/sonar-web/src/main/js/apps/users/layout.js +++ b/server/sonar-web/src/main/js/apps/users/layout.js @@ -2,7 +2,7 @@ define([ './templates' ], function () { - return Marionette.Layout.extend({ + return Marionette.LayoutView.extend({ template: Templates['users-layout'], regions: { diff --git a/server/sonar-web/src/main/js/apps/users/list-item-view.js b/server/sonar-web/src/main/js/apps/users/list-item-view.js index 99aa973579b..b11e39e2766 100644 --- a/server/sonar-web/src/main/js/apps/users/list-item-view.js +++ b/server/sonar-web/src/main/js/apps/users/list-item-view.js @@ -30,7 +30,7 @@ define([ this.$('[data-toggle="tooltip"]').tooltip({ container: 'body', placement: 'bottom' }); }, - onClose: function () { + onDestroy: function () { this.$('[data-toggle="tooltip"]').tooltip('destroy'); }, diff --git a/server/sonar-web/src/main/js/apps/users/list-view.js b/server/sonar-web/src/main/js/apps/users/list-view.js index 138c36b7619..24878864d30 100644 --- a/server/sonar-web/src/main/js/apps/users/list-view.js +++ b/server/sonar-web/src/main/js/apps/users/list-view.js @@ -5,7 +5,7 @@ define([ return Marionette.CollectionView.extend({ tagName: 'ul', - itemView: ListItemView + childView: ListItemView }); }); diff --git a/server/sonar-web/src/main/js/apps/users/update-view.js b/server/sonar-web/src/main/js/apps/users/update-view.js index 81497a3a75d..b276b79ba42 100644 --- a/server/sonar-web/src/main/js/apps/users/update-view.js +++ b/server/sonar-web/src/main/js/apps/users/update-view.js @@ -19,7 +19,7 @@ define([ } }).done(function () { that.collection.refresh(); - that.close(); + that.destroy(); }).fail(function (jqXHR) { that.enableForm(); that.showErrors(jqXHR.responseJSON.errors, jqXHR.responseJSON.warnings); |