Review changes refactoring.
This commit is contained in:
parent
3a3e0602b7
commit
419d00f2db
|
@ -438,6 +438,12 @@ define([
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'</section>';
|
'</section>';
|
||||||
|
|
||||||
|
function _click_turnpreview(btn, e) {
|
||||||
|
if (this.appConfig.canReview) {
|
||||||
|
Common.NotificationCenter.trigger('reviewchanges:turn', btn.pressed ? 'on' : 'off');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
function setEvents() {
|
function setEvents() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
|
@ -466,12 +472,6 @@ define([
|
||||||
me.fireEvent('reviewchange:reject', [menu, item]);
|
me.fireEvent('reviewchange:reject', [menu, item]);
|
||||||
});
|
});
|
||||||
|
|
||||||
function _click_turnpreview(btn, e) {
|
|
||||||
if (me.appConfig.canReview) {
|
|
||||||
Common.NotificationCenter.trigger('reviewchanges:turn', btn.pressed ? 'on' : 'off');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this.btnsTurnReview.forEach(function (button) {
|
this.btnsTurnReview.forEach(function (button) {
|
||||||
button.on('click', _click_turnpreview.bind(me));
|
button.on('click', _click_turnpreview.bind(me));
|
||||||
Common.NotificationCenter.trigger('edit:complete', me);
|
Common.NotificationCenter.trigger('edit:complete', me);
|
||||||
|
|
Loading…
Reference in a new issue