Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_workflow
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenjie.zheng
erp5_workflow
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 @@
...
@@ -244,10 +244,9 @@
\n
\n
gadget.props.jelement.panel("toggle");\n
gadget.props.jelement.panel("toggle");\n
\n
\n
return gadget.redirect({jio_key: options.jio_key,\n
return gadget.redirect({command: \'change\', options:{\n
"extended_search": query, "domain_tree": domain_tree_query,\n
"extended_search": query,\n
"sort_list": options.form_definition.sort_list || "",\n
"domain_tree": domain_tree_query}});\n
"hide_item": options.form_definition.hide_item || ""});\n
\n
\n
}\n
}\n
\n
\n
...
@@ -794,7 +793,7 @@
...
@@ -794,7 +793,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
946.
27361.45605.54152
</string>
</value>
<value>
<string>
946.
46249.31868.4846
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -812,7 +811,7 @@
...
@@ -812,7 +811,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
144
4825245.7
</float>
<float>
144
5963748.44
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
View file @
03626609
...
@@ -157,6 +157,7 @@
...
@@ -157,6 +157,7 @@
document_table = gadget.props.element.querySelector(\'.document_table\'),\n
document_table = gadget.props.element.querySelector(\'.document_table\'),\n
th,\n
th,\n
tmp,\n
tmp,\n
sort_list,\n
length_table = field_json.column_list.length,\n
length_table = field_json.column_list.length,\n
j,\n
j,\n
i;\n
i;\n
...
@@ -169,7 +170,8 @@
...
@@ -169,7 +170,8 @@
gadget.props.hide_item = options.hide_item;\n
gadget.props.hide_item = options.hide_item;\n
gadget.props.sort_list = [];\n
gadget.props.sort_list = [];\n
if (options.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
\n
\n
if (field_json.show_anchor) {\n
if (field_json.show_anchor) {\n
...
@@ -292,7 +294,6 @@
...
@@ -292,7 +294,6 @@
}\n
}\n
\n
\n
select_list.push("uid");\n
select_list.push("uid");\n
return gadget.jio_allDocs({\n
return gadget.jio_allDocs({\n
// XXX Not jIO compatible, but until a better api is found...\n
// XXX Not jIO compatible, but until a better api is found...\n
"list_method_template": field_json.list_method_template,\n
"list_method_template": field_json.list_method_template,\n
...
@@ -417,13 +418,10 @@
...
@@ -417,13 +418,10 @@
prev_param[gadget.props.field_json.key + \'_begin_from\'] = begin_from - lines;\n
prev_param[gadget.props.field_json.key + \'_begin_from\'] = begin_from - lines;\n
setNext();\n
setNext();\n
}\n
}\n
\n
return RSVP.all([\n
return RSVP.all([\n
gadget.getUrlFor({command: \'change\', options: {jio_key: gadget.props.jio_key, "extended_search": gadget.props.extended_search || "",\n
gadget.getUrlFor({command: \'change\', options: prev_param}),\n
"domain_tree": gadget.props.domain_tree || "", "sort_list": gadget.props.sort_list || "",\n
gadget.getUrlFor({command: \'change\', options: next_param})\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
]);\n
]);\n
\n
\n
}).push(function (url_list) {\n
}).push(function (url_list) {\n
...
@@ -551,10 +549,8 @@
...
@@ -551,10 +549,8 @@
//if nothing is selected, show all\n
//if nothing is selected, show all\n
if (hide_form_elements.length === 0) {\n
if (hide_form_elements.length === 0) {\n
colspan.setAttribute("colspan", parseInt(colspan.getAttribute("colspan"), 10) - 1);\n
colspan.setAttribute("colspan", parseInt(colspan.getAttribute("colspan"), 10) - 1);\n
return gadget.redirect({jio_key: gadget.props.jio_key,\n
return gadget.redirect({command: \'change\', options: {\n
"extended_search": gadget.props.extended_search || "",\n
"domain_tree": gadget.props.domain_tree || ""}});\n
"domain_tree": gadget.props.domain_tree || "",\n
"sort_list": gadget.props.sort_list || ""});\n
}\n
}\n
\n
\n
//all selected\n
//all selected\n
...
@@ -582,11 +578,8 @@
...
@@ -582,11 +578,8 @@
type:
"complex"\n
type:
"complex"\n
});\n
});\n
\n
\n
return
gadget.redirect({jio_key:
gadget.props.jio_key,\n
return
gadget.redirect({command:
\'change\',
options:
{\n
"extended_search":
gadget.props.extended_search
||
"",\n
"hide_item":
Query.objectToSearchText(selected_uid_query)}});\n
"domain_tree":
gadget.props.domain_tree
||
"",\n
"sort_list":
gadget.props.sort_list
||
"",\n
"hide_item":
Query.objectToSearchText(selected_uid_query)});\n
}\n
}\n
\n
\n
hide_show_all.setAttribute("type",
"submit");\n
hide_show_all.setAttribute("type",
"submit");\n
...
@@ -610,10 +603,8 @@
...
@@ -610,10 +603,8 @@
"submit",\n
"submit",\n
false,\n
false,\n
function
()
{\n
function
()
{\n
return
gadget.redirect({jio_key:
gadget.props.jio_key,\n
return
gadget.redirect({command:
\'change\',
options:
{\n
"extended_search":
gadget.props.extended_search
||
"",\n
"hide_item":
""}});\n
"domain_tree":
gadget.props.domain_tree
||
"",\n
"sort_list":
gadget.props.sort_list
||
""});\n
}\n
}\n
);\n
);\n
thead_tr.insertBefore(th,
thead_tr.firstChild);\n
thead_tr.insertBefore(th,
thead_tr.firstChild);\n
...
@@ -806,7 +797,7 @@
...
@@ -806,7 +797,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
946.
5879.32028.47257
</string>
</value>
<value>
<string>
946.
46337.55165.55125
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -824,7 +815,7 @@
...
@@ -824,7 +815,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
144
4722552.95
</float>
<float>
144
5963866.42
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</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 @@
...
@@ -215,7 +215,7 @@
gadget.getDeclaredGadget("erp5_form"),\n
gadget.getDeclaredGadget("erp5_form"),\n
gadget.getUrlFor({command: \'change\', options: {page: "breadcrumb"}}),\n
gadget.getUrlFor({command: \'change\', options: {page: "breadcrumb"}}),\n
new_content_action,\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("filterEditor"),\n
gadget.getDeclaredGadget("sortEditor")\n
gadget.getDeclaredGadget("sortEditor")\n
]);\n
]);\n
...
@@ -398,7 +398,7 @@
...
@@ -398,7 +398,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -416,7 +416,7 @@
...
@@ -416,7 +416,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
144
4816468.81
</float>
<float>
144
5950207.32
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_html.xml
View file @
03626609
...
@@ -125,7 +125,7 @@
...
@@ -125,7 +125,7 @@
<div
class=
"ui-field-contain"
>
\n
<div
class=
"ui-field-contain"
>
\n
<div
class=
"bottom"
>
\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 {{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
<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
<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
{{search_i18n}}
<input
tabindex=
"-1"
data-role=
"button"
data-enhanced=
"true"
type=
"submit"
data-i18n=
"[value]{{search_i18n}}"
value=
" "
/>
\n
...
@@ -290,7 +290,7 @@
...
@@ -290,7 +290,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
946.
26055.51865.42035
</string>
</value>
<value>
<string>
946.
46365.63113.6638
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -308,7 +308,7 @@
...
@@ -308,7 +308,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
144
4746743.09
</float>
<float>
144
5965410.12
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_js.xml
View file @
03626609
...
@@ -174,7 +174,6 @@
...
@@ -174,7 +174,6 @@
.push(function (my_translated_html) {\n
.push(function (my_translated_html) {\n
search_gadget.props.element.querySelector(".container").innerHTML =\n
search_gadget.props.element.querySelector(".container").innerHTML =\n
my_translated_html;\n
my_translated_html;\n
return search_gadget;\n
});\n
});\n
})\n
})\n
.declareMethod("showQueryError", function (param) {\n
.declareMethod("showQueryError", function (param) {\n
...
@@ -244,7 +243,7 @@
...
@@ -244,7 +243,7 @@
type: "complex"\n
type: "complex"\n
});\n
});\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
"extended_search": Query.objectToSearchText(new ComplexQuery({\n
operator: search_query.operator || "AND",\n
operator: search_query.operator || "AND",\n
query_list: query_list,\n
query_list: query_list,\n
...
@@ -252,10 +251,10 @@
...
@@ -252,10 +251,10 @@
})),\n
})),\n
"domain_tree": domain_tree_query ? Query.objectToSearchText(domain_tree_query) : "",\n
"domain_tree": domain_tree_query ? Query.objectToSearchText(domain_tree_query) : "",\n
"hide_item": hide_query ? Query.objectToSearchText(hide_query) : ""\n
"hide_item": hide_query ? Query.objectToSearchText(hide_query) : ""\n
});\n
}
}
);\n
}\n
}\n
return gadget.redirect({
jio_key: gadget.props.jio_key,
\n
return gadget.redirect({
command: \'change\', options:{
\n
"extended_search": "", "domain_tree": "", "hide_item": ""});\n
"extended_search": "", "domain_tree": "", "hide_item": ""}
}
);\n
});\n
});\n
}\n
}\n
// Listen to form submit\n
// Listen to form submit\n
...
@@ -265,6 +264,7 @@
...
@@ -265,6 +264,7 @@
false,\n
false,\n
formSubmit\n
formSubmit\n
);\n
);\n
\n
loopEventListener(\n
loopEventListener(\n
gadget.props.element.querySelector(\'.filter_form\'),\n
gadget.props.element.querySelector(\'.filter_form\'),\n
\'submit\',\n
\'submit\',\n
...
@@ -396,7 +396,7 @@
...
@@ -396,7 +396,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
romain
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
@@ -410,7 +410,7 @@
...
@@ -410,7 +410,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
946.
27251.38084.62685
</string>
</value>
<value>
<string>
946.
46366.4373.50670
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -428,7 +428,7 @@
...
@@ -428,7 +428,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
144
4824166.86
</float>
<float>
144
5965368.84
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_sorteditor_js.xml
View file @
03626609
...
@@ -276,12 +276,16 @@
...
@@ -276,12 +276,16 @@
})\n
})\n
.push(function (result) {\n
.push(function (result) {\n
var key,\n
var key,\n
sort_list = {},\n
queue = new RSVP.Queue();\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
gadget.props.column_list = result._embedded._view.listbox.column_list;\n
for (key in
options.form_definition.
sort_list) {\n
for (key in sort_list) {\n
if (
options.form_definition.
sort_list.hasOwnProperty(key)) {\n
if (sort_list.hasOwnProperty(key)) {\n
if (
options.form_definition.
sort_list[key] !== "") {\n
if (sort_list[key] !== "") {\n
queue.push(createTranslatedItem(gadget,
options.form_definition.
sort_list[key]));\n
queue.push(createTranslatedItem(gadget, sort_list[key]));\n
}\n
}\n
}\n
}\n
}\n
}\n
...
@@ -315,24 +319,21 @@
...
@@ -315,24 +319,21 @@
false,\n
false,\n
function () {\n
function () {\n
var sort_list = gadget.props.element.querySelectorAll(".sortForm"),\n
var sort_list = gadget.props.element.querySelectorAll(".sortForm"),\n
sort_query =
[]
,\n
sort_query =
{}
,\n
sort_item,\n
sort_item,\n
sort_item_query,\n
sort_item_query,\n
i;\n
i;\n
for (i = 0; i < sort_list.length; i += 1) {\n
for (i = 0; i < sort_list.length; i += 1) {\n
sort_item = sort_list[i];\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_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
}\n
sort_query
.push("")
;\n
sort_query
[i] = ""
;\n
return new RSVP.Queue()\n
return new RSVP.Queue()\n
.push(function () {\n
.push(function () {\n
gadget.props.jelement.panel("toggle");\n
gadget.props.jelement.panel("toggle");\n
return gadget.redirect({jio_key: gadget.props.options.jio_key,\n
return gadget.redirect({command: \'change\', options: {\n
"extended_search": gadget.props.options.form_definition.extended_search || "",\n
"sort_list": JSON.stringify(sort_query)}});\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
});\n
});\n
}\n
}\n
);\n
);\n
...
@@ -475,7 +476,7 @@
...
@@ -475,7 +476,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
946.
6000.3675.35362
</string>
</value>
<value>
<string>
946.
46298.51121.25531
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -493,7 +494,7 @@
...
@@ -493,7 +494,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
144
3629882.33
</float>
<float>
144
5963800.7
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</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