[DE] devided ReviewChanges for private members
This commit is contained in:
parent
b0935bca7a
commit
d880555bbf
|
@ -409,12 +409,13 @@ define([
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Common.Views.ReviewChanges = Common.UI.BaseView.extend(_.extend({
|
Common.Views.ReviewChanges = Common.UI.BaseView.extend(_.extend((function(){
|
||||||
|
return {
|
||||||
el: '#review-changes-panel',
|
el: '#review-changes-panel',
|
||||||
|
|
||||||
options: {},
|
options: {},
|
||||||
|
|
||||||
initialize : function(options) {
|
initialize: function (options) {
|
||||||
Common.UI.BaseView.prototype.initialize.call(this, options);
|
Common.UI.BaseView.prototype.initialize.call(this, options);
|
||||||
|
|
||||||
this.template = [
|
this.template = [
|
||||||
|
@ -437,7 +438,7 @@ define([
|
||||||
this.popoverChanges = this.options.popoverChanges;
|
this.popoverChanges = this.options.popoverChanges;
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function () {
|
||||||
var el = $(this.el),
|
var el = $(this.el),
|
||||||
me = this;
|
me = this;
|
||||||
el.addClass('review-changes');
|
el.addClass('review-changes');
|
||||||
|
@ -452,7 +453,7 @@ define([
|
||||||
hint: this.txtPrev,
|
hint: this.txtPrev,
|
||||||
hintAnchor: 'top'
|
hintAnchor: 'top'
|
||||||
});
|
});
|
||||||
this.btnPrev.render( $('#id-review-button-prev'));
|
this.btnPrev.render($('#id-review-button-prev'));
|
||||||
|
|
||||||
this.btnNext = new Common.UI.Button({
|
this.btnNext = new Common.UI.Button({
|
||||||
cls: 'btn-toolbar',
|
cls: 'btn-toolbar',
|
||||||
|
@ -461,13 +462,13 @@ define([
|
||||||
hint: this.txtNext,
|
hint: this.txtNext,
|
||||||
hintAnchor: 'top'
|
hintAnchor: 'top'
|
||||||
});
|
});
|
||||||
this.btnNext.render( $('#id-review-button-next'));
|
this.btnNext.render($('#id-review-button-next'));
|
||||||
|
|
||||||
this.btnAccept = new Common.UI.Button({
|
this.btnAccept = new Common.UI.Button({
|
||||||
cls : 'btn-toolbar',
|
cls: 'btn-toolbar',
|
||||||
caption : this.txtAccept,
|
caption: this.txtAccept,
|
||||||
split : true,
|
split: true,
|
||||||
menu : new Common.UI.Menu({
|
menu: new Common.UI.Menu({
|
||||||
menuAlign: 'bl-tl',
|
menuAlign: 'bl-tl',
|
||||||
style: 'margin-top:-5px;',
|
style: 'margin-top:-5px;',
|
||||||
items: [
|
items: [
|
||||||
|
@ -485,10 +486,10 @@ define([
|
||||||
this.btnAccept.render($('#id-review-button-accept'));
|
this.btnAccept.render($('#id-review-button-accept'));
|
||||||
|
|
||||||
this.btnReject = new Common.UI.Button({
|
this.btnReject = new Common.UI.Button({
|
||||||
cls : 'btn-toolbar',
|
cls: 'btn-toolbar',
|
||||||
caption : this.txtReject,
|
caption: this.txtReject,
|
||||||
split : true,
|
split: true,
|
||||||
menu : new Common.UI.Menu({
|
menu: new Common.UI.Menu({
|
||||||
menuAlign: 'bl-tl',
|
menuAlign: 'bl-tl',
|
||||||
style: 'margin-top:-5px;',
|
style: 'margin-top:-5px;',
|
||||||
items: [
|
items: [
|
||||||
|
@ -511,7 +512,7 @@ define([
|
||||||
hint: this.txtClose,
|
hint: this.txtClose,
|
||||||
hintAnchor: 'top'
|
hintAnchor: 'top'
|
||||||
});
|
});
|
||||||
this.btnClose.render( $('#id-review-button-close'));
|
this.btnClose.render($('#id-review-button-close'));
|
||||||
this.btnClose.on('click', _.bind(this.onClose, this));
|
this.btnClose.on('click', _.bind(this.onClose, this));
|
||||||
|
|
||||||
this.boxSdk = $('#editor_sdk');
|
this.boxSdk = $('#editor_sdk');
|
||||||
|
@ -519,7 +520,7 @@ define([
|
||||||
Common.NotificationCenter.on('layout:changed', _.bind(this.onLayoutChanged, this));
|
Common.NotificationCenter.on('layout:changed', _.bind(this.onLayoutChanged, this));
|
||||||
},
|
},
|
||||||
|
|
||||||
onClose: function(event) {
|
onClose: function (event) {
|
||||||
this.hide();
|
this.hide();
|
||||||
this.fireEvent('hide', this);
|
this.fireEvent('hide', this);
|
||||||
},
|
},
|
||||||
|
@ -529,8 +530,8 @@ define([
|
||||||
this.fireEvent('show', this);
|
this.fireEvent('show', this);
|
||||||
},
|
},
|
||||||
|
|
||||||
onLayoutChanged: function(area) {
|
onLayoutChanged: function (area) {
|
||||||
if (area=='rightmenu' && this.boxSdk) {
|
if (area == 'rightmenu' && this.boxSdk) {
|
||||||
this.$el.css('right', ($('body').width() - this.boxSdk.offset().left - this.boxSdk.width() + 15) + 'px');
|
this.$el.css('right', ($('body').width() - this.boxSdk.offset().left - this.boxSdk.width() + 15) + 'px');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -538,9 +539,9 @@ define([
|
||||||
getPopover: function (sdkViewName) {
|
getPopover: function (sdkViewName) {
|
||||||
if (_.isUndefined(this.popover)) {
|
if (_.isUndefined(this.popover)) {
|
||||||
this.popover = new Common.Views.ReviewChangesPopover({
|
this.popover = new Common.Views.ReviewChangesPopover({
|
||||||
store : this.popoverChanges,
|
store: this.popoverChanges,
|
||||||
delegate : this,
|
delegate: this,
|
||||||
renderTo : sdkViewName
|
renderTo: sdkViewName
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -560,5 +561,6 @@ define([
|
||||||
txtRejectCurrent: 'Reject current Changes',
|
txtRejectCurrent: 'Reject current Changes',
|
||||||
txtRejectAll: 'Reject all Changes',
|
txtRejectAll: 'Reject all Changes',
|
||||||
txtClose: 'Close'
|
txtClose: 'Close'
|
||||||
}, Common.Views.ReviewChanges || {}))
|
}
|
||||||
|
}()), Common.Views.ReviewChanges || {}))
|
||||||
});
|
});
|
Loading…
Reference in a new issue