Commit caab19c1 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_web_renderjs_ui: make multi checkbox field and radio field 's layout better

parent ecd90514
......@@ -121,13 +121,17 @@
<script src="gadget_erp5_field_multicheckbox.js" type="text/javascript"></script>\n
\n
<script id="unchecked-template" type="text/x-handlebars-template">\n
<input type="checkbox" value= "{{value}}" name="{{text}}" class ="ui-btn" data-i18n="{{text}}">\n
<label for="{{text}}" data-i18n="{{text}}">{{text}}</label>\n
<div class="ui-field-contain">\n
<label for="{{text}}" data-i18n="{{text}}">{{text}}</label>\n
<input type="checkbox" value= "{{value}}" name="{{text}}" class ="ui-btn" data-i18n="{{text}}">\n
</div>\n
</script>\n
\n
<script id="checked-template" type="text/x-handlebars-template">\n
<input type="checkbox" value= "{{value}}" checked=true data-i18n="{{text}}" class ="ui-btn" name="{{text}}">\n
<label for="{{text}}" data-i18n="{{text}}">{{text}}</label>\n
<diV class="ui-field-contain">\n
<label for="{{text}}" data-i18n="{{text}}">{{text}}</label>\n
<input type="checkbox" value= "{{value}}" checked=true data-i18n="{{text}}" class ="ui-btn" name="{{text}}">\n
</div>\n
</script>\n
</head>\n
<body>\n
......@@ -273,7 +277,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>944.6697.38351.57821</string> </value>
<value> <string>944.6874.36886.54937</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -291,7 +295,7 @@
</tuple>
<state>
<tuple>
<float>1435813493.65</float>
<float>1435817983.35</float>
<string>GMT+2</string>
</tuple>
</state>
......
......@@ -120,7 +120,9 @@
</head>\n
\n
<body>\n
<fieldset class="radiogroup" data-role="controlgroup">\n
<fieldset class="ui-controlgroup ui-corner-all ui-controlgroup-vertical">\n
<div class="radiogroup">\n
</div>\n
</fieldset>\n
</body>\n
</html>
......@@ -246,7 +248,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>xiaowu</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -260,7 +262,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>943.40818.25091.49920</string> </value>
<value> <string>943.62898.42115.10666</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -278,8 +280,8 @@
</tuple>
<state>
<tuple>
<float>1434009025.41</float>
<string>UTC</string>
<float>1435816933.09</float>
<string>GMT+2</string>
</tuple>
</state>
</object>
......
......@@ -135,6 +135,7 @@
div = document.createElement("div");\n
div.setAttribute("class", "ui-field-contain");\n
input = document.createElement("input");\n
input.setAttribute("class", "ui-btn");\n
input.setAttribute("type", "radio");\n
input.setAttribute("name", field_json.key);\n
input.setAttribute("value", items[i][1]);\n
......@@ -142,13 +143,13 @@
input.setAttribute("checked", true);\n
}\n
if (editable === 0) {\n
input.setAttribute("class", "ui-state-disabled");\n
input.setAttribute("class", "ui-btn ui-state-disabled");\n
}\n
label = document.createElement("label");\n
label.setAttribute(\'for\', items[i][0]);\n
label.textContent = items[i][0];\n
label.setAttribute(\'data-i18n\', items[i][0]);\n
\n
\n
div.appendChild(label);\n
div.appendChild(input);\n
radio_group.appendChild(div);\n
......@@ -307,7 +308,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>xiaowu</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -321,7 +322,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>943.41916.12770.63334</string> </value>
<value> <string>944.6869.21158.19933</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -339,8 +340,8 @@
</tuple>
<state>
<tuple>
<float>1434075112.9</float>
<string>UTC</string>
<float>1435817661.94</float>
<string>GMT+2</string>
</tuple>
</state>
</object>
......
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