Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hamza
erp5-Boxiang
Commits
03626609
Commit
03626609
authored
Oct 27, 2015
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: fix broken gadget
parent
2b419857
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
57 deletions
+48
-57
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_filtereditor_js.xml
...eItem/web_page_module/rjs_gadget_erp5_filtereditor_js.xml
+5
-6
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
...mplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
+14
-23
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.xml
...eItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.xml
+3
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_html.xml
...Item/web_page_module/rjs_gadget_erp5_searchfield_html.xml
+3
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_js.xml
...teItem/web_page_module/rjs_gadget_erp5_searchfield_js.xml
+8
-8
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_sorteditor_js.xml
...ateItem/web_page_module/rjs_gadget_erp5_sorteditor_js.xml
+15
-14
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_filtereditor_js.xml
View file @
03626609
...
...
@@ -244,10 +244,9 @@
\n
gadget.props.jelement.panel("toggle");\n
\n
return gadget.redirect({jio_key: options.jio_key,\n
"extended_search": query, "domain_tree": domain_tree_query,\n
"sort_list": options.form_definition.sort_list || "",\n
"hide_item": options.form_definition.hide_item || ""});\n
return gadget.redirect({command: \'change\', options:{\n
"extended_search": query,\n
"domain_tree": domain_tree_query}});\n
\n
}\n
\n
...
...
@@ -794,7 +793,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
946.
27361.45605.54152
</string>
</value>
<value>
<string>
946.
46249.31868.4846
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -812,7 +811,7 @@
</tuple>
<state>
<tuple>
<float>
144
4825245.7
</float>
<float>
144
5963748.44
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
View file @
03626609
...
...
@@ -157,6 +157,7 @@
document_table = gadget.props.element.querySelector(\'.document_table\'),\n
th,\n
tmp,\n
sort_list,\n
length_table = field_json.column_list.length,\n
j,\n
i;\n
...
...
@@ -169,7 +170,8 @@
gadget.props.hide_item = options.hide_item;\n
gadget.props.sort_list = [];\n
if (options.sort_list) {\n
gadget.props.sort_list = Object.keys(options.sort_list).map(function (key) {return options.sort_list[key]; });\n
sort_list = JSON.parse(options.sort_list);\n
gadget.props.sort_list = Object.keys(sort_list).map(function (key) {return sort_list[key]; });\n
}\n
\n
if (field_json.show_anchor) {\n
...
...
@@ -292,7 +294,6 @@
}\n
\n
select_list.push("uid");\n
return gadget.jio_allDocs({\n
// XXX Not jIO compatible, but until a better api is found...\n
"list_method_template": field_json.list_method_template,\n
...
...
@@ -417,13 +418,10 @@
prev_param[gadget.props.field_json.key + \'_begin_from\'] = begin_from - lines;\n
setNext();\n
}\n
\n
return RSVP.all([\n
gadget.getUrlFor({command: \'change\', options: {jio_key: gadget.props.jio_key, "extended_search": gadget.props.extended_search || "",\n
"domain_tree": gadget.props.domain_tree || "", "sort_list": gadget.props.sort_list || "",\n
"begin_from":prev_param.begin_from}}),\n
gadget.getUrlFor({command: \'change\', options: {jio_key: gadget.props.jio_key, "extended_search": gadget.props.extended_search || "",\n
"domain_tree": gadget.props.domain_tree || "", "sort_list": gadget.props.sort_list || "",\n
"begin_from":next_param.begin_from}})\n
gadget.getUrlFor({command: \'change\', options: prev_param}),\n
gadget.getUrlFor({command: \'change\', options: next_param})\n
]);\n
\n
}).push(function (url_list) {\n
...
...
@@ -551,10 +549,8 @@
//if nothing is selected, show all\n
if (hide_form_elements.length === 0) {\n
colspan.setAttribute("colspan", parseInt(colspan.getAttribute("colspan"), 10) - 1);\n
return gadget.redirect({jio_key: gadget.props.jio_key,\n
"extended_search": gadget.props.extended_search || "",\n
"domain_tree": gadget.props.domain_tree || "",\n
"sort_list": gadget.props.sort_list || ""});\n
return gadget.redirect({command: \'change\', options: {\n
"domain_tree": gadget.props.domain_tree || ""}});\n
}\n
\n
//all selected\n
...
...
@@ -582,11 +578,8 @@
type:
"complex"\n
});\n
\n
return
gadget.redirect({jio_key:
gadget.props.jio_key,\n
"extended_search":
gadget.props.extended_search
||
"",\n
"domain_tree":
gadget.props.domain_tree
||
"",\n
"sort_list":
gadget.props.sort_list
||
"",\n
"hide_item":
Query.objectToSearchText(selected_uid_query)});\n
return
gadget.redirect({command:
\'change\',
options:
{\n
"hide_item":
Query.objectToSearchText(selected_uid_query)}});\n
}\n
\n
hide_show_all.setAttribute("type",
"submit");\n
...
...
@@ -610,10 +603,8 @@
"submit",\n
false,\n
function
()
{\n
return
gadget.redirect({jio_key:
gadget.props.jio_key,\n
"extended_search":
gadget.props.extended_search
||
"",\n
"domain_tree":
gadget.props.domain_tree
||
"",\n
"sort_list":
gadget.props.sort_list
||
""});\n
return
gadget.redirect({command:
\'change\',
options:
{\n
"hide_item":
""}});\n
}\n
);\n
thead_tr.insertBefore(th,
thead_tr.firstChild);\n
...
...
@@ -806,7 +797,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
946.
5879.32028.47257
</string>
</value>
<value>
<string>
946.
46337.55165.55125
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -824,7 +815,7 @@
</tuple>
<state>
<tuple>
<float>
144
4722552.95
</float>
<float>
144
5963866.42
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.xml
View file @
03626609
...
...
@@ -215,7 +215,7 @@
gadget.getDeclaredGadget("erp5_form"),\n
gadget.getUrlFor({command: \'change\', options: {page: "breadcrumb"}}),\n
new_content_action,\n
gadget.getUrlFor({command: \'change\', options: {page: "action"}})\n
gadget.getUrlFor({command: \'change\', options: {page: "action"}})
,
\n
gadget.getDeclaredGadget("filterEditor"),\n
gadget.getDeclaredGadget("sortEditor")\n
]);\n
...
...
@@ -398,7 +398,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
946.4
414.7934.44748
</string>
</value>
<value>
<string>
946.4
6100.61365.28740
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -416,7 +416,7 @@
</tuple>
<state>
<tuple>
<float>
144
4816468.81
</float>
<float>
144
5950207.32
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_html.xml
View file @
03626609
...
...
@@ -125,7 +125,7 @@
<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
<form
class=
"save_form
document_form
"
>
\n
<form
class=
"save_form"
>
\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
...
...
@@ -290,7 +290,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
946.
26055.51865.42035
</string>
</value>
<value>
<string>
946.
46365.63113.6638
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -308,7 +308,7 @@
</tuple>
<state>
<tuple>
<float>
144
4746743.09
</float>
<float>
144
5965410.12
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_js.xml
View file @
03626609
...
...
@@ -174,7 +174,6 @@
.push(function (my_translated_html) {\n
search_gadget.props.element.querySelector(".container").innerHTML =\n
my_translated_html;\n
return search_gadget;\n
});\n
})\n
.declareMethod("showQueryError", function (param) {\n
...
...
@@ -244,7 +243,7 @@
type: "complex"\n
});\n
}\n
return gadget.redirect({
jio_key: gadget.props.jio_key,
\n
return gadget.redirect({
command: \'change\', options: {
\n
"extended_search": Query.objectToSearchText(new ComplexQuery({\n
operator: search_query.operator || "AND",\n
query_list: query_list,\n
...
...
@@ -252,10 +251,10 @@
})),\n
"domain_tree": domain_tree_query ? Query.objectToSearchText(domain_tree_query) : "",\n
"hide_item": hide_query ? Query.objectToSearchText(hide_query) : ""\n
});\n
}
}
);\n
}\n
return gadget.redirect({
jio_key: gadget.props.jio_key,
\n
"extended_search": "", "domain_tree": "", "hide_item": ""});\n
return gadget.redirect({
command: \'change\', options:{
\n
"extended_search": "", "domain_tree": "", "hide_item": ""}
}
);\n
});\n
}\n
// Listen to form submit\n
...
...
@@ -265,6 +264,7 @@
false,\n
formSubmit\n
);\n
\n
loopEventListener(\n
gadget.props.element.querySelector(\'.filter_form\'),\n
\'submit\',\n
...
...
@@ -396,7 +396,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
romain
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -410,7 +410,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
946.
27251.38084.62685
</string>
</value>
<value>
<string>
946.
46366.4373.50670
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -428,7 +428,7 @@
</tuple>
<state>
<tuple>
<float>
144
4824166.86
</float>
<float>
144
5965368.84
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_sorteditor_js.xml
View file @
03626609
...
...
@@ -276,12 +276,16 @@
})\n
.push(function (result) {\n
var key,\n
sort_list = {},\n
queue = new RSVP.Queue();\n
if (options.form_definition.sort_list) {\n
sort_list = JSON.parse(options.form_definition.sort_list);\n
}\n
gadget.props.column_list = result._embedded._view.listbox.column_list;\n
for (key in
options.form_definition.
sort_list) {\n
if (
options.form_definition.
sort_list.hasOwnProperty(key)) {\n
if (
options.form_definition.
sort_list[key] !== "") {\n
queue.push(createTranslatedItem(gadget,
options.form_definition.
sort_list[key]));\n
for (key in sort_list) {\n
if (sort_list.hasOwnProperty(key)) {\n
if (sort_list[key] !== "") {\n
queue.push(createTranslatedItem(gadget, sort_list[key]));\n
}\n
}\n
}\n
...
...
@@ -315,24 +319,21 @@
false,\n
function () {\n
var sort_list = gadget.props.element.querySelectorAll(".sortForm"),\n
sort_query =
[]
,\n
sort_query =
{}
,\n
sort_item,\n
sort_item_query,\n
i;\n
for (i = 0; i < sort_list.length; i += 1) {\n
sort_item = sort_list[i];\n
sort_item_query = sort_item[0][sort_item[0].selectedIndex].value + "," + sort_item[1][sort_item[1].selectedIndex].value + ",";\n
sort_query
.push(sort_item_query)
;\n
sort_query
[i] = sort_item_query
;\n
}\n
sort_query
.push("")
;\n
sort_query
[i] = ""
;\n
return new RSVP.Queue()\n
.push(function () {\n
gadget.props.jelement.panel("toggle");\n
return gadget.redirect({jio_key: gadget.props.options.jio_key,\n
"extended_search": gadget.props.options.form_definition.extended_search || "",\n
"domain_tree": gadget.props.options.form_definition.domain_tree || "",\n
"sort_list": sort_query,\n
"hide_item": gadget.props.options.form_definition.hide_item || ""});\n
return gadget.redirect({command: \'change\', options: {\n
"sort_list": JSON.stringify(sort_query)}});\n
});\n
}\n
);\n
...
...
@@ -475,7 +476,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
946.
6000.3675.35362
</string>
</value>
<value>
<string>
946.
46298.51121.25531
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -493,7 +494,7 @@
</tuple>
<state>
<tuple>
<float>
144
3629882.33
</float>
<float>
144
5963800.7
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment