Fix hint manager

This commit is contained in:
JuliaSvinareva 2021-07-02 14:58:27 +03:00
parent a443fcfd2a
commit 147bffff21
5 changed files with 11 additions and 10 deletions

View file

@ -177,7 +177,7 @@ Common.UI.HintManager = new(function() {
if (_currentControls.length === 0)
_getControls();
_currentControls.forEach(function(item, index) {
if (!item.hasClass('disabled') && !item.parent().hasClass('disabled')) {
if (!item.hasClass('disabled') && !item.parent().hasClass('disabled') && !item.attr('disabled')) {
var hint = $('<div style="" class="hint-div">' + item.attr('data-hint-title') + '</div>');
var direction = item.attr('data-hint-direction');
// exceptions

View file

@ -886,7 +886,7 @@ Common.Utils.lockControls = function(causes, lock, opts, defControls) {
});
};
Common.Utils.injectButtons = function($slots, id, iconCls, caption, lock, split, menu, toggle, dataHint, dataHintDirection, dataHintOffset) {
Common.Utils.injectButtons = function($slots, id, iconCls, caption, lock, split, menu, toggle, dataHint, dataHintDirection, dataHintOffset, dataHintTitle) {
var btnsArr = createButtonSet();
btnsArr.setDisabled(true);
id = id || ("id-toolbar-" + iconCls);
@ -907,7 +907,8 @@ Common.Utils.injectButtons = function($slots, id, iconCls, caption, lock, split,
disabled: true,
dataHint: dataHint,
dataHintDirection: dataHintDirection,
dataHintOffset: dataHintOffset
dataHintOffset: dataHintOffset,
dataHintTitle: dataHintTitle
});
btnsArr.add(button);

View file

@ -85,7 +85,7 @@ define([
'<div class="hedset">' +
// '<span class="btn-slot text" id="slot-btn-users"></span>' +
'<section id="tlb-box-users" class="box-cousers dropdown"">' +
'<div class="btn-users" data-hint="0">' +
'<div class="btn-users" data-hint="0" data-hint-direction="bottom" data-hint-offset="big">' +
'<i class="icon toolbar__icon icon--inverse btn-users"></i>' +
'<label class="caption">&plus;</label>' +
'</div>' +

View file

@ -7,9 +7,9 @@
<button id="status-btn-tablast" type="button" class="btn small btn-toolbar" data-hint="0" data-hint-direction="top" data-hint-offset="small" data-hint-title="L"><i class="icon toolbar__icon btn-lastitem">&nbsp;</i></button>
</div>
<div id="status-addtabs-box" class="status-group">
<button id="status-btn-addtab" type="button" class="btn small btn-toolbar" data-hint="0" data-hint-direction="top" data-hint-offset="small"><i class="icon toolbar__icon btn-zoomup">&nbsp;</i></button>
<button id="status-btn-addtab" type="button" class="btn small btn-toolbar" data-hint="0" data-hint-direction="top" data-hint-offset="small" data-hint-title="P"><i class="icon toolbar__icon btn-zoomup">&nbsp;</i></button>
<div class="cnt-tabslist">
<button id="status-btn-tabslist" type="button" class="btn small btn-toolbar dropdown-toggle" data-toggle="dropdown"><i class="icon toolbar__icon btn-sheet-list">&nbsp;</i></button>
<button id="status-btn-tabslist" type="button" class="btn small btn-toolbar dropdown-toggle" data-toggle="dropdown" data-hint="0" data-hint-direction="top" data-hint-offset="small" data-hint-title="S"><i class="icon toolbar__icon btn-sheet-list">&nbsp;</i></button>
</div>
</div>
<div id="status-zoom-box" class="status-group">

View file

@ -241,17 +241,17 @@ define([
this.lockedControls.push(this.btnCustomSort);
this.btnsSortDown = Common.Utils.injectButtons($host.find('.slot-sortdesc'), '', 'toolbar__icon btn-sort-down', '',
[_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.cantModifyFilter, _set.sheetLock, _set.cantSort], undefined, undefined, undefined, '1', 'top');
[_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.cantModifyFilter, _set.sheetLock, _set.cantSort], undefined, undefined, undefined, '1', 'top', undefined, 'D');
this.btnsSortUp = Common.Utils.injectButtons($host.find('.slot-sortasc'), '', 'toolbar__icon btn-sort-up', '',
[_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.cantModifyFilter, _set.sheetLock, _set.cantSort], undefined, undefined, undefined, '1', 'top');
[_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.cantModifyFilter, _set.sheetLock, _set.cantSort], undefined, undefined, undefined, '1', 'top', undefined, 'U');
this.btnsSetAutofilter = Common.Utils.injectButtons($host.find('.slot-btn-setfilter'), '', 'toolbar__icon btn-autofilter', '',
[_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.editPivot, _set.cantModifyFilter, _set.tableHasSlicer],
false, false, true, '1', 'bottom');
false, false, true, '1', 'bottom', undefined, 'F');
this.btnsClearAutofilter = Common.Utils.injectButtons($host.find('.slot-btn-clear-filter'), '', 'toolbar__icon btn-clear-filter', '',
[_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleDelFilter], undefined, undefined, undefined, '1', 'bottom');
[_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleDelFilter], undefined, undefined, undefined, '1', 'bottom', undefined, 'N');
Array.prototype.push.apply(this.lockedControls, this.btnsSortDown.concat(this.btnsSortUp, this.btnsSetAutofilter,this.btnsClearAutofilter));