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
5dbdd24a
Commit
5dbdd24a
authored
Apr 01, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Factorise more
parent
56cc0aaf
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
51 additions
and
40 deletions
+51
-40
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
+22
-8
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_pt_form_list_js.js
...teItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.js
+5
-9
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
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.js
...b_page_module/rjs_gadget_erp5_pt_form_view_editable_js.js
+8
-12
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.xml
..._page_module/rjs_gadget_erp5_pt_form_view_editable_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.js
...teItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.js
+8
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml
...eItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_global_js.js
View file @
5dbdd24a
/*global window, RSVP, Array, isNaN, SimpleQuery, ComplexQuery, Query */
/*jslint indent: 2, maxerr: 3, nomen: true, unparam: true */
/*jslint indent: 2, maxerr: 3, nomen: true, unparam: true
, continue: true
*/
(
function
(
window
,
RSVP
,
Array
,
isNaN
,
SimpleQuery
,
ComplexQuery
,
Query
)
{
"
use strict
"
;
...
...
@@ -149,7 +149,7 @@
}
if
(
view
===
undefined
)
{
// Action was not found.
return
gadget
.
notifySubmitted
({
return
gadget
.
notifySubmitted
ClipboardAction
({
"
message
"
:
"
Action not handled.
"
});
}
...
...
@@ -157,7 +157,7 @@
if
(
action_name
===
'
paste_document_list
'
)
{
// Get the list of document uid from the internal clipboard
queue
=
gadget
.
getSetting
(
'
clipboard
'
)
queue
=
gadget
.
getSetting
ClipboardAction
(
'
clipboard
'
)
.
push
(
function
(
uid_list
)
{
checked_uid_list
=
uid_list
||
[];
});
...
...
@@ -172,22 +172,22 @@
// Dialog listbox use catalog method, which may be different from the current select method
// and so, it is mandatory to propagate a list of uid, otherwise, the dialog may display
// an unexpected huge list of unrelated documents
return
gadget
.
notifySubmitted
({
return
gadget
.
notifySubmitted
ClipboardAction
({
"
message
"
:
"
Nothing selected.
"
});
}
if
(
action_name
===
'
copy_document_list
'
)
{
return
gadget
.
setSetting
(
'
clipboard
'
,
checked_uid_list
)
return
gadget
.
setSetting
ClipboardAction
(
'
clipboard
'
,
checked_uid_list
)
.
push
(
function
()
{
return
gadget
.
notifySubmitted
({
return
gadget
.
notifySubmitted
ClipboardAction
({
"
message
"
:
"
Copied.
"
,
"
status
"
:
"
success
"
});
});
}
return
gadget
.
redirect
({
return
gadget
.
redirect
ClipboardAction
({
command
:
'
display_dialog_with_history
'
,
options
:
{
"
jio_key
"
:
gadget
.
state
.
jio_key
,
...
...
@@ -201,7 +201,21 @@
});
}
window
.
getListboxClipboardActionList
=
getListboxClipboardActionList
;
function
declareGadgetClassCanHandleListboxClipboardAction
(
gadget_klass
)
{
gadget_klass
.
declareAcquiredMethod
(
"
setSettingClipboardAction
"
,
"
setSetting
"
)
.
declareAcquiredMethod
(
"
getSettingClipboardAction
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
redirectClipboardAction
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
notifySubmittedClipboardAction
"
,
"
notifySubmitted
"
)
// Handle listbox custom button
.
allowPublicAcquisition
(
"
getListboxClipboardActionList
"
,
getListboxClipboardActionList
)
.
allowPublicAcquisition
(
"
triggerListboxClipboardAction
"
,
triggerListboxClipboardAction
);
}
window
.
triggerListboxClipboardAction
=
triggerListboxClipboardAction
;
window
.
declareGadgetClassCanHandleListboxClipboardAction
=
declareGadgetClassCanHandleListboxClipboardAction
;
}(
window
,
RSVP
,
Array
,
isNaN
,
SimpleQuery
,
ComplexQuery
,
Query
));
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_global_js.xml
View file @
5dbdd24a
...
...
@@ -228,7 +228,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
974.483
16.46514.38946
</string>
</value>
<value>
<string>
974.483
73.9942.49254
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>
155411
0522.02
</float>
<float>
155411
2759.88
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.js
View file @
5dbdd24a
/*global window, rJS, RSVP, calculatePageTitle, SimpleQuery, ComplexQuery,
Query, QueryFactory, ensureArray, triggerListboxClipboardAction,
getListboxClipboardActionList
*/
declareGadgetClassCanHandleListboxClipboardAction
*/
/*jslint nomen: true, indent: 2, maxerr: 3, continue: true */
(
function
(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
SimpleQuery
,
ComplexQuery
,
Query
,
QueryFactory
,
ensureArray
,
triggerListboxClipboardAction
,
getListboxClipboardActionList
)
{
declareGadgetClassCanHandleListboxClipboardAction
)
{
"
use strict
"
;
function
updateSearchQueryFromSelection
(
extended_search
,
checked_uid_list
,
...
...
@@ -337,14 +337,10 @@
}
throw
new
Error
(
'
Unsupported triggerListboxSelectAction action:
'
+
action
);
})
})
;
// Handle listbox custom button
.
allowPublicAcquisition
(
"
getListboxClipboardActionList
"
,
getListboxClipboardActionList
)
.
allowPublicAcquisition
(
"
triggerListboxClipboardAction
"
,
triggerListboxClipboardAction
);
declareGadgetClassCanHandleListboxClipboardAction
(
rJS
(
window
));
}(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
SimpleQuery
,
ComplexQuery
,
Query
,
QueryFactory
,
ensureArray
,
triggerListboxClipboardAction
,
getListboxClipboardActionList
));
\ No newline at end of file
declareGadgetClassCanHandleListboxClipboardAction
));
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.xml
View file @
5dbdd24a
...
...
@@ -228,7 +228,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
974.483
38.56343.35345
</string>
</value>
<value>
<string>
974.483
75.35929.5939
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>
155411
0585.33
</float>
<float>
155411
2783.5
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.js
View file @
5dbdd24a
/*global window, rJS, RSVP, calculatePageTitle,
triggerListboxClipboardAction,
getListboxClipboardActionList
*/
/*global window, rJS, RSVP, calculatePageTitle,
declareGadgetClassCanHandleListboxClipboardAction
*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
triggerListboxClipboardAction
,
getListboxClipboardActionList
)
{
(
function
(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
declareGadgetClassCanHandleListboxClipboardAction
)
{
"
use strict
"
;
rJS
(
window
)
...
...
@@ -182,13 +182,9 @@
}
});
// page form handles failures well enough
},
false
,
true
)
},
false
,
true
)
;
// Handle listbox custom button
.
allowPublicAcquisition
(
"
getListboxClipboardActionList
"
,
getListboxClipboardActionList
)
.
allowPublicAcquisition
(
"
triggerListboxClipboardAction
"
,
triggerListboxClipboardAction
);
declareGadgetClassCanHandleListboxClipboardAction
(
rJS
(
window
));
}(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
triggerListboxClipboardAction
,
getListboxClipboardActionList
));
\ No newline at end of file
}(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
declareGadgetClassCanHandleListboxClipboardAction
));
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.xml
View file @
5dbdd24a
...
...
@@ -228,7 +228,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
974.4833
8.34236.46097
</string>
</value>
<value>
<string>
974.4833
9.52946.33450
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>
155411
0628.46
</float>
<float>
155411
2591.65
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.js
View file @
5dbdd24a
/*global window, rJS, RSVP, calculatePageTitle, isEmpty */
/*global window, rJS, RSVP, calculatePageTitle, isEmpty,
declareGadgetClassCanHandleListboxClipboardAction */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
isEmpty
)
{
(
function
(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
isEmpty
,
declareGadgetClassCanHandleListboxClipboardAction
)
{
"
use strict
"
;
/** Return true if `field` resembles non-empty and non-editable field. */
...
...
@@ -161,4 +163,7 @@
});
});
}(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
isEmpty
));
\ No newline at end of file
declareGadgetClassCanHandleListboxClipboardAction
(
rJS
(
window
));
}(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
isEmpty
,
declareGadgetClassCanHandleListboxClipboardAction
));
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml
View file @
5dbdd24a
...
...
@@ -228,7 +228,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
97
2.58906.44395.12356
</string>
</value>
<value>
<string>
97
4.48369.21631.14967
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>
15
47195629.34
</float>
<float>
15
54112407.89
</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