Review changes refactoring.

This commit is contained in:
Julia Radzhabova 2017-12-13 16:53:00 +03:00
parent 3a3e0602b7
commit 419d00f2db

View file

@ -438,6 +438,12 @@ define([
'</div>' +
'</section>';
function _click_turnpreview(btn, e) {
if (this.appConfig.canReview) {
Common.NotificationCenter.trigger('reviewchanges:turn', btn.pressed ? 'on' : 'off');
}
};
function setEvents() {
var me = this;
@ -466,12 +472,6 @@ define([
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) {
button.on('click', _click_turnpreview.bind(me));
Common.NotificationCenter.trigger('edit:complete', me);