Merge pull request #753 from ONLYOFFICE/fix/bug_49232
[SSE] Fix Bug 49232
This commit is contained in:
commit
fd86c9c369
|
@ -501,7 +501,10 @@ define([
|
|||
|
||||
onClear: function(menu, item) {
|
||||
if (this.api) {
|
||||
this.api.asc_emptyCells(item.value);
|
||||
if (item.value == Asc.c_oAscCleanOptions.Comments) {
|
||||
this.api.asc_RemoveAllComments(!this.permissions.canDeleteComments, true);// 1 param = true if remove only my comments, 2 param - remove current comments
|
||||
} else
|
||||
this.api.asc_emptyCells(item.value, item.value == Asc.c_oAscCleanOptions.All && !this.permissions.canDeleteComments);
|
||||
|
||||
Common.NotificationCenter.trigger('edit:complete', this.documentHolder);
|
||||
Common.component.Analytics.trackEvent('DocumentHolder', 'Clear');
|
||||
|
|
|
@ -1429,8 +1429,12 @@ define([
|
|||
},
|
||||
|
||||
onClearStyleMenu: function(menu, item, e) {
|
||||
if (this.api)
|
||||
this.api.asc_emptyCells(item.value);
|
||||
if (this.api) {
|
||||
if (item.value == Asc.c_oAscCleanOptions.Comments) {
|
||||
this.api.asc_RemoveAllComments(!this.mode.canDeleteComments, true);// 1 param = true if remove only my comments, 2 param - remove current comments
|
||||
} else
|
||||
this.api.asc_emptyCells(item.value, item.value == Asc.c_oAscCleanOptions.All && !this.mode.canDeleteComments);
|
||||
}
|
||||
|
||||
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
||||
Common.component.Analytics.trackEvent('ToolBar', 'Clear');
|
||||
|
|
|
@ -54,7 +54,8 @@ define([
|
|||
var _actionSheets = [],
|
||||
_isEdit = false,
|
||||
_canViewComments = true,
|
||||
_isComments = false;
|
||||
_isComments = false,
|
||||
_canDeleteComments = false;
|
||||
|
||||
function openLink(url) {
|
||||
var newDocumentPage = window.open(url, '_blank');
|
||||
|
@ -95,6 +96,7 @@ define([
|
|||
this.api.asc_registerCallback('asc_onSetAFDialog', _.bind(this.onApiFilterOptions, this));
|
||||
}
|
||||
_canViewComments = mode.canViewComments;
|
||||
_canDeleteComments = mode.canDeleteComments;
|
||||
},
|
||||
|
||||
// When our application is ready, lets get started
|
||||
|
@ -187,7 +189,9 @@ define([
|
|||
}
|
||||
}
|
||||
break;
|
||||
case 'del': me.api.asc_emptyCells(Asc.c_oAscCleanOptions.All); break;
|
||||
case 'del':
|
||||
me.api.asc_emptyCells(Asc.c_oAscCleanOptions.All, !_canDeleteComments);
|
||||
break;
|
||||
case 'wrap': me.api.asc_setCellTextWrap(true); break;
|
||||
case 'unwrap': me.api.asc_setCellTextWrap(false); break;
|
||||
case 'edit':
|
||||
|
|
Loading…
Reference in a new issue