[DE] Review: close tooltip in statusbar when review button is pressed off.

This commit is contained in:
Julia Radzhabova 2017-04-25 11:54:45 +03:00
parent 293d08c2be
commit ef3fbc630b
2 changed files with 13 additions and 1 deletions

View file

@ -99,6 +99,10 @@ define([
: tipEl.css({top : showxy.top + this.target.height()/2 + 'px', left: showxy.left + this.target.width() + 'px'});
},
isVisible: function() {
return tipEl && tipEl.is(':visible');
},
textDontShow : 'Don\'t show this message again',
textSynchronize : 'The document has been changed by another user.<br/>Please click to save your changes and reload the updates.'
}

View file

@ -104,7 +104,8 @@ define([
}
});
Common.NotificationCenter.on('app:ready', me.onAppReady.bind(this));
Common.NotificationCenter.on('app:ready', me.onAppReady.bind(me));
Common.NotificationCenter.on('reviewchanges:turn', me.onTurnPreview.bind(me));
},
onAppReady: function (config) {
@ -155,6 +156,13 @@ define([
});
},
onTurnPreview: function(state) {
if (state == 'off' && this.changesTooltip && this.changesTooltip.isVisible()) {
this.changesTooltip.hide();
this.btnTurnReview.updateHint(this.tipReview);
}
},
setApi: function(api) {
this.api = api;
this.api.asc_registerCallback('asc_onZoomChange', _.bind(this._onZoomChange, this));