Commit 7cb1baf5 authored by Julia Radzhabova's avatar Julia Radzhabova

Delete unused events and methods.

parent f9534c18
...@@ -130,8 +130,7 @@ ...@@ -130,8 +130,7 @@
events: { events: {
'onReady': <document ready callback>, 'onReady': <document ready callback>,
'onBack': <back to folder callback>, 'onBack': <back to folder callback>,
'onDocumentStateChange': <document state changed callback>, 'onDocumentStateChange': <document state changed callback>
'onSave': <save request callback>
} }
} }
...@@ -279,9 +278,6 @@ ...@@ -279,9 +278,6 @@
if (handler) { if (handler) {
res = handler.call(_self, {target: _self, data: msg.data}); res = handler.call(_self, {target: _self, data: msg.data});
if (msg.event === 'onSave' && res !== false) {
_processSaveResult(true);
}
} }
} }
} }
......
...@@ -65,7 +65,6 @@ ...@@ -65,7 +65,6 @@
'onRequestEmailAddresses': onRequestEmailAddresses, 'onRequestEmailAddresses': onRequestEmailAddresses,
'onRequestStartMailMerge': onRequestStartMailMerge, 'onRequestStartMailMerge': onRequestStartMailMerge,
'onRequestHistoryClose': onRequestHistoryClose, 'onRequestHistoryClose': onRequestHistoryClose,
'onSave': onDocumentSave,
'onError': onError 'onError': onError
} }
}); });
...@@ -195,12 +194,6 @@ ...@@ -195,12 +194,6 @@
docEditor.applyEditRights(true, "Someone is editing this document right now. Please try again later."); docEditor.applyEditRights(true, "Someone is editing this document right now. Please try again later.");
} }
function onDocumentSave(event) {
var url = event.data;
// if you want to async save process return false
// and call api.processSaveResult when ready
}
function onError(event) { function onError(event) {
// critical error happened // critical error happened
// examine event.data.errorCode and event.data.errorDescription for details // examine event.data.errorCode and event.data.errorDescription for details
......
...@@ -142,13 +142,6 @@ if (Common === undefined) { ...@@ -142,13 +142,6 @@ if (Common === undefined) {
_postMessage({ event: 'onReady' }); _postMessage({ event: 'onReady' });
}, },
save: function(url) {
_postMessage({
event: 'onSave',
data: url
});
},
requestEditRights: function() { requestEditRights: function() {
_postMessage({ event: 'onRequestEditRights' }); _postMessage({ event: 'onRequestEditRights' });
}, },
......
...@@ -1106,7 +1106,6 @@ define([ ...@@ -1106,7 +1106,6 @@ define([
me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me)); me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me));
me.api.asc_registerCallback('asc_onDocumentCanSaveChanged', _.bind(me.onDocumentCanSaveChanged, me)); me.api.asc_registerCallback('asc_onDocumentCanSaveChanged', _.bind(me.onDocumentCanSaveChanged, me));
me.api.asc_registerCallback('asc_onSaveUrl', _.bind(me.onSaveUrl, me));
/** coauthoring begin **/ /** coauthoring begin **/
me.api.asc_registerCallback('asc_onCollaborativeChanges', _.bind(me.onCollaborativeChanges, me)); me.api.asc_registerCallback('asc_onCollaborativeChanges', _.bind(me.onCollaborativeChanges, me));
me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me)); me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me));
...@@ -1467,10 +1466,6 @@ define([ ...@@ -1467,10 +1466,6 @@ define([
$('#loading-mask').hide().remove(); $('#loading-mask').hide().remove();
}, },
onSaveUrl: function(url) {
Common.Gateway.save(url);
},
onDownloadUrl: function(url) { onDownloadUrl: function(url) {
if (this._state.isFromGatewayDownloadAs) if (this._state.isFromGatewayDownloadAs)
Common.Gateway.downloadAs(url); Common.Gateway.downloadAs(url);
......
...@@ -677,7 +677,6 @@ define([ ...@@ -677,7 +677,6 @@ define([
me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me)); me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me));
me.api.asc_registerCallback('asc_onDocumentCanSaveChanged', _.bind(me.onDocumentCanSaveChanged, me)); me.api.asc_registerCallback('asc_onDocumentCanSaveChanged', _.bind(me.onDocumentCanSaveChanged, me));
me.api.asc_registerCallback('asc_onSaveUrl', _.bind(me.onSaveUrl, me));
/** coauthoring begin **/ /** coauthoring begin **/
me.api.asc_registerCallback('asc_onCollaborativeChanges', _.bind(me.onCollaborativeChanges, me)); me.api.asc_registerCallback('asc_onCollaborativeChanges', _.bind(me.onCollaborativeChanges, me));
me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me)); me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me));
...@@ -929,10 +928,6 @@ define([ ...@@ -929,10 +928,6 @@ define([
$('#loading-mask').hide().remove(); $('#loading-mask').hide().remove();
}, },
onSaveUrl: function(url) {
Common.Gateway.save(url);
},
onDownloadUrl: function(url) { onDownloadUrl: function(url) {
if (this._state.isFromGatewayDownloadAs) { if (this._state.isFromGatewayDownloadAs) {
Common.Gateway.downloadAs(url); Common.Gateway.downloadAs(url);
......
...@@ -866,7 +866,6 @@ define([ ...@@ -866,7 +866,6 @@ define([
me.api.asc_registerCallback('asc_onChangeObjectLock', _.bind(me._onChangeObjectLock, me)); me.api.asc_registerCallback('asc_onChangeObjectLock', _.bind(me._onChangeObjectLock, me));
me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me)); me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me));
me.api.asc_registerCallback('asc_onDocumentCanSaveChanged', _.bind(me.onDocumentCanSaveChanged, me)); me.api.asc_registerCallback('asc_onDocumentCanSaveChanged', _.bind(me.onDocumentCanSaveChanged, me));
me.api.asc_registerCallback('asc_onSaveUrl', _.bind(me.onSaveUrl, me));
/** coauthoring begin **/ /** coauthoring begin **/
me.api.asc_registerCallback('asc_onCollaborativeChanges', _.bind(me.onCollaborativeChanges, me)); me.api.asc_registerCallback('asc_onCollaborativeChanges', _.bind(me.onCollaborativeChanges, me));
me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me)); me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me));
...@@ -1217,10 +1216,6 @@ define([ ...@@ -1217,10 +1216,6 @@ define([
$('#loading-mask').hide().remove(); $('#loading-mask').hide().remove();
}, },
onSaveUrl: function(url) {
Common.Gateway.save(url);
},
onDownloadUrl: function(url) { onDownloadUrl: function(url) {
Common.Gateway.downloadAs(url); Common.Gateway.downloadAs(url);
}, },
......
...@@ -637,7 +637,6 @@ define([ ...@@ -637,7 +637,6 @@ define([
me.api.asc_registerCallback('asc_onChangeObjectLock', _.bind(me._onChangeObjectLock, me)); me.api.asc_registerCallback('asc_onChangeObjectLock', _.bind(me._onChangeObjectLock, me));
me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me)); me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me));
me.api.asc_registerCallback('asc_onDocumentCanSaveChanged', _.bind(me.onDocumentCanSaveChanged, me)); me.api.asc_registerCallback('asc_onDocumentCanSaveChanged', _.bind(me.onDocumentCanSaveChanged, me));
me.api.asc_registerCallback('asc_onSaveUrl', _.bind(me.onSaveUrl, me));
/** coauthoring begin **/ /** coauthoring begin **/
me.api.asc_registerCallback('asc_onCollaborativeChanges', _.bind(me.onCollaborativeChanges, me)); me.api.asc_registerCallback('asc_onCollaborativeChanges', _.bind(me.onCollaborativeChanges, me));
me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me)); me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me));
...@@ -889,10 +888,6 @@ define([ ...@@ -889,10 +888,6 @@ define([
$('#loading-mask').hide().remove(); $('#loading-mask').hide().remove();
}, },
onSaveUrl: function(url) {
Common.Gateway.save(url);
},
onDownloadUrl: function(url) { onDownloadUrl: function(url) {
if (this._state.isFromGatewayDownloadAs) { if (this._state.isFromGatewayDownloadAs) {
Common.Gateway.downloadAs(url); Common.Gateway.downloadAs(url);
......
...@@ -649,7 +649,6 @@ define([ ...@@ -649,7 +649,6 @@ define([
rightmenuController.createDelayedElements(); rightmenuController.createDelayedElements();
me.api.asc_registerCallback('asc_onSaveUrl', _.bind(me.onSaveUrl, me));
me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me)); me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me));
me.api.asc_registerCallback('asc_onDocumentCanSaveChanged', _.bind(me.onDocumentCanSaveChanged, me)); me.api.asc_registerCallback('asc_onDocumentCanSaveChanged', _.bind(me.onDocumentCanSaveChanged, me));
me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me)); me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me));
...@@ -1360,10 +1359,6 @@ define([ ...@@ -1360,10 +1359,6 @@ define([
$('#loading-mask').hide().remove(); $('#loading-mask').hide().remove();
}, },
onSaveUrl: function(url) {
Common.Gateway.save(url);
},
onDownloadUrl: function(url) { onDownloadUrl: function(url) {
Common.Gateway.downloadAs(url); Common.Gateway.downloadAs(url);
}, },
......
...@@ -653,7 +653,6 @@ define([ ...@@ -653,7 +653,6 @@ define([
me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me)); me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me));
me.api.asc_registerCallback('asc_onDocumentCanSaveChanged', _.bind(me.onDocumentCanSaveChanged, me)); me.api.asc_registerCallback('asc_onDocumentCanSaveChanged', _.bind(me.onDocumentCanSaveChanged, me));
me.api.asc_registerCallback('asc_onSaveUrl', _.bind(me.onSaveUrl, me));
/** coauthoring begin **/ /** coauthoring begin **/
me.api.asc_registerCallback('asc_onCollaborativeChanges', _.bind(me.onCollaborativeChanges, me)); me.api.asc_registerCallback('asc_onCollaborativeChanges', _.bind(me.onCollaborativeChanges, me));
me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me)); me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me));
...@@ -1023,10 +1022,6 @@ define([ ...@@ -1023,10 +1022,6 @@ define([
$('#loading-mask').hide().remove(); $('#loading-mask').hide().remove();
}, },
onSaveUrl: function(url) {
Common.Gateway.save(url);
},
onDownloadUrl: function(url) { onDownloadUrl: function(url) {
if (this._state.isFromGatewayDownloadAs) { if (this._state.isFromGatewayDownloadAs) {
Common.Gateway.downloadAs(url); Common.Gateway.downloadAs(url);
......
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