Merge pull request #2093 from ONLYOFFICE/fix/bugfix

Fix/bugfix
This commit is contained in:
Julia Radzhabova 2022-11-29 13:06:44 +03:00 committed by GitHub
commit d8e3a7be30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 39 additions and 12 deletions

View file

@ -1787,6 +1787,9 @@ define([
this.showTips([this.scriptLoadError]);
this.tooltip && this.tooltip.getBSTip().$tip.css('z-index', 10000);
return;
} else if (id == Asc.c_oAscError.ID.CanNotPasteImage) {
this.showTips([this.errorCannotPasteImg], {timeout: 7000, hideCloseTip: true});
return;
}
this.hidePreloader();
@ -3322,7 +3325,8 @@ define([
errorInconsistentExtXlsx: 'An error has occurred while opening the file.<br>The file content corresponds to spreadsheets (e.g. xlsx), but the file has the inconsistent extension: %1.',
errorInconsistentExtPptx: 'An error has occurred while opening the file.<br>The file content corresponds to presentations (e.g. pptx), but the file has the inconsistent extension: %1.',
errorInconsistentExtPdf: 'An error has occurred while opening the file.<br>The file content corresponds to one of the following formats: pdf/djvu/xps/oxps, but the file has the inconsistent extension: %1.',
errorInconsistentExt: 'An error has occurred while opening the file.<br>The file content does not match the file extension.'
errorInconsistentExt: 'An error has occurred while opening the file.<br>The file content does not match the file extension.',
errorCannotPasteImg: 'We can\'t paste this image from the Clipboard, but you can save it to your device and \ninsert it from there, or you can copy the image without text and paste it into the document.'
}
})(), DE.Controllers.Main || {}))
});

View file

@ -771,6 +771,7 @@
"DE.Controllers.Main.errorUserDrop": "The file cannot be accessed right now.",
"DE.Controllers.Main.errorUsersExceed": "The number of users allowed by the pricing plan was exceeded",
"DE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,<br>but will not be able to download or print it until the connection is restored and page is reloaded.",
"DE.Controllers.Main.errorCannotPasteImg": "We can't paste this image from the Clipboard, but you can save it to your device and \ninsert it from there, or you can copy the image without text and paste it into the document.",
"DE.Controllers.Main.leavePageText": "You have unsaved changes in this document. Click \"Stay on This Page\", then \"Save\" to save them. Click \"Leave This Page\" to discard all the unsaved changes.",
"DE.Controllers.Main.leavePageTextOnClose": "All unsaved changes in this document will be lost.<br> Click \"Cancel\" then \"Save\" to save them. Click \"OK\" to discard all the unsaved changes.",
"DE.Controllers.Main.loadFontsTextText": "Loading data...",

View file

@ -2163,7 +2163,7 @@ define([
onGuidesClick: function(menu, item) {
if (item.value == 'del-guide' && item.options.guideId)
this.api.asc_deleteGuide(item.options.guideId);
this.documentHolder.fireEvent('guides:delete', [item.options.guideId]);
else if (item.value === 'add-vert' || item.value === 'add-hor')
this.documentHolder.fireEvent('guides:add', [item.value]);
else if (item.value === 'clear')
@ -2398,7 +2398,7 @@ define([
},
onLockViewProps: function(lock) {
this.documentHolder && (this.documentHolder._state.viewPropsLock = lock);
Common.Utils.InternalSettings.set("pe-lock-view-props", lock);
var me = this,
currentMenu = me.documentHolder.currentMenu;

View file

@ -1428,6 +1428,9 @@ define([
this.showTips([this.scriptLoadError]);
this.tooltip && this.tooltip.getBSTip().$tip.css('z-index', 10000);
return;
} else if (id == Asc.c_oAscError.ID.CanNotPasteImage) {
this.showTips([this.errorCannotPasteImg], {timeout: 7000, hideCloseTip: true});
return;
}
this.hidePreloader();
@ -3052,7 +3055,8 @@ define([
errorInconsistentExtXlsx: 'An error has occurred while opening the file.<br>The file content corresponds to spreadsheets (e.g. xlsx), but the file has the inconsistent extension: %1.',
errorInconsistentExtPptx: 'An error has occurred while opening the file.<br>The file content corresponds to presentations (e.g. pptx), but the file has the inconsistent extension: %1.',
errorInconsistentExtPdf: 'An error has occurred while opening the file.<br>The file content corresponds to one of the following formats: pdf/djvu/xps/oxps, but the file has the inconsistent extension: %1.',
errorInconsistentExt: 'An error has occurred while opening the file.<br>The file content does not match the file extension.'
errorInconsistentExt: 'An error has occurred while opening the file.<br>The file content does not match the file extension.',
errorCannotPasteImg: 'We can\'t paste this image from the Clipboard, but you can save it to your device and \ninsert it from there, or you can copy the image without text and paste it into the presentation.'
}
})(), PE.Controllers.Main || {}))
});

View file

@ -123,6 +123,7 @@ define([
'DocumentHolder': {
'guides:show': _.bind(this.onGuidesShow, this),
'guides:add': _.bind(this.onGuidesAdd, this),
'guides:delete': _.bind(this.onGuidesDelete, this),
'guides:clear': _.bind(this.onGuidesClear, this),
'guides:smart': _.bind(this.onGuidesSmartShow, this),
'gridlines:show': _.bind(this.onGridlinesShow, this),
@ -277,8 +278,17 @@ define([
Common.NotificationCenter.trigger('edit:complete', this.view);
},
onGuidesDelete: function(id) {
this.api.asc_deleteGuide(id);
this.api.asc_getShowGuides() && (this.api.asc_getGuidesCount()<1) && this.onGuidesShow(false);
Common.NotificationCenter.trigger('edit:complete', this.view);
},
onGuidesClear: function() {
this.api.asc_clearGuides();
this.api.asc_getShowGuides() && this.onGuidesShow(false);
Common.NotificationCenter.trigger('edit:complete', this.view);
},
@ -365,6 +375,7 @@ define([
onLockViewProps: function(lock) {
this._state.lock_viewProps = lock;
Common.Utils.InternalSettings.set("pe-lock-view-props", lock);
if (this.view) {
if (this.view.btnGridlines && (typeof this.view.btnGridlines.menu === 'object') && this.view.btnGridlines.menu.isVisible())
this.onGridlinesAfterShow();

View file

@ -1036,10 +1036,11 @@ define([
}
me.mnuGuides.menu.items[6].setChecked(me.api.asc_getShowSmartGuides(), true);
me.mnuGuides.menu.items[2].setDisabled(me._state.viewPropsLock);
me.mnuGuides.menu.items[3].setDisabled(me._state.viewPropsLock);
me.mnuGuides.menu.items[4].setDisabled(me._state.viewPropsLock);
me.mnuGuides.menu.items[7].setDisabled(me._state.viewPropsLock || !me.api.asc_canClearGuides());
var viewPropsLock = !!Common.Utils.InternalSettings.get("pe-lock-view-props");
me.mnuGuides.menu.items[2].setDisabled(viewPropsLock);
me.mnuGuides.menu.items[3].setDisabled(viewPropsLock);
me.mnuGuides.menu.items[4].setDisabled(viewPropsLock);
me.mnuGuides.menu.items[7].setDisabled(viewPropsLock || !me.api.asc_canClearGuides());
me.mnuGridlines.menu.items[0].setChecked(me.api.asc_getShowGridlines(), true);
me.mnuGridlines.menu.items[1].setChecked(me.api.asc_getSnapToGrid(), true);
@ -1072,10 +1073,10 @@ define([
item.setChecked(true);
else
item.setChecked(false);
item.setDisabled(me._state.viewPropsLock);
item.setDisabled(viewPropsLock);
}
me.mnuGridlines.menu.items[1].setDisabled(me._state.viewPropsLock);
me.mnuGridlines.menu.items[items.length-1].setDisabled(me._state.viewPropsLock);
me.mnuGridlines.menu.items[1].setDisabled(viewPropsLock);
me.mnuGridlines.menu.items[items.length-1].setDisabled(viewPropsLock);
me.mnuRulers.setChecked(!Common.Utils.InternalSettings.get("pe-hidden-rulers"));
}

View file

@ -843,6 +843,7 @@
"PE.Controllers.Main.errorUserDrop": "The file cannot be accessed right now.",
"PE.Controllers.Main.errorUsersExceed": "The number of users allowed by the pricing plan was exceeded",
"PE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,<br>but will not be able to download or print it until the connection is restored and page is reloaded.",
"PE.Controllers.Main.errorCannotPasteImg": "We can't paste this image from the Clipboard, but you can save it to your device and \ninsert it from there, or you can copy the image without text and paste it into the presentation.",
"PE.Controllers.Main.leavePageText": "You have unsaved changes in this presentation. Click \"Stay on This Page\", then \"Save\" to save them. Click \"Leave This Page\" to discard all the unsaved changes.",
"PE.Controllers.Main.leavePageTextOnClose": "All unsaved changes in this presentation will be lost.<br> Click \"Cancel\" then \"Save\" to save them. Click \"OK\" to discard all the unsaved changes.",
"PE.Controllers.Main.loadFontsTextText": "Loading data...",

View file

@ -1572,6 +1572,9 @@ define([
this.showTips([this.scriptLoadError]);
this.tooltip && this.tooltip.getBSTip().$tip.css('z-index', 10000);
return;
} else if (id == Asc.c_oAscError.ID.CanNotPasteImage) {
this.showTips([this.errorCannotPasteImg], {timeout: 7000, hideCloseTip: true});
return;
}
this.hidePreloader();
@ -3716,7 +3719,8 @@ define([
errorInconsistentExtXlsx: 'An error has occurred while opening the file.<br>The file content corresponds to spreadsheets (e.g. xlsx), but the file has the inconsistent extension: %1.',
errorInconsistentExtPptx: 'An error has occurred while opening the file.<br>The file content corresponds to presentations (e.g. pptx), but the file has the inconsistent extension: %1.',
errorInconsistentExtPdf: 'An error has occurred while opening the file.<br>The file content corresponds to one of the following formats: pdf/djvu/xps/oxps, but the file has the inconsistent extension: %1.',
errorInconsistentExt: 'An error has occurred while opening the file.<br>The file content does not match the file extension.'
errorInconsistentExt: 'An error has occurred while opening the file.<br>The file content does not match the file extension.',
errorCannotPasteImg: 'We can\'t paste this image from the Clipboard, but you can save it to your device and \ninsert it from there, or you can copy the image without text and paste it into the spreadsheet.'
}
})(), SSE.Controllers.Main || {}))
});

View file

@ -959,6 +959,7 @@
"SSE.Controllers.Main.errorWrongBracketsCount": "An error in the entered formula.<br>Wrong number of brackets is used.",
"SSE.Controllers.Main.errorWrongOperator": "An error in the entered formula. Wrong operator is used.<br>Please correct the error.",
"SSE.Controllers.Main.errorWrongPassword": "The password you supplied is not correct.",
"SSE.Controllers.Main.errorCannotPasteImg": "We can't paste this image from the Clipboard, but you can save it to your device and \ninsert it from there, or you can copy the image without text and paste it into the spreadsheet.",
"SSE.Controllers.Main.errRemDuplicates": "Duplicate values found and deleted: {0}, unique values left: {1}.",
"SSE.Controllers.Main.leavePageText": "You have unsaved changes in this spreadsheet. Click 'Stay on this Page' then 'Save' to save them. Click 'Leave this Page' to discard all the unsaved changes.",
"SSE.Controllers.Main.leavePageTextOnClose": "All unsaved changes in this spreadsheet will be lost.<br> Click \"Cancel\" then \"Save\" to save them. Click \"OK\" to discard all the unsaved changes.",