Composer fixes

This commit is contained in:
RainLoop Team 2015-04-16 21:55:13 +04:00
parent 01e1c770ea
commit b062e9b190
9 changed files with 86 additions and 61 deletions

View file

@ -22,6 +22,7 @@
'Sheet': 'sheet',
'Presentation': 'presentation',
'Certificate': 'certificate',
'CertificateBin': 'certificate-bin',
'Archive': 'archive'
};

View file

@ -32,7 +32,6 @@
this.resize = _.throttle(_.bind(this.resize, this), 100);
this.__inited = false;
this.__initedData = null;
this.init();
}
@ -206,10 +205,6 @@
this.focus();
}
}
else
{
this.__initedData = [true, sHtml, bFocus];
}
};
HtmlEditor.prototype.setPlain = function (sPlain, bFocus)
@ -233,10 +228,6 @@
this.focus();
}
}
else
{
this.__initedData = [false, sPlain, bFocus];
}
};
HtmlEditor.prototype.init = function ()
@ -318,37 +309,29 @@
self.focusTrigger();
});
if (self.fOnReady)
{
self.editor.on('instanceReady', function () {
self.editor.on('instanceReady', function () {
if (self.editor.removeMenuItem)
{
self.editor.removeMenuItem('cut');
self.editor.removeMenuItem('copy');
self.editor.removeMenuItem('paste');
}
if (self.editor.removeMenuItem)
{
self.editor.removeMenuItem('cut');
self.editor.removeMenuItem('copy');
self.editor.removeMenuItem('paste');
}
self.editor.setKeystroke(window.CKEDITOR.CTRL + 65 /* A */, 'selectAll');
self.editor.setKeystroke(window.CKEDITOR.CTRL + 65 /* A */, 'selectAll');
self.__resizable = true;
self.__inited = true;
self.resize();
if (self.fOnReady)
{
self.fOnReady();
self.__resizable = true;
self.__inited = true;
self.resize();
if (self.__initedData)
{
if (self.__initedData[0])
{
self.setHtml(self.__initedData[1], self.__initedData[2]);
}
else
{
self.setPlain(self.__initedData[1], self.__initedData[2]);
}
}
});
}
}
});
}
;