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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
06f64a9b
Commit
06f64a9b
authored
Apr 01, 2019
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP [erp5_web_renderjs_ui] Copy/Paste
parent
f77434df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
3 deletions
+55
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.js
...teItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.js
+53
-1
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
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.js
View file @
06f64a9b
...
...
@@ -71,6 +71,17 @@
view
,
i
;
if
(
action_name
===
'
copy_document_list
'
)
{
console
.
log
(
'
Copying
'
,
checked_uid_list
);
return
gadget
.
setSetting
(
'
clipboard
'
,
checked_uid_list
)
.
push
(
function
()
{
return
gadget
.
notifySubmitted
({
"
message
"
:
"
Copied.
"
,
"
status
"
:
"
success
"
});
});
}
for
(
i
=
0
;
i
<
action_list
.
length
;
i
+=
1
)
{
if
(
action_name
===
action_list
[
i
].
name
)
{
view
=
action_list
[
i
].
href
;
...
...
@@ -94,6 +105,33 @@
command
:
'
reload
'
});
}
if
(
action_name
===
'
paste_document_list
'
)
{
return
gadget
.
getSetting
(
'
clipboard
'
)
.
push
(
function
(
uid_list
)
{
uid_list
=
uid_list
||
[];
if
(
uid_list
.
length
===
0
)
{
// Nothing to paste, go away
uid_list
=
[
'
XXX
'
];
}
extended_search
=
updateSearchQueryFromSelection
(
''
,
uid_list
,
'
catalog.uid
'
,
true
);
console
.
log
(
'
Pasting
'
,
uid_list
);
return
gadget
.
redirect
({
command
:
'
display_dialog_with_history
'
,
options
:
{
"
jio_key
"
:
gadget
.
state
.
jio_key
,
"
view
"
:
view
,
"
extended_search
"
:
extended_search
}
},
true
);
});
}
return
gadget
.
redirect
({
command
:
'
display_dialog_with_history
'
,
options
:
{
...
...
@@ -108,12 +146,15 @@
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
setSetting
"
,
"
setSetting
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
getUrlForList
"
,
"
getUrlForList
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
getUrlParameter
"
,
"
getUrlParameter
"
)
.
declareAcquiredMethod
(
"
renderEditorPanel
"
,
"
renderEditorPanel
"
)
.
declareAcquiredMethod
(
"
getTranslationList
"
,
"
getTranslationList
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
"
notifySubmitted
"
)
/////////////////////////////////////////////////////////////////
// Proxy methods to the child gadget
...
...
@@ -320,6 +361,9 @@
if
(
action_list
[
i
].
name
===
'
delete_document_list
'
)
{
continue
;
}
if
(
action_list
[
i
].
name
===
'
paste_document_list
'
)
{
continue
;
}
if
(
action_list
[
i
].
name
===
'
mass_workflow_jio
'
)
{
icon
=
'
random
'
;
}
else
{
...
...
@@ -365,7 +409,8 @@
},
true
);
}
if
(
action
!==
'
delete_document_list
'
)
{
if
((
action
!==
'
delete_document_list
'
)
&&
(
action
!==
'
paste_document_list
'
))
{
return
triggerListboxClipboardAction
.
apply
(
this
,
[
argument_list
]);
}
...
...
@@ -378,9 +423,16 @@
i
,
result_list
=
[],
icon
;
result_list
.
push
({
title
:
'
Copy
'
,
icon
:
'
copy
'
,
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
;
}
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.xml
View file @
06f64a9b
...
...
@@ -228,7 +228,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
97
3.131.13855.5137
</string>
</value>
<value>
<string>
97
4.42547.505.51302
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>
15
47545219.53
</float>
<float>
15
53763421.11
</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