Signed-off-by: Florian Eckert <fe@dev.tdt.de>
+ /**
+ * Set a tooltip icon.
+ *
+ * If set, this icon will be shown for the default one.
+ * This could also be a png icon from the resources directory.
+ *
+ * @name LuCI.form.TypedSection.prototype#tooltipicon
+ * @type string
+ * @default 'ℹ️';
+ */
+
/** @private */
renderWidget: function(section_id, option_index, cfgvalue) {
var tooltip = null;
/** @private */
renderWidget: function(section_id, option_index, cfgvalue) {
var tooltip = null;
value_disabled: this.disabled,
validate: L.bind(this.validate, this, section_id),
tooltip: tooltip,
value_disabled: this.disabled,
validate: L.bind(this.validate, this, section_id),
tooltip: tooltip,
+ tooltipicon: this.tooltipicon,
disabled: (this.readonly != null) ? this.readonly : this.map.readonly
});
disabled: (this.readonly != null) ? this.readonly : this.map.readonly
});
frameEl.appendChild(E('label', { 'for': id }));
if (this.options.tooltip != null) {
frameEl.appendChild(E('label', { 'for': id }));
if (this.options.tooltip != null) {
+ var icon = "⚠️";
+
+ if (this.options.tooltipicon != null)
+ icon = this.options.tooltipicon;
+
frameEl.appendChild(
E('label', { 'class': 'cbi-tooltip-container' },[
frameEl.appendChild(
E('label', { 'class': 'cbi-tooltip-container' },[
E('div', { 'class': 'cbi-tooltip' },
this.options.tooltip
)
E('div', { 'class': 'cbi-tooltip' },
this.options.tooltip
)