Commit 711b4e9b authored by Sven Franck's avatar Sven Franck Committed by Sebastien Robin

erp5_web_renderjs_ui: Allow breadcrumbs to go temporarily go "Home"

parent 9584a80f
......@@ -154,11 +154,15 @@
return gadget.whoWantToDisplayThis(uri.segment(2))\n
.push(function (parent_href) {\n
link_element = document.createElement("a");\n
// XXX Romain: please allow to "go home" via breadcrumb\n
if (parent_href === "#erp5_gadget.jio_key=undefined") {\n
parent_href = "#";\n
}\n
link_element.textContent = parent_link.name || "Home";\n
link_element.href = parent_href;\n
link_element.setAttribute("class", "responsive ui-btn ui-icon-carat-u ui-btn-icon-left");\n
link_element.setAttribute("data-role", "button");\n
link_element.setAttribute("role", "button");\n
link_element.textContent = parent_link.name;\n
parent_element.appendChild(link_element);\n
});\n
}\n
......@@ -299,7 +303,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>936.46052.59584.21316</string> </value>
<value> <string>937.8179.20788.60245</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -317,7 +321,7 @@
</tuple>
<state>
<tuple>
<float>1407318113.56</float>
<float>1408976172.25</float>
<string>GMT</string>
</tuple>
</state>
......
......@@ -177,7 +177,8 @@
\n
breadcrumb_options.title = result.data.title ||\n
result.data.reference || options.jio_key;\n
breadcrumb_options.parent_link = result.data._links.parent || result.data._links.site_root;\n
\n
breadcrumb_options.parent_link = result.data._links.parent || "#";\n
\n
uri = new URI(\n
result.data._embedded._view._links.form_definition.href\n
......@@ -563,7 +564,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>936.56327.51436.15564</string> </value>
<value> <string>937.8167.39223.50892</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -581,7 +582,7 @@
</tuple>
<state>
<tuple>
<float>1407932681.24</float>
<float>1408975361.84</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