[SSE] Hint manager: add hints into right menu and file menu

This commit is contained in:
JuliaSvinareva 2021-06-10 23:05:49 +03:00
parent 9ec0a305b3
commit 529d6c2ad0
14 changed files with 290 additions and 81 deletions

View file

@ -846,6 +846,7 @@ define([
return false; return false;
case 'escape': case 'escape':
if ( this.leftMenu.menuFile.isVisible() ) { if ( this.leftMenu.menuFile.isVisible() ) {
if (Common.UI.HintManager.needCloseMenu())
this.leftMenu.menuFile.hide(); this.leftMenu.menuFile.hide();
return false; return false;
} }

View file

@ -125,7 +125,7 @@
</tr> </tr>
<tr> <tr>
<td align="center"> <td align="center">
<label class="link" id="chart-advanced-link"><%= scope.textAdvanced %></label> <label class="link" id="chart-advanced-link" data-hint="1" data-hint-direction="bottom" data-hint-offset="medium"><%= scope.textAdvanced %></label>
</td> </td>
</tr> </tr>
<tr class="finish-cell"></tr> <tr class="finish-cell"></tr>

View file

@ -21,7 +21,7 @@
<table cols="2"> <table cols="2">
<tr> <tr>
<td class="padding-small" colspan=2> <td class="padding-small" colspan=2>
<button type="button" class="btn btn-text-default" id="image-button-original-size" style="min-width:100px;width: auto;"><%= scope.textOriginalSize %></button> <button type="button" class="btn btn-text-default" id="image-button-original-size" style="min-width:100px;width: auto;" data-hint="1" data-hint-direction="bottom" data-hint-offset="big"><%= scope.textOriginalSize %></button>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -77,7 +77,7 @@
</tr> </tr>
<tr> <tr>
<td align="center" colspan=2> <td align="center" colspan=2>
<label class="link" id="image-advanced-link"><%= scope.textAdvanced %></label> <label class="link" id="image-advanced-link" data-hint="1" data-hint-direction="bottom" data-hint-offset="medium"><%= scope.textAdvanced %></label>
</td> </td>
</tr> </tr>
<tr class="finish-cell"></tr> <tr class="finish-cell"></tr>

View file

@ -34,7 +34,7 @@
</tr> </tr>
<tr> <tr>
<td align="center" colspan=2> <td align="center" colspan=2>
<label class="link" id="paragraph-advanced-link"><%= scope.textAdvanced %></label> <label class="link" id="paragraph-advanced-link" data-hint="1" data-hint-direction="bottom" data-hint-offset="medium"><%= scope.textAdvanced %></label>
</td> </td>
</tr> </tr>
<tr class="finish-cell"></tr> <tr class="finish-cell"></tr>

View file

@ -48,7 +48,7 @@
</tr> </tr>
<tr> <tr>
<td align="center" colspan=2> <td align="center" colspan=2>
<label class="link" id="pivot-advanced-link"><%= scope.textAdvanced %></label> <label class="link" id="pivot-advanced-link" data-hint="1" data-hint-direction="bottom" data-hint-offset="medium"><%= scope.textAdvanced %></label>
</td> </td>
</tr> </tr>
<tr class="finish-cell"></tr> <tr class="finish-cell"></tr>

View file

@ -122,7 +122,7 @@
</tr> </tr>
<tr> <tr>
<td align="center" colspan=2> <td align="center" colspan=2>
<label class="link" id="slicer-advanced-link"><%= scope.textAdvanced %></label> <label class="link" id="slicer-advanced-link" data-hint="1" data-hint-direction="bottom" data-hint-offset="medium"><%= scope.textAdvanced %></label>
</td> </td>
</tr> </tr>
<tr class="finish-cell"></tr> <tr class="finish-cell"></tr>

View file

@ -33,10 +33,10 @@
<table cols="2" style="width: 100%;"> <table cols="2" style="width: 100%;">
<tr> <tr>
<td class="padding-small" width="50%"> <td class="padding-small" width="50%">
<button type="button" class="btn btn-text-default" id="textart-button-from-file" style="width:90px;"><%= scope.textFromFile %></button> <button type="button" class="btn btn-text-default" id="textart-button-from-file" style="width:90px;" data-hint="1" data-hint-direction="bottom" data-hint-offset="big"><%= scope.textFromFile %></button>
</td> </td>
<td class="padding-small" width="50%"> <td class="padding-small" width="50%">
<button type="button" class="btn btn-text-default" id="textart-button-from-url" style="width:90px;float:right;"><%= scope.textFromUrl %></button> <button type="button" class="btn btn-text-default" id="textart-button-from-url" style="width:90px;float:right;" data-hint="1" data-hint-direction="bottom" data-hint-offset="big"><%= scope.textFromUrl %></button>
</td> </td>
</tr> </tr>
<tr> <tr>

View file

@ -609,7 +609,10 @@ define([
defaultUnit : "cm", defaultUnit : "cm",
value: '3 cm', value: '3 cm',
maxValue: 55.88, maxValue: 55.88,
minValue: 0 minValue: 0,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.spinners.push(this.spnWidth); this.spinners.push(this.spnWidth);
this.lockedControls.push(this.spnWidth); this.lockedControls.push(this.spnWidth);
@ -621,7 +624,10 @@ define([
defaultUnit : "cm", defaultUnit : "cm",
value: '3 cm', value: '3 cm',
maxValue: 55.88, maxValue: 55.88,
minValue: 0 minValue: 0,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.spinners.push(this.spnHeight); this.spinners.push(this.spnHeight);
this.lockedControls.push(this.spnHeight); this.lockedControls.push(this.spnHeight);
@ -637,7 +643,10 @@ define([
iconCls: 'toolbar__icon advanced-btn-ratio', iconCls: 'toolbar__icon advanced-btn-ratio',
style: 'margin-bottom: 1px;', style: 'margin-bottom: 1px;',
enableToggle: true, enableToggle: true,
hint: this.textKeepRatio hint: this.textKeepRatio,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.lockedControls.push(this.btnRatio); this.lockedControls.push(this.btnRatio);
@ -738,7 +747,10 @@ define([
cls : 'btn-toolbar', cls : 'btn-toolbar',
iconCls : 'toolbar__icon btn-menu-chart', iconCls : 'toolbar__icon btn-menu-chart',
caption : this.textChangeType, caption : this.textChangeType,
style : 'width: 100%;text-align: left;' style : 'width: 100%;text-align: left;',
dataHint : '1',
dataHintDirection: 'left',
dataHintOffset: 'small'
}); });
this.btnChangeType.on('click', _.bind(this.onChangeType, this)); this.btnChangeType.on('click', _.bind(this.onChangeType, this));
this.lockedControls.push(this.btnChangeType); this.lockedControls.push(this.btnChangeType);
@ -748,7 +760,10 @@ define([
cls : 'btn-toolbar', cls : 'btn-toolbar',
iconCls : 'toolbar__icon btn-select-range', iconCls : 'toolbar__icon btn-select-range',
caption : this.textSelectData, caption : this.textSelectData,
style : 'width: 100%;text-align: left;' style : 'width: 100%;text-align: left;',
dataHint : '1',
dataHintDirection: 'left',
dataHintOffset: 'small'
}); });
this.btnSelectData.on('click', _.bind(this.onSelectData, this)); this.btnSelectData.on('click', _.bind(this.onSelectData, this));
this.lockedControls.push(this.btnSelectData); this.lockedControls.push(this.btnSelectData);
@ -976,7 +991,10 @@ define([
itemHeight: 50, itemHeight: 50,
menuMaxHeight: 270, menuMaxHeight: 270,
enableKeyEvents: true, enableKeyEvents: true,
cls: 'combo-chart-style' cls: 'combo-chart-style',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.cmbChartStyle.render($('#chart-combo-style')); this.cmbChartStyle.render($('#chart-combo-style'));
this.cmbChartStyle.openButton.menu.cmpEl.css({ this.cmbChartStyle.openButton.menu.cmpEl.css({

View file

@ -79,7 +79,10 @@ define([
action : 'save', action : 'save',
caption : this.btnSaveCaption, caption : this.btnSaveCaption,
canFocused: false, canFocused: false,
disabled: true disabled: true,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}); });
if ( !!this.options.miSave ) { if ( !!this.options.miSave ) {
this.miSave.setDisabled(this.options.miSave.isDisabled()); this.miSave.setDisabled(this.options.miSave.isDisabled());
@ -90,49 +93,70 @@ define([
el : $markup.elementById('#fm-btn-edit'), el : $markup.elementById('#fm-btn-edit'),
action : 'edit', action : 'edit',
caption : this.btnToEditCaption, caption : this.btnToEditCaption,
canFocused: false canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}); });
this.miDownload = new Common.UI.MenuItem({ this.miDownload = new Common.UI.MenuItem({
el : $markup.elementById('#fm-btn-download'), el : $markup.elementById('#fm-btn-download'),
action : 'saveas', action : 'saveas',
caption : this.btnDownloadCaption, caption : this.btnDownloadCaption,
canFocused: false canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}); });
this.miSaveCopyAs = new Common.UI.MenuItem({ this.miSaveCopyAs = new Common.UI.MenuItem({
el : $markup.elementById('#fm-btn-save-copy'), el : $markup.elementById('#fm-btn-save-copy'),
action : 'save-copy', action : 'save-copy',
caption : this.btnSaveCopyAsCaption, caption : this.btnSaveCopyAsCaption,
canFocused: false canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}); });
this.miSaveAs = new Common.UI.MenuItem({ this.miSaveAs = new Common.UI.MenuItem({
el : $markup.elementById('#fm-btn-save-desktop'), el : $markup.elementById('#fm-btn-save-desktop'),
action : 'save-desktop', action : 'save-desktop',
caption : this.btnSaveAsCaption, caption : this.btnSaveAsCaption,
canFocused: false canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}); });
this.miPrint = new Common.UI.MenuItem({ this.miPrint = new Common.UI.MenuItem({
el : $markup.elementById('#fm-btn-print'), el : $markup.elementById('#fm-btn-print'),
action : 'print', action : 'print',
caption : this.btnPrintCaption, caption : this.btnPrintCaption,
canFocused: false canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}); });
this.miRename = new Common.UI.MenuItem({ this.miRename = new Common.UI.MenuItem({
el : $markup.elementById('#fm-btn-rename'), el : $markup.elementById('#fm-btn-rename'),
action : 'rename', action : 'rename',
caption : this.btnRenameCaption, caption : this.btnRenameCaption,
canFocused: false canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}); });
this.miProtect = new Common.UI.MenuItem({ this.miProtect = new Common.UI.MenuItem({
el : $markup.elementById('#fm-btn-protect'), el : $markup.elementById('#fm-btn-protect'),
action : 'protect', action : 'protect',
caption : this.btnProtectCaption, caption : this.btnProtectCaption,
canFocused: false canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}); });
if ( !!this.options.miProtect ) { if ( !!this.options.miProtect ) {
this.miProtect.setDisabled(this.options.miProtect.isDisabled()); this.miProtect.setDisabled(this.options.miProtect.isDisabled());
@ -143,35 +167,50 @@ define([
el : $markup.elementById('#fm-btn-recent'), el : $markup.elementById('#fm-btn-recent'),
action : 'recent', action : 'recent',
caption : this.btnRecentFilesCaption, caption : this.btnRecentFilesCaption,
canFocused: false canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}); });
this.miNew = new Common.UI.MenuItem({ this.miNew = new Common.UI.MenuItem({
el : $markup.elementById('#fm-btn-create'), el : $markup.elementById('#fm-btn-create'),
action : 'new', action : 'new',
caption : this.btnCreateNewCaption, caption : this.btnCreateNewCaption,
canFocused: false canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}); });
this.miAccess = new Common.UI.MenuItem({ this.miAccess = new Common.UI.MenuItem({
el : $markup.elementById('#fm-btn-rights'), el : $markup.elementById('#fm-btn-rights'),
action : 'rights', action : 'rights',
caption : this.btnRightsCaption, caption : this.btnRightsCaption,
canFocused: false canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}); });
this.miSettings = new Common.UI.MenuItem({ this.miSettings = new Common.UI.MenuItem({
el : $markup.elementById('#fm-btn-settings'), el : $markup.elementById('#fm-btn-settings'),
action : 'opts', action : 'opts',
caption : this.btnSettingsCaption, caption : this.btnSettingsCaption,
canFocused: false canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}); });
this.miHelp = new Common.UI.MenuItem({ this.miHelp = new Common.UI.MenuItem({
el : $markup.elementById('#fm-btn-help'), el : $markup.elementById('#fm-btn-help'),
action : 'help', action : 'help',
caption : this.btnHelpCaption, caption : this.btnHelpCaption,
canFocused: false canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}); });
this.items = []; this.items = [];
@ -180,7 +219,10 @@ define([
el : $markup.elementById('#fm-btn-return'), el : $markup.elementById('#fm-btn-return'),
action : 'back', action : 'back',
caption : this.btnCloseMenuCaption, caption : this.btnCloseMenuCaption,
canFocused: false canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}), }),
this.miSave, this.miSave,
this.miEdit, this.miEdit,
@ -196,7 +238,10 @@ define([
el : $markup.elementById('#fm-btn-info'), el : $markup.elementById('#fm-btn-info'),
action : 'info', action : 'info',
caption : this.btnInfoCaption, caption : this.btnInfoCaption,
canFocused: false canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}), }),
this.miAccess, this.miAccess,
this.miSettings, this.miSettings,
@ -205,7 +250,10 @@ define([
el : $markup.elementById('#fm-btn-back'), el : $markup.elementById('#fm-btn-back'),
action : 'exit', action : 'exit',
caption : this.btnBackCaption, caption : this.btnBackCaption,
canFocused: false canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}) })
); );

View file

@ -63,7 +63,7 @@ define([
'<% _.each(rows, function(row) { %>', '<% _.each(rows, function(row) { %>',
'<tr>', '<tr>',
'<% _.each(row, function(item) { %>', '<% _.each(row, function(item) { %>',
'<td><div><svg class="btn-doc-format" format="<%= item.type %>">', '<td><div><svg class="btn-doc-format" format="<%= item.type %>" data-hint="2" data-hint-direction="left-top" data-hint-offset="4, 4">',
'<use xlink:href="#svg-format-<%= item.imgCls %>"></use>', '<use xlink:href="#svg-format-<%= item.imgCls %>"></use>',
'</svg></div></td>', '</svg></div></td>',
'<% }) %>', '<% }) %>',

View file

@ -130,7 +130,10 @@ define([
defaultUnit : "cm", defaultUnit : "cm",
value: '3 cm', value: '3 cm',
maxValue: 55.88, maxValue: 55.88,
minValue: 0 minValue: 0,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.spinners.push(this.spnWidth); this.spinners.push(this.spnWidth);
this.lockedControls.push(this.spnWidth); this.lockedControls.push(this.spnWidth);
@ -142,7 +145,10 @@ define([
defaultUnit : "cm", defaultUnit : "cm",
value: '3 cm', value: '3 cm',
maxValue: 55.88, maxValue: 55.88,
minValue: 0 minValue: 0,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.spinners.push(this.spnHeight); this.spinners.push(this.spnHeight);
this.lockedControls.push(this.spnHeight); this.lockedControls.push(this.spnHeight);
@ -153,7 +159,10 @@ define([
iconCls: 'toolbar__icon advanced-btn-ratio', iconCls: 'toolbar__icon advanced-btn-ratio',
style: 'margin-bottom: 1px;', style: 'margin-bottom: 1px;',
enableToggle: true, enableToggle: true,
hint: this.textKeepRatio hint: this.textKeepRatio,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.lockedControls.push(this.btnRatio); this.lockedControls.push(this.btnRatio);
@ -186,7 +195,10 @@ define([
{caption: this.textFromUrl, value: 1}, {caption: this.textFromUrl, value: 1},
{caption: this.textFromStorage, value: 2} {caption: this.textFromStorage, value: 2}
] ]
}) }),
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.lockedControls.push(this.btnSelectImage); this.lockedControls.push(this.btnSelectImage);
this.btnSelectImage.menu.on('item:click', _.bind(this.onImageSelect, this)); this.btnSelectImage.menu.on('item:click', _.bind(this.onImageSelect, this));
@ -235,7 +247,10 @@ define([
caption: this.textCropFit, caption: this.textCropFit,
value: 2 value: 2
}] }]
}) }),
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.btnCrop.on('click', _.bind(this.onCrop, this)); this.btnCrop.on('click', _.bind(this.onCrop, this));
this.btnCrop.menu.on('item:click', _.bind(this.onCropMenu, this)); this.btnCrop.menu.on('item:click', _.bind(this.onCropMenu, this));
@ -246,7 +261,10 @@ define([
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-rotate-270', iconCls: 'toolbar__icon btn-rotate-270',
value: 0, value: 0,
hint: this.textHint270 hint: this.textHint270,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'small'
}); });
this.btnRotate270.on('click', _.bind(this.onBtnRotateClick, this)); this.btnRotate270.on('click', _.bind(this.onBtnRotateClick, this));
this.lockedControls.push(this.btnRotate270); this.lockedControls.push(this.btnRotate270);
@ -256,7 +274,10 @@ define([
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-rotate-90', iconCls: 'toolbar__icon btn-rotate-90',
value: 1, value: 1,
hint: this.textHint90 hint: this.textHint90,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'small'
}); });
this.btnRotate90.on('click', _.bind(this.onBtnRotateClick, this)); this.btnRotate90.on('click', _.bind(this.onBtnRotateClick, this));
this.lockedControls.push(this.btnRotate90); this.lockedControls.push(this.btnRotate90);
@ -266,7 +287,10 @@ define([
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-flip-vert', iconCls: 'toolbar__icon btn-flip-vert',
value: 0, value: 0,
hint: this.textHintFlipV hint: this.textHintFlipV,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'small'
}); });
this.btnFlipV.on('click', _.bind(this.onBtnFlipClick, this)); this.btnFlipV.on('click', _.bind(this.onBtnFlipClick, this));
this.lockedControls.push(this.btnFlipV); this.lockedControls.push(this.btnFlipV);
@ -276,7 +300,10 @@ define([
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-flip-hor', iconCls: 'toolbar__icon btn-flip-hor',
value: 1, value: 1,
hint: this.textHintFlipH hint: this.textHintFlipH,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'small'
}); });
this.btnFlipH.on('click', _.bind(this.onBtnFlipClick, this)); this.btnFlipH.on('click', _.bind(this.onBtnFlipClick, this));
this.lockedControls.push(this.btnFlipH); this.lockedControls.push(this.btnFlipH);

View file

@ -274,7 +274,10 @@ define([
cls: 'input-group-nr', cls: 'input-group-nr',
menuStyle: 'min-width: 85px;', menuStyle: 'min-width: 85px;',
editable: false, editable: false,
data: this._arrLineRule data: this._arrLineRule,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.cmbLineRule.setValue(c_paragraphLinerule.LINERULE_AUTO); this.cmbLineRule.setValue(c_paragraphLinerule.LINERULE_AUTO);
this.lockedControls.push(this.cmbLineRule); this.lockedControls.push(this.cmbLineRule);
@ -286,7 +289,10 @@ define([
value: '1.5', value: '1.5',
defaultUnit : "", defaultUnit : "",
maxValue: 132, maxValue: 132,
minValue: 0.5 minValue: 0.5,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.lockedControls.push(this.numLineHeight); this.lockedControls.push(this.numLineHeight);
@ -299,7 +305,10 @@ define([
maxValue: 55.88, maxValue: 55.88,
minValue: 0, minValue: 0,
allowAuto : true, allowAuto : true,
autoText : this.txtAutoText autoText : this.txtAutoText,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.spinners.push(this.numSpacingBefore); this.spinners.push(this.numSpacingBefore);
this.lockedControls.push(this.numSpacingBefore); this.lockedControls.push(this.numSpacingBefore);
@ -313,7 +322,10 @@ define([
maxValue: 55.88, maxValue: 55.88,
minValue: 0, minValue: 0,
allowAuto : true, allowAuto : true,
autoText : this.txtAutoText autoText : this.txtAutoText,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.spinners.push(this.numSpacingAfter); this.spinners.push(this.numSpacingAfter);
this.lockedControls.push(this.numSpacingAfter); this.lockedControls.push(this.numSpacingAfter);

View file

@ -142,7 +142,10 @@ define([
defaultUnit : "cm", defaultUnit : "cm",
value: '0 cm', value: '0 cm',
maxValue: 5963.9, maxValue: 5963.9,
minValue: 0 minValue: 0,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.spinners.push(this.spnWidth); this.spinners.push(this.spnWidth);
this.sizeControls.push(this.spnWidth); this.sizeControls.push(this.spnWidth);
@ -154,7 +157,10 @@ define([
defaultUnit : "cm", defaultUnit : "cm",
value: '0 cm', value: '0 cm',
maxValue: 5963.9, maxValue: 5963.9,
minValue: 0 minValue: 0,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.spinners.push(this.spnHeight); this.spinners.push(this.spnHeight);
this.sizeControls.push(this.spnHeight); this.sizeControls.push(this.spnHeight);
@ -165,7 +171,10 @@ define([
iconCls: 'toolbar__icon advanced-btn-ratio', iconCls: 'toolbar__icon advanced-btn-ratio',
style: 'margin-bottom: 1px;', style: 'margin-bottom: 1px;',
enableToggle: true, enableToggle: true,
hint: this.textKeepRatio hint: this.textKeepRatio,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.sizeControls.push(this.btnRatio); this.sizeControls.push(this.btnRatio);
@ -194,7 +203,10 @@ define([
defaultUnit : "cm", defaultUnit : "cm",
value: '0 cm', value: '0 cm',
maxValue: 5963.9, maxValue: 5963.9,
minValue: 0 minValue: 0,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.spinners.push(this.spnHor); this.spinners.push(this.spnHor);
this.sizeControls.push(this.spnHor); this.sizeControls.push(this.spnHor);
@ -206,7 +218,10 @@ define([
defaultUnit : "cm", defaultUnit : "cm",
value: '0 cm', value: '0 cm',
maxValue: 5963.9, maxValue: 5963.9,
minValue: 0 minValue: 0,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.spinners.push(this.spnVert); this.spinners.push(this.spnVert);
this.sizeControls.push(this.spnVert); this.sizeControls.push(this.spnVert);
@ -219,7 +234,10 @@ define([
this.chLock = new Common.UI.CheckBox({ this.chLock = new Common.UI.CheckBox({
el: $('#slicer-checkbox-disable-resize'), el: $('#slicer-checkbox-disable-resize'),
labelText: this.textLock, labelText: this.textLock,
disabled: this._locked disabled: this._locked,
dataHint: '1',
dataHintDirection: 'left',
dataHintOffset: 'small'
}); });
this.lockedControls.push(this.chLock); this.lockedControls.push(this.chLock);
this.chLock.on('change', this.onLockSlicerChange.bind(this)); this.chLock.on('change', this.onLockSlicerChange.bind(this));
@ -231,7 +249,10 @@ define([
defaultUnit : "cm", defaultUnit : "cm",
value: '0 cm', value: '0 cm',
maxValue: 5963.9, maxValue: 5963.9,
minValue: 0 minValue: 0,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.spinners.push(this.spnColWidth); this.spinners.push(this.spnColWidth);
this.sizeControls.push(this.spnColWidth); this.sizeControls.push(this.spnColWidth);
@ -243,7 +264,10 @@ define([
defaultUnit : "cm", defaultUnit : "cm",
value: '0 cm', value: '0 cm',
maxValue: 5963.9, maxValue: 5963.9,
minValue: 0 minValue: 0,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.spinners.push(this.spnColHeight); this.spinners.push(this.spnColHeight);
this.sizeControls.push(this.spnColHeight); this.sizeControls.push(this.spnColHeight);
@ -257,7 +281,10 @@ define([
value: '1', value: '1',
allowDecimal: false, allowDecimal: false,
maxValue: 20000, maxValue: 20000,
minValue: 1 minValue: 1,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.sizeControls.push(this.numCols); this.sizeControls.push(this.numCols);
@ -274,7 +301,10 @@ define([
el: $('#slicer-radio-asc'), el: $('#slicer-radio-asc'),
name: 'asc-radio-slicer-sort', name: 'asc-radio-slicer-sort',
labelText: this.textAsc + ' (' + this.textAZ + ')', labelText: this.textAsc + ' (' + this.textAZ + ')',
checked: true checked: true,
dataHint: '1',
dataHintDirection: 'left',
dataHintOffset: 'small'
}); });
this.radioAsc.on('change', _.bind(function(field, newValue, eOpts) { this.radioAsc.on('change', _.bind(function(field, newValue, eOpts) {
if (newValue && this.api) { if (newValue && this.api) {
@ -291,7 +321,10 @@ define([
el: $('#slicer-radio-desc'), el: $('#slicer-radio-desc'),
name: 'asc-radio-slicer-sort', name: 'asc-radio-slicer-sort',
labelText: this.textDesc + ' (' + this.textZA + ')', labelText: this.textDesc + ' (' + this.textZA + ')',
checked: false checked: false,
dataHint: '1',
dataHintDirection: 'left',
dataHintOffset: 'small'
}); });
this.radioDesc.on('change', _.bind(function(field, newValue, eOpts) { this.radioDesc.on('change', _.bind(function(field, newValue, eOpts) {
if (newValue && this.api) { if (newValue && this.api) {
@ -306,7 +339,10 @@ define([
this.chHideNoData = new Common.UI.CheckBox({ this.chHideNoData = new Common.UI.CheckBox({
el: $('#slicer-check-hide-nodata'), el: $('#slicer-check-hide-nodata'),
labelText: this.strHideNoData labelText: this.strHideNoData,
dataHint: '1',
dataHintDirection: 'left',
dataHintOffset: 'small'
}); });
this.chHideNoData.on('change', _.bind(function(field, newValue, oldValue, eOpts){ this.chHideNoData.on('change', _.bind(function(field, newValue, oldValue, eOpts){
var checked = (field.getValue()=='checked'); var checked = (field.getValue()=='checked');
@ -320,7 +356,10 @@ define([
this.chIndNoData = new Common.UI.CheckBox({ this.chIndNoData = new Common.UI.CheckBox({
el: $('#slicer-check-indicate-nodata'), el: $('#slicer-check-indicate-nodata'),
labelText: this.strIndNoData labelText: this.strIndNoData,
dataHint: '1',
dataHintDirection: 'left',
dataHintOffset: 'small'
}); });
this.chIndNoData.on('change', _.bind(function(field, newValue, oldValue, eOpts){ this.chIndNoData.on('change', _.bind(function(field, newValue, oldValue, eOpts){
var checked = (field.getValue()=='checked'); var checked = (field.getValue()=='checked');
@ -335,7 +374,10 @@ define([
this.chShowNoData = new Common.UI.CheckBox({ this.chShowNoData = new Common.UI.CheckBox({
el: $('#slicer-check-show-nodata-last'), el: $('#slicer-check-show-nodata-last'),
disabled: true, disabled: true,
labelText: this.strShowNoData labelText: this.strShowNoData,
dataHint: '1',
dataHintDirection: 'left',
dataHintOffset: 'small'
}); });
this.chShowNoData.on('change', _.bind(function(field, newValue, oldValue, eOpts){ this.chShowNoData.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._originalProps && this.api) { if (this._originalProps && this.api) {
@ -348,7 +390,10 @@ define([
this.chShowDel = new Common.UI.CheckBox({ this.chShowDel = new Common.UI.CheckBox({
el: $('#slicer-check-show-deleted'), el: $('#slicer-check-show-deleted'),
labelText: this.strShowDel labelText: this.strShowDel,
dataHint: '1',
dataHintDirection: 'left',
dataHintOffset: 'small'
}); });
this.chShowDel.on('change', _.bind(function(field, newValue, oldValue, eOpts){ this.chShowDel.on('change', _.bind(function(field, newValue, oldValue, eOpts){
// if (this._originalProps && this.api) { // if (this._originalProps && this.api) {
@ -650,7 +695,10 @@ define([
itemHeight: 49, itemHeight: 49,
menuMaxHeight: 235, menuMaxHeight: 235,
enableKeyEvents: true, enableKeyEvents: true,
cls: 'combo-slicer-style' cls: 'combo-slicer-style',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.btnSlicerStyle.render($('#slicer-btn-style')); this.btnSlicerStyle.render($('#slicer-btn-style'));
this.btnSlicerStyle.openButton.menu.cmpEl.css({ this.btnSlicerStyle.openButton.menu.cmpEl.css({

View file

@ -1086,7 +1086,10 @@ define([
style: 'width: 100%;', style: 'width: 100%;',
menuStyle: 'min-width: 100%;', menuStyle: 'min-width: 100%;',
editable: false, editable: false,
data: this._arrFillSrc data: this._arrFillSrc,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.cmbFillSrc.setValue(this._arrFillSrc[0].value); this.cmbFillSrc.setValue(this._arrFillSrc[0].value);
this.cmbFillSrc.on('selected', _.bind(this.onFillSrcSelect, this)); this.cmbFillSrc.on('selected', _.bind(this.onFillSrcSelect, this));
@ -1097,7 +1100,10 @@ define([
itemHeight: 28, itemHeight: 28,
menuMaxHeight: 300, menuMaxHeight: 300,
enableKeyEvents: true, enableKeyEvents: true,
cls: 'combo-pattern' cls: 'combo-pattern',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.cmbPattern.menuPicker.itemTemplate = this.cmbPattern.fieldPicker.itemTemplate = _.template([ this.cmbPattern.menuPicker.itemTemplate = this.cmbPattern.fieldPicker.itemTemplate = _.template([
'<div class="style" id="<%= id %>">', '<div class="style" id="<%= id %>">',
@ -1144,7 +1150,10 @@ define([
cls: 'input-group-nr', cls: 'input-group-nr',
menuStyle: 'min-width: 90px;', menuStyle: 'min-width: 90px;',
editable: false, editable: false,
data: this._arrFillType data: this._arrFillType,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.cmbFillType.setValue(this._arrFillType[0].value); this.cmbFillType.setValue(this._arrFillType[0].value);
this.cmbFillType.on('selected', _.bind(this.onFillTypeSelect, this)); this.cmbFillType.on('selected', _.bind(this.onFillTypeSelect, this));
@ -1157,7 +1166,10 @@ define([
value: '100 %', value: '100 %',
defaultUnit : "%", defaultUnit : "%",
maxValue: 100, maxValue: 100,
minValue: 0 minValue: 0,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.numTransparency.on('change', _.bind(this.onNumTransparencyChange, this)); this.numTransparency.on('change', _.bind(this.onNumTransparencyChange, this));
this.numTransparency.on('inputleave', function(){ Common.NotificationCenter.trigger('edit:complete', me);}); this.numTransparency.on('inputleave', function(){ Common.NotificationCenter.trigger('edit:complete', me);});
@ -1187,7 +1199,10 @@ define([
cls: 'input-group-nr', cls: 'input-group-nr',
menuStyle: 'min-width: 90px;', menuStyle: 'min-width: 90px;',
editable: false, editable: false,
data: this._arrGradType data: this._arrGradType,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.cmbGradType.setValue(this._arrGradType[0].value); this.cmbGradType.setValue(this._arrGradType[0].value);
this.cmbGradType.on('selected', _.bind(this.onGradTypeSelect, this)); this.cmbGradType.on('selected', _.bind(this.onGradTypeSelect, this));
@ -1217,7 +1232,10 @@ define([
items: [ items: [
{ template: _.template('<div id="id-textart-menu-direction" style="width: 175px; margin: 0 5px;"></div>') } { template: _.template('<div id="id-textart-menu-direction" style="width: 175px; margin: 0 5px;"></div>') }
] ]
}) }),
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.btnDirection.on('render:after', function(btn) { this.btnDirection.on('render:after', function(btn) {
me.mnuDirectionPicker = new Common.UI.DataView({ me.mnuDirectionPicker = new Common.UI.DataView({
@ -1292,7 +1310,10 @@ define([
allowDecimal: false, allowDecimal: false,
maxValue: 100, maxValue: 100,
minValue: 0, minValue: 0,
disabled: this._locked disabled: this._locked,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.lockedControls.push(this.spnGradPosition); this.lockedControls.push(this.spnGradPosition);
this.spnGradPosition.on('change', _.bind(this.onPositionChange, this)); this.spnGradPosition.on('change', _.bind(this.onPositionChange, this));
@ -1303,7 +1324,9 @@ define([
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-add-breakpoint', iconCls: 'toolbar__icon btn-add-breakpoint',
disabled: this._locked, disabled: this._locked,
hint: this.tipAddGradientPoint hint: this.tipAddGradientPoint,
dataHint: '1',
dataHintDirection: 'bottom'
}); });
this.btnAddGradientStep.on('click', _.bind(this.onAddGradientStep, this)); this.btnAddGradientStep.on('click', _.bind(this.onAddGradientStep, this));
this.lockedControls.push(this.btnAddGradientStep); this.lockedControls.push(this.btnAddGradientStep);
@ -1313,7 +1336,9 @@ define([
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-remove-breakpoint', iconCls: 'toolbar__icon btn-remove-breakpoint',
disabled: this._locked, disabled: this._locked,
hint: this.tipRemoveGradientPoint hint: this.tipRemoveGradientPoint,
dataHint: '1',
dataHintDirection: 'bottom'
}); });
this.btnRemoveGradientStep.on('click', _.bind(this.onRemoveGradientStep, this)); this.btnRemoveGradientStep.on('click', _.bind(this.onRemoveGradientStep, this));
this.lockedControls.push(this.btnRemoveGradientStep); this.lockedControls.push(this.btnRemoveGradientStep);
@ -1327,7 +1352,10 @@ define([
allowDecimal: true, allowDecimal: true,
maxValue: 359.9, maxValue: 359.9,
minValue: 0, minValue: 0,
disabled: this._locked disabled: this._locked,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.lockedControls.push(this.numGradientAngle); this.lockedControls.push(this.numGradientAngle);
this.numGradientAngle.on('change', _.bind(this.onGradientAngleChange, this)); this.numGradientAngle.on('change', _.bind(this.onGradientAngleChange, this));
@ -1336,7 +1364,10 @@ define([
this.cmbBorderSize = new Common.UI.ComboBorderSizeEditable({ this.cmbBorderSize = new Common.UI.ComboBorderSizeEditable({
el: $('#textart-combo-border-size'), el: $('#textart-combo-border-size'),
style: "width: 93px;", style: "width: 93px;",
txtNoBorders: this.txtNoBorders txtNoBorders: this.txtNoBorders,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}) })
.on('selected', _.bind(this.onBorderSizeSelect, this)) .on('selected', _.bind(this.onBorderSizeSelect, this))
.on('changed:before',_.bind(this.onBorderSizeChanged, this, true)) .on('changed:before',_.bind(this.onBorderSizeChanged, this, true))
@ -1349,7 +1380,10 @@ define([
this.cmbBorderType = new Common.UI.ComboBorderType({ this.cmbBorderType = new Common.UI.ComboBorderType({
el: $('#textart-combo-border-type'), el: $('#textart-combo-border-type'),
style: "width: 93px;", style: "width: 93px;",
menuStyle: 'min-width: 93px;' menuStyle: 'min-width: 93px;',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}).on('selected', _.bind(this.onBorderTypeSelect, this)) }).on('selected', _.bind(this.onBorderTypeSelect, this))
.on('combo:blur', _.bind(this.onComboBlur, this, false)); .on('combo:blur', _.bind(this.onComboBlur, this, false));
this.BorderType = Asc.c_oDashType.solid; this.BorderType = Asc.c_oDashType.solid;
@ -1361,7 +1395,10 @@ define([
itemHeight: 50, itemHeight: 50,
menuMaxHeight: 300, menuMaxHeight: 300,
enableKeyEvents: true, enableKeyEvents: true,
cls: 'combo-textart' cls: 'combo-textart',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.cmbTransform.render($('#textart-combo-transform')); this.cmbTransform.render($('#textart-combo-transform'));
this.cmbTransform.openButton.menu.cmpEl.css({ this.cmbTransform.openButton.menu.cmpEl.css({
@ -1438,7 +1475,7 @@ define([
el: $('#textart-combo-fill-texture'), el: $('#textart-combo-fill-texture'),
template: _.template([ template: _.template([
'<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle" tabindex="0" data-toggle="dropdown">', '<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle" tabindex="0" data-toggle="dropdown">',
'<div class="form-control text" style="width: 90px;">' + this.textSelectTexture + '</div>', '<div class="form-control text" style="width: 90px;" data-hint="1" data-hint-direction="bottom" data-hint-offset="big">' + this.textSelectTexture + '</div>',
'<div style="display: table-cell;"></div>', '<div style="display: table-cell;"></div>',
'<button type="button" class="btn btn-default">', '<button type="button" class="btn btn-default">',
'<span class="caret" />', '<span class="caret" />',
@ -1500,7 +1537,10 @@ define([
menuMaxHeight: 300, menuMaxHeight: 300,
enableKeyEvents: true, enableKeyEvents: true,
showLast: false, showLast: false,
cls: 'combo-textart' cls: 'combo-textart',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.cmbTextArt.render($('#textart-combo-template')); this.cmbTextArt.render($('#textart-combo-template'));
this.cmbTextArt.openButton.menu.cmpEl.css({ this.cmbTextArt.openButton.menu.cmpEl.css({
@ -1580,7 +1620,10 @@ define([
if (!this.btnBackColor) { if (!this.btnBackColor) {
this.btnBorderColor = new Common.UI.ColorButton({ this.btnBorderColor = new Common.UI.ColorButton({
parentEl: $('#textart-border-color-btn'), parentEl: $('#textart-border-color-btn'),
color: '000000' color: '000000',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.lockedControls.push(this.btnBorderColor); this.lockedControls.push(this.btnBorderColor);
this.colorsBorder = this.btnBorderColor.getPicker(); this.colorsBorder = this.btnBorderColor.getPicker();
@ -1589,7 +1632,10 @@ define([
this.btnBackColor = new Common.UI.ColorButton({ this.btnBackColor = new Common.UI.ColorButton({
parentEl: $('#textart-back-color-btn'), parentEl: $('#textart-back-color-btn'),
transparent: true, transparent: true,
color: 'transparent' color: 'transparent',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'medium'
}); });
this.lockedControls.push(this.btnBackColor); this.lockedControls.push(this.btnBackColor);
this.colorsBack = this.btnBackColor.getPicker(); this.colorsBack = this.btnBackColor.getPicker();
@ -1597,7 +1643,10 @@ define([
this.btnFGColor = new Common.UI.ColorButton({ this.btnFGColor = new Common.UI.ColorButton({
parentEl: $('#textart-foreground-color-btn'), parentEl: $('#textart-foreground-color-btn'),
color: '000000' color: '000000',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.lockedControls.push(this.btnFGColor); this.lockedControls.push(this.btnFGColor);
this.colorsFG = this.btnFGColor.getPicker(); this.colorsFG = this.btnFGColor.getPicker();
@ -1605,7 +1654,10 @@ define([
this.btnBGColor = new Common.UI.ColorButton({ this.btnBGColor = new Common.UI.ColorButton({
parentEl: $('#textart-background-color-btn'), parentEl: $('#textart-background-color-btn'),
color: 'ffffff' color: 'ffffff',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.lockedControls.push(this.btnBGColor); this.lockedControls.push(this.btnBGColor);
this.colorsBG = this.btnBGColor.getPicker(); this.colorsBG = this.btnBGColor.getPicker();
@ -1613,7 +1665,10 @@ define([
this.btnGradColor = new Common.UI.ColorButton({ this.btnGradColor = new Common.UI.ColorButton({
parentEl: $('#textart-gradient-color-btn'), parentEl: $('#textart-gradient-color-btn'),
color: '000000' color: '000000',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
}); });
this.lockedControls.push(this.btnGradColor); this.lockedControls.push(this.btnGradColor);
this.colorsGrad = this.btnGradColor.getPicker(); this.colorsGrad = this.btnGradColor.getPicker();