Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Ivan Tyagov
slapos.core
Commits
332b5582
Commit
332b5582
authored
Aug 09, 2023
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: use changeState rather them render directly
parent
304a9133
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
19 deletions
+65
-19
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_person_request_certificate_html.html
...adget_erp5_page_slap_person_request_certificate_html.html
+6
-4
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_person_request_certificate_html.xml
...gadget_erp5_page_slap_person_request_certificate_html.xml
+2
-2
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_person_request_certificate_js.js
...js_gadget_erp5_page_slap_person_request_certificate_js.js
+55
-11
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_person_request_certificate_js.xml
...s_gadget_erp5_page_slap_person_request_certificate_js.xml
+2
-2
No files found.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_person_request_certificate_html.html
View file @
332b5582
...
...
@@ -7,17 +7,19 @@
data-i18n=Your Certificate
data-i18n=Your Key
data-i18n=Request New Certificate
data-i18n=Title
-->
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
OfficeJS Add Text Document
</title>
<title>
Request New Certificate
</title>
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"gadget_erp5_page_slap_person_request_certificate.js"
></script>
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_erp5_page_slap_person_request_certificate.js"
type=
"text/javascript"
></script>
</head>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_person_request_certificate_html.xml
View file @
332b5582
...
...
@@ -287,7 +287,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
982.32516.46874.3959
</string>
</value>
<value>
<string>
1010.21499.31843.44083
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -307,7 +307,7 @@
</tuple>
<state>
<tuple>
<float>
1
584350630.01
</float>
<float>
1
691552889.43
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_person_request_certificate_js.js
View file @
332b5582
...
...
@@ -11,6 +11,8 @@
.
declareAcquiredMethod
(
"
updatePanel
"
,
"
updatePanel
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
'
notifySubmitted
'
)
...
...
@@ -50,7 +52,12 @@
.
push
(
function
()
{
// Workaround, find a way to open document without break gadget.
result
.
jio_key
=
doc
.
relative_url
;
return
gadget
.
render
(
result
);
return
gadget
.
changeState
({
jio_key
:
doc
.
relative_url
,
certificate
:
result
.
certificate
,
key
:
result
.
key
,
title
:
doc
.
title
});
});
});
});
...
...
@@ -61,6 +68,24 @@
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
,
jio_key
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
jio_key
=
options
.
jio_key
;
return
gadget
.
jio_get
(
jio_key
);
})
.
push
(
function
(
doc
)
{
return
gadget
.
changeState
({
jio_key
:
jio_key
,
doc
:
doc
,
editable
:
1
});
});
})
.
onStateChange
(
function
()
{
var
gadget
=
this
,
page_title_translation
,
translation_list
=
[
...
...
@@ -69,7 +94,8 @@
"
Parent Relative Url
"
,
"
Your Certificate
"
,
"
Your Key
"
,
"
Request New Certificate
"
"
Request New Certificate
"
,
"
Title
"
];
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
...
...
@@ -82,13 +108,16 @@
gadget
.
msg1_translation
=
result
[
1
][
0
];
gadget
.
msg2_translation
=
result
[
1
][
1
];
page_title_translation
=
result
[
1
][
5
];
if
(
gadget
.
state
.
title
===
undefined
)
{
gadget
.
state
.
title
=
gadget
.
state
.
doc
.
first_name
+
"
"
+
gadget
.
state
.
doc
.
last_name
;
}
return
result
[
0
].
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
my_relative_url
"
:
{
"
description
"
:
""
,
"
title
"
:
result
[
1
][
2
],
"
default
"
:
options
.
jio_key
,
"
default
"
:
gadget
.
state
.
jio_key
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
,
...
...
@@ -96,26 +125,37 @@
"
hidden
"
:
1
,
"
type
"
:
"
StringField
"
},
"
my_title
"
:
{
"
description
"
:
""
,
"
title
"
:
result
[
1
][
6
],
"
default
"
:
gadget
.
state
.
title
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
0
,
"
key
"
:
"
title
"
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_certificate
"
:
{
"
description
"
:
""
,
"
title
"
:
result
[
1
][
3
],
"
default
"
:
options
.
certificate
,
"
default
"
:
gadget
.
state
.
certificate
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
,
"
key
"
:
"
certificate
"
,
"
hidden
"
:
(
options
.
certificate
===
undefined
)
?
1
:
0
,
"
hidden
"
:
(
gadget
.
state
.
certificate
===
undefined
)
?
1
:
0
,
"
type
"
:
"
TextAreaField
"
},
"
my_key
"
:
{
"
description
"
:
""
,
"
title
"
:
result
[
1
][
4
],
"
default
"
:
options
.
key
,
"
default
"
:
gadget
.
state
.
key
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
,
"
key
"
:
"
key
"
,
"
hidden
"
:
(
options
.
key
===
undefined
)
?
1
:
0
,
"
hidden
"
:
(
gadget
.
state
.
key
===
undefined
)
?
1
:
0
,
"
type
"
:
"
TextAreaField
"
}
}},
...
...
@@ -128,9 +168,13 @@
},
form_definition
:
{
group_list
:
[[
"
center
"
,
[[
"
my_key
"
],
[
"
my_certificate
"
],
[
"
my_relative_url
"
]]
]]
"
left
"
,
[[
"
my_title
"
]]
],
[
"
center
"
,
[[
"
my_key
"
],
[
"
my_certificate
"
],
[
"
my_relative_url
"
]]
]]
}
});
})
...
...
@@ -149,7 +193,7 @@
page_title
:
page_title_translation
,
selection_url
:
url_list
[
0
]
};
if
(
options
.
key
===
undefined
)
{
if
(
gadget
.
state
.
key
===
undefined
)
{
header_dict
.
submit_action
=
true
;
}
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_person_request_certificate_js.xml
View file @
332b5582
...
...
@@ -283,7 +283,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1010.
19575.46252.59357
</string>
</value>
<value>
<string>
1010.
21512.39856.6519
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -303,7 +303,7 @@
</tuple>
<state>
<tuple>
<float>
1691
436974.71
</float>
<float>
1691
553296.49
</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