Merge pull request 'fix/bug-74201' (#565) from fix/bug-74201 into develop

This commit is contained in:
Julia Radzhabova
2025-07-01 11:39:21 +00:00
7 changed files with 46 additions and 6 deletions

View File

@ -103,11 +103,6 @@ define([
isVisible: false
};
me.eyedropperTip = {
toolTip: new Common.UI.Tooltip({
owner: this,
html: true,
cls: 'eyedropper-tooltip'
}),
isHidden: true,
isVisible: false,
eyedropperColor: null,

View File

@ -1189,6 +1189,16 @@ define([], function () {
me.eyedropperTip.toolTip.hide();
}
if (!me.eyedropperTip.toolTip) {
var tipEl = $('<div id="tip-container-eyedroppertip" style="position: absolute; z-index: 10000;"></div>');
me.documentHolder.cmpEl.append(tipEl);
me.eyedropperTip.toolTip = new Common.UI.Tooltip({
owner: tipEl,
html: true,
cls: 'eyedropper-tooltip'
});
}
var color = moveData.get_EyedropperColor().asc_getColor(),
r = color.get_r(),
g = color.get_g(),
@ -1214,7 +1224,7 @@ define([], function () {
me.eyedropperTip.tipInterval = setInterval(function () {
clearInterval(me.eyedropperTip.tipInterval);
if (me.eyedropperTip.isVisible) {
ToolTip = '<div>RGB(' + r + ',' + g + ',' + b + ')</div>' +
ToolTip = '<div>RGB (' + r + ',' + g + ',' + b + ')</div>' +
'<div>' + moveData.get_EyedropperColor().asc_getName() + '</div>';
me.eyedropperTip.toolTip.setTitle(ToolTip);
me.eyedropperTip.isTipVisible = true;

View File

@ -16,6 +16,12 @@
<div id="form-txt-pholder"></div>
</td>
</tr>
<tr>
<td class="padding-small">
<label class="input-label"><%= scope.textTip %></label>
<div id="form-txt-tip"></div>
</td>
</tr>
<tr class="form-text-combo">
<td class="padding-small">
<label class="input-label"><%= scope.textFormat %></label>

View File

@ -241,6 +241,18 @@ define([
setTimeout(function(){me.txtPlaceholder._input && me.txtPlaceholder._input.select();}, 1);
});
this.textareaTip = new Common.UI.TextareaField({
el : $markup.findById('#form-txt-tip'),
style : 'width: 100%; height: 36px;',
value : '',
dataHint : '1',
dataHintDirection: 'left',
dataHintOffset: 'small'
});
this.lockedControls.push(this.textareaTip);
this.textareaTip.on('changed:after', this.onTipChanged.bind(this));
this.textareaTip.on('inputleave', function(){ me.fireEvent('editcomplete', me);});
this.chAutofit = new Common.UI.CheckBox({
el: $markup.findById('#form-chb-autofit'),
labelText: this.textAutofit,
@ -888,6 +900,14 @@ define([
}
},
onTipChanged: function(input, newValue, oldValue, e) {
if (this.api && !this._noApply && (newValue!==oldValue)) {
this.api.SetFieldTooltip(newValue);
if (!e.relatedTarget || (e.relatedTarget.localName != 'input' && e.relatedTarget.localName != 'textarea') || !/form-control/.test(e.relatedTarget.className))
this.fireEvent('editcomplete', this);
}
},
onLineWidthChanged: function(combo, record) {
if (this.api && !this._noApply) {
this._state.StrokeWidth = undefined;
@ -1314,6 +1334,12 @@ define([
this._state.Name=val;
}
val = props.asc_getTooltip();
if (this._state.tip!==val) {
this.textareaTip.setValue(val ? val : '');
this._state.tip=val;
}
val = props.asc_getRequired();
if ( this._state.Required!==val ) {
this.chRequired.setValue(!!val, true);

View File

@ -203,6 +203,7 @@ require([
'common/main/lib/view/ListSettingsDialog',
'common/main/lib/view/CustomizeQuickAccessDialog',
'common/main/lib/view/PasswordDialog',
'common/main/lib/component/TextareaField',
'pdfeditor/main/app/controller/DocumentHolderExt',
'pdfeditor/main/app/view/FileMenuPanels',

View File

@ -20,6 +20,7 @@ require([
'common/main/lib/view/ListSettingsDialog',
'common/main/lib/view/CustomizeQuickAccessDialog',
'common/main/lib/view/PasswordDialog',
'common/main/lib/component/TextareaField',
'pdfeditor/main/app/controller/DocumentHolderExt',
'pdfeditor/main/app/view/FileMenuPanels',

View File

@ -1519,6 +1519,7 @@
"PDFE.Views.FormSettings.textZipCode": "ZIP Code",
"PDFE.Views.FormSettings.textZipCode4": "ZIP Code + 4",
"PDFE.Views.FormSettings.txtCustom": "Custom",
"PDFE.Views.FormSettings.textTip": "Tip",
"PDFE.Views.FormsTab.capBtnCheckBox": "Checkbox",
"PDFE.Views.FormsTab.capBtnComboBox": "Combo Box",
"PDFE.Views.FormsTab.capBtnDropDown": "List Box",