From 9939a4c15ab48c35793d9a9099ab7bba5c1c8e22 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 1 Sep 2017 10:03:11 +0300 Subject: [PATCH] [DE] Toolbar lock refactoring. --- apps/documenteditor/main/app/controller/Toolbar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 7d0cc37a3..69dbda159 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -656,7 +656,7 @@ define([ header_locked = pr.get_Locked(); in_header = true; } else if (type === Asc.c_oAscTypeSelectElement.Image) { - in_image = in_header = true; + in_image = true; image_locked = pr.get_Locked(); if (pr && pr.get_ChartProperties()) in_chart = true; @@ -726,7 +726,7 @@ define([ need_disable = toolbar.mnuPageNumCurrentPos.isDisabled() && toolbar.mnuPageNumberPosPicker.isDisabled(); toolbar.mnuInsertPageNum.setDisabled(need_disable); - need_disable = paragraph_locked || header_locked || in_header || in_equation && !btn_eq_state || this.api.asc_IsCursorInFootnote(); + need_disable = paragraph_locked || header_locked || in_header || in_image || in_equation && !btn_eq_state || this.api.asc_IsCursorInFootnote(); toolbar.btnsPageBreak.disable(need_disable); need_disable = paragraph_locked || header_locked || !can_add_image || in_equation;