save as for pdf

This commit is contained in:
Sergey Linnik
2024-04-19 12:22:14 +03:00
parent e89eee7e28
commit 844e723387
10 changed files with 9 additions and 31 deletions

View File

@ -1,5 +1,6 @@
# Change Log
- save as for pdf
- fill permission in embedded mode
- delete all files
- handling conversion -9 error

View File

@ -337,6 +337,7 @@
config.events['onRequestUsers'] = onRequestUsers;
<% } %>
config.events['onRequestSaveAs'] = onRequestSaveAs;
// the user is mentioned in a comment
config.events['onRequestSendNotify'] = onRequestSendNotify;
// prevent file renaming for anonymous users
@ -347,10 +348,6 @@
config.events['onRequestOpen'] = onRequestOpen;
}
if (config.editorConfig.createUrl) {
config.events.onRequestSaveAs = onRequestSaveAs;
};
var сonnectEditor = function () {
docEditor = new DocsAPI.DocEditor("iframeEditor", config);
};

View File

@ -338,6 +338,7 @@
config.events['onRequestUsers'] = onRequestUsers;
<% } %>
config.events['onRequestSaveAs'] = onRequestSaveAs;
// the user is mentioned in a comment
config.events['onRequestSendNotify'] = onRequestSendNotify;
// prevent file renaming for anonymous users
@ -348,10 +349,6 @@
config.events['onRequestOpen'] = onRequestOpen;
}
if (config.editorConfig.createUrl) {
config.events.onRequestSaveAs = onRequestSaveAs;
};
var сonnectEditor = function () {
docEditor = new DocsAPI.DocEditor("iframeEditor", config);
};

View File

@ -318,6 +318,7 @@
if (config.editorConfig.user.id != 4) {
// add mentions for not anonymous users
config.events['onRequestUsers'] = onRequestUsers;
config.events['onRequestSaveAs'] = onRequestSaveAs;
// the user is mentioned in a comment
config.events['onRequestSendNotify'] = onRequestSendNotify;
// prevent file renaming for anonymous users
@ -334,10 +335,6 @@
}
}
if (config.editorConfig.createUrl) {
config.events.onRequestSaveAs = onRequestSaveAs;
};
var сonnectEditor = function () {
docEditor = new DocsAPI.DocEditor("iframeEditor", config);
};

View File

@ -317,6 +317,7 @@
if (config.editorConfig.user.id) {
// add mentions for not anonymous users
config.events['onRequestUsers'] = onRequestUsers;
config.events['onRequestSaveAs'] = onRequestSaveAs;
// the user is mentioned in a comment
config.events['onRequestSendNotify'] = onRequestSendNotify;
// prevent file renaming for anonymous users
@ -333,10 +334,6 @@
}
}
if (config.editorConfig.createUrl) {
config.events.onRequestSaveAs = onRequestSaveAs;
};
var сonnectEditor = function () {
docEditor = new DocsAPI.DocEditor("iframeEditor", config);
};

View File

@ -381,6 +381,7 @@
config.events.onRequestHistoryData = onRequestHistoryData;
config.events.onRequestRename = onRequestRename;
config.events.onRequestUsers = onRequestUsers;
config.events.onRequestSaveAs = onRequestSaveAs;
config.events.onRequestSendNotify = onRequestSendNotify;
config.events.onRequestReferenceData = onRequestReferenceData;
config.events.onRequestReferenceSource = onRequestReferenceSource;
@ -390,10 +391,6 @@
}
}
if (config.editorConfig.createUrl) {
config.events.onRequestSaveAs = onRequestSaveAs;
}
try {
var oformParam = new URL(window.location).searchParams.get("oform");
} catch (e) {}

View File

@ -256,6 +256,7 @@ final class DocEditorView extends View
if ($user->id != "uid-0") {
$historyLayout .= "// add mentions for not anonymous users
config.events['onRequestUsers'] = onRequestUsers;
config.events['onRequestSaveAs'] = onRequestSaveAs;
// the user is mentioned in a comment
config.events['onRequestSendNotify'] = onRequestSendNotify;
// prevent file renaming for anonymous users

View File

@ -337,10 +337,6 @@
{history}
if (config.editorConfig.createUrl) {
config.events.onRequestSaveAs = onRequestSaveAs;
};
docEditor = new DocsAPI.DocEditor("iframeEditor", config);
};

View File

@ -316,6 +316,7 @@
// add mentions for not anonymous users
config.events['onRequestUsers'] = onRequestUsers;
config.events['onRequestSaveAs'] = onRequestSaveAs;
// the user is mentioned in a comment
config.events['onRequestSendNotify'] = onRequestSendNotify;
// prevent file renaming for anonymous users
@ -333,9 +334,6 @@
}
}
if (config.editorConfig.createUrl) {
config.events.onRequestSaveAs = onRequestSaveAs;
};
docEditor = new DocsAPI.DocEditor("iframeEditor", config);
fixSize();

View File

@ -295,6 +295,7 @@
// add mentions for not anonymous users
config.events['onRequestUsers'] = onRequestUsers;
config.events['onRequestSaveAs'] = onRequestSaveAs;
// the user is mentioned in a comment
config.events['onRequestSendNotify'] = onRequestSendNotify;
// prevent file renaming for anonymous users
@ -311,10 +312,6 @@
}
}
if (config.editorConfig.createUrl) {
config.events.onRequestSaveAs = onRequestSaveAs;
};
docEditor = new DocsAPI.DocEditor("iframeEditor", config);
};