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
Paul Graydon
erp5
Commits
c5a2a785
Commit
c5a2a785
authored
Jul 02, 2020
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: add select&unselect all in listbox
add test later
parent
10906f77
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
217 additions
and
176 deletions
+217
-176
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_global_js.js
...TemplateItem/web_page_module/rjs_gadget_erp5_global_js.js
+49
-23
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_global_js.xml
...emplateItem/web_page_module/rjs_gadget_erp5_global_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_html.html
...ateItem/web_page_module/rjs_gadget_erp5_listbox_html.html
+3
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_html.xml
...lateItem/web_page_module/rjs_gadget_erp5_listbox_html.xml
+163
-151
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_global_js.js
View file @
c5a2a785
...
@@ -159,26 +159,41 @@
...
@@ -159,26 +159,41 @@
i
,
i
,
result_list
=
[],
result_list
=
[],
icon
;
icon
;
result_list
.
push
({
return
this
.
getTranslationList
([
'
Select All
'
,
'
Unselect All
'
,
'
Copy
'
])
title
:
'
Copy
'
,
.
push
(
function
(
translation_list
)
{
icon
:
'
copy
'
,
result_list
=
[
action
:
'
copy_document_list
'
{
});
title
:
translation_list
[
0
],
for
(
i
=
0
;
i
<
action_list
.
length
;
i
+=
1
)
{
icon
:
'
check-square-o
'
,
if
(
action_list
[
i
].
name
===
'
delete_document_list
'
)
{
action
:
'
select_all_document_list
'
icon
=
'
trash-o
'
;
},
}
else
if
(
action_list
[
i
].
name
===
'
paste_document_list
'
)
{
{
icon
=
'
paste
'
;
title
:
translation_list
[
1
],
}
else
{
icon
:
'
ban
'
,
continue
;
action
:
'
unselect_all_document_list
'
}
},
result_list
.
push
({
{
title
:
action_list
[
i
].
title
,
title
:
translation_list
[
2
],
icon
:
icon
,
icon
:
'
copy
'
,
action
:
action_list
[
i
].
name
action
:
'
copy_document_list
'
}
];
for
(
i
=
0
;
i
<
action_list
.
length
;
i
+=
1
)
{
if
(
action_list
[
i
].
name
===
'
delete_document_list
'
)
{
icon
=
'
trash-o
'
;
}
else
if
(
action_list
[
i
].
name
===
'
paste_document_list
'
)
{
icon
=
'
paste
'
;
}
else
{
continue
;
}
result_list
.
push
({
title
:
action_list
[
i
].
title
,
icon
:
icon
,
action
:
action_list
[
i
].
name
});
}
return
result_list
;
});
});
}
return
result_list
;
}
}
function
createSearchQuery
(
checked_uid_list
,
key
)
{
function
createSearchQuery
(
checked_uid_list
,
key
)
{
...
@@ -219,15 +234,16 @@
...
@@ -219,15 +234,16 @@
unchecked_uid_list
=
argument_list
[
2
],
unchecked_uid_list
=
argument_list
[
2
],
view
,
view
,
i
,
i
,
select_attribute
,
all_hide_element_list
,
queue
;
queue
;
if
(
checked_uid_list
.
length
===
0
)
{
if
(
checked_uid_list
.
length
===
0
)
{
// If nothing is checked, use all unchecked values (same as xhtml style)
// If nothing is checked, use all unchecked values (same as xhtml style)
checked_uid_list
=
unchecked_uid_list
;
checked_uid_list
=
unchecked_uid_list
;
}
}
if
((
action_name
!==
'
copy_document_list
'
)
&&
(
action_name
!==
'
select_all_document_list
'
)
&&
(
action_name
!==
'
unselect_all_document_list
'
))
{
if
(
action_name
!==
'
copy_document_list
'
)
{
// Copy, select all, un select all actions are only done on javascript side
// Copy action is only done on javascript side
for
(
i
=
0
;
i
<
action_list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
action_list
.
length
;
i
+=
1
)
{
if
(
action_name
===
action_list
[
i
].
name
)
{
if
(
action_name
===
action_list
[
i
].
name
)
{
view
=
action_list
[
i
].
href
;
view
=
action_list
[
i
].
href
;
...
@@ -262,7 +278,17 @@
...
@@ -262,7 +278,17 @@
"
message
"
:
"
Nothing selected
"
"
message
"
:
"
Nothing selected
"
});
});
}
}
if
((
action_name
===
'
select_all_document_list
'
)
||
(
action_name
===
'
unselect_all_document_list
'
))
{
all_hide_element_list
=
gadget
.
element
.
querySelectorAll
(
"
.hide_element
"
);
select_attribute
=
(
action_name
===
'
select_all_document_list
'
?
true
:
false
);
for
(
i
=
0
;
i
<
all_hide_element_list
.
length
;
i
+=
1
)
{
all_hide_element_list
[
i
].
checked
=
select_attribute
;
}
return
notifyTranslatedMessage
(
gadget
,
{
"
message
"
:
(
action_name
===
'
select_all_document_list
'
?
'
Selected
'
:
'
Unselected
'
),
"
status
"
:
"
success
"
});
}
if
(
action_name
===
'
copy_document_list
'
)
{
if
(
action_name
===
'
copy_document_list
'
)
{
return
gadget
.
setSettingClipboardAction
(
'
clipboard
'
,
checked_uid_list
)
return
gadget
.
setSettingClipboardAction
(
'
clipboard
'
,
checked_uid_list
)
.
push
(
function
()
{
.
push
(
function
()
{
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_global_js.xml
View file @
c5a2a785
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
79.58035.58376.38417
</string>
</value>
<value>
<string>
9
84.64003.17482.44305
</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>
15
74157261.21
</float>
<float>
15
93681243.48
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_html.html
View file @
c5a2a785
...
@@ -14,6 +14,9 @@
...
@@ -14,6 +14,9 @@
data-i18n=Reset
data-i18n=Reset
data-i18n=Previous
data-i18n=Previous
data-i18n=Next
data-i18n=Next
data-i18n=Copy
data-i18n=Select All
data-i18n=Unselect All
-->
-->
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_html.xml
View file @
c5a2a785
...
@@ -152,171 +152,183 @@
...
@@ -152,171 +152,183 @@
</record>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
patches.WorkflowTool
"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
Workflow
"
/>
</pickle>
</pickle>
<pickle>
<pickle>
<tuple>
<dictionary>
<none/>
<item>
<list>
<key>
<string>
_log
</string>
</key>
<dictionary>
<value>
<item>
<list>
<key>
<string>
action
</string>
</key>
<dictionary>
<value>
<string>
publish_alive
</string>
</value>
<item>
</item>
<key>
<string>
action
</string>
</key>
<item>
<value>
<string>
publish_alive
</string>
</value>
<key>
<string>
actor
</string>
</key>
</item>
<value>
<string>
romain
</string>
</value>
<item>
</item>
<key>
<string>
actor
</string>
</key>
<item>
<value>
<string>
romain
</string>
</value>
<key>
<string>
comment
</string>
</key>
</item>
<value>
<string></string>
</value>
<item>
</item>
<key>
<string>
comment
</string>
</key>
<item>
<value>
<string></string>
</value>
<key>
<string>
error_message
</string>
</key>
</item>
<value>
<string></string>
</value>
<item>
</item>
<key>
<string>
error_message
</string>
</key>
<item>
<value>
<string></string>
</value>
<key>
<string>
time
</string>
</key>
</item>
<value>
<item>
<object>
<key>
<string>
time
</string>
</key>
<klass>
<value>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
<object>
</klass>
<klass>
<tuple>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
<none/>
</klass>
</tuple>
<tuple>
<state>
<none/>
<tuple>
</tuple>
<float>
1406898405.83
</float>
<state>
<string>
GMT
</string>
<tuple>
</tuple>
<float>
1406898405.83
</float>
</state>
<string>
GMT
</string>
</object>
</tuple>
</value>
</state>
</item>
</object>
<item>
</value>
<key>
<string>
validation_state
</string>
</key>
</item>
<value>
<string>
published_alive
</string>
</value>
<item>
</item>
<key>
<string>
validation_state
</string>
</key>
</dictionary>
<value>
<string>
published_alive
</string>
</value>
</list>
</item>
</tuple>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
patches.WorkflowTool
"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
Workflow
"
/>
</pickle>
</pickle>
<pickle>
<pickle>
<tuple>
<dictionary>
<none/>
<item>
<list>
<key>
<string>
_log
</string>
</key>
<dictionary>
<value>
<item>
<list>
<key>
<string>
action
</string>
</key>
<dictionary>
<value>
<string>
edit
</string>
</value>
<item>
</item>
<key>
<string>
action
</string>
</key>
<item>
<value>
<string>
edit
</string>
</value>
<key>
<string>
actor
</string>
</key>
</item>
<value>
<string>
zope
</string>
</value>
<item>
</item>
<key>
<string>
actor
</string>
</key>
<item>
<value>
<string>
zope
</string>
</value>
<key>
<string>
comment
</string>
</key>
</item>
<value>
<item>
<none/>
<key>
<string>
comment
</string>
</key>
</value>
<value>
</item>
<none/>
<item>
</value>
<key>
<string>
error_message
</string>
</key>
</item>
<value>
<string></string>
</value>
<item>
</item>
<key>
<string>
error_message
</string>
</key>
<item>
<value>
<string></string>
</value>
<key>
<string>
serial
</string>
</key>
</item>
<value>
<string>
972.60114.22488.50688
</string>
</value>
<item>
</item>
<key>
<string>
serial
</string>
</key>
<item>
<value>
<string>
984.39653.64795.20104
</string>
</value>
<key>
<string>
state
</string>
</key>
</item>
<value>
<string>
current
</string>
</value>
<item>
</item>
<key>
<string>
state
</string>
</key>
<item>
<value>
<string>
current
</string>
</value>
<key>
<string>
time
</string>
</key>
</item>
<value>
<item>
<object>
<key>
<string>
time
</string>
</key>
<klass>
<value>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
<object>
</klass>
<klass>
<tuple>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
<none/>
</klass>
</tuple>
<tuple>
<state>
<none/>
<tuple>
</tuple>
<float>
1547457320.7
</float>
<state>
<string>
UTC
</string>
<tuple>
</tuple>
<float>
1593680987.57
</float>
</state>
<string>
UTC
</string>
</object>
</tuple>
</value>
</state>
</item>
</object>
</dictionary>
</value>
</list>
</item>
</tuple>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
patches.WorkflowTool
"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
Workflow
"
/>
</pickle>
</pickle>
<pickle>
<pickle>
<tuple>
<dictionary>
<none/>
<item>
<list>
<key>
<string>
_log
</string>
</key>
<dictionary>
<value>
<item>
<list>
<key>
<string>
action
</string>
</key>
<dictionary>
<value>
<string>
detect_converted_file
</string>
</value>
<item>
</item>
<key>
<string>
action
</string>
</key>
<item>
<value>
<string>
detect_converted_file
</string>
</value>
<key>
<string>
actor
</string>
</key>
</item>
<value>
<string>
romain
</string>
</value>
<item>
</item>
<key>
<string>
actor
</string>
</key>
<item>
<value>
<string>
romain
</string>
</value>
<key>
<string>
comment
</string>
</key>
</item>
<value>
<string></string>
</value>
<item>
</item>
<key>
<string>
comment
</string>
</key>
<item>
<value>
<string></string>
</value>
<key>
<string>
error_message
</string>
</key>
</item>
<value>
<string></string>
</value>
<item>
</item>
<key>
<string>
error_message
</string>
</key>
<item>
<value>
<string></string>
</value>
<key>
<string>
external_processing_state
</string>
</key>
</item>
<value>
<string>
converted
</string>
</value>
<item>
</item>
<key>
<string>
external_processing_state
</string>
</key>
<item>
<value>
<string>
converted
</string>
</value>
<key>
<string>
serial
</string>
</key>
</item>
<value>
<string>
0.0.0.0
</string>
</value>
<item>
</item>
<key>
<string>
serial
</string>
</key>
<item>
<value>
<string>
0.0.0.0
</string>
</value>
<key>
<string>
time
</string>
</key>
</item>
<value>
<item>
<object>
<key>
<string>
time
</string>
</key>
<klass>
<value>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
<object>
</klass>
<klass>
<tuple>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
<none/>
</klass>
</tuple>
<tuple>
<state>
<none/>
<tuple>
</tuple>
<float>
1405429265.11
</float>
<state>
<string>
GMT
</string>
<tuple>
</tuple>
<float>
1405429265.11
</float>
</state>
<string>
GMT
</string>
</object>
</tuple>
</value>
</state>
</item>
</object>
</dictionary>
</value>
</list>
</item>
</tuple>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</pickle>
</record>
</record>
</ZopeData>
</ZopeData>
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