[DE] Fix permission.comment=false
This commit is contained in:
parent
4220962c40
commit
81de52f79b
|
@ -724,21 +724,23 @@ define([
|
|||
plain_del_lock = (frame_pr) ? !frame_pr.can_DeleteInlineContentControl() : false,
|
||||
plain_edit_lock = (frame_pr) ? !frame_pr.can_EditInlineContentControl() : false;
|
||||
|
||||
this.toolbar.lockToolbar(Common.enumLock.cantAddQuotedComment, !this.api.can_AddQuotedComment(), {array: this.btnsComment});
|
||||
this.toolbar.lockToolbar(Common.enumLock.imageLock, image_locked, {array: this.btnsComment});
|
||||
this.mode.compatibleFeatures && this.toolbar.lockToolbar(Common.enumLock.inImage, in_image, {array: this.btnsComment});
|
||||
if (this.api.asc_IsContentControl()) {
|
||||
var control_props = this.api.asc_GetContentControlProperties(),
|
||||
spectype = control_props ? control_props.get_SpecificType() : Asc.c_oAscContentControlSpecificType.None;
|
||||
this.toolbar.lockToolbar(Common.enumLock.inSpecificForm, spectype==Asc.c_oAscContentControlSpecificType.CheckBox || spectype==Asc.c_oAscContentControlSpecificType.Picture ||
|
||||
spectype==Asc.c_oAscContentControlSpecificType.ComboBox || spectype==Asc.c_oAscContentControlSpecificType.DropDownList || spectype==Asc.c_oAscContentControlSpecificType.DateTime, {array: this.btnsComment});
|
||||
if (this.btnsComment) {
|
||||
this.toolbar.lockToolbar(Common.enumLock.cantAddQuotedComment, !this.api.can_AddQuotedComment(), {array: this.btnsComment});
|
||||
this.toolbar.lockToolbar(Common.enumLock.imageLock, image_locked, {array: this.btnsComment});
|
||||
this.mode.compatibleFeatures && this.toolbar.lockToolbar(Common.enumLock.inImage, in_image, {array: this.btnsComment});
|
||||
if (this.api.asc_IsContentControl()) {
|
||||
var control_props = this.api.asc_GetContentControlProperties(),
|
||||
spectype = control_props ? control_props.get_SpecificType() : Asc.c_oAscContentControlSpecificType.None;
|
||||
this.toolbar.lockToolbar(Common.enumLock.inSpecificForm, spectype==Asc.c_oAscContentControlSpecificType.CheckBox || spectype==Asc.c_oAscContentControlSpecificType.Picture ||
|
||||
spectype==Asc.c_oAscContentControlSpecificType.ComboBox || spectype==Asc.c_oAscContentControlSpecificType.DropDownList || spectype==Asc.c_oAscContentControlSpecificType.DateTime, {array: this.btnsComment});
|
||||
}
|
||||
this.toolbar.lockToolbar(Common.enumLock.paragraphLock, paragraph_locked, {array: this.btnsComment});
|
||||
this.toolbar.lockToolbar(Common.enumLock.headerLock, header_locked, {array: this.btnsComment});
|
||||
this.toolbar.lockToolbar(Common.enumLock.richEditLock, rich_edit_lock, {array: this.btnsComment});
|
||||
this.toolbar.lockToolbar(Common.enumLock.plainEditLock, plain_edit_lock, {array: this.btnsComment});
|
||||
this.toolbar.lockToolbar(Common.enumLock.richDelLock, rich_del_lock, {array: this.btnsComment});
|
||||
this.toolbar.lockToolbar(Common.enumLock.plainDelLock, plain_del_lock, {array: this.btnsComment});
|
||||
}
|
||||
this.toolbar.lockToolbar(Common.enumLock.paragraphLock, paragraph_locked, {array: this.btnsComment});
|
||||
this.toolbar.lockToolbar(Common.enumLock.headerLock, header_locked, {array: this.btnsComment});
|
||||
this.toolbar.lockToolbar(Common.enumLock.richEditLock, rich_edit_lock, {array: this.btnsComment});
|
||||
this.toolbar.lockToolbar(Common.enumLock.plainEditLock, plain_edit_lock, {array: this.btnsComment});
|
||||
this.toolbar.lockToolbar(Common.enumLock.richDelLock, rich_del_lock, {array: this.btnsComment});
|
||||
this.toolbar.lockToolbar(Common.enumLock.plainDelLock, plain_del_lock, {array: this.btnsComment});
|
||||
},
|
||||
|
||||
onApiFocusObject: function(selectedObjects) {
|
||||
|
@ -814,9 +816,9 @@ define([
|
|||
this.toolbar.lockToolbar(Common.enumLock.richEditLock, rich_edit_lock, {array: this.toolbar.paragraphControls.concat([toolbar.btnClearStyle])});
|
||||
this.toolbar.lockToolbar(Common.enumLock.plainEditLock, plain_edit_lock, {array: this.toolbar.paragraphControls.concat([toolbar.btnClearStyle])});
|
||||
|
||||
this.toolbar.lockToolbar(Common.enumLock.richDelLock, rich_del_lock, {array: this.btnsComment.concat(toolbar.btnsPageBreak).concat([toolbar.btnInsertTable, toolbar.btnInsertImage, toolbar.btnInsertChart, toolbar.btnInsertTextArt,
|
||||
this.toolbar.lockToolbar(Common.enumLock.richDelLock, rich_del_lock, {array: toolbar.btnsPageBreak.concat(this.btnsComment).concat([toolbar.btnInsertTable, toolbar.btnInsertImage, toolbar.btnInsertChart, toolbar.btnInsertTextArt,
|
||||
toolbar.btnInsDateTime, toolbar.btnBlankPage, toolbar.btnInsertEquation, toolbar.btnInsertSymbol ])});
|
||||
this.toolbar.lockToolbar(Common.enumLock.plainDelLock, plain_del_lock, {array: this.btnsComment.concat(toolbar.btnsPageBreak).concat([toolbar.btnInsertTable, toolbar.btnInsertImage, toolbar.btnInsertChart, toolbar.btnInsertTextArt,
|
||||
this.toolbar.lockToolbar(Common.enumLock.plainDelLock, plain_del_lock, {array: toolbar.btnsPageBreak.concat(this.btnsComment).concat([toolbar.btnInsertTable, toolbar.btnInsertImage, toolbar.btnInsertChart, toolbar.btnInsertTextArt,
|
||||
toolbar.btnInsDateTime, toolbar.btnBlankPage, toolbar.btnInsertEquation, toolbar.btnInsertSymbol ])});
|
||||
|
||||
this.toolbar.lockToolbar(Common.enumLock.inChart, in_chart, {array: toolbar.textOnlyControls.concat([toolbar.btnClearStyle, toolbar.btnInsertEquation])});
|
||||
|
@ -888,15 +890,17 @@ define([
|
|||
if (toolbar.listStylesAdditionalMenuItem && (frame_pr===undefined) !== toolbar.listStylesAdditionalMenuItem.isDisabled())
|
||||
toolbar.listStylesAdditionalMenuItem.setDisabled(frame_pr===undefined);
|
||||
|
||||
// comments
|
||||
this.toolbar.lockToolbar(Common.enumLock.cantAddQuotedComment, !this.api.can_AddQuotedComment(), {array: this.btnsComment});
|
||||
this.toolbar.lockToolbar(Common.enumLock.imageLock, image_locked, {array: this.btnsComment});
|
||||
this.mode.compatibleFeatures && this.toolbar.lockToolbar(Common.enumLock.inImage, in_image, {array: this.btnsComment});
|
||||
if (control_props) {
|
||||
var spectype = control_props.get_SpecificType();
|
||||
this.toolbar.lockToolbar(Common.enumLock.inSpecificForm, spectype==Asc.c_oAscContentControlSpecificType.CheckBox || spectype==Asc.c_oAscContentControlSpecificType.Picture ||
|
||||
spectype==Asc.c_oAscContentControlSpecificType.ComboBox || spectype==Asc.c_oAscContentControlSpecificType.DropDownList || spectype==Asc.c_oAscContentControlSpecificType.DateTime,
|
||||
{array: this.btnsComment});
|
||||
if (this.btnsComment) {
|
||||
// comments
|
||||
this.toolbar.lockToolbar(Common.enumLock.cantAddQuotedComment, !this.api.can_AddQuotedComment(), {array: this.btnsComment});
|
||||
this.toolbar.lockToolbar(Common.enumLock.imageLock, image_locked, {array: this.btnsComment});
|
||||
this.mode.compatibleFeatures && this.toolbar.lockToolbar(Common.enumLock.inImage, in_image, {array: this.btnsComment});
|
||||
if (control_props) {
|
||||
var spectype = control_props.get_SpecificType();
|
||||
this.toolbar.lockToolbar(Common.enumLock.inSpecificForm, spectype==Asc.c_oAscContentControlSpecificType.CheckBox || spectype==Asc.c_oAscContentControlSpecificType.Picture ||
|
||||
spectype==Asc.c_oAscContentControlSpecificType.ComboBox || spectype==Asc.c_oAscContentControlSpecificType.DropDownList || spectype==Asc.c_oAscContentControlSpecificType.DateTime,
|
||||
{array: this.btnsComment});
|
||||
}
|
||||
}
|
||||
if (frame_pr) {
|
||||
this._state.suppress_num = !!frame_pr.get_SuppressLineNumbers();
|
||||
|
@ -3217,6 +3221,7 @@ define([
|
|||
var me = this;
|
||||
me.appOptions = config;
|
||||
|
||||
this.btnsComment = [];
|
||||
if ( config.canCoAuthoring && config.canComments ) {
|
||||
this.btnsComment = Common.Utils.injectButtons(this.toolbar.$el.find('.slot-comment'), 'tlbtn-addcomment-', 'toolbar__icon btn-menu-comments', this.toolbar.capBtnComment,
|
||||
[ Common.enumLock.paragraphLock, Common.enumLock.headerLock, Common.enumLock.richEditLock, Common.enumLock.plainEditLock, Common.enumLock.richDelLock, Common.enumLock.plainDelLock,
|
||||
|
|
Loading…
Reference in a new issue