csharp-mvc: remove historyClose and restore

This commit is contained in:
sshakndr
2023-12-19 15:41:22 +07:00
parent 92206ed637
commit dc14a9aa90
2 changed files with 16 additions and 12 deletions

View File

@ -59,7 +59,9 @@ namespace OnlineEditorsExampleMVC.Helpers
"Cant print the file",
"Can create new files from the editor",
"Can see the information about Group2 users",
"Cant submit forms"
"Cant submit forms",
"Can't close history",
"Can't restore the file version"
};
static List<string> descr_user_0 = new List<string>()

View File

@ -259,6 +259,13 @@
}
}
<% string usersForMentions; %>
<% Model.GetUsersMentions(Request, out usersForMentions); %>
<% string usersInfo; %>
<% Model.GetUsersInfo(Request, out usersInfo); %>
<% string usersForProtect; %>
<% Model.GetUsersProtect(Request, out usersForProtect); %>
var onRequestUsers = function (event) {
if (event && event.data){
var c = event.data.c;
@ -311,23 +318,18 @@
"onRequestSelectSpreadsheet": onRequestSelectSpreadsheet,
};
<% string usersForMentions; %>
<% Model.GetUsersMentions(Request, out usersForMentions); %>
<% string usersInfo; %>
<% Model.GetUsersInfo(Request, out usersInfo); %>
<% string usersForProtect; %>
<% Model.GetUsersProtect(Request, out usersForProtect); %>
if (config.editorConfig.user.id) {
// the user is trying to show the document version history
config.events['onRequestHistory'] = onRequestHistory;
// the user is trying to click the specific document version in the document version history
config.events['onRequestHistoryData'] = onRequestHistoryData;
// the user is trying to go back to the document from viewing the document version history
config.events['onRequestHistoryClose'] = function () {
document.location.reload();
};
config.events['onRequestRestore'] = onRequestRestore;
if (config.editorConfig.user.id !== "uid-3") {
config.events['onRequestHistoryClose'] = function () {
document.location.reload();
};
config.events['onRequestRestore'] = onRequestRestore;
}
// add mentions for not anonymous users
<% if (!string.IsNullOrEmpty(usersForMentions))