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
b4d74f8e
Commit
b4d74f8e
authored
Jun 17, 2019
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: allowed sub types managed by new layout properties
parent
e28d03dc
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
98 additions
and
22 deletions
+98
-22
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_common_utils_js.js
...teItem/web_page_module/gadget_officejs_common_utils_js.js
+19
-4
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_controller_page_local_controller_js.xml
...e/gadget_officejs_controller_page_local_controller_js.xml
+2
-2
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
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_action_officejs_js.js
...eb_page_module/gadget_officejs_page_action_officejs_js.js
+4
-8
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_action_officejs_js.xml
...b_page_module/gadget_officejs_page_action_officejs_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_site_module/officejs_text_editor/app.xml
...TemplateItem/web_site_module/officejs_text_editor/app.xml
+67
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_common_utils_js.js
View file @
b4d74f8e
...
...
@@ -91,13 +91,17 @@
.
declareMethod
(
"
getFormDefinition
"
,
function
(
portal_type
,
action_reference
)
{
var
gadget
=
this
,
all_allowed_sub_types_list
=
[],
allowed_sub_types_list
=
[],
i
=
0
,
query
,
action_type
,
action_title
,
form_definition
,
query_type
,
query_parent
,
query_reference
;
query_reference
,
pair
;
query_reference
=
new
SimpleQuery
({
key
:
"
reference
"
,
operator
:
""
,
...
...
@@ -137,10 +141,21 @@
form_definition
=
form_result
.
form_definition
;
form_definition
.
action_type
=
action_type
;
form_definition
.
title
=
action_title
;
return
gadget
.
jio_get
(
"
portal_types/
"
+
portal_type
);
return
gadget
.
getSetting
(
"
app_allowed_sub_types
"
);
})
.
push
(
function
(
portal_type_definition
)
{
form_definition
.
allowed_sub_types_list
=
portal_type_definition
.
type_allowed_content_type_list
;
.
push
(
function
(
allowed_sub_types
)
{
allowed_sub_types
=
allowed_sub_types
.
replace
(
/
\(
/g
,
'
[
'
)
.
replace
(
/
\)
/g
,
'
]
'
)
.
replace
(
/,
\]
/g
,
'
]
'
)
.
replace
(
/
\'
/g
,
'
"
'
);
all_allowed_sub_types_list
=
JSON
.
parse
(
allowed_sub_types
);
for
(
i
=
0
;
i
<
all_allowed_sub_types_list
.
length
;
i
++
)
{
pair
=
all_allowed_sub_types_list
[
i
].
split
(
"
|
"
);
if
(
pair
[
0
]
===
portal_type
)
{
allowed_sub_types_list
.
push
(
pair
[
1
]);
}
}
form_definition
.
allowed_sub_types_list
=
allowed_sub_types_list
;
return
gadget
.
checkMoreActions
(
portal_type
,
action_type
);
})
.
push
(
function
(
has_more_dict
)
{
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_common_utils_js.xml
View file @
b4d74f8e
...
...
@@ -269,7 +269,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
976.2
2359.27411.27050
</string>
</value>
<value>
<string>
976.2
9977.52189.65245
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -287,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>
1560
329876.02
</float>
<float>
1560
786832.33
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_local_controller_js.xml
View file @
b4d74f8e
...
...
@@ -228,7 +228,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
976.2
5433.13146.32819
</string>
</value>
<value>
<string>
976.2
9901.4312.20343
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>
1560
517773.74
</float>
<float>
1560
785129.07
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_form_view_js.xml
View file @
b4d74f8e
...
...
@@ -269,7 +269,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
976.2
5423.55011.64512
</string>
</value>
<value>
<string>
976.2
9933.16046.63863
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -287,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>
1560
513625.91
</float>
<float>
1560
784206.19
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_action_officejs_js.js
View file @
b4d74f8e
...
...
@@ -85,6 +85,7 @@
})
.
declareMethod
(
"
getAllActions
"
,
function
(
portal_type
,
options
)
{
//TODO for now this takes also views. Views should be handle in another gadget like "..tab_office.js"
var
gadget
=
this
,
action_info_dict
=
{
views
:
{},
actions
:
{}},
query
=
'
portal_type: "Action Information" AND parent_relative_url: "portal_types/
'
+
portal_type
+
'
"
'
;
...
...
@@ -101,6 +102,8 @@
.
push
(
function
(
action_document_list
)
{
var
action_settings_list
=
[],
page
,
action_key
,
action_doc
,
key
,
action_settings
;
for
(
action_key
in
action_document_list
)
{
//TODO filter actions: discard actions that are not in getSettings("app_actions")
//there must be one "View" action. If not, use default view (like jio_view in getsettings)
if
(
action_document_list
.
hasOwnProperty
(
action_key
))
{
action_doc
=
action_document_list
[
action_key
];
page
=
"
handle_action
"
;
...
...
@@ -128,13 +131,6 @@
}
}
}
//var default_view = "text_editor_view";
//TODO use app settings to get the default view, and then:
//if (action_info_dict.views.hasOwnProperty(default_view) {
// remove all other views (iterate and delete every view in view_categories distinct from default view
//}
//if portal_type has both view and jio_view, remove classic 'view'
//is the 'classic view' action needed at all here? -maybe it shouldn't be added in appcache manifest
if
(
action_info_dict
.
views
.
hasOwnProperty
(
"
view
"
)
&&
action_info_dict
.
views
.
hasOwnProperty
(
"
jio_view
"
))
{
delete
action_info_dict
.
views
.
view
;
}
...
...
@@ -162,7 +158,7 @@
gadget
.
getHTMLElementList
(
action_info_dict
.
actions
)
]);
})
//
TODO: check other lists like clone or delete?
//
check other lists like clone or delete? NO. For now, they will be actions
.
push
(
function
(
all_html_elements
)
{
return
RSVP
.
all
([
renderLinkList
(
gadget
,
"
Views
"
,
"
eye
"
,
all_html_elements
[
0
]),
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_action_officejs_js.xml
View file @
b4d74f8e
...
...
@@ -228,7 +228,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
976.2
5441.59429.45926
</string>
</value>
<value>
<string>
976.2
9913.52.4761
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>
1560
517786.94
</float>
<float>
1560
785127.88
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_site_module/officejs_text_editor/app.xml
View file @
b4d74f8e
...
...
@@ -335,6 +335,46 @@
<value>
<string>
string
</string>
</value>
</item>
</dictionary>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
configuration_app_action_prefix
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
string
</string>
</value>
</item>
</dictionary>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
configuration_header_jump_button
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
int
</string>
</value>
</item>
</dictionary>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
configuration_app_actions
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
lines
</string>
</value>
</item>
</dictionary>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
configuration_app_allowed_sub_types
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
lines
</string>
</value>
</item>
</dictionary>
</tuple>
</value>
</item>
...
...
@@ -365,6 +405,27 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
configuration_app_action_prefix
</string>
</key>
<value>
<string>
some_action_prefix
</string>
</value>
</item>
<item>
<key>
<string>
configuration_app_actions
</string>
</key>
<value>
<tuple>
<string>
Web Page | text_editor_view
</string>
<string>
Web Page | jio_view
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
configuration_app_allowed_sub_types
</string>
</key>
<value>
<tuple>
<string>
Web Page Module | Web Page
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
configuration_application_title
</string>
</key>
<value>
<string>
Text Editor
</string>
</value>
...
...
@@ -393,6 +454,10 @@
<key>
<string>
configuration_header_gadget_url
</string>
</key>
<value>
<string>
gadget_erp5_header.html
</string>
</value>
</item>
<item>
<key>
<string>
configuration_header_jump_button
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
configuration_jio_gadget_url
</string>
</key>
<value>
<string>
gadget_ojs_local_jio.html
</string>
</value>
...
...
@@ -694,7 +759,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
976.2
0971.62073.32870
</string>
</value>
<value>
<string>
976.2
9963.55292.21623
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -712,7 +777,7 @@
</tuple>
<state>
<tuple>
<float>
1560
246622.09
</float>
<float>
1560
786002.25
</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