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