Disable strict mode
This commit is contained in:
@@ -457,6 +457,22 @@ define([
|
|||||||
deleteOfflineLocks();
|
deleteOfflineLocks();
|
||||||
APP.onLocal();
|
APP.onLocal();
|
||||||
handleNewLocks(oldLocks, content.locks || {});
|
handleNewLocks(oldLocks, content.locks || {});
|
||||||
|
|
||||||
|
var observer = new MutationObserver(function(mutations) {
|
||||||
|
mutations.forEach(function(mutation) {
|
||||||
|
if (mutation.type === "childList") {
|
||||||
|
for (var i = 0; i < mutation.addedNodes.length; i++) {
|
||||||
|
if (mutation.addedNodes[i].classList.contains('asc-window') &&
|
||||||
|
mutation.addedNodes[i].classList.contains('alert')) {
|
||||||
|
$(mutation.addedNodes[i]).find('button').not('.custom').click();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
observer.observe(window.frames[0].document.body, {
|
||||||
|
childList: true,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// Add a lock
|
// Add a lock
|
||||||
@@ -625,6 +641,8 @@ define([
|
|||||||
var $tb = $('iframe[name="frameEditor"]').contents().find('head');
|
var $tb = $('iframe[name="frameEditor"]').contents().find('head');
|
||||||
var css = '#id-toolbar-full .toolbar-group:nth-child(2), #id-toolbar-full .separator:nth-child(3) { display: none; }' +
|
var css = '#id-toolbar-full .toolbar-group:nth-child(2), #id-toolbar-full .separator:nth-child(3) { display: none; }' +
|
||||||
'#fm-btn-save { display: none !important; }' +
|
'#fm-btn-save { display: none !important; }' +
|
||||||
|
'#panel-settings-general tr.autosave { display: none !important; }' +
|
||||||
|
'#panel-settings-general tr.coauth { display: none !important; }' +
|
||||||
'#header { display: none !important; }';
|
'#header { display: none !important; }';
|
||||||
$('<style>').text(css).appendTo($tb);
|
$('<style>').text(css).appendTo($tb);
|
||||||
if (UI.findOKButton().length) {
|
if (UI.findOKButton().length) {
|
||||||
@@ -642,6 +660,7 @@ define([
|
|||||||
APP.docEditor = new window.DocsAPI.DocEditor("cp-app-oo-placeholder", APP.ooconfig);
|
APP.docEditor = new window.DocsAPI.DocEditor("cp-app-oo-placeholder", APP.ooconfig);
|
||||||
ooLoaded = true;
|
ooLoaded = true;
|
||||||
makeChannel();
|
makeChannel();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var loadLastDocument = function () {
|
var loadLastDocument = function () {
|
||||||
@@ -737,7 +756,6 @@ define([
|
|||||||
if (initializing) { return; }
|
if (initializing) { return; }
|
||||||
if (readOnly) { return; }
|
if (readOnly) { return; }
|
||||||
|
|
||||||
console.error('onLocal, data available');
|
|
||||||
// Update metadata
|
// Update metadata
|
||||||
var content = stringifyInner();
|
var content = stringifyInner();
|
||||||
APP.realtime.contentUpdate(content);
|
APP.realtime.contentUpdate(content);
|
||||||
|
|||||||
Reference in New Issue
Block a user