|
|
@ -227,9 +227,13 @@ define([
|
|
|
|
cpIndex: 0
|
|
|
|
cpIndex: 0
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var getEditor = function () {
|
|
|
|
|
|
|
|
return window.frames[0].editor || window.frames[0].editorCell;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var getContent = function () {
|
|
|
|
var getContent = function () {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
return window.frames[0].editor.asc_nativeGetFile();
|
|
|
|
return getEditor().asc_nativeGetFile();
|
|
|
|
} catch (e) {
|
|
|
|
} catch (e) {
|
|
|
|
console.error(e);
|
|
|
|
console.error(e);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -242,7 +246,7 @@ define([
|
|
|
|
// loadable by users joining after the checkpoint
|
|
|
|
// loadable by users joining after the checkpoint
|
|
|
|
var fixSheets = function () {
|
|
|
|
var fixSheets = function () {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
var editor = window.frames[0].editor;
|
|
|
|
var editor = getEditor();
|
|
|
|
// if we are not in the sheet app
|
|
|
|
// if we are not in the sheet app
|
|
|
|
// we should not call this code
|
|
|
|
// we should not call this code
|
|
|
|
if (typeof editor.GetSheets === 'undefined') { return; }
|
|
|
|
if (typeof editor.GetSheets === 'undefined') { return; }
|
|
|
@ -1173,7 +1177,7 @@ define([
|
|
|
|
UI.removeModals();
|
|
|
|
UI.removeModals();
|
|
|
|
UI.confirm(Messages.oo_uploaded, function (yes) {
|
|
|
|
UI.confirm(Messages.oo_uploaded, function (yes) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
window.frames[0].editor.setViewModeDisconnect();
|
|
|
|
getEditor().setViewModeDisconnect();
|
|
|
|
} catch (e) {}
|
|
|
|
} catch (e) {}
|
|
|
|
if (!yes) { return; }
|
|
|
|
if (!yes) { return; }
|
|
|
|
common.gotoURL();
|
|
|
|
common.gotoURL();
|
|
|
@ -1303,7 +1307,7 @@ define([
|
|
|
|
var setEditable = function (state) {
|
|
|
|
var setEditable = function (state) {
|
|
|
|
if (!state) {
|
|
|
|
if (!state) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
window.frames[0].editor.setViewModeDisconnect(true);
|
|
|
|
getEditor().setViewModeDisconnect(true);
|
|
|
|
} catch (e) {}
|
|
|
|
} catch (e) {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
debug(state);
|
|
|
|
debug(state);
|
|
|
|