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
b45165da
Commit
b45165da
authored
Apr 01, 2019
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Factorise code
parent
f26ca734
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
68 deletions
+55
-68
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
+29
-0
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
+10
-31
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
+10
-31
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
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_global_js.js
View file @
b45165da
...
...
@@ -76,6 +76,33 @@
///////////////////////////////
// Handle listbox action list
///////////////////////////////
function
getListboxClipboardActionList
()
{
var
action_list
=
ensureArray
(
this
.
state
.
erp5_document
.
_links
.
action_object_list_action
||
[]),
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
;
}
result_list
.
push
({
title
:
action_list
[
i
].
title
,
icon
:
icon
,
action
:
action_list
[
i
].
name
});
}
return
result_list
;
}
function
createSearchQuery
(
checked_uid_list
,
key
)
{
var
i
,
search_query
,
...
...
@@ -173,6 +200,8 @@
},
true
);
});
}
window
.
getListboxClipboardActionList
=
getListboxClipboardActionList
;
window
.
triggerListboxClipboardAction
=
triggerListboxClipboardAction
;
}(
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 @
b45165da
...
...
@@ -228,7 +228,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
974.4831
5.28627.55534
</string>
</value>
<value>
<string>
974.4831
6.46514.38946
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>
15541
09242.58
</float>
<float>
15541
10522.02
</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 @
b45165da
/*global window, rJS, RSVP, calculatePageTitle, SimpleQuery, ComplexQuery,
Query, QueryFactory, ensureArray, triggerListboxClipboardAction */
Query, QueryFactory, ensureArray, triggerListboxClipboardAction,
getListboxClipboardActionList*/
/*jslint nomen: true, indent: 2, maxerr: 3, continue: true */
(
function
(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
SimpleQuery
,
ComplexQuery
,
Query
,
QueryFactory
,
ensureArray
,
triggerListboxClipboardAction
)
{
Query
,
QueryFactory
,
ensureArray
,
triggerListboxClipboardAction
,
getListboxClipboardActionList
)
{
"
use strict
"
;
function
updateSearchQueryFromSelection
(
extended_search
,
checked_uid_list
,
...
...
@@ -338,34 +340,11 @@
})
// Handle listbox custom button
.
allowPublicAcquisition
(
"
getListboxClipboardActionList
"
,
function
getListboxClipboardActionList
()
{
var
action_list
=
ensureArray
(
this
.
state
.
erp5_document
.
_links
.
action_object_list_action
||
[]),
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
;
}
result_list
.
push
({
title
:
action_list
[
i
].
title
,
icon
:
icon
,
action
:
action_list
[
i
].
name
});
}
return
result_list
;
})
.
allowPublicAcquisition
(
"
triggerListboxClipboardAction
"
,
triggerListboxClipboardAction
);
.
allowPublicAcquisition
(
"
getListboxClipboardActionList
"
,
getListboxClipboardActionList
)
.
allowPublicAcquisition
(
"
triggerListboxClipboardAction
"
,
triggerListboxClipboardAction
);
}(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
SimpleQuery
,
ComplexQuery
,
Query
,
QueryFactory
,
ensureArray
,
triggerListboxClipboardAction
));
\ No newline at end of file
QueryFactory
,
ensureArray
,
triggerListboxClipboardAction
,
getListboxClipboardActionList
));
\ 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 @
b45165da
...
...
@@ -228,7 +228,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
974.483
18.49230.61986
</string>
</value>
<value>
<string>
974.483
38.56343.35345
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>
15541
09391.26
</float>
<float>
15541
10585.33
</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 @
b45165da
/*global window, rJS, RSVP, calculatePageTitle */
/*global window, rJS, RSVP, calculatePageTitle, triggerListboxClipboardAction,
getListboxClipboardActionList */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
,
calculatePageTitle
)
{
(
function
(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
triggerListboxClipboardAction
,
getListboxClipboardActionList
)
{
"
use strict
"
;
rJS
(
window
)
...
...
@@ -183,33 +185,10 @@
},
false
,
true
)
// Handle listbox custom button
.
allowPublicAcquisition
(
"
getListboxClipboardActionList
"
,
function
getListboxClipboardActionList
()
{
var
action_list
=
ensureArray
(
this
.
state
.
erp5_document
.
_links
.
action_object_list_action
||
[]),
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
;
}
result_list
.
push
({
title
:
action_list
[
i
].
title
,
icon
:
icon
,
action
:
action_list
[
i
].
name
});
}
return
result_list
;
})
.
allowPublicAcquisition
(
"
triggerListboxClipboardAction
"
,
triggerListboxClipboardAction
);
.
allowPublicAcquisition
(
"
getListboxClipboardActionList
"
,
getListboxClipboardActionList
)
.
allowPublicAcquisition
(
"
triggerListboxClipboardAction
"
,
triggerListboxClipboardAction
);
}(
window
,
rJS
,
RSVP
,
calculatePageTitle
));
\ No newline at end of file
}(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
triggerListboxClipboardAction
,
getListboxClipboardActionList
));
\ 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 @
b45165da
...
...
@@ -228,7 +228,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
974.4
4332.43937.58060
</string>
</value>
<value>
<string>
974.4
8338.34236.46097
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>
155
3870231.5
6
</float>
<float>
155
4110628.4
6
</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