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
4c7556ba
Commit
4c7556ba
authored
May 06, 2019
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: post list form rendered using local storage form definition
parent
30a58f16
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
60 deletions
+18
-60
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_discussion_tool_appcache.xml
..._page_module/gadget_officejs_discussion_tool_appcache.xml
+3
-3
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_discussion_tool_configuration.xml
..._module/gadget_officejs_discussion_tool_configuration.xml
+3
-3
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_post_list_js.js
...web_page_module/gadget_officejs_erp5_page_post_list_js.js
+10
-52
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_post_list_js.xml
...eb_page_module/gadget_officejs_erp5_page_post_list_js.xml
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_discussion_tool_appcache.xml
View file @
4c7556ba
...
...
@@ -255,7 +255,7 @@ jio_appcachestorage.js\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_skins%2Ferp5_officejs_jio_connector%2FHTMLPost_viewAsJio&view=jio_view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_skins%2Ferp5_officejs_jio_connector%2FHTMLPost_viewReplyDialog&view=jio_view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_skins%2Ferp5_post%2FPostModule_newHTMLPost&view=jio_view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_skins%2Ferp5_post%2FPostModule_viewHTMLPostList&view=jio_view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_skins%2Ferp5_post%2FPostModule_viewHTMLPostList
AsJio
&view=jio_view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_types%2FHTML%20Post%2F1&view=view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_types%2FHTML%20Post%2F2&view=view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_types%2FHTML%20Post%2F3&view=view&appcache=1\n
...
...
@@ -748,7 +748,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
975.3
3891.43185.1636
6
</string>
</value>
<value>
<string>
975.3
5023.63449.2759
6
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -766,7 +766,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>
1557
091528.6
</float>
<float>
1557
159135.54
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_discussion_tool_configuration.xml
View file @
4c7556ba
...
...
@@ -119,7 +119,7 @@ CACHE:\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_skins%2Ferp5_officejs_jio_connector%2FHTMLPost_viewAsJio&view=jio_view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_skins%2Ferp5_officejs_jio_connector%2FHTMLPost_viewReplyDialog&view=jio_view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_skins%2Ferp5_post%2FPostModule_newHTMLPost&view=jio_view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_skins%2Ferp5_post%2FPostModule_viewHTMLPostList&view=jio_view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_skins%2Ferp5_post%2FPostModule_viewHTMLPostList
AsJio
&view=jio_view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_types%2FHTML%20Post%2F1&view=view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_types%2FHTML%20Post%2F2&view=view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_types%2FHTML%20Post%2F3&view=view&appcache=1\n
...
...
@@ -271,7 +271,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
975.33
891.3939.51882
</string>
</value>
<value>
<string>
975.33
927.59349.41574
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -289,7 +289,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>
1557
091674.33
</float>
<float>
1557
157442.14
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_post_list_js.js
View file @
4c7556ba
...
...
@@ -17,63 +17,20 @@
// declared methods
/////////////////////////////////////////////////////////////////
//HARDCODED UNTIL form_def is stored in local storage
.
declareMethod
(
"
getFormDefinition
"
,
function
(
gadget
)
{
var
fake_thread_uid
=
"
thread-
"
+
(
"
0000
"
+
((
Math
.
random
()
*
Math
.
pow
(
36
,
4
))
|
0
).
toString
(
36
)).
slice
(
-
4
),
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
,
default_view
=
"
jio_view
"
,
common_utils_gadget_url
=
"
gadget_officejs_common_utils.html
"
,
child_gadget_url
=
'
gadget_erp5_pt_form_list.html
'
,
//HARDCODED NEW ACTION INFORMATION - TODO: get like in action_offline gadget (refactor/reuse code)
fake_thread_uid
=
"
thread-
"
+
(
"
0000
"
+
((
Math
.
random
()
*
Math
.
pow
(
36
,
4
))
|
0
).
toString
(
36
)).
slice
(
-
4
),
action_info
=
{
page
:
"
handle_action
"
,
action
:
"
new
"
,
portal_type
:
"
HTML Post
"
,
parent_portal_type
:
"
Post Module
"
,
my_source_reference
:
fake_thread_uid
},
form_definition
=
{
_debug
:
"
traverse
"
,
pt
:
"
form_view
"
,
title
:
"
Post
"
,
group_list
:
[[
"
bottom
"
,
[[
"
my_listbox
"
]]
]],
//this fields_raw_properties is totally made up, but somewhere in the definition there must be
//information about the fields. So, foreach field: key->info
fields_raw_properties
:
{
"
my_listbox
"
:
{
"
type
"
:
"
ListBox
"
,
"
key
"
:
"
field_listbox
"
,
// or my_listbox ??
"
values
"
:
{
"
column_list
"
:
[[
'
title
'
,
'
Title
'
],
[
'
modification_date
'
,
'
Modification Date
'
]],
"
show_anchor
"
:
0
,
"
default_params
"
:
{},
"
editable
"
:
1
,
"
editable_column_list
"
:
[],
"
lines
"
:
30
,
"
list_method
"
:
"
portal_catalog
"
,
// is this correct? the query should come from the form definition, right?
"
query
"
:
"
urn:jio:allDocs?query=portal_type%3A%22HTML Post%22
"
,
"
portal_type
"
:
[],
"
search_column_list
"
:
[[
'
title
'
,
'
Title
'
],
[
'
modification_date
'
,
'
Modification Date
'
]],
"
sort_column_list
"
:
[[
'
title
'
,
'
Title
'
],
[
'
modification_date
'
,
'
Modification Date
'
]],
"
sort
"
:
[[
'
modification_date
'
,
'
descending
'
]],
"
title
"
:
"
Posts
"
},
"
tales
"
:
{},
"
overrides
"
:
{},
"
message_values
"
:
{}
}
},
action
:
"
Base_edit
"
,
update_action
:
""
,
_links
:
{
"
type
"
:
{
name
:
""
},
"
action_object_new_content_action
"
:
action_info
}
};
return
form_definition
;
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
,
default_view
=
"
jio_view
"
,
common_utils_gadget_url
=
"
gadget_officejs_common_utils.html
"
,
child_gadget_url
=
'
gadget_erp5_pt_form_list.html
'
;
return
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
([
...
...
@@ -82,10 +39,11 @@
]);
})
.
push
(
function
(
result
)
{
return
gadget
.
getFormDefinition
();
//return result[1].getFormDefinition(result[0], default_view);
return
result
[
1
].
getFormDefinition
(
result
[
0
],
default_view
);
})
.
push
(
function
(
form_definition
)
{
//HARDCODED ACTION INFORMATION
form_definition
.
_links
.
action_object_new_content_action
=
action_info
;
return
gadget
.
changeState
({
jio_key
:
options
.
jio_key
,
child_gadget_url
:
child_gadget_url
,
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_post_list_js.xml
View file @
4c7556ba
...
...
@@ -269,7 +269,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
975.3
3902.30639.19097
</string>
</value>
<value>
<string>
975.3
5049.45064.43076
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -287,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>
1557
091447.99
</float>
<float>
1557
158988.51
</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