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
c3621f67
Commit
c3621f67
authored
Nov 23, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: WIP try to show multiple view actions
parent
2910a940
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_common_util_js.js
...ateItem/web_page_module/gadget_officejs_common_util_js.js
+13
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_common_util_js.xml
...teItem/web_page_module/gadget_officejs_common_util_js.xml
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_common_util_js.js
View file @
c3621f67
...
...
@@ -13,6 +13,7 @@
// this is for scenarios were the portal type has several "View"
// (like view, jio_view, custom_view)
// priority: app_view ; default_view ; other
return
views_dict
;
var
only_view
,
key
,
view_list
=
Object
.
keys
(
views_dict
).
map
(
function
(
key
)
{
if
(
views_dict
[
key
].
title
===
"
View
"
)
{
return
key
;
}
...
...
@@ -40,6 +41,7 @@
.
replace
(
/,
\]
/g
,
'
]
'
)
.
replace
(
/
\'
/g
,
'
"
'
);
configuration_list
=
JSON
.
parse
(
configuration_list_string
);
console
.
log
(
'
configuration_list
'
,
configuration_list
)
for
(
i
=
0
;
i
<
configuration_list
.
length
;
i
+=
1
)
{
pair
=
configuration_list
[
i
].
split
(
"
|
"
);
if
(
pair
.
length
!==
2
)
{
...
...
@@ -59,6 +61,7 @@
throw
e
;
}
}
console
.
log
(
'
formatted_list
'
,
formatted_list
);
return
formatted_list
;
}
...
...
@@ -130,14 +133,18 @@
.
declareMethod
(
"
getViewAndActionDict
"
,
function
(
portal_type
,
app_view
,
default_view
,
app_actions_string
,
jio_key
)
{
// console.log('app_actions_string', app_actions_string);
var
gadget
=
this
,
action_info_dict
=
{
view_list
:
{},
action_list
:
{}},
query
=
buildSearchQuery
(
portal_type
),
app_actions
,
app_actions_result
=
formatSettingList
(
app_actions_string
,
portal_type
);
console
.
log
(
'
app_actions_string
'
,
app_actions_result
);
app_actions
=
app_actions_result
.
map
(
function
(
pair
)
{
return
pair
[
1
];
});
console
.
log
(
'
app_actions
'
,
app_actions
);
return
gadget
.
jio_allDocs
({
query
:
query
})
.
push
(
function
(
action_list
)
{
var
path_for_jio_get_list
=
[],
row
;
...
...
@@ -150,6 +157,9 @@
return
RSVP
.
all
(
path_for_jio_get_list
);
})
.
push
(
function
(
action_document_list
)
{
// console.log(JSON.stringify(action_document_list));
console
.
log
(
'
app_actions
'
,
app_actions
);
var
action_key
,
action_doc
,
action_settings
;
for
(
action_key
in
action_document_list
)
{
if
(
action_document_list
.
hasOwnProperty
(
action_key
))
{
...
...
@@ -177,8 +187,11 @@
}
}
}
console
.
log
(
'
couscous
'
,
JSON
.
stringify
(
action_info_dict
));
action_info_dict
.
view_list
=
filterViewList
(
action_info_dict
.
view_list
,
app_view
,
default_view
);
console
.
log
(
'
taboulet
'
,
JSON
.
stringify
(
action_info_dict
));
return
action_info_dict
;
});
})
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_common_util_js.xml
View file @
c3621f67
...
...
@@ -275,7 +275,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
98
7.1958.49484.49100
</string>
</value>
<value>
<string>
98
8.10966.984.65433
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -293,7 +293,7 @@
</tuple>
<state>
<tuple>
<float>
160
1668696.35
</float>
<float>
160
6140846.1
</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