Commit 74245431 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_web_renderjs_ui: create link when a sub field is not editable but it's in...

erp5_web_renderjs_ui: create link when a sub field is not editable but it's in listbox's editable column
parent bb594594
...@@ -315,6 +315,7 @@ ...@@ -315,6 +315,7 @@
a.className = "ui-link";\n a.className = "ui-link";\n
a.textContent = value;\n a.textContent = value;\n
th.appendChild(a);\n th.appendChild(a);\n
tr.appendChild(th);\n
} else {\n } else {\n
if (gadget.props.listbox_uid_dict.key === undefined) {\n if (gadget.props.listbox_uid_dict.key === undefined) {\n
gadget.props.listbox_uid_dict.key = result.data.rows[i].value["listbox_uid:list"].key;\n gadget.props.listbox_uid_dict.key = result.data.rows[i].value["listbox_uid:list"].key;\n
...@@ -329,9 +330,21 @@ ...@@ -329,9 +330,21 @@
}\n }\n
\n \n
promise_list.push(renderSubCell(th, value));\n promise_list.push(renderSubCell(th, value));\n
}\n \n
//when a sub field is not editable but it\'s in listbox\'s editable colummn \n
//then create link, see ListBox.py line 2518\n
if (value.editable === 0) {\n
a = document.createElement("a");\n
a.href = tmp_url;\n
a.className = "ui-link";\n
a.appendChild(th);\n
tr.appendChild(a);\n
} else {\n
tr.appendChild(th);\n tr.appendChild(th);\n
}\n }\n
}\n
}\n
\n
tbody.appendChild(tr);\n tbody.appendChild(tr);\n
}\n }\n
return RSVP.all(promise_list);\n return RSVP.all(promise_list);\n
...@@ -598,7 +611,7 @@ ...@@ -598,7 +611,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>
...@@ -612,7 +625,7 @@ ...@@ -612,7 +625,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>943.26058.11320.20582</string> </value> <value> <string>944.8265.37712.58112</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -630,8 +643,8 @@ ...@@ -630,8 +643,8 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1433234504.32</float> <float>1435902335.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