[DE] Get/set formula text
This commit is contained in:
parent
a02151af4f
commit
2d70f7af36
|
@ -78,6 +78,7 @@ define([
|
||||||
|
|
||||||
this.options.tpl = _.template(this.template)(this.options);
|
this.options.tpl = _.template(this.template)(this.options);
|
||||||
this.bookmarks = this.options.bookmarks;
|
this.bookmarks = this.options.bookmarks;
|
||||||
|
this.api = this.options.api;
|
||||||
|
|
||||||
Common.UI.Window.prototype.initialize.call(this, this.options);
|
Common.UI.Window.prototype.initialize.call(this, this.options);
|
||||||
},
|
},
|
||||||
|
@ -164,13 +165,11 @@ define([
|
||||||
|
|
||||||
afterRender: function() {
|
afterRender: function() {
|
||||||
this.refreshBookmarks();
|
this.refreshBookmarks();
|
||||||
this._setDefaults(this.props);
|
this._setDefaults();
|
||||||
},
|
},
|
||||||
|
|
||||||
_setDefaults: function (props) {
|
_setDefaults: function () {
|
||||||
if (props) {
|
this.inputFormula.setValue(this.api.asc_GetTableFormula());
|
||||||
|
|
||||||
}
|
|
||||||
this.checkFormulaInput(this.inputFormula, this.inputFormula.getValue());
|
this.checkFormulaInput(this.inputFormula, this.inputFormula.getValue());
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -771,11 +771,12 @@ define([
|
||||||
if (me.api && !this._locked){
|
if (me.api && !this._locked){
|
||||||
(new DE.Views.TableFormulaDialog(
|
(new DE.Views.TableFormulaDialog(
|
||||||
{
|
{
|
||||||
|
api: me.api,
|
||||||
bookmarks: me.api.asc_GetBookmarksManager(),
|
bookmarks: me.api.asc_GetBookmarksManager(),
|
||||||
handler: function(result, value) {
|
handler: function(result, value) {
|
||||||
if (result == 'ok') {
|
if (result == 'ok') {
|
||||||
if (me.api) {
|
if (me.api) {
|
||||||
// me.api.addFormula(value.tableProps);
|
me.api.asc_AddTableFormula(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
me.fireEvent('editcomplete', me);
|
me.fireEvent('editcomplete', me);
|
||||||
|
|
Loading…
Reference in a new issue