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
56cc0aaf
Commit
56cc0aaf
authored
Apr 01, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Factorise code
parent
f8b47669
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 @
56cc0aaf
...
@@ -76,6 +76,33 @@
...
@@ -76,6 +76,33 @@
///////////////////////////////
///////////////////////////////
// Handle listbox action list
// 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
)
{
function
createSearchQuery
(
checked_uid_list
,
key
)
{
var
i
,
var
i
,
search_query
,
search_query
,
...
@@ -173,6 +200,8 @@
...
@@ -173,6 +200,8 @@
},
true
);
},
true
);
});
});
}
}
window
.
getListboxClipboardActionList
=
getListboxClipboardActionList
;
window
.
triggerListboxClipboardAction
=
triggerListboxClipboardAction
;
window
.
triggerListboxClipboardAction
=
triggerListboxClipboardAction
;
}(
window
,
RSVP
,
Array
,
isNaN
,
SimpleQuery
,
ComplexQuery
,
Query
));
}(
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 @
56cc0aaf
...
@@ -228,7 +228,7 @@
...
@@ -228,7 +228,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -246,7 +246,7 @@
...
@@ -246,7 +246,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15541
09242.58
</float>
<float>
15541
10522.02
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.js
View file @
56cc0aaf
/*global window, rJS, RSVP, calculatePageTitle, SimpleQuery, ComplexQuery,
/*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 */
/*jslint nomen: true, indent: 2, maxerr: 3, continue: true */
(
function
(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
SimpleQuery
,
ComplexQuery
,
(
function
(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
SimpleQuery
,
ComplexQuery
,
Query
,
QueryFactory
,
ensureArray
,
triggerListboxClipboardAction
)
{
Query
,
QueryFactory
,
ensureArray
,
triggerListboxClipboardAction
,
getListboxClipboardActionList
)
{
"
use strict
"
;
"
use strict
"
;
function
updateSearchQueryFromSelection
(
extended_search
,
checked_uid_list
,
function
updateSearchQueryFromSelection
(
extended_search
,
checked_uid_list
,
...
@@ -338,34 +340,11 @@
...
@@ -338,34 +340,11 @@
})
})
// Handle listbox custom button
// Handle listbox custom button
.
allowPublicAcquisition
(
"
getListboxClipboardActionList
"
,
function
getListboxClipboardActionList
()
{
.
allowPublicAcquisition
(
"
getListboxClipboardActionList
"
,
var
action_list
=
ensureArray
(
this
.
state
.
erp5_document
.
_links
.
action_object_list_action
||
[]),
getListboxClipboardActionList
)
i
,
.
allowPublicAcquisition
(
"
triggerListboxClipboardAction
"
,
result_list
=
[],
triggerListboxClipboardAction
);
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
);
}(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
SimpleQuery
,
ComplexQuery
,
Query
,
}(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
SimpleQuery
,
ComplexQuery
,
Query
,
QueryFactory
,
ensureArray
,
triggerListboxClipboardAction
));
QueryFactory
,
ensureArray
,
triggerListboxClipboardAction
,
\ No newline at end of file
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 @
56cc0aaf
...
@@ -228,7 +228,7 @@
...
@@ -228,7 +228,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -246,7 +246,7 @@
...
@@ -246,7 +246,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15541
09391.26
</float>
<float>
15541
10585.33
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.js
View file @
56cc0aaf
/*global window, rJS, RSVP, calculatePageTitle */
/*global window, rJS, RSVP, calculatePageTitle, triggerListboxClipboardAction,
getListboxClipboardActionList */
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
,
calculatePageTitle
)
{
(
function
(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
triggerListboxClipboardAction
,
getListboxClipboardActionList
)
{
"
use strict
"
;
"
use strict
"
;
rJS
(
window
)
rJS
(
window
)
...
@@ -183,33 +185,10 @@
...
@@ -183,33 +185,10 @@
},
false
,
true
)
},
false
,
true
)
// Handle listbox custom button
// Handle listbox custom button
.
allowPublicAcquisition
(
"
getListboxClipboardActionList
"
,
function
getListboxClipboardActionList
()
{
.
allowPublicAcquisition
(
"
getListboxClipboardActionList
"
,
var
action_list
=
ensureArray
(
this
.
state
.
erp5_document
.
_links
.
action_object_list_action
||
[]),
getListboxClipboardActionList
)
i
,
.
allowPublicAcquisition
(
"
triggerListboxClipboardAction
"
,
result_list
=
[],
triggerListboxClipboardAction
);
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
);
}(
window
,
rJS
,
RSVP
,
calculatePageTitle
));
}(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
triggerListboxClipboardAction
,
\ No newline at end of file
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 @
56cc0aaf
...
@@ -228,7 +228,7 @@
...
@@ -228,7 +228,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -246,7 +246,7 @@
...
@@ -246,7 +246,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
155
3870231.5
6
</float>
<float>
155
4110628.4
6
</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