aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/components')
-rw-r--r--server/sonar-web/src/main/js/components/common/modals.js8
-rw-r--r--server/sonar-web/src/main/js/components/common/popup.js8
-rw-r--r--server/sonar-web/src/main/js/components/common/selectable-collection-view.js2
-rw-r--r--server/sonar-web/src/main/js/components/issue/issue-view.js6
-rw-r--r--server/sonar-web/src/main/js/components/issue/manual-issue-view.js6
-rw-r--r--server/sonar-web/src/main/js/components/issue/views/action-options-view.js8
-rw-r--r--server/sonar-web/src/main/js/components/issue/views/assign-form-view.js2
-rw-r--r--server/sonar-web/src/main/js/components/issue/views/comment-form-view.js2
-rw-r--r--server/sonar-web/src/main/js/components/issue/views/issue-popup.js6
-rw-r--r--server/sonar-web/src/main/js/components/issue/views/tags-form-view.js2
-rw-r--r--server/sonar-web/src/main/js/components/navigator/facets-view.js4
-rw-r--r--server/sonar-web/src/main/js/components/navigator/filters/filter-bar.js12
-rw-r--r--server/sonar-web/src/main/js/components/navigator/workspace-header-view.js2
-rw-r--r--server/sonar-web/src/main/js/components/navigator/workspace-list-view.js4
-rw-r--r--server/sonar-web/src/main/js/components/source-viewer/main.js6
-rw-r--r--server/sonar-web/src/main/js/components/source-viewer/more-actions.js2
-rw-r--r--server/sonar-web/src/main/js/components/workspace/main.js4
-rw-r--r--server/sonar-web/src/main/js/components/workspace/views/base-viewer-view.js4
-rw-r--r--server/sonar-web/src/main/js/components/workspace/views/items-view.js6
-rw-r--r--server/sonar-web/src/main/js/components/workspace/views/rule-view.js6
-rw-r--r--server/sonar-web/src/main/js/components/workspace/views/viewer-header-view.js2
21 files changed, 51 insertions, 51 deletions
diff --git a/server/sonar-web/src/main/js/components/common/modals.js b/server/sonar-web/src/main/js/components/common/modals.js
index 243ddb04948..b4812096177 100644
--- a/server/sonar-web/src/main/js/components/common/modals.js
+++ b/server/sonar-web/src/main/js/components/common/modals.js
@@ -41,7 +41,7 @@ define(function () {
this.keyScope = key.getScope();
key.setScope('modal');
key('escape', 'modal', function () {
- that.close();
+ that.destroy();
return false;
});
this.show();
@@ -58,7 +58,7 @@ define(function () {
}, 0);
},
- onClose: function () {
+ onDestroy: function () {
$('html').removeClass(this.htmlClassName);
this.removeOverlay();
key.deleteScope('modal');
@@ -67,7 +67,7 @@ define(function () {
onCloseClick: function (e) {
e.preventDefault();
- this.close();
+ this.destroy();
},
renderOverlay: function () {
@@ -85,7 +85,7 @@ define(function () {
var that = this;
$('body').on('click.' + EVENT_SCOPE, function () {
$('body').off('click.' + EVENT_SCOPE);
- that.close();
+ that.destroy();
});
}
});
diff --git a/server/sonar-web/src/main/js/components/common/popup.js b/server/sonar-web/src/main/js/components/common/popup.js
index f978b7ab380..a3d15c1bbb8 100644
--- a/server/sonar-web/src/main/js/components/common/popup.js
+++ b/server/sonar-web/src/main/js/components/common/popup.js
@@ -31,20 +31,20 @@ define(function () {
attachCloseEvents: function () {
var that = this;
key('escape', function () {
- that.close();
+ that.destroy();
});
$('body').on('click.bubble-popup', function () {
$('body').off('click.bubble-popup');
- that.close();
+ that.destroy();
});
this.options.triggerEl.on('click.bubble-popup', function (e) {
that.options.triggerEl.off('click.bubble-popup');
e.stopPropagation();
- that.close();
+ that.destroy();
});
},
- onClose: function () {
+ onDestroy: function () {
$('body').off('click.bubble-popup');
this.options.triggerEl.off('click.bubble-popup');
}
diff --git a/server/sonar-web/src/main/js/components/common/selectable-collection-view.js b/server/sonar-web/src/main/js/components/common/selectable-collection-view.js
index b025ba925a5..c7250855946 100644
--- a/server/sonar-web/src/main/js/components/common/selectable-collection-view.js
+++ b/server/sonar-web/src/main/js/components/common/selectable-collection-view.js
@@ -26,7 +26,7 @@ define(function () {
this.listenTo(this.collection, 'reset', this.resetSelectedIndex);
},
- itemViewOptions: function (model, index) {
+ childViewOptions: function (model, index) {
return { index: index };
},
diff --git a/server/sonar-web/src/main/js/components/issue/issue-view.js b/server/sonar-web/src/main/js/components/issue/issue-view.js
index d7c90ddb777..d211ab65eda 100644
--- a/server/sonar-web/src/main/js/components/issue/issue-view.js
+++ b/server/sonar-web/src/main/js/components/issue/issue-view.js
@@ -72,7 +72,7 @@ define([
data: { issue: this.model.get('key') }
}).done(function () {
if (that.popup) {
- that.popup.close();
+ that.popup.destroy();
}
that.popup = new ChangeLogView({
triggerEl: t,
@@ -86,7 +86,7 @@ define([
updateAfterAction: function (fetch) {
if (this.popup) {
- this.popup.close();
+ this.popup.destroy();
}
if (fetch) {
this.resetIssue();
@@ -176,7 +176,7 @@ define([
triggerEl: $('body')
});
view.submit(window.SS.user, window.SS.userName);
- view.close();
+ view.destroy();
},
plan: function (e) {
diff --git a/server/sonar-web/src/main/js/components/issue/manual-issue-view.js b/server/sonar-web/src/main/js/components/issue/manual-issue-view.js
index 1b043544a44..2f819f62f2b 100644
--- a/server/sonar-web/src/main/js/components/issue/manual-issue-view.js
+++ b/server/sonar-web/src/main/js/components/issue/manual-issue-view.js
@@ -37,7 +37,7 @@ define([
}
},
- onClose: function () {
+ onDestroy: function () {
if (key != null && this.key != null) {
key.setScope(this.key);
}
@@ -61,13 +61,13 @@ define([
var that = this;
return issue.fetch().done(function () {
that.trigger('add', issue);
- that.close();
+ that.destroy();
});
},
cancel: function (e) {
e.preventDefault();
- this.close();
+ this.destroy();
},
serializeData: function () {
diff --git a/server/sonar-web/src/main/js/components/issue/views/action-options-view.js b/server/sonar-web/src/main/js/components/issue/views/action-options-view.js
index 402a0cc6ec6..57b5c95d0a9 100644
--- a/server/sonar-web/src/main/js/components/issue/views/action-options-view.js
+++ b/server/sonar-web/src/main/js/components/issue/views/action-options-view.js
@@ -75,7 +75,7 @@ define([
return that.selectActiveOption();
});
key('escape', this.keyScope, function () {
- return that.close();
+ return that.destroy();
});
key('backspace', this.keyScope, function () {
return false;
@@ -96,8 +96,8 @@ define([
key.setScope(this.currentKeyScope);
},
- onClose: function () {
- PopupView.prototype.onClose.apply(this, arguments);
+ onDestroy: function () {
+ PopupView.prototype.onDestroy.apply(this, arguments);
this.unbindShortcuts();
this.$('[data-toggle="tooltip"]').tooltip('destroy');
$('.tooltip').remove();
@@ -105,7 +105,7 @@ define([
selectOption: function (e) {
e.preventDefault();
- this.close();
+ this.destroy();
},
selectActiveOption: function () {
diff --git a/server/sonar-web/src/main/js/components/issue/views/assign-form-view.js b/server/sonar-web/src/main/js/components/issue/views/assign-form-view.js
index f2894e865af..bca6a296365 100644
--- a/server/sonar-web/src/main/js/components/issue/views/assign-form-view.js
+++ b/server/sonar-web/src/main/js/components/issue/views/assign-form-view.js
@@ -98,7 +98,7 @@ define([
this.selectActiveOption();
}
if (e.keyCode === 27) {
- this.close();
+ this.destroy();
}
if ([9, 13, 27, 38, 40].indexOf(e.keyCode) !== -1) {
return false;
diff --git a/server/sonar-web/src/main/js/components/issue/views/comment-form-view.js b/server/sonar-web/src/main/js/components/issue/views/comment-form-view.js
index 10e9c713e09..52cd3917a2c 100644
--- a/server/sonar-web/src/main/js/components/issue/views/comment-form-view.js
+++ b/server/sonar-web/src/main/js/components/issue/views/comment-form-view.js
@@ -41,7 +41,7 @@ define([
onKeydown: function (e) {
if (e.keyCode === 27) {
- this.close();
+ this.destroy();
}
},
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 575fb50a52a..9c36ad104b5 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
@@ -11,7 +11,7 @@ define([
events: function () {
return {
- 'click .js-issue-form-cancel': 'close'
+ 'click .js-issue-form-cancel': 'destroy'
};
},
@@ -21,8 +21,8 @@ define([
this.options.view.render();
},
- onClose: function () {
- this.options.view.close();
+ onDestroy: function () {
+ this.options.view.destroy();
},
attachCloseEvents: function () {
diff --git a/server/sonar-web/src/main/js/components/issue/views/tags-form-view.js b/server/sonar-web/src/main/js/components/issue/views/tags-form-view.js
index ee04d7103c9..868230ccd88 100644
--- a/server/sonar-web/src/main/js/components/issue/views/tags-form-view.js
+++ b/server/sonar-web/src/main/js/components/issue/views/tags-form-view.js
@@ -142,7 +142,7 @@ define([
this.selectActiveOption();
}
if (e.keyCode === 27) {
- this.close();
+ this.destroy();
}
if ([9, 13, 27, 38, 40].indexOf(e.keyCode) !== -1) {
return false;
diff --git a/server/sonar-web/src/main/js/components/navigator/facets-view.js b/server/sonar-web/src/main/js/components/navigator/facets-view.js
index b137c39e81c..bf881e018fa 100644
--- a/server/sonar-web/src/main/js/components/navigator/facets-view.js
+++ b/server/sonar-web/src/main/js/components/navigator/facets-view.js
@@ -24,13 +24,13 @@ define([
return Marionette.CollectionView.extend({
className: 'search-navigator-facets-list',
- itemViewOptions: function () {
+ childViewOptions: function () {
return {
app: this.options.app
};
},
- getItemView: function () {
+ getChildView: function () {
return BaseFacet;
},
diff --git a/server/sonar-web/src/main/js/components/navigator/filters/filter-bar.js b/server/sonar-web/src/main/js/components/navigator/filters/filter-bar.js
index b87da53c1d6..28ee2ceb836 100644
--- a/server/sonar-web/src/main/js/components/navigator/filters/filter-bar.js
+++ b/server/sonar-web/src/main/js/components/navigator/filters/filter-bar.js
@@ -26,7 +26,7 @@ define(
function (BaseFilters, MoreCriteriaFilters) {
return Marionette.CompositeView.extend({
- itemViewContainer: '.navigator-filters-list',
+ childViewContainer: '.navigator-filters-list',
collectionEvents: {
@@ -34,12 +34,12 @@ define(
},
- getItemView: function (item) {
+ getChildView: function (item) {
return item.get('type') || BaseFilters.BaseFilterView;
},
- itemViewOptions: function () {
+ childViewOptions: function () {
return {
filterBarView: this,
app: this.options.app
@@ -94,7 +94,7 @@ define(
getEnabledFilters: function() {
- return this.$(this.itemViewContainer).children()
+ return this.$(this.childViewContainer).children()
.not('.navigator-filter-disabled')
.not('.navigator-filter-inactive')
.not('.navigator-filter-favorite');
@@ -146,8 +146,8 @@ define(
},
- onAfterItemAdded: function (itemView) {
- if (itemView.model.get('type') === MoreCriteriaFilters.FavoriteFilterView) {
+ onAddChild: function (childView) {
+ if (childView.model.get('type') === MoreCriteriaFilters.FavoriteFilterView) {
jQuery('.navigator-header').addClass('navigator-header-favorite');
}
},
diff --git a/server/sonar-web/src/main/js/components/navigator/workspace-header-view.js b/server/sonar-web/src/main/js/components/navigator/workspace-header-view.js
index 524346fa080..75e34798616 100644
--- a/server/sonar-web/src/main/js/components/navigator/workspace-header-view.js
+++ b/server/sonar-web/src/main/js/components/navigator/workspace-header-view.js
@@ -48,7 +48,7 @@ define(function () {
this.$('[data-toggle="tooltip"]').tooltip('destroy');
},
- onClose: function () {
+ onDestroy: function () {
this.$('[data-toggle="tooltip"]').tooltip('destroy');
},
diff --git a/server/sonar-web/src/main/js/components/navigator/workspace-list-view.js b/server/sonar-web/src/main/js/components/navigator/workspace-list-view.js
index 0296b1589aa..a9c1831c835 100644
--- a/server/sonar-web/src/main/js/components/navigator/workspace-list-view.js
+++ b/server/sonar-web/src/main/js/components/navigator/workspace-list-view.js
@@ -27,7 +27,7 @@ define(function () {
loadMore: '.js-more'
},
- itemViewOptions: function () {
+ childViewOptions: function () {
return {
app: this.options.app
};
@@ -44,7 +44,7 @@ define(function () {
this.bindShortcuts();
},
- onClose: function () {
+ onDestroy: function () {
this.unbindScrollEvents();
this.unbindShortcuts();
},
diff --git a/server/sonar-web/src/main/js/components/source-viewer/main.js b/server/sonar-web/src/main/js/components/source-viewer/main.js
index a007145f354..947d6582af0 100644
--- a/server/sonar-web/src/main/js/components/source-viewer/main.js
+++ b/server/sonar-web/src/main/js/components/source-viewer/main.js
@@ -42,7 +42,7 @@ define([
var $ = jQuery,
HIGHLIGHTED_ROW_CLASS = 'source-line-highlighted';
- return Marionette.Layout.extend({
+ return Marionette.LayoutView.extend({
className: 'source-viewer',
template: Templates['source-viewer'],
@@ -106,9 +106,9 @@ define([
this.$('[data-toggle="tooltip"]').tooltip({ container: 'body' });
},
- onClose: function () {
+ onDestroy: function () {
this.issueViews.forEach(function (view) {
- return view.close();
+ return view.destroy();
});
this.issueViews = [];
this.clearTooltips();
diff --git a/server/sonar-web/src/main/js/components/source-viewer/more-actions.js b/server/sonar-web/src/main/js/components/source-viewer/more-actions.js
index c3e7698b8f9..a1b5ff87f99 100644
--- a/server/sonar-web/src/main/js/components/source-viewer/more-actions.js
+++ b/server/sonar-web/src/main/js/components/source-viewer/more-actions.js
@@ -39,7 +39,7 @@ define([
var that = this;
$('body').on('click.component-viewer-more-actions', function () {
$('body').off('click.component-viewer-more-actions');
- that.close();
+ that.destroy();
});
},
diff --git a/server/sonar-web/src/main/js/components/workspace/main.js b/server/sonar-web/src/main/js/components/workspace/main.js
index 5f766ce00fa..7aa7f901aa6 100644
--- a/server/sonar-web/src/main/js/components/workspace/main.js
+++ b/server/sonar-web/src/main/js/components/workspace/main.js
@@ -89,7 +89,7 @@ define([
var that = this;
if (this.viewerView != null) {
this.viewerView.model.trigger('hideViewer');
- this.viewerView.close();
+ this.viewerView.destroy();
}
$('html').addClass('with-workspace');
model.trigger('showViewer');
@@ -112,7 +112,7 @@ define([
closeComponentViewer: function () {
if (this.viewerView != null) {
- this.viewerView.close();
+ this.viewerView.destroy();
$('.with-workspace').removeClass('with-workspace');
}
},
diff --git a/server/sonar-web/src/main/js/components/workspace/views/base-viewer-view.js b/server/sonar-web/src/main/js/components/workspace/views/base-viewer-view.js
index 761b9887184..c917fbc9f65 100644
--- a/server/sonar-web/src/main/js/components/workspace/views/base-viewer-view.js
+++ b/server/sonar-web/src/main/js/components/workspace/views/base-viewer-view.js
@@ -21,11 +21,11 @@ define([
'./viewer-header-view'
], function (HeaderView) {
- return Marionette.Layout.extend({
+ return Marionette.LayoutView.extend({
className: 'workspace-viewer',
modelEvents: {
- 'destroy': 'close'
+ 'destroy': 'destroy'
},
regions: {
diff --git a/server/sonar-web/src/main/js/components/workspace/views/items-view.js b/server/sonar-web/src/main/js/components/workspace/views/items-view.js
index a83eeb0f3e8..36aa5679097 100644
--- a/server/sonar-web/src/main/js/components/workspace/views/items-view.js
+++ b/server/sonar-web/src/main/js/components/workspace/views/items-view.js
@@ -25,10 +25,10 @@ define([
return Marionette.CompositeView.extend({
className: 'workspace-nav',
template: Templates['workspace-items'],
- itemViewContainer: '.workspace-nav-list',
- itemView: ItemView,
+ childViewContainer: '.workspace-nav-list',
+ childView: ItemView,
- itemViewOptions: function () {
+ childViewOptions: function () {
return { collectionView: this };
}
});
diff --git a/server/sonar-web/src/main/js/components/workspace/views/rule-view.js b/server/sonar-web/src/main/js/components/workspace/views/rule-view.js
index 4b4a498244b..b6ca04fee6f 100644
--- a/server/sonar-web/src/main/js/components/workspace/views/rule-view.js
+++ b/server/sonar-web/src/main/js/components/workspace/views/rule-view.js
@@ -26,7 +26,7 @@ define([
template: Templates['workspace-rule'],
modelEvents: {
- 'destroy': 'close',
+ 'destroy': 'destroy',
'change': 'render'
},
@@ -35,12 +35,12 @@ define([
this.$('[data-toggle="tooltip"]').tooltip({ container: 'body' });
},
- onClose: function () {
+ onDestroy: function () {
this.$('[data-toggle="tooltip"]').tooltip('destroy');
},
serializeData: function () {
- return _.extend(Marionette.Layout.prototype.serializeData.apply(this, arguments), {
+ return _.extend(Marionette.LayoutView.prototype.serializeData.apply(this, arguments), {
allTags: _.union(this.model.get('sysTags'), this.model.get('tags'))
});
}
diff --git a/server/sonar-web/src/main/js/components/workspace/views/viewer-header-view.js b/server/sonar-web/src/main/js/components/workspace/views/viewer-header-view.js
index b0705fb724a..6ef5b47f375 100644
--- a/server/sonar-web/src/main/js/components/workspace/views/viewer-header-view.js
+++ b/server/sonar-web/src/main/js/components/workspace/views/viewer-header-view.js
@@ -44,7 +44,7 @@ define([
this.$('.js-normal-size').addClass('hidden');
},
- onClose: function () {
+ onDestroy: function () {
this.$('[data-toggle="tooltip"]').tooltip('destroy');
$('.tooltip').remove();
},