[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() { onWatch: function(state) {
(new SSE.Views.WatchDialog({ if (state) {
var me = this;
this._watchDlg = new SSE.Views.WatchDialog({
api: this.api, api: this.api,
handler: function(result) { handler: function(result) {
Common.NotificationCenter.trigger('edit:complete'); Common.NotificationCenter.trigger('edit:complete');
}, }
})).show(); });
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', sCategoryAll: 'All',

View file

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

View file

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