[SSE] Set not-modal watch window

This commit is contained in:
Julia Radzhabova 2022-06-24 22:37:11 +03:00
parent 5b0769f326
commit 8be25036a9
3 changed files with 22 additions and 12 deletions

View file

@ -411,13 +411,22 @@ define([
}
},
onWatch: function() {
(new SSE.Views.WatchDialog({
api: this.api,
handler: function(result) {
Common.NotificationCenter.trigger('edit:complete');
},
})).show();
onWatch: function(state) {
if (state) {
var me = this;
this._watchDlg = new SSE.Views.WatchDialog({
api: this.api,
handler: function(result) {
Common.NotificationCenter.trigger('edit:complete');
}
});
this._watchDlg.on('close', function(win){
me.formulaTab.btnWatch.toggle(false, true);
me._watchDlg = null;
}).show();
} else if (this._watchDlg)
this._watchDlg.close();
},
sCategoryAll: 'All',

View file

@ -69,8 +69,8 @@ define([
me.btnNamedRange.menu.on('item:click', function (menu, item, e) {
me.fireEvent('function:namedrange', [menu, item, e]);
});
me.btnWatch.on('click', function(){
me.fireEvent('function:watch');
me.btnWatch.on('click', function(b, e){
me.fireEvent('function:watch', [b.pressed]);
});
}
return {
@ -328,7 +328,8 @@ define([
caption: this.txtWatch,
hint: this.tipWatch,
disabled: true,
lock: [_set.editText, _set.lostConnect, _set.coAuth],
enableToggle: true,
lock: [_set.editCell, _set.lostConnect, _set.coAuth],
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'small'

View file

@ -53,6 +53,7 @@ define([ 'text!spreadsheeteditor/main/app/template/WatchDialog.template',
alias: 'WatchDialog',
contentWidth: 560,
height: 294,
modal: false,
buttons: null
},
@ -148,9 +149,8 @@ define([ 'text!spreadsheeteditor/main/app/template/WatchDialog.template',
props: watch
});
}
this.watchList.store.reset(arr);
}
this.watchList.store.reset(arr);
this.updateButtons();
},