Commit e3df7423 authored by Sven Franck's avatar Sven Franck Committed by Romain Courteaud

erp5_web_renderjs_ui: added section and temp icon switch

parent 6a7a1d4a
......@@ -124,7 +124,10 @@
</head>\n
<body>\n
\n
<h1></h1>\n
<section class="ui-content-header-plain">\n
<h3 class="ui-content-title ui-body-c"></h3>\n
</section>\n
\n
<!-- XXX action, method, fieldset -->\n
<form class="dialog_form">\n
<button type="submit" class="ui-btn ui-btn-b ui-btn-inline\n
......@@ -258,7 +261,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>romain</string> </value>
<value> <string>sven</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -272,7 +275,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>937.54178.32965.53043</string> </value>
<value> <string>937.64343.1806.54016</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -290,7 +293,7 @@
</tuple>
<state>
<tuple>
<float>1412240451.98</float>
<float>1413880520.29</float>
<string>GMT</string>
</tuple>
</state>
......
......@@ -164,6 +164,9 @@
.push(function (erp5_form) {\n
var title = options.form_definition.title,\n
i,\n
icon,\n
span = document.createElement("span"),\n
selector = form_gadget.__element.querySelector("h3"),\n
view_list = erp5_document._links.action_workflow || [];\n
\n
for (i = 0; i < view_list.length; i += 1) {\n
......@@ -171,8 +174,21 @@
title = view_list[i].title;\n
}\n
}\n
form_gadget.__element.querySelector("h1").textContent = title;\n
\n
// XXX hardcoded...\n
switch (title) {\n
case "Create User": icon = " ui-icon-user"; break;\n
case "Create Document": icon = " ui-icon-file-o"; break;\n
case "Change State": icon = " ui-icon-share-alt"; break;\n
case "Submit": icon = " ui-icon-check"; break;\n
default: icon = " ui-icon-random"; break;\n
}\n
span.className = "ui-icon ui-icon-custom" + icon;\n
span.textContent = "\\u00A0";\n
selector.appendChild(span);\n
selector.appendChild(document.createTextNode(title));\n
\n
// <span class="ui-icon ui-icon-custom ui-icon-random">&nbsp;</span>\n
form_options.erp5_document = options.erp5_document;\n
form_options.form_definition = options.form_definition;\n
form_options.view = options.view;\n
......@@ -377,7 +393,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>romain</string> </value>
<value> <string>sven</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -391,7 +407,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>937.65475.63762.40123</string> </value>
<value> <string>938.25845.4177.6041</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -409,7 +425,7 @@
</tuple>
<state>
<tuple>
<float>1412328524.22</float>
<float>1413881685.29</float>
<string>GMT</string>
</tuple>
</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