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