Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Laurent S
erp5
Commits
f5bbbaa5
Commit
f5bbbaa5
authored
Sep 25, 2015
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: add "show all" command
parent
95f7985a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
5 deletions
+27
-5
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
+27
-5
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
View file @
f5bbbaa5
...
@@ -219,7 +219,6 @@
...
@@ -219,7 +219,6 @@
dataset,\n
dataset,\n
counter,\n
counter,\n
hide_item = gadget.props.hide_item,\n
hide_item = gadget.props.hide_item,\n
tmp_hide_item,\n
sort_list = gadget.props.sort_list || [],\n
sort_list = gadget.props.sort_list || [],\n
i,\n
i,\n
j,\n
j,\n
...
@@ -499,7 +498,6 @@
...
@@ -499,7 +498,6 @@
})\n
})\n
.declareService(function () {\n
.declareService(function () {\n
var gadget = this,\n
var gadget = this,\n
selected_uid_list,\n
selected_uid_query,\n
selected_uid_query,\n
hide_form = gadget.props.element.querySelector(".hide_form");\n
hide_form = gadget.props.element.querySelector(".hide_form");\n
/* hide form */\n
/* hide form */\n
...
@@ -513,13 +511,16 @@
...
@@ -513,13 +511,16 @@
i,\n
i,\n
th,\n
th,\n
hide_form_elements,\n
hide_form_elements,\n
hide_submit_form = document.createElement("form"),\n
hide_show_all = document.createElement("button"),\n
checkbox;\n
checkbox;\n
\n
hide_form_elements = gadget.props.element.querySelectorAll(".hide_form_element:checked");\n
hide_form_elements = gadget.props.element.querySelectorAll(".hide_form_element:checked");\n
\n
if (hide_form_elements.length > 0) {\n
if (hide_form_elements.length > 0) {\n
selected_uid_query = "catalog.uid: (";\n
selected_uid_query = "catalog.uid: (";\n
for (i = 0; i
< hide_form_elements.length
;
i
+=
1)
{\n
for (i = 0; i
< hide_form_elements.length
;
i
+=
1)
{\n
selected_uid_query
+=
hide_form_elements[i].parentElement.getAttribute("value");\n
selected_uid_query
+=
hide_form_elements[i].parentElement.getAttribute("value");\n
hide_form_elements[i].parentElement.removeChild(hide_form_elements[i]);\n
if
(i
!==
hide_form_elements.length
-
1)
{\n
if
(i
!==
hide_form_elements.length
-
1)
{\n
selected_uid_query
+=
",
";\n
selected_uid_query
+=
",
";\n
}
else
{\n
}
else
{\n
...
@@ -527,15 +528,36 @@
...
@@ -527,15 +528,36 @@
}\n
}\n
}\n
}\n
\n
\n
hide_form_elements =
gadget.props.element.querySelectorAll(".hide_form_element");\n
for
(
i =
0;
i
<
hide_form_elements.length;
i
+=
1)
{\n
hide_form_elements[i].parentElement.removeChild(hide_form_elements[i]);\n
}\n
return
gadget.redirect({jio_key:
gadget.props.jio_key,\n
return
gadget.redirect({jio_key:
gadget.props.jio_key,\n
"extended_search":
gadget.props.extended_search
||
"",\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
"sort_list":
gadget.props.sort_list
||
"",\n
"hide_item":
selected_uid_query});\n
"hide_item":
selected_uid_query});\n
}\n
}\n
\n
hide_show_all.setAttribute("type",
"submit");\n
hide_show_all.textContent =
"Show All"
;\n
hide_show_all.className =
"ui-btn responsive ui-last-child"
;\n
hide_submit_form.appendChild(hide_show_all);\n
th =
document.createElement("th");\n
th =
document.createElement("th");\n
\n
\n
th.setAttribute("class",
"hide_form_element");\n
th.setAttribute("class",
"hide_form_element");\n
th.appendChild(hide_submit_form);\n
loopEventListener(\n
hide_submit_form,\n
"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
}\n
);\n
thead_tr.insertBefore(th,
thead_tr.firstChild);\n
thead_tr.insertBefore(th,
thead_tr.firstChild);\n
for
(
i =
0;
i
<
tr_list.length;
i
+=
1)
{\n
for
(
i =
0;
i
<
tr_list.length;
i
+=
1)
{\n
checkbox =
document.createElement("input");\n
checkbox =
document.createElement("input");\n
...
@@ -725,7 +747,7 @@
...
@@ -725,7 +747,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
945.64
123.65425.24012
</string>
</value>
<value>
<string>
945.64
213.19729.53691
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -743,7 +765,7 @@
...
@@ -743,7 +765,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
14431
85166.52
</float>
<float>
14431
90830.65
</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