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
0
Issues
0
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
Yoji Takeuchi
erp5
Commits
38476d1b
Commit
38476d1b
authored
Feb 14, 2019
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: -discussion tool- moving form definition to erp5 form
parent
ce37ac0a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
10 deletions
+31
-10
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_controller_js.js
...e_module/gadget_officejs_controller_page_controller_js.js
+27
-4
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
+2
-4
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_controller_js.js
View file @
38476d1b
/*global document, window, rJS, RSVP */
/*global document, window, rJS, RSVP
, jIO
*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
document
,
window
,
rJS
,
RSVP
)
{
(
function
(
document
,
window
,
rJS
,
RSVP
,
jIO
)
{
"
use strict
"
;
rJS
(
window
)
...
...
@@ -11,6 +11,7 @@
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
jio_put
"
,
"
jio_put
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
'
notifySubmitted
'
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
...
...
@@ -20,6 +21,27 @@
/////////////////////////////////////////////////////////////////
.
declareMethod
(
"
getFormDefinition
"
,
function
()
{
//preparing a less hardcoded version, moving form definition to erp5 side
/*var gadget = this;
return new RSVP.Queue()
.push(function () {
return RSVP.all([
gadget.getSetting('hateoas_url'),
gadget.getSetting('default_view_reference')
]);
})
.push(function (setting_list) {
var jio_options = {
type: "erp5",
url: setting_list[0],
default_view_reference: setting_list[1]
},
jio_storage = jIO.createJIO(jio_options);
return jio_storage.get('portal_skins/erp5_officejs_jio_connector/HTMLPost_viewAsJio')
.push(function (result) {
return result.form_definition;
});
});*/
//somehow the form_definition should come from the erp5-doc/form (jio?)
//for now, hardcoded form_definition for POST VIEW
return
{
...
...
@@ -74,6 +96,8 @@
my_element
=
fields
[
j
][
0
];
if
(
my_element
.
startsWith
(
"
my_
"
))
{
element_id
=
my_element
.
replace
(
"
my_
"
,
""
);
}
else
if
(
my_element
.
startsWith
(
"
your_
"
))
{
element_id
=
my_element
.
replace
(
"
your_
"
,
""
);
}
field_info
=
form_definition
.
field_info_dict
[
my_element
];
if
(
document
&&
document
.
hasOwnProperty
(
element_id
))
{
...
...
@@ -161,7 +185,6 @@
}
else
{
throw
new
Error
(
'
Can not display document:
'
+
options
.
jio_key
);
}
//somehow the form_definition should come from the erp5-doc/form (jio?)
return
gadget
.
getFormDefinition
(
options
.
jio_key
)
.
push
(
function
(
form_definition
)
{
return
gadget
.
changeState
({
...
...
@@ -199,4 +222,4 @@
});
});
}(
document
,
window
,
rJS
,
RSVP
));
\ No newline at end of file
}(
document
,
window
,
rJS
,
RSVP
,
jIO
));
\ No newline at end of file
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_controller_js.xml
View file @
38476d1b
...
...
@@ -227,7 +227,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
973.
33799.59117.25480
</string>
</value>
<value>
<string>
973.
43856.29209.60757
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -245,7 +245,7 @@
</tuple>
<state>
<tuple>
<float>
15
49565293.34
</float>
<float>
15
50168687.51
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_discussion_tool_appcache.xml
View file @
38476d1b
...
...
@@ -226,8 +226,6 @@ gadget_erp5_page_ojs_controller.html\n
gadget_erp5_page_ojs_controller.js\n
gadget_erp5_page_ojs_post_list.html\n
gadget_erp5_page_ojs_post_list.js\n
#gadget_officejs_jio_html_post_view.html\n
#gadget_officejs_jio_html_post_view.js\n
gadget_erp5_page_ojs_add_post.html\n
gadget_erp5_page_ojs_add_post.js\n
\n
...
...
@@ -714,7 +712,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
973.
33828.18786.32665
</string>
</value>
<value>
<string>
973.
42204.3106.62924
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -732,7 +730,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>
15
49567442.36
</float>
<float>
15
50168931.13
</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