Merge pull request #368 from ONLYOFFICE/feature/Bug_44415

Feature/bug 44415
This commit is contained in:
JuliaSvinareva 2020-03-19 15:22:57 +03:00 committed by GitHub
commit efa7f8eaf7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 182 additions and 51 deletions

View file

@ -121,31 +121,73 @@ define([
var res = me.api.Cut();
if (!res) {
_view.hideMenu();
uiApp.modal({
title: me.textCopyCutPasteActions,
text : me.errorCopyCutPaste,
buttons: [{text: 'OK'}]
});
if (!Common.localStorage.getBool("de-hide-copy-cut-paste-warning")) {
uiApp.modal({
title: me.textCopyCutPasteActions,
text: me.errorCopyCutPaste,
afterText: '<label class="label-checkbox item-content no-ripple">' +
'<input type="checkbox" name="checkbox-show-cut">' +
'<div class="item-media" style="margin-top: 10px; display: flex; align-items: center;">' +
'<i class="icon icon-form-checkbox"></i><span style="margin-left: 10px;">' + me.textDoNotShowAgain + '</span>' +
'</div>' +
'</label>',
buttons: [{
text: 'OK',
onClick: function () {
var dontshow = $('input[name="checkbox-show-cut"]').prop('checked');
if (dontshow) Common.localStorage.setItem("de-hide-copy-cut-paste-warning", 1);
}
}]
});
}
}
} else if ('copy' == eventName) {
var res = me.api.Copy();
if (!res) {
_view.hideMenu();
uiApp.modal({
title: me.textCopyCutPasteActions,
text : me.errorCopyCutPaste,
buttons: [{text: 'OK'}]
});
if (!Common.localStorage.getBool("de-hide-copy-cut-paste-warning")) {
uiApp.modal({
title: me.textCopyCutPasteActions,
text: me.errorCopyCutPaste,
afterText: '<label class="label-checkbox item-content no-ripple">' +
'<input type="checkbox" name="checkbox-show-copy">' +
'<div class="item-media" style="margin-top: 10px; display: flex; align-items: center;">' +
'<i class="icon icon-form-checkbox"></i><span style="margin-left: 10px;">' + me.textDoNotShowAgain + '</span>' +
'</div>' +
'</label>',
buttons: [{
text: 'OK',
onClick: function () {
var dontshow = $('input[name="checkbox-show-copy"]').prop('checked');
if (dontshow) Common.localStorage.setItem("de-hide-copy-cut-paste-warning", 1);
}
}]
});
}
}
} else if ('paste' == eventName) {
var res = me.api.Paste();
if (!res) {
_view.hideMenu();
uiApp.modal({
title: me.textCopyCutPasteActions,
text: me.errorCopyCutPaste,
buttons: [{text: 'OK'}]
});
if (!Common.localStorage.getBool("de-hide-copy-cut-paste-warning")) {
uiApp.modal({
title: me.textCopyCutPasteActions,
text: me.errorCopyCutPaste,
afterText: '<label class="label-checkbox item-content no-ripple">' +
'<input type="checkbox" name="checkbox-show-paste">' +
'<div class="item-media" style="margin-top: 10px; display: flex; align-items: center;">' +
'<i class="icon icon-form-checkbox"></i><span style="margin-left: 10px;">' + me.textDoNotShowAgain + '</span>' +
'</div>' +
'</label>',
buttons: [{
text: 'OK',
onClick: function () {
var dontshow = $('input[name="checkbox-show-paste"]').prop('checked');
if (dontshow) Common.localStorage.setItem("de-hide-copy-cut-paste-warning", 1);
}
}]
});
}
}
} else if ('merge' == eventName) {
me.api.MergeCells();
@ -585,7 +627,8 @@ define([
menuDeleteTable: 'Delete Table',
menuReviewChange: 'Review Change',
textCopyCutPasteActions: 'Copy, Cut and Paste Actions',
errorCopyCutPaste: 'Copy, cut and paste actions using the context menu will be performed within the current file only. You cannot copy or paste to or from other applications.'
errorCopyCutPaste: 'Copy, cut and paste actions using the context menu will be performed within the current file only.',
textDoNotShowAgain: 'Do not show again'
}
})(), DE.Controllers.DocumentHolder || {}))
});

View file

@ -90,7 +90,8 @@
"DE.Controllers.AddTable.textColumns": "Columns",
"DE.Controllers.AddTable.textRows": "Rows",
"DE.Controllers.AddTable.textTableSize": "Table Size",
"DE.Controllers.DocumentHolder.errorCopyCutPaste": "Copy, cut and paste actions using the context menu will be performed within the current file only. You cannot copy or paste to or from other applications.",
"DE.Controllers.DocumentHolder.errorCopyCutPaste": "Copy, cut and paste actions using the context menu will be performed within the current file only.",
"DE.Controllers.DocumentHolder.textDoNotShowAgain": "Do not show again",
"DE.Controllers.DocumentHolder.menuAddLink": "Add Link",
"DE.Controllers.DocumentHolder.menuCopy": "Copy",
"DE.Controllers.DocumentHolder.menuCut": "Cut",

View file

@ -107,31 +107,73 @@ define([
var res = me.api.Cut();
if (!res) {
_view.hideMenu();
uiApp.modal({
title: me.textCopyCutPasteActions,
text : me.errorCopyCutPaste,
buttons: [{text: 'OK'}]
});
if (!Common.localStorage.getBool("pe-hide-copy-cut-paste-warning")) {
uiApp.modal({
title: me.textCopyCutPasteActions,
text: me.errorCopyCutPaste,
afterText: '<label class="label-checkbox item-content no-ripple">' +
'<input type="checkbox" name="checkbox-show-cut">' +
'<div class="item-media" style="margin-top: 10px; display: flex; align-items: center;">' +
'<i class="icon icon-form-checkbox"></i><span style="margin-left: 10px;">' + me.textDoNotShowAgain + '</span>' +
'</div>' +
'</label>',
buttons: [{
text: 'OK',
onClick: function () {
var dontshow = $('input[name="checkbox-show-cut"]').prop('checked');
if (dontshow) Common.localStorage.setItem("pe-hide-copy-cut-paste-warning", 1);
}
}]
});
}
}
} else if ('copy' == eventName) {
var res = me.api.Copy();
if (!res) {
_view.hideMenu();
uiApp.modal({
title: me.textCopyCutPasteActions,
text : me.errorCopyCutPaste,
buttons: [{text: 'OK'}]
});
if (!Common.localStorage.getBool("pe-hide-copy-cut-paste-warning")) {
uiApp.modal({
title: me.textCopyCutPasteActions,
text: me.errorCopyCutPaste,
afterText: '<label class="label-checkbox item-content no-ripple">' +
'<input type="checkbox" name="checkbox-show-copy">' +
'<div class="item-media" style="margin-top: 10px; display: flex; align-items: center;">' +
'<i class="icon icon-form-checkbox"></i><span style="margin-left: 10px;">' + me.textDoNotShowAgain + '</span>' +
'</div>' +
'</label>',
buttons: [{
text: 'OK',
onClick: function () {
var dontshow = $('input[name="checkbox-show-copy"]').prop('checked');
if (dontshow) Common.localStorage.setItem("pe-hide-copy-cut-paste-warning", 1);
}
}]
});
}
}
} else if ('paste' == eventName) {
var res = me.api.Paste();
if (!res) {
_view.hideMenu();
uiApp.modal({
title: me.textCopyCutPasteActions,
text: me.errorCopyCutPaste,
buttons: [{text: 'OK'}]
});
if (!Common.localStorage.getBool("pe-hide-copy-cut-paste-warning")) {
uiApp.modal({
title: me.textCopyCutPasteActions,
text: me.errorCopyCutPaste,
afterText: '<label class="label-checkbox item-content no-ripple">' +
'<input type="checkbox" name="checkbox-show-paste">' +
'<div class="item-media" style="margin-top: 10px; display: flex; align-items: center;">' +
'<i class="icon icon-form-checkbox"></i><span style="margin-left: 10px;">' + me.textDoNotShowAgain + '</span>' +
'</div>' +
'</label>',
buttons: [{
text: 'OK',
onClick: function () {
var dontshow = $('input[name="checkbox-show-paste"]').prop('checked');
if (dontshow) Common.localStorage.setItem("pe-hide-copy-cut-paste-warning", 1);
}
}]
});
}
}
} else if ('delete' == eventName) {
me.api.asc_Remove();
@ -355,7 +397,8 @@ define([
menuMore: 'More',
sheetCancel: 'Cancel',
textCopyCutPasteActions: 'Copy, Cut and Paste Actions',
errorCopyCutPaste: 'Copy, cut and paste actions using the context menu will be performed within the current file only. You cannot copy or paste to or from other applications.'
errorCopyCutPaste: 'Copy, cut and paste actions using the context menu will be performed within the current file only.',
textDoNotShowAgain: 'Do not show again'
}
})(), PE.Controllers.DocumentHolder || {}))
});

View file

@ -30,7 +30,8 @@
"PE.Controllers.AddTable.textColumns": "Columns",
"PE.Controllers.AddTable.textRows": "Rows",
"PE.Controllers.AddTable.textTableSize": "Table Size",
"PE.Controllers.DocumentHolder.errorCopyCutPaste": "Copy, cut and paste actions using the context menu will be performed within the current file only. You cannot copy or paste to or from other applications.",
"PE.Controllers.DocumentHolder.errorCopyCutPaste": "Copy, cut and paste actions using the context menu will be performed within the current file only.",
"PE.Controllers.DocumentHolder.textDoNotShowAgain": "Do not show again",
"PE.Controllers.DocumentHolder.menuAddLink": "Add Link",
"PE.Controllers.DocumentHolder.menuCopy": "Copy",
"PE.Controllers.DocumentHolder.menuCut": "Cut",

View file

@ -113,33 +113,74 @@ define([
var res = me.api.asc_Cut();
if (!res) {
me.view.hideMenu();
uiApp.modal({
title: me.textCopyCutPasteActions,
text : me.errorCopyCutPaste,
buttons: [{text: 'OK'}]
});
if (!Common.localStorage.getBool("sse-hide-copy-cut-paste-warning")) {
uiApp.modal({
title: me.textCopyCutPasteActions,
text: me.errorCopyCutPaste,
afterText: '<label class="label-checkbox item-content no-ripple">' +
'<input type="checkbox" name="checkbox-show-cut">' +
'<div class="item-media" style="margin-top: 10px; display: flex; align-items: center;">' +
'<i class="icon icon-form-checkbox"></i><span style="margin-left: 10px;">' + me.textDoNotShowAgain + '</span>' +
'</div>' +
'</label>',
buttons: [{
text: 'OK',
onClick: function () {
var dontshow = $('input[name="checkbox-show-cut"]').prop('checked');
if (dontshow) Common.localStorage.setItem("sse-hide-copy-cut-paste-warning", 1);
}
}]
});
}
}
break;
case 'copy':
var res = me.api.asc_Copy();
if (!res) {
me.view.hideMenu();
uiApp.modal({
title: me.textCopyCutPasteActions,
text : me.errorCopyCutPaste,
buttons: [{text: 'OK'}]
});
if (!Common.localStorage.getBool("sse-hide-copy-cut-paste-warning")) {
uiApp.modal({
title: me.textCopyCutPasteActions,
afterText: '<label class="label-checkbox item-content no-ripple">' +
'<input type="checkbox" name="checkbox-show-copy">' +
'<div class="item-media" style="margin-top: 10px; display: flex; align-items: center;">' +
'<i class="icon icon-form-checkbox"></i><span style="margin-left: 10px;">' + me.textDoNotShowAgain + '</span>' +
'</div>' +
'</label>',
buttons: [{
text: 'OK',
onClick: function () {
var dontshow = $('input[name="checkbox-show-copy"]').prop('checked');
if (dontshow) Common.localStorage.setItem("sse-hide-copy-cut-paste-warning", 1);
}
}]
});
}
}
break;
case 'paste':
var res = me.api.asc_Paste();
if (!res) {
me.view.hideMenu();
uiApp.modal({
title: me.textCopyCutPasteActions,
text: me.errorCopyCutPaste,
buttons: [{text: 'OK'}]
});
if (!Common.localStorage.getBool("sse-hide-copy-cut-paste-warning")) {
uiApp.modal({
title: me.textCopyCutPasteActions,
text: me.errorCopyCutPaste,
afterText: '<label class="label-checkbox item-content no-ripple">' +
'<input type="checkbox" name="checkbox-show-paste">' +
'<div class="item-media" style="margin-top: 10px; display: flex; align-items: center;">' +
'<i class="icon icon-form-checkbox"></i><span style="margin-left: 10px;">' + me.textDoNotShowAgain + '</span>' +
'</div>' +
'</label>',
buttons: [{
text: 'OK',
onClick: function () {
var dontshow = $('input[name="checkbox-show-paste"]').prop('checked');
if (dontshow) Common.localStorage.setItem("sse-hide-copy-cut-paste-warning", 1);
}
}]
});
}
}
break;
case 'del': me.api.asc_emptyCells(Asc.c_oAscCleanOptions.All); break;
@ -422,7 +463,8 @@ define([
menuFreezePanes: 'Freeze Panes',
menuUnfreezePanes: 'Unfreeze Panes',
textCopyCutPasteActions: 'Copy, Cut and Paste Actions',
errorCopyCutPaste: 'Copy, cut and paste actions using the context menu will be performed within the current file only. You cannot copy or paste to or from other applications.'
errorCopyCutPaste: 'Copy, cut and paste actions using the context menu will be performed within the current file only.',
textDoNotShowAgain: 'Do not show again'
}
})(), SSE.Controllers.DocumentHolder || {}))
});

View file

@ -23,7 +23,8 @@
"SSE.Controllers.AddLink.txtNotUrl": "This field should be a URL in the format 'http://www.example.com'",
"SSE.Controllers.AddOther.textEmptyImgUrl": "You need to specify image URL.",
"SSE.Controllers.AddOther.txtNotUrl": "This field should be a URL in the format 'http://www.example.com'",
"SSE.Controllers.DocumentHolder.errorCopyCutPaste": "Copy, cut and paste actions using the context menu will be performed within the current file only. You cannot copy or paste to or from other applications.",
"SSE.Controllers.DocumentHolder.errorCopyCutPaste": "Copy, cut and paste actions using the context menu will be performed within the current file only.",
"SSE.Controllers.DocumentHolder.textDoNotShowAgain": "Do not show again",
"SSE.Controllers.DocumentHolder.menuAddLink": "Add Link",
"SSE.Controllers.DocumentHolder.menuCell": "Cell",
"SSE.Controllers.DocumentHolder.menuCopy": "Copy",