Commit d9c6a501 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_web_renderjs_ui: don't loss form element

parent 03626609
......@@ -124,9 +124,9 @@
<div class="field_container">\n
<div class="ui-field-contain">\n
<div class="bottom">\n
<div class="ui-input-text ui-body-{{theme}} ui-input-has-icon ui-corner-all ui-shadow-inset ui-input-has-clear {{status_class}} {{css_class}}">\n
<div class="ui-input-text ui-body-{{theme}} ui-input-has-icon ui-corner-all ui-shadow-inset ui-input-has-clear">\n
<form class="save_form">\n
<input type="text" data-enhanced="true" value="{{widget_value}}" name="search" {{widget_status_attribute}} />\n
<input type="text" data-enhanced="true" value="{{widget_value}}" name="search" {{widget_status_attribute}} >\n
<div class="ui-btn ui-input-clear ui-input-btn ui-corner-all ui-icon-search ui-btn-icon-notext" data-i18n="[node]{{search_i18n}}">\n
{{search_i18n}}<input tabindex="-1" data-role="button" data-enhanced="true" type="submit" data-i18n="[value]{{search_i18n}}" value=" "/>\n
</div>\n
......@@ -137,7 +137,6 @@
<div class="ui-input-btn">\n
<input data-role="button" data-enhanced="true" type="submit" data-i18n="[value]" value=" ">\n
</div>\n
\n
</form>\n
</div>\n
</div>\n
......@@ -151,7 +150,6 @@
\n
</head>\n
<body>\n
<div class="container"></div>\n
</body>\n
</html>
......@@ -290,7 +288,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>946.46365.63113.6638</string> </value>
<value> <string>946.47294.45750.61781</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -308,7 +306,7 @@
</tuple>
<state>
<tuple>
<float>1445965410.12</float>
<float>1446021106.86</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -101,7 +101,7 @@
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*global window, rJS, RSVP, loopEventListener, Handlebars, QueryFactory, SimpleQuery, ComplexQuery, Query */\n
/*global window, rJS, RSVP, loopEventListener, Handlebars, QueryFactory, SimpleQuery, ComplexQuery, Query, document */\n
/*jslint nomen: true, indent: 2, maxerr: 3 */\n
(function (window, rJS, RSVP, loopEventListener, Handlebars) {\n
"use strict";\n
......@@ -143,15 +143,13 @@
// declared methods\n
/////////////////////////////////////////////////////////////////\n
.declareMethod(\'render\', function (option_dict) {\n
var append_class,\n
append_attribute,\n
var append_attribute,\n
placeholder = "",\n
value,\n
is_disabled = option_dict.disabled,\n
search_gadget = this;\n
search_gadget.props.jio_key = option_dict.jio_key;\n
if (is_disabled) {\n
append_class = " ui-disabled";\n
append_attribute = \' disabled="disabled\';\n
}\n
value = option_dict.extended_search || "";\n
......@@ -167,13 +165,14 @@
return search_gadget.translateHtml(panel_template({\n
widget_value: value,\n
widget_theme: option_dict.theme || "c",\n
widget_status_attribute: append_attribute || placeholder,\n
widget_status_class: append_class || placeholder\n
widget_status_attribute: append_attribute || placeholder\n
}));\n
})\n
.push(function (my_translated_html) {\n
search_gadget.props.element.querySelector(".container").innerHTML =\n
my_translated_html;\n
var container = document.createElement("div");\n
container.setAttribute("class", "container");\n
container.innerHTML = my_translated_html;\n
search_gadget.props.element.appendChild(container);\n
});\n
})\n
.declareMethod("showQueryError", function (param) {\n
......@@ -243,7 +242,9 @@
type: "complex"\n
});\n
}\n
return gadget.redirect({command: \'change\', options: {\n
return gadget.redirect({\n
command: \'change\',\n
options: {\n
"extended_search": Query.objectToSearchText(new ComplexQuery({\n
operator: search_query.operator || "AND",\n
query_list: query_list,\n
......@@ -251,10 +252,17 @@
})),\n
"domain_tree": domain_tree_query ? Query.objectToSearchText(domain_tree_query) : "",\n
"hide_item": hide_query ? Query.objectToSearchText(hide_query) : ""\n
}});\n
}\n
return gadget.redirect({command: \'change\', options:{\n
"extended_search": "", "domain_tree": "", "hide_item": ""}});\n
});\n
}\n
return gadget.redirect({\n
command: \'change\',\n
options: {\n
"extended_search": "",\n
"domain_tree": "",\n
"hide_item": ""\n
}\n
});\n
});\n
}\n
// Listen to form submit\n
......@@ -410,7 +418,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>946.46366.4373.50670</string> </value>
<value> <string>946.47311.65417.26606</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -428,7 +436,7 @@
</tuple>
<state>
<tuple>
<float>1445965368.84</float>
<float>1446022123.95</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