Commit 8bddeb7d authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_web_renderjs_ui: no need to show create object text

parent d77cfff0
...@@ -12,28 +12,11 @@ ...@@ -12,28 +12,11 @@
<script src="gadget_global.js" type="text/javascript"></script> <script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_erp5_relation_input.js" type="text/javascript"></script> <script src="gadget_erp5_relation_input.js" type="text/javascript"></script>
<script id="create-template" type="text/x-handlebars-template">
<div class="ui-controlgroup ui-controlgroup-horizontal ui-corner-all">
<div class="ui-controlgroup-controls">
<li class="ui-first-child ui-last-child ui-input-text">Create:{{text}}
</li>
</div>
</script>
<script id="relation-input-template" type="text/x-handlebars-template"> <script id="relation-input-template" type="text/x-handlebars-template">
<div class="ui-input-text ui-body-inherit ui-corner-all ui-shadow-inset ui-input-has-clear ui-input-has-icon {{readonly}}"> <div class="ui-input-text ui-body-inherit ui-corner-all ui-shadow-inset ui-input-has-clear ui-input-has-icon {{readonly}}">
<input type='text' title="{{title}}" name="{{name}}" autocomplete="off" data-enhanced="true" value="{{value}}" > <input type='text' title="{{title}}" name="{{name}}" autocomplete="off" data-enhanced="true" value="{{value}}" >
<a href="#" tabindex="-1" class="ui-hidden-accessible">&nbsp;</a> <a href="#" tabindex="-1" class="ui-hidden-accessible">&nbsp;</a>
<div class="ui-tag-list ui-tag-list-inset">
{{#if create_object}}
<div class="ui-controlgroup ui-controlgroup-horizontal ui-corner-all">
<div class="ui-controlgroup-controls">
<li class="ui-first-child ui-last-child ui-input-text">Create:{{create_object}}
</li>
</div>
</div>
{{/if}}
</div>
<ul class="ui-listview ui-corner-all search_ul"></ul> <ul class="ui-listview ui-corner-all search_ul"></ul>
</div> </div>
<a href={{href}} tabindex="-1" class="{{class_name}}" >Jump to this document</a> <a href={{href}} tabindex="-1" class="{{class_name}}" >Jump to this document</a>
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>952.34455.45402.61030</string> </value> <value> <string>952.34465.51212.22528</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1468412266.88</float> <float>1468420120.27</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -17,11 +17,6 @@ ...@@ -17,11 +17,6 @@
.innerHTML, .innerHTML,
relation_listview_template = Handlebars.compile(relation_listview_source), relation_listview_template = Handlebars.compile(relation_listview_source),
create_source = gadget_klass.__template_element
.getElementById("create-template")
.innerHTML,
create_template = Handlebars.compile(create_source),
searching = "ui-btn ui-corner-all ui-btn-icon-notext" + searching = "ui-btn ui-corner-all ui-btn-icon-notext" +
" ui-input-clear ui-icon-spinner ui-icon-spin", " ui-input-clear ui-icon-spinner ui-icon-spin",
...@@ -216,7 +211,6 @@ ...@@ -216,7 +211,6 @@
search_query, search_query,
simple_query, simple_query,
field_json = props.field_json, field_json = props.field_json,
create_div = props.element.querySelector(".ui-tag-list"),
ul = gadget.props.element.querySelector(".search_ul"); ul = gadget.props.element.querySelector(".search_ul");
function generateList(event) { function generateList(event) {
...@@ -227,7 +221,6 @@ ...@@ -227,7 +221,6 @@
props.plane.className = jump_off; props.plane.className = jump_off;
props.jump_url = []; props.jump_url = [];
create_div.innerHTML = "";
ul.innerHTML = ""; ul.innerHTML = "";
if (my_value === "") { if (my_value === "") {
props.spinner.className = searched; props.spinner.className = searched;
...@@ -299,7 +292,6 @@ ...@@ -299,7 +292,6 @@
if (create_object_type) { if (create_object_type) {
gadget.props.create_object_type = create_object_type; gadget.props.create_object_type = create_object_type;
props.plane.className = jump_add; props.plane.className = jump_add;
create_div.innerHTML = create_template({'text': create_object_type});
return; return;
} }
if (explore) { if (explore) {
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>952.34564.50128.10973</string> </value> <value> <string>952.34578.31726.63163</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1468419029.04</float> <float>1468420163.31</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -160,12 +160,6 @@ ...@@ -160,12 +160,6 @@
</tr> </tr>
<tr>
<td>verifyText</td>
<td>//div[@data-gadget-scope='field_my_bar_category_title_list']//fieldset[1]//div[@class="ui-tag-list ui-tag-list-inset"]//li</td>
<td>Create:Foo</td>
</tr>
<tr> <tr>
...@@ -216,12 +210,6 @@ ...@@ -216,12 +210,6 @@
</tr> </tr>
<tr>
<td>verifyText</td>
<td>//div[@data-gadget-scope='field_my_bar_category_title_list']//fieldset[2]//div[@class="ui-tag-list ui-tag-list-inset"]//li</td>
<td>Create:Foo</td>
</tr>
<tr> <tr>
<td>verifyElementPresent</td> <td>verifyElementPresent</td>
<td>//div[@data-gadget-scope='field_my_bar_category_title_list']//fieldset[2]//a[contains(@class, "ui-icon-plus")]</td> <td>//div[@data-gadget-scope='field_my_bar_category_title_list']//fieldset[2]//a[contains(@class, "ui-icon-plus")]</td>
......
...@@ -175,11 +175,7 @@ ...@@ -175,11 +175,7 @@
</tr> </tr>
<tr>
<td>verifyText</td>
<td>//div[@data-gadget-scope='field_my_bar_category_title_list']//fieldset[1]//div[@class="ui-tag-list ui-tag-list-inset"]//li</td>
<td>Create:Foo</td>
</tr>
...@@ -326,11 +322,6 @@ ...@@ -326,11 +322,6 @@
</tr> </tr>
<tr>
<td>verifyText</td>
<td>//div[@data-gadget-scope='field_my_bar_category_title_list']//fieldset[1]//div[@class="ui-tag-list ui-tag-list-inset"]//li</td>
<td>Create:Foo</td>
</tr>
......
...@@ -137,11 +137,7 @@ ...@@ -137,11 +137,7 @@
</tr> </tr>
<tr>
<td>verifyText</td>
<td>//div[@data-gadget-scope='field_my_bar_category_title_list']//fieldset[1]//div[@class="ui-tag-list ui-tag-list-inset"]//li</td>
<td>Create:Foo</td>
</tr>
...@@ -195,11 +191,6 @@ ...@@ -195,11 +191,6 @@
<td></td> <td></td>
</tr> </tr>
<tr>
<td>waitForTextPresent</td>
<td>Create:Category</td>
<td></td>
</tr>
<tr> <tr>
<td>click</td> <td>click</td>
...@@ -279,11 +270,7 @@ ...@@ -279,11 +270,7 @@
<td>//input[@name="field_my_foo_line_foo_category_title"]</td> <td>//input[@name="field_my_foo_line_foo_category_title"]</td>
<td>TEST1</td> <td>TEST1</td>
</tr> </tr>
<tr>
<td>verifyTextPresent</td>
<td>Create:Category</td>
<td></td>
</tr>
<tr> <tr>
<td>assertChecked</td> <td>assertChecked</td>
...@@ -305,11 +292,7 @@ ...@@ -305,11 +292,7 @@
</tr> </tr>
<tr>
<td>verifyText</td>
<td>//div[@data-gadget-scope='field_my_bar_category_title_list']//fieldset[1]//div[@class="ui-tag-list ui-tag-list-inset"]//li</td>
<td>Create:Foo</td>
</tr>
...@@ -462,11 +445,7 @@ ...@@ -462,11 +445,7 @@
<td>//input[@name="field_my_foo_line_foo_category_title"]</td> <td>//input[@name="field_my_foo_line_foo_category_title"]</td>
<td>TEST1</td> <td>TEST1</td>
</tr> </tr>
<tr>
<td>verifyTextNotPresent</td>
<td>Create:Category</td>
<td></td>
</tr>
<tr> <tr>
<td>assertNotChecked</td> <td>assertNotChecked</td>
......
...@@ -206,11 +206,7 @@ ...@@ -206,11 +206,7 @@
<td></td> <td></td>
</tr> </tr>
<tr>
<td>waitForTextPresent</td>
<td>Create:Category</td>
<td></td>
</tr>
<tr> <tr>
<td>click</td> <td>click</td>
...@@ -334,11 +330,7 @@ ...@@ -334,11 +330,7 @@
<td>//input[@name="field_my_foo_big_category_title"]</td> <td>//input[@name="field_my_foo_big_category_title"]</td>
<td>TEST1</td> <td>TEST1</td>
</tr> </tr>
<tr>
<td>verifyTextPresent</td>
<td>Create:Category</td>
<td></td>
</tr>
<tr> <tr>
<td>assertChecked</td> <td>assertChecked</td>
...@@ -488,11 +480,7 @@ ...@@ -488,11 +480,7 @@
<td>//input[@name="field_my_foo_big_category_title"]</td> <td>//input[@name="field_my_foo_big_category_title"]</td>
<td>TEST1</td> <td>TEST1</td>
</tr> </tr>
<tr>
<td>verifyTextNotPresent</td>
<td>Create:Category</td>
<td></td>
</tr>
<tr> <tr>
<td>assertNotChecked</td> <td>assertNotChecked</td>
......
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