diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index 8032fcdba..64d3d6ae6 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -95,6 +95,7 @@ define([ '' + '
' + '
' + + '
' + '
' + ''; @@ -216,6 +217,8 @@ define([ } } + function onAppShowed(config) {} + function onAppReady(mode) { appConfig = mode; @@ -318,6 +321,9 @@ define([ }); } } + + if ( me.btnOptions ) + me.btnOptions.updateHint(me.tipViewSettings); } function onDocNameKeyDown(e) { @@ -393,9 +399,18 @@ define([ reset : onResetUsers }); + me.btnOptions = new Common.UI.Button({ + cls: 'btn-header no-caret', + iconCls: 'svgicon svg-btn-options', + menu: true + }); + Common.NotificationCenter.on('app:ready', function(mode) { Common.Utils.asyncCall(onAppReady, me, mode); }); + Common.NotificationCenter.on('app:face', function(mode) { + Common.Utils.asyncCall(onAppShowed, me, mode); + }); }, render: function (el, role) { @@ -468,6 +483,8 @@ define([ if ( config.canEdit && config.canRequestEditRights ) this.btnEdit = createTitleButton('svg-btn-edit', $html.find('#slot-hbtn-edit')); + } else { + me.btnOptions.render($html.find('#slot-btn-options')); } $userList = $html.find('.cousers-list'); @@ -657,18 +674,19 @@ define([ btn.keepState = { disabled: btn.isDisabled() }; + btn.setDisabled( true ); } else { btn.setDisabled( btn.keepState.disabled ); - delete me.btnUndo.keepState; + delete btn.keepState; } } } - if ( alias == 'undo' ) { - _lockButton(me.btnUndo); - } else - if ( alias == 'redo' ) { - _lockButton(me.btnRedo); + switch ( alias ) { + case 'undo': _lockButton(me.btnUndo); break; + case 'redo': _lockButton(me.btnRedo); break; + case 'opts': _lockButton(me.btnOptions); break; + default: break; } } }, diff --git a/apps/common/main/resources/img/header/buttons.svg b/apps/common/main/resources/img/header/buttons.svg index 8bb39193b..637a73f15 100644 --- a/apps/common/main/resources/img/header/buttons.svg +++ b/apps/common/main/resources/img/header/buttons.svg @@ -59,7 +59,12 @@ c0.845-1.277,2.313-2.215,3.99-2.215c2.461,0,5.405,1.78,5.694,4.119C17.601,10.291,14.966,7.625,11.355,7.625z"/> - + + + + + + diff --git a/apps/common/main/resources/less/header.less b/apps/common/main/resources/less/header.less index fe8398aee..782457e60 100644 --- a/apps/common/main/resources/less/header.less +++ b/apps/common/main/resources/less/header.less @@ -62,6 +62,12 @@ color: #fff; } + .dropdown-menu { + label { + color: @gray-deep; + } + } + .btn-users, .btn-header { &:hover { @@ -70,7 +76,7 @@ } } - &:active { + &:active, &.active { &:not(.disabled) { background-color: rgba(0,0,0,0.2); } @@ -242,6 +248,11 @@ .hedset { font-size: 0; display: flex; + + .btn-group { + height: 100%; + } + } .btn-header { @@ -275,6 +286,12 @@ background-color: rgba(0,0,0,0.2); } } + + &.no-caret { + .inner-box-caret { + display: none; + } + } } #box-document-title {