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
1
Issues
1
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
Roque
erp5
Commits
7f212c74
Commit
7f212c74
authored
May 15, 2019
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: changes on getFormDefinition method
parent
12d527d3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
25 deletions
+10
-25
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_common_utils_js.js
...teItem/web_page_module/gadget_officejs_common_utils_js.js
+5
-20
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_common_utils_js.xml
...eItem/web_page_module/gadget_officejs_common_utils_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_form_view_js.js
...plateItem/web_page_module/gadget_officejs_form_view_js.js
+1
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_form_view_js.xml
...lateItem/web_page_module/gadget_officejs_form_view_js.xml
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_common_utils_js.js
View file @
7f212c74
...
@@ -53,32 +53,17 @@
...
@@ -53,32 +53,17 @@
.
declareMethod
(
"
checkMoreActions
"
,
function
(
portal_type
,
action_category
)
{
.
declareMethod
(
"
checkMoreActions
"
,
function
(
portal_type
,
action_category
)
{
var
gadget
=
this
,
var
gadget
=
this
,
//for now, views and actions are handle together via handle_action gadget
has_more_dict
=
{
views
:
{},
actions
:
{}},
has_more_dict
=
{
views
:
{},
actions
:
{}},
query
;
query
;
//if target action is a type of view, get all actions/views for the portal_type
// get all actions/views for the portal_type, if target action is a type of view
// (exclude custom scripts and dialogs)
if
(
view_categories
.
includes
(
action_category
))
{
if
(
view_categories
.
includes
(
action_category
))
{
query
=
'
portal_type: "Action Information" AND parent_relative_url: "portal_types/
'
+
portal_type
+
'
"
'
;
query
=
'
portal_type: "Action Information" AND parent_relative_url: "portal_types/
'
+
portal_type
+
'
"
'
;
return
gadget
.
jio_allDocs
({
query
:
query
})
return
gadget
.
jio_allDocs
({
query
:
query
})
.
push
(
function
(
action_list
)
{
.
push
(
function
(
action_list
)
{
var
path_for_jio_get_list
=
[],
row
;
if
(
action_list
.
data
.
rows
.
length
>
0
)
{
for
(
row
in
action_list
.
data
.
rows
)
{
has_more_dict
.
has_more_actions
=
true
;
if
(
action_list
.
data
.
rows
.
hasOwnProperty
(
row
))
{
path_for_jio_get_list
.
push
(
gadget
.
jio_get
(
action_list
.
data
.
rows
[
row
].
id
));
}
}
return
RSVP
.
all
(
path_for_jio_get_list
);
})
.
push
(
function
(
action_document_list
)
{
var
get_action_settings_list
=
[],
page
,
action_key
,
action_doc
;
for
(
action_key
in
action_document_list
)
{
if
(
action_document_list
.
hasOwnProperty
(
action_key
))
{
action_doc
=
action_document_list
[
action_key
];
if
(
view_categories
.
includes
(
action_doc
.
action_type
))
{
has_more_dict
.
has_more_views
=
true
;
}
else
{
has_more_dict
.
has_more_actions
=
true
;
}
}
}
}
return
has_more_dict
;
return
has_more_dict
;
});
});
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_common_utils_js.xml
View file @
7f212c74
...
@@ -269,7 +269,7 @@
...
@@ -269,7 +269,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
975.4
0669.15893.6946
</string>
</value>
<value>
<string>
975.4
7864.34898.9710
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -287,7 +287,7 @@
...
@@ -287,7 +287,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1557
496163.64
</float>
<float>
1557
927902.87
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_form_view_js.js
View file @
7f212c74
...
@@ -187,7 +187,7 @@
...
@@ -187,7 +187,7 @@
header_dict
.
save_action
=
true
;
header_dict
.
save_action
=
true
;
}
}
}
}
if
(
options
.
form_definition
.
has_more_actions
)
{
if
(
options
.
form_definition
.
has_more_actions
||
options
.
form_definition
.
has_more_views
)
{
header_dict
.
actions_url
=
url_list
[
1
];
header_dict
.
actions_url
=
url_list
[
1
];
}
}
if
(
add_url
)
{
if
(
add_url
)
{
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_form_view_js.xml
View file @
7f212c74
...
@@ -269,7 +269,7 @@
...
@@ -269,7 +269,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
975.
39468.60846.58214
</string>
</value>
<value>
<string>
975.
46515.39016.26350
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -287,7 +287,7 @@
...
@@ -287,7 +287,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1557
758125.07
</float>
<float>
1557
927355.84
</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