diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_appcache.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_appcache.xml index 280d425afb2f9313a7c19cc990f80de97233430e..b7e24202d0ad84acc79c478b1ae25a51926a4654 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_appcache.xml +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_appcache.xml @@ -108,7 +108,7 @@ <value> <string encoding="cdata"><![CDATA[ CACHE MANIFEST\n -# generated on Wed, 03 Nov 2016 16:00:00 GMT\n +# generated on Mon, 07 Nov 2016 10:00:00 GMT\n # XXX + fonts\n # images/ajax-loader.gif\n CACHE:\n @@ -366,7 +366,7 @@ NETWORK:\n </item> <item> <key> <string>serial</string> </key> - <value> <string>955.2249.38182.56985</string> </value> + <value> <string>955.7684.22445.34560</string> </value> </item> <item> <key> <string>state</string> </key> @@ -384,7 +384,7 @@ NETWORK:\n </tuple> <state> <tuple> - <float>1478191304.27</float> + <float>1478515550.48</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multirelationstringfield_js.js b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multirelationstringfield_js.js index 9a2e0fe4ac8930d33663f6fbb7fc937307b1be25..f2034cb85bdc1c8d7fba340b954454edc98483f7 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multirelationstringfield_js.js +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multirelationstringfield_js.js @@ -206,6 +206,9 @@ if (input_result.value_portal_type) { result[gadget.state.relation_field_id + '_' + k] = "_newContent_" + input_result.value_portal_type; + } else if (input_result.value_uid) { + result[gadget.state.relation_field_id + '_' + k] = + input_result.value_uid; } result[gadget.state.key].push(input_result.value_text); } diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multirelationstringfield_js.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multirelationstringfield_js.xml index 40c361c00d004303eaed1e32f57fd2d44ae3efeb..1b365fb3203f339d281082df321ad57bcc76586a 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multirelationstringfield_js.xml +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multirelationstringfield_js.xml @@ -230,7 +230,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>954.57674.49472.38673</string> </value> + <value> <string>954.57699.3960.12356</string> </value> </item> <item> <key> <string>state</string> </key> @@ -248,7 +248,7 @@ </tuple> <state> <tuple> - <float>1477584183.47</float> + <float>1478513065.68</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_html.html b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_html.html index 018ca85b4807f5492c62497b0a849958f9e3da00..0164b7e7af563a00d8611962a08a000649f74a67 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_html.html +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_html.html @@ -31,7 +31,7 @@ {{#if list.length}} <!--li class="ui-autocomplete ui-li ui-li-divider ui-bar-inherit ui-first-child" role="heading">Select from the {{list.length}} Search Results</li--> {{#each list}} - <li class="ui-li-static ui-body-inherit ui-icon-mail-forward ui-btn-icon-right" data-relative-url={{id}} >{{value}}</li> + <li class="ui-li-static ui-body-inherit ui-icon-mail-forward ui-btn-icon-right" data-relative-url="{{id}}" data-uid="{{uid}}">{{value}}</li> {{/each}} {{#each type}} <li class="ui-li-static ui-body-inherit ui-bar-inherit ui-icon-plus ui-btn-icon-right" data-create-object="{{this}}" name="{{this}}">Create New {{this}}: {{../value}}</li> diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_html.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_html.xml index 54dd5dc09cb22349057fa3d39401def421eb7927..6283c87106a01892a6799760d276140663584955 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_html.xml +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_html.xml @@ -234,7 +234,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>954.54399.20164.63317</string> </value> + <value> <string>955.7622.39581.2525</string> </value> </item> <item> <key> <string>state</string> </key> @@ -252,7 +252,7 @@ </tuple> <state> <tuple> - <float>1477475951.1</float> + <float>1478511768.91</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_js.js b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_js.js index 7db663af5f3d348ad212548d15b2e3b00ab5cd8b..51a5de3f46d52ef1709b6a111a0c2ac4fe665699 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_js.js +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_js.js @@ -142,7 +142,7 @@ // uid is known // User selected a document from a listbox - if (gadget.state.value_uid) { + if ((gadget.state.value_uid) && (!gadget.state.value_text)) { plane.className = SEARCHING_CLASS_STR; return gadget.jio_allDocs({ "query": Query.objectToSearchText(new SimpleQuery({ @@ -155,8 +155,7 @@ .push(function (result) { return gadget.changeState({ value_text: result.data.rows[0] - .value[gadget.state.catalog_index], - value_uid: null + .value[gadget.state.catalog_index] }); }); } @@ -230,7 +229,7 @@ ] })), limit: [0, 10], - select_list: [gadget.state.catalog_index] + select_list: [gadget.state.catalog_index, "uid"] }); }) .push(function (result) { @@ -245,7 +244,8 @@ for (i = 0; i < result.data.rows.length; i += 1) { list.push({ id: result.data.rows[i].id, - value: result.data.rows[i].value[gadget.state.catalog_index] + value: result.data.rows[i].value[gadget.state.catalog_index], + uid: result.data.rows[i].value.uid }); } plane.className = JUMP_UNKNOWN_CLASS_STR; @@ -268,7 +268,8 @@ result = { value_relative_url: gadget.state.value_relative_url, value_text: gadget.state.value_text, - value_portal_type: gadget.state.value_portal_type + value_portal_type: gadget.state.value_portal_type, + value_uid: gadget.state.value_uid }; } return result; @@ -310,6 +311,7 @@ // Check which 'li' element was clicked var li = event.target, data_relative_url = li.getAttribute("data-relative-url"), + data_uid = li.getAttribute("data-uid"), data_portal_type = li.getAttribute("data-create-object"), data_explore = li.getAttribute("data-explore"); @@ -323,6 +325,7 @@ if (data_relative_url) { new_state.value_text = li.textContent; new_state.value_relative_url = data_relative_url; + new_state.value_uid = data_uid; return gadget.changeState(new_state); } diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_js.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_js.xml index 6e16ff8e05177c19c594d4a809c3be98d04e64cc..4b5789b565103acbb20b6e19a2210e69b4927dd4 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_js.xml +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_js.xml @@ -236,7 +236,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>954.57692.7289.25070</string> </value> + <value> <string>955.7686.33333.9745</string> </value> </item> <item> <key> <string>state</string> </key> @@ -254,7 +254,7 @@ </tuple> <state> <tuple> - <float>1477583820.22</float> + <float>1478515602.79</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relationstringfield_js.js b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relationstringfield_js.js index b44c0af93c2e048f31adb300e3863928cbbdec96..6692092660535d99bda6ab6ebef3d6a2a0830ec4 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relationstringfield_js.js +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relationstringfield_js.js @@ -67,6 +67,9 @@ if (input_result.value_portal_type) { result[gadget.state.relation_field_id] = "_newContent_" + input_result.value_portal_type; + } else if (input_result.value_uid) { + result[gadget.state.relation_field_id] = + input_result.value_uid; } result[gadget.state.key] = input_result.value_text; } else { diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relationstringfield_js.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relationstringfield_js.xml index 463c607020f01add2920ec7aeb3533a51dec9b62..15fe1d81d5fffd57d7150b310ffdc936fd09029a 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relationstringfield_js.xml +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relationstringfield_js.xml @@ -230,7 +230,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>954.57675.64427.52462</string> </value> + <value> <string>955.7640.34748.48025</string> </value> </item> <item> <key> <string>state</string> </key> @@ -248,7 +248,7 @@ </tuple> <state> <tuple> - <float>1477582815.99</float> + <float>1478512986.68</float> <string>UTC</string> </tuple> </state>