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
5d19966a
Commit
5d19966a
authored
Apr 19, 2019
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: some code cleanup
parent
f64c3237
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
50 additions
and
52 deletions
+50
-52
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_controller_js.js
...e_module/gadget_officejs_controller_page_controller_js.js
+27
-27
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_form_view_js.js
...plateItem/web_page_module/gadget_officejs_form_view_js.js
+5
-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_offline_js.js
...web_page_module/gadget_officejs_page_action_offline_js.js
+2
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_action_offline_js.xml
...eb_page_module/gadget_officejs_page_action_offline_js.xml
+1
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_handle_action_js.js
.../web_page_module/gadget_officejs_page_handle_action_js.js
+9
-15
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_handle_action_js.xml
...web_page_module/gadget_officejs_page_handle_action_js.xml
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_controller_js.js
View file @
5d19966a
/*global
document, window, rJS, RSVP
*/
/*global
window, rJS
*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
document
,
window
,
rJS
,
RSVP
)
{
(
function
(
window
,
rJS
)
{
"
use strict
"
;
"
use strict
"
;
var
default_view
=
"
jio_view
"
,
var
default_view
=
"
jio_view
"
,
...
@@ -64,4 +64,4 @@
...
@@ -64,4 +64,4 @@
return
gadget_utils
.
renderGadget
(
this
);
return
gadget_utils
.
renderGadget
(
this
);
});
});
}(
document
,
window
,
rJS
,
RSVP
));
}(
window
,
rJS
));
\ No newline at end of file
\ No newline at end of file
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_controller_js.xml
View file @
5d19966a
...
@@ -225,7 +225,7 @@
...
@@ -225,7 +225,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
97
4.64565.20677.40089
</string>
</value>
<value>
<string>
97
5.9054.53655.8977
</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>
15556
26551.51
</float>
<float>
15556
85699.99
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_form_view_js.js
View file @
5d19966a
...
@@ -67,7 +67,9 @@
...
@@ -67,7 +67,9 @@
title
:
"
Untitled Document
"
,
title
:
"
Untitled Document
"
,
portal_type
:
options
.
portal_type
,
portal_type
:
options
.
portal_type
,
parent_relative_url
:
options
.
parent_relative_url
parent_relative_url
:
options
.
parent_relative_url
},
key
,
doc_key
,
doc_id
;
},
key
,
doc_key
;
for
(
key
in
options
)
{
for
(
key
in
options
)
{
if
(
options
.
hasOwnProperty
(
key
))
{
if
(
options
.
hasOwnProperty
(
key
))
{
if
(
key
.
startsWith
(
"
my_
"
))
{
if
(
key
.
startsWith
(
"
my_
"
))
{
...
@@ -133,7 +135,8 @@
...
@@ -133,7 +135,8 @@
.
declareMethod
(
"
renderGadget
"
,
function
(
target_gadget
)
{
.
declareMethod
(
"
renderGadget
"
,
function
(
target_gadget
)
{
var
fragment
=
document
.
createElement
(
'
div
'
),
var
fragment
=
document
.
createElement
(
'
div
'
),
gadget
=
this
,
form_json
;
gadget
=
this
,
form_json
;
return
gadget
.
renderForm
(
target_gadget
.
state
.
form_definition
,
target_gadget
.
state
.
doc
)
return
gadget
.
renderForm
(
target_gadget
.
state
.
form_definition
,
target_gadget
.
state
.
doc
)
.
push
(
function
(
json
)
{
.
push
(
function
(
json
)
{
form_json
=
json
;
form_json
=
json
;
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_form_view_js.xml
View file @
5d19966a
...
@@ -269,7 +269,7 @@
...
@@ -269,7 +269,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
975.
7931.50394.10308
</string>
</value>
<value>
<string>
975.
9052.17383.43895
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -287,7 +287,7 @@
...
@@ -287,7 +287,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15556
18316.02
</float>
<float>
15556
85570.38
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_action_offline_js.js
View file @
5d19966a
...
@@ -55,7 +55,8 @@
...
@@ -55,7 +55,8 @@
.
declareMethod
(
"
render
"
,
function
(
options
)
{
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
,
var
gadget
=
this
,
action_info_list
=
[],
action_info_list
=
[],
document_title
,
portal_type
;
document_title
,
portal_type
;
return
gadget
.
jio_get
(
options
.
jio_key
)
return
gadget
.
jio_get
(
options
.
jio_key
)
.
push
(
function
(
document
)
{
.
push
(
function
(
document
)
{
var
parent
=
"
portal_types/
"
+
document
.
portal_type
,
var
parent
=
"
portal_types/
"
+
document
.
portal_type
,
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_action_offline_js.xml
View file @
5d19966a
...
@@ -246,7 +246,7 @@
...
@@ -246,7 +246,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1555
418496.64
</float>
<float>
1555
685607.37
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_handle_action_js.js
View file @
5d19966a
/*global window, rJS, RSVP */
/*global window, rJS, RSVP */
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
document
,
window
,
rJS
,
RSVP
)
{
/*jslint evil: true */
(
function
(
window
,
rJS
,
RSVP
)
{
"
use strict
"
;
"
use strict
"
;
var
gadget_utils
,
action_reference
,
action_type
;
var
gadget_utils
,
action_reference
,
action_type
;
...
@@ -43,19 +45,12 @@
...
@@ -43,19 +45,12 @@
if
(
action_type
===
"
object_jio_js_script
"
)
{
if
(
action_type
===
"
object_jio_js_script
"
)
{
if
(
form_definition
.
fields_raw_properties
.
hasOwnProperty
(
"
gadget_field_action_js_script
"
))
{
if
(
form_definition
.
fields_raw_properties
.
hasOwnProperty
(
"
gadget_field_action_js_script
"
))
{
action_code
=
form_definition
.
fields_raw_properties
.
gadget_field_action_js_script
.
values
.
renderjs_extra
[
0
];
action_code
=
form_definition
.
fields_raw_properties
.
gadget_field_action_js_script
.
values
.
renderjs_extra
[
0
];
return
window
.
eval
.
call
(
window
,
'
(function (gadget, gadget_utils, options,
\
return
window
.
eval
.
call
(
window
,
'
(function (gadget, gadget_utils, options, action_reference, parent_portal_type, form_definition, submit_code) {
'
+
action_code
[
0
]
+
'
})
'
)(
gadget
,
gadget_utils
,
options
,
action_reference
,
parent_portal_type
,
form_definition
,
action_code
[
1
]);
action_reference, parent_portal_type,
\
}
else
{
form_definition, submit_code)
\
throw
"
Field 'gadget_field_action_js_script' missing in action form. Please check '
"
+
action_reference
+
"
' action configuration.
"
;
{
'
+
action_code
[
0
]
+
'
})
'
)
(
gadget
,
gadget_utils
,
options
,
action_reference
,
parent_portal_type
,
form_definition
,
action_code
[
1
]);
}
else
{
throw
"
Field 'gadget_field_action_js_script' missing in action
\
form. Please check '
"
+
action_reference
+
"
' action configuration.
"
;
}
}
}
else
{
}
else
{
throw
"
Action type must be 'object_jio_js_script'. Please check
\
throw
"
Action type must be 'object_jio_js_script'. Please check '
"
+
action_reference
+
"
' action configuration.
"
;
'
"
+
action_reference
+
"
' action configuration.
"
;
}
}
});
});
});
});
...
@@ -81,8 +76,7 @@
...
@@ -81,8 +76,7 @@
content_dict
=
options
[
2
],
content_dict
=
options
[
2
],
submit_code
=
gadget
.
state
.
submit_code
;
submit_code
=
gadget
.
state
.
submit_code
;
if
(
action_type
===
"
object_jio_js_script
"
)
{
if
(
action_type
===
"
object_jio_js_script
"
)
{
return
window
.
eval
.
call
(
window
,
'
(function (gadget, gadget_utils, jio_key, content_dict)
\
return
window
.
eval
.
call
(
window
,
'
(function (gadget, gadget_utils, jio_key, content_dict) {
'
+
submit_code
+
'
})
'
)(
gadget
,
gadget_utils
,
jio_key
,
content_dict
);
{
'
+
submit_code
+
'
})
'
)(
gadget
,
gadget_utils
,
jio_key
,
content_dict
);
}
}
});
});
}(
document
,
window
,
rJS
,
RSVP
));
}(
window
,
rJS
,
RSVP
));
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_handle_action_js.xml
View file @
5d19966a
...
@@ -269,7 +269,7 @@
...
@@ -269,7 +269,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
975.
7932.44543.51438
</string>
</value>
<value>
<string>
975.
9050.9155.58845
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -287,7 +287,7 @@
...
@@ -287,7 +287,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15556
18542.84
</float>
<float>
15556
85432.75
</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