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
Amer
erp5
Commits
379bd22d
Commit
379bd22d
authored
Mar 11, 2019
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
discussion tool: cleanup on controller gadget
parent
581c808b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
22 deletions
+8
-22
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_controller_js.js
...e_module/gadget_officejs_controller_page_controller_js.js
+6
-20
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_controller_js.xml
..._module/gadget_officejs_controller_page_controller_js.xml
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_controller_js.js
View file @
379bd22d
/*global document, window, rJS, RSVP, jIO */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
document
,
window
,
rJS
,
RSVP
,
jIO
,
console
,
XMLHttpRequest
)
{
(
function
(
document
,
window
,
rJS
,
RSVP
,
jIO
)
{
"
use strict
"
;
function
renderField
(
field_id
,
field_definition
,
document
)
{
...
...
@@ -16,7 +16,7 @@
if
(
tales_expr
!==
undefined
&&
tales_expr
!==
null
&&
tales_expr
!==
''
)
{
try
{
final_value
=
eval
(
tales_expr
);
}
catch
(
e
)
{}
// TALES expressions are usually python code, so ignore
}
catch
(
e
)
{}
// TALES expressions are usually python code, so
for now
ignore
}
if
(
final_value
===
undefined
)
{
if
(
override
!==
undefined
&&
override
!==
null
&&
override
!==
''
)
{
...
...
@@ -89,7 +89,6 @@
/////////////////////////////////////////////////////////////////
.
declareMethod
(
"
getFormDefinition
"
,
function
(
jio_key
)
{
//preparing a less hardcoded version, moving form definition to erp5 side
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
...
...
@@ -106,26 +105,12 @@
default_view_reference
:
setting_list
[
1
]
},
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
()
{
// manual request to hateoas script to test if the script json dict result is correctly cached in appcache
var
xmlHttp
=
new
XMLHttpRequest
(),
url
=
"
https://softinst112382.host.vifib.net/erp5/web_site_module/officejs_discussion_tool/hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_skins%2Ferp5_officejs_jio_connector%2FHTMLPost_viewAsJio&view=jio_view
"
;
xmlHttp
.
open
(
"
GET
"
,
url
,
false
);
// false for synchronous request
xmlHttp
.
send
(
null
);
return
JSON
.
parse
(
xmlHttp
.
responseText
);
})
return
jio_storage
.
get
(
form_path
)
.
push
(
function
(
result
)
{
//return result._embedded._view.my_form_definition["default"];
// jio.get ends up calling hateoas script
return
jio_storage
.
get
(
form_path
)
.
push
(
function
(
result
)
{
return
result
.
form_definition
;
});
return
result
.
form_definition
;
});
});
})
...
...
@@ -133,6 +118,7 @@
.
declareMethod
(
"
renderForm
"
,
function
(
form_definition
,
document
)
{
return
renderForm
(
form_definition
,
document
);
})
.
allowPublicAcquisition
(
'
submitContent
'
,
function
(
options
)
{
var
gadget
=
this
,
jio_key
=
options
[
0
],
...
...
@@ -245,4 +231,4 @@
});
});
}(
document
,
window
,
rJS
,
RSVP
,
jIO
,
console
,
XMLHttpRequest
));
\ 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 @
379bd22d
...
...
@@ -225,7 +225,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
974.1
2826.51404.40908
</string>
</value>
<value>
<string>
974.1
8369.12138.30429
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -243,7 +243,7 @@
</tuple>
<state>
<tuple>
<float>
155
1979865.57
</float>
<float>
155
2312445.03
</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