Commit 01473b72 authored by Alexander Yuzhin's avatar Alexander Yuzhin

[SSE] Fix Bug 33907

parent e258200a
......@@ -60,6 +60,9 @@ define([
initialize: function () {
var me = this;
Common.NotificationCenter.on('document:ready', _.bind(me.onDocumentReady, me));
this.addListeners({
'FileMenu': {
'settings:apply': function() {
......@@ -71,16 +74,28 @@ define([
setApi: function (api) {
this.api = api;
return this;
},
if (this.formulasGroups && this.api) {
this.loadingFormulas();
setMode: function(mode) {
this.mode = mode;
return this;
},
onLaunch: function () {
this.formulasGroups = this.getApplication().getCollection('FormulaGroups');
},
var me = this;
onDocumentReady: function () {
var me = this;
this.formulas = new SSE.Views.FormulaDialog({
api : this.api,
if (me.formulasGroups && me.api) {
me.loadingFormulas();
me.formulas = new SSE.Views.FormulaDialog({
api : me.api,
toolclose : 'hide',
formulasGroups : this.formulasGroups,
formulasGroups : me.formulasGroups,
handler : function (func) {
if (func && me.api) {
me.api.asc_insertFormula(func, Asc.c_oAscPopUpSelectorType.Func);
......@@ -88,7 +103,7 @@ define([
}
});
this.formulas.on({
me.formulas.on({
'hide': function () {
if (me.api) {
me.api.asc_enableKeyEvents(true);
......@@ -96,17 +111,6 @@ define([
}
});
}
return this;
},
setMode: function(mode) {
this.mode = mode;
return this;
},
onLaunch: function () {
this.formulasGroups = this.getApplication().getCollection('FormulaGroups');
},
showDialog: function () {
......
......@@ -58,7 +58,8 @@ define([
],
initialize: function () {
Common.NotificationCenter.on('addcontainer:show', _.bind(this.initEvents, this));
Common.NotificationCenter.on('addcontainer:show', _.bind(this.initEvents, this));
Common.NotificationCenter.on('document:ready', _.bind(this.onDocumentReady, this));
this.addListeners({
'AddFunction': {
......@@ -85,6 +86,15 @@ define([
initEvents: function () {
},
onDocumentReady: function () {
var me = this;
_.defer(function () {
me.api.asc_setLocalization(fc);
me.fillFunctions.call(me);
});
},
fillFunctions: function() {
var functions = {};
var jsonDescr = JSON.parse(fd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment