Commit 3e12184b authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: use regex to replace all occurrences of spaces

The code result.portal_type.replace(' ', '_') gives Sale_Invoice Transaction

The code result.portal_type.replace(/ /g, '_') gives Sale_Invoice_Transaction
parent 41612f99
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
if (result.portal_type !== undefined) { if (result.portal_type !== undefined) {
child_gadget_url = 'gadget_erp5_page_slap_' + child_gadget_url = 'gadget_erp5_page_slap_' +
result.portal_type.replace(' ', '_').toLowerCase() + result.portal_type.replace(/ /g, '_').toLowerCase() +
'_view.html'; '_view.html';
} else { } else {
throw new Error('Can not display document: ' + options.jio_key); throw new Error('Can not display document: ' + options.jio_key);
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>963.19049.63397.221</string> </value> <value> <string>964.64854.62654.27545</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1510054929.9</float> <float>1516644220.55</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </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