2017-06-24 00:58:56 +03:00
|
|
|
CKEDITOR.plugins.add('savedocs', {
|
|
|
|
init: function(a) {
|
|
|
|
var cmd = a.addCommand('savedoc', {
|
2020-07-02 17:59:09 +03:00
|
|
|
exec: saveDocument
|
2017-06-24 00:58:56 +03:00
|
|
|
})
|
|
|
|
a.ui.addButton('savedocs', {
|
|
|
|
label: 'Save',
|
|
|
|
command: 'savedoc',
|
|
|
|
icon: this.path + "images/save.png"
|
|
|
|
})
|
|
|
|
}
|
2020-07-02 17:59:09 +03:00
|
|
|
});
|
2017-06-24 00:58:56 +03:00
|
|
|
|
2020-07-02 17:59:09 +03:00
|
|
|
function saveDocument(event) {
|
|
|
|
var theForm = event.element.$.form;
|
2017-06-24 00:58:56 +03:00
|
|
|
if (typeof(theForm.onsubmit) == 'function') {
|
2020-07-02 17:59:09 +03:00
|
|
|
AveDocs.saveDocument();
|
2017-06-24 00:58:56 +03:00
|
|
|
return false;
|
|
|
|
} else {
|
2020-07-02 17:59:09 +03:00
|
|
|
AveDocs.saveDocument();
|
2017-06-24 00:58:56 +03:00
|
|
|
}
|
|
|
|
}
|