mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-02-10 18:05:10 +08:00
format
This commit is contained in:
@ -219,14 +219,17 @@
|
||||
document.location.reload();
|
||||
};
|
||||
<% } %>
|
||||
|
||||
// add mentions for not anonymous users
|
||||
<% if (!string.IsNullOrEmpty(usersForMentions)) { %>
|
||||
<% if (!string.IsNullOrEmpty(usersForMentions))
|
||||
{ %>
|
||||
config.events['onRequestUsers'] = function () {
|
||||
docEditor.setUsers({ // set a list of users to mention in the comments
|
||||
"users": <%= usersForMentions %>
|
||||
"users": <%= usersForMentions %>
|
||||
});
|
||||
};
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
// the user is mentioned in a comment
|
||||
config.events['onRequestSendNotify'] = function (event) {
|
||||
event.data.actionLink = replaceActionLink(location.href, JSON.stringify(event.data.actionLink));
|
||||
@ -235,8 +238,8 @@
|
||||
};
|
||||
// prevent file renaming for anonymous users
|
||||
config.events['onRequestRename'] = onRequestRename;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (config.editorConfig.createUrl) {
|
||||
config.events.onRequestSaveAs = onRequestSaveAs;
|
||||
};
|
||||
|
||||
@ -208,7 +208,8 @@
|
||||
};
|
||||
|
||||
if (config.editorConfig.user.id) {
|
||||
<% if (!string.IsNullOrEmpty(History) && !string.IsNullOrEmpty(HistoryData)) { %>
|
||||
<% if (!string.IsNullOrEmpty(History) && !string.IsNullOrEmpty(HistoryData))
|
||||
{ %>
|
||||
config.events['onRequestHistory'] = function () { // the user is trying to show the document version history
|
||||
docEditor.refreshHistory(<%= History %>); // show the document version history
|
||||
};
|
||||
@ -221,15 +222,17 @@
|
||||
document.location.reload();
|
||||
};
|
||||
<% } %>
|
||||
|
||||
// add mentions for not anonymous users
|
||||
<% if (!string.IsNullOrEmpty(UsersForMentions)) { %>
|
||||
<% if (!string.IsNullOrEmpty(UsersForMentions))
|
||||
{ %>
|
||||
config.events['onRequestUsers'] = function () {
|
||||
docEditor.setUsers({ // set a list of users to mention in the comments
|
||||
"users": <%= UsersForMentions %>
|
||||
});
|
||||
};
|
||||
<% } %>
|
||||
|
||||
<% } %>
|
||||
|
||||
// the user is mentioned in a comment
|
||||
config.events['onRequestSendNotify'] = function (event) {
|
||||
event.data.actionLink = replaceActionLink(location.href, JSON.stringify(event.data.actionLink));
|
||||
@ -239,7 +242,7 @@
|
||||
// prevent file renaming for anonymous users
|
||||
config.events['onRequestRename'] = onRequestRename;
|
||||
}
|
||||
|
||||
|
||||
if (config.editorConfig.createUrl) {
|
||||
config.events.onRequestSaveAs = onRequestSaveAs;
|
||||
};
|
||||
|
||||
@ -179,7 +179,7 @@
|
||||
var historyData = histArray[1];
|
||||
var usersForMentions = [[${usersForMentions}]];
|
||||
|
||||
if(config.editorConfig.user.id != 4){
|
||||
if (config.editorConfig.user.id != 4) {
|
||||
if (hist && historyData) {
|
||||
// the user is trying to show the document version history
|
||||
config.events['onRequestHistory'] = function () {
|
||||
|
||||
@ -196,7 +196,7 @@
|
||||
|
||||
|
||||
if (config.editorConfig.user.id) {
|
||||
|
||||
|
||||
{% if history and historyData %}
|
||||
|
||||
// the user is trying to show the document version history
|
||||
|
||||
@ -172,7 +172,7 @@
|
||||
<%
|
||||
history = @file.get_history
|
||||
usersMentions = @file.get_users_mentions %>
|
||||
|
||||
|
||||
if (config.editorConfig.user.id) {
|
||||
<% if history %>
|
||||
// the user is trying to show the document version history
|
||||
|
||||
Reference in New Issue
Block a user