From 6d385730b197f3305a4095eb0206d6215879b5c1 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Fri, 16 Feb 2018 02:46:45 +0300 Subject: [PATCH] [Common] make created buttons disabled --- apps/common/main/lib/view/Header.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index 083b94536..a77543b9d 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -408,10 +408,11 @@ define([ getPanel: function (role, config) { var me = this; - function createTitleButton(iconid, slot) { + function createTitleButton(iconid, slot, disabled) { return (new Common.UI.Button({ cls: 'btn-header', - iconCls: 'svgicon ' + iconid + iconCls: 'svgicon ' + iconid, + disabled: disabled === true })).render(slot); } @@ -493,9 +494,9 @@ define([ me.btnPrint = createTitleButton('svg-btn-print', $('#slot-btn-dt-print', $html)); } - me.btnSave = createTitleButton('svg-btn-save', $('#slot-btn-dt-save', $html)); - me.btnUndo = createTitleButton('svg-btn-undo', $('#slot-btn-dt-undo', $html)); - me.btnRedo = createTitleButton('svg-btn-redo', $('#slot-btn-dt-redo', $html)); + me.btnSave = createTitleButton('svg-btn-save', $('#slot-btn-dt-save', $html), true); + me.btnUndo = createTitleButton('svg-btn-undo', $('#slot-btn-dt-undo', $html), true); + me.btnRedo = createTitleButton('svg-btn-redo', $('#slot-btn-dt-redo', $html), true); return $html; }