Commit 48212e10 authored by Xiaowu Zhang's avatar Xiaowu Zhang

Attribute prefixed by data-* for HTML5 Doctype

parent c4d1a523
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts16413519.07</string> </value> <value> <string>ts17000485.95</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -101,8 +101,8 @@ ...@@ -101,8 +101,8 @@
list.push(g.getDeclaredGadget(scope));\n list.push(g.getDeclaredGadget(scope));\n
tmp.sandbox = list_gadget[i].getAttribute("data-gadget-sandbox");\n tmp.sandbox = list_gadget[i].getAttribute("data-gadget-sandbox");\n
tmp.key = scope;\n tmp.key = scope;\n
tmp.editable = list_gadget[i].getAttribute("editable");\n tmp.editable = list_gadget[i].getAttribute("data-gadget-editable");\n
tmp.value = list_gadget[i].getAttribute("value");\n tmp.value = list_gadget[i].getAttribute("data-gadget-value");\n
gadget_attributes.push(tmp);\n gadget_attributes.push(tmp);\n
}\n }\n
}\n }\n
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>6233</int> </value> <value> <int>6257</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -32,9 +32,9 @@ class GadgetWidget(Widget.TextWidget): ...@@ -32,9 +32,9 @@ class GadgetWidget(Widget.TextWidget):
kw['data-gadget-url'] = field.get_value('gadget_url') kw['data-gadget-url'] = field.get_value('gadget_url')
kw['data-gadget-scope'] = field.id kw['data-gadget-scope'] = field.id
if key is not None: if key is not None:
kw['editable'] = key kw['data-gadget-editable'] = key
kw['class'] = "gadget" kw['class'] = "gadget"
kw['value'] = value kw['data-gadget-value'] = value
kw['data-gadget-sandbox'] = field.get_value('js_sandbox') kw['data-gadget-sandbox'] = field.get_value('js_sandbox')
return Widget.render_element("div", return Widget.render_element("div",
**kw) **kw)
......
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