Commit ff829633 authored by Romain Courteaud's avatar Romain Courteaud

erp5_web_renderjs_ui: gadget_html5_element add support for href attribute

parent eecda1b2
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
id: undefined, id: undefined,
name: undefined, name: undefined,
src: undefined, src: undefined,
href: undefined,
alt: undefined, alt: undefined,
append: '', append: '',
prepend: '' prepend: ''
...@@ -23,6 +24,7 @@ ...@@ -23,6 +24,7 @@
id: options.id, id: options.id,
tag: options.tag || 'div', tag: options.tag || 'div',
src: options.src, src: options.src,
href: options.href,
alt: options.alt, alt: options.alt,
name: options.name, name: options.name,
append: getFirstNonEmpty(options.append, ""), append: getFirstNonEmpty(options.append, ""),
...@@ -60,6 +62,9 @@ ...@@ -60,6 +62,9 @@
if (this.state.src) { if (this.state.src) {
new_element.setAttribute('src', this.state.src); new_element.setAttribute('src', this.state.src);
} }
if (this.state.href) {
new_element.setAttribute('href', this.state.href);
}
if (this.state.alt) { if (this.state.alt) {
new_element.setAttribute('alt', this.state.alt); new_element.setAttribute('alt', this.state.alt);
} }
......
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>986.41601.40161.17629</string> </value> <value> <string>989.27523.29749.43383</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1601393849.37</float> <float>1614350654.73</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment