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
3b15ad3d
Commit
3b15ad3d
authored
Feb 26, 2019
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: moving form definition to hateoas script
parent
45216535
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
79 additions
and
21 deletions
+79
-21
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_controller_js.js
...e_module/gadget_officejs_controller_page_controller_js.js
+57
-7
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_controller_js.xml
..._module/gadget_officejs_controller_page_controller_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_discussion_tool_appcache.xml
..._page_module/gadget_officejs_discussion_tool_appcache.xml
+17
-10
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_controller_html.html
...web_page_module/gadget_officejs_page_controller_html.html
+1
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_controller_html.xml
.../web_page_module/gadget_officejs_page_controller_html.xml
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_controller_js.js
View file @
3b15ad3d
...
@@ -20,14 +20,16 @@
...
@@ -20,14 +20,16 @@
// declared methods
// declared methods
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
.
declareMethod
(
"
getFormDefinition
"
,
function
()
{
.
declareMethod
(
"
getFormDefinition
"
,
function
(
jio_key
)
{
//preparing a less hardcoded version, moving form definition to erp5 side
//preparing a less hardcoded version, moving form definition to erp5 side
/*
var gadget = this;
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
.
push
(
function
()
{
return
RSVP
.
all
([
return
RSVP
.
all
([
gadget
.
getSetting
(
'
hateoas_url
'
),
gadget
.
getSetting
(
'
hateoas_url
'
),
gadget.getSetting('default_view_reference')
gadget
.
getSetting
(
'
default_view_reference
'
),
gadget
.
jio_get
(
jio_key
)
//gadget.jio_get("portal_skins/erp5_hal_json_style/roquetest")
]);
]);
})
})
.
push
(
function
(
setting_list
)
{
.
push
(
function
(
setting_list
)
{
...
@@ -36,12 +38,60 @@
...
@@ -36,12 +38,60 @@
url
:
setting_list
[
0
],
url
:
setting_list
[
0
],
default_view_reference
:
setting_list
[
1
]
default_view_reference
:
setting_list
[
1
]
},
},
jio_storage = jIO.createJIO(jio_options);
jio_options_indexdb
=
{
return jio_storage.get('portal_skins/erp5_officejs_jio_connector/HTMLPost_viewAsJio')
type
:
"
replicate
"
,
check_remote_deletion
:
true
,
check_local_creation
:
true
,
check_local_deletion
:
false
,
check_local_modification
:
true
,
signature_sub_storage
:
{
type
:
"
query
"
,
sub_storage
:
{
type
:
"
indexeddb
"
,
database
:
"
officejs-hash
"
}
},
local_sub_storage
:
{
type
:
"
query
"
,
sub_storage
:
{
type
:
"
uuid
"
,
sub_storage
:
{
type
:
"
indexeddb
"
,
database
:
"
ojs_source_code
"
}
}
},
remote_sub_storage
:
{
type
:
"
appcache
"
,
manifest
:
"
gadget_officejs_discussion_tool.appcache
"
,
version
:
"
app/
"
,
take_installer
:
true
}
},
jio_storage
=
jIO
.
createJIO
(
jio_options
),
//jio_storage = jIO.createJIO(jio_options_indexdb),
form_path
=
'
portal_skins/erp5_officejs_jio_connector/
'
+
setting_list
[
2
].
portal_type
.
replace
(
/ /g
,
''
)
+
'
_viewAsJio
'
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
var
xmlHttp
=
new
XMLHttpRequest
(),
url
=
"
https://softinst112382.host.vifib.net/erp5/web_site_module/officejs_discussion_tool/app/portal_skins/erp5_hal_json_style/roquetest
"
;
xmlHttp
.
open
(
"
GET
"
,
url
,
false
);
// false for synchronous request
xmlHttp
.
send
(
null
);
return
xmlHttp
.
responseText
;
})
.
push
(
function
(
result
)
{
.
push
(
function
(
result
)
{
console
.
log
(
"
XMLHttpRequest result:
"
);
console
.
log
(
result
);
return
jio_storage
.
get
(
form_path
)
.
push
(
function
(
result
)
{
console
.
log
(
"
jio_storage.get(
"
+
form_path
+
"
) RESULT:
"
);
console
.
log
(
result
);
return
result
.
form_definition
;
return
result
.
form_definition
;
});
});
});*/
});
});
//somehow the form_definition should come from the erp5-doc/form (jio?)
//somehow the form_definition should come from the erp5-doc/form (jio?)
//for now, hardcoded form_definition for POST VIEW
//for now, hardcoded form_definition for POST VIEW
return
{
return
{
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_controller_js.xml
View file @
3b15ad3d
...
@@ -225,7 +225,7 @@
...
@@ -225,7 +225,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
973.
45022.8574.58385
</string>
</value>
<value>
<string>
973.
60782.51516.51131
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -243,7 +243,7 @@
...
@@ -243,7 +243,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
155
0238642.63
</float>
<float>
155
1184466.38
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_discussion_tool_appcache.xml
View file @
3b15ad3d
...
@@ -109,7 +109,9 @@
...
@@ -109,7 +109,9 @@
</item>
</item>
<item>
<item>
<key>
<string>
text_content
</string>
</key>
<key>
<string>
text_content
</string>
</key>
<value>
<string>
CACHE MANIFEST\n
<value>
<string
encoding=
"cdata"
>
<![CDATA[
CACHE MANIFEST\n
# generated on Fri, 25 Jun 2016 11:45:33 +0000\n
# generated on Fri, 25 Jun 2016 11:45:33 +0000\n
# XXX + fonts\n
# XXX + fonts\n
# images/ajax-loader.gif\n
# images/ajax-loader.gif\n
...
@@ -222,12 +224,15 @@ officejs_logo_text_editor.png\n
...
@@ -222,12 +224,15 @@ officejs_logo_text_editor.png\n
gadget_erp5_pt_form_view_editable.html\n
gadget_erp5_pt_form_view_editable.html\n
gadget_erp5_pt_form_view_editable.js\n
gadget_erp5_pt_form_view_editable.js\n
gadget_officejs_discussion_tool_router.html\n
gadget_officejs_discussion_tool_router.html\n
gadget_erp5_page_ojs_controller.html\n
\n
gadget_erp5_page_ojs_controller.js\n
portal_skins/erp5_hal_json_style/ERP5Document_getHateoas?mode=traverse&relative_url=portal_skins%2Ferp5_officejs_jio_connector%2FHTMLPost_viewAsJio&view=jio_view\n
gadget_erp5_page_ojs_post_list.html\n
\n
gadget_erp5_page_ojs_post_list.js\n
#gadget_erp5_page_ojs_controller.html\n
gadget_erp5_page_ojs_add_post.html\n
#gadget_erp5_page_ojs_controller.js\n
gadget_erp5_page_ojs_add_post.js\n
#gadget_erp5_page_ojs_post_list.html\n
#gadget_erp5_page_ojs_post_list.js\n
#gadget_erp5_page_ojs_add_post.html\n
#gadget_erp5_page_ojs_add_post.js\n
\n
\n
gadget_erp5_field_listbox.html\n
gadget_erp5_field_listbox.html\n
gadget_erp5_field_listbox.js\n
gadget_erp5_field_listbox.js\n
...
@@ -571,7 +576,9 @@ ckeditor/ckeditor.js\n
...
@@ -571,7 +576,9 @@ ckeditor/ckeditor.js\n
ckeditor/adapters/jquery.js\n
ckeditor/adapters/jquery.js\n
\n
\n
NETWORK:\n
NETWORK:\n
*
</string>
</value>
*
]]>
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
...
@@ -712,7 +719,7 @@ NETWORK:\n
...
@@ -712,7 +719,7 @@ NETWORK:\n
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
973.
45023.7563.33484
</string>
</value>
<value>
<string>
973.
60973.53293.46336
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -730,7 +737,7 @@ NETWORK:\n
...
@@ -730,7 +737,7 @@ NETWORK:\n
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
155
0239187.57
</float>
<float>
155
1212411.72
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_controller_html.html
View file @
3b15ad3d
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
<!-- renderjs -->
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"jio_appcachestorage.js"
></script>
<!-- custom script -->
<!-- custom script -->
<script
src=
"gadget_erp5_page_ojs_controller.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_erp5_page_ojs_controller.js"
type=
"text/javascript"
></script>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_controller_html.xml
View file @
3b15ad3d
...
@@ -229,7 +229,7 @@
...
@@ -229,7 +229,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
61.578.63257.59545
</string>
</value>
<value>
<string>
9
73.44981.11075.37051
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -247,7 +247,7 @@
...
@@ -247,7 +247,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
01163709.2
</float>
<float>
15
51184378.85
</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