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
Paul Graydon
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
Show 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 @@
...
@@ -7,17 +7,19 @@
data-i18n=Your Certificate
data-i18n=Your Certificate
data-i18n=Your Key
data-i18n=Your Key
data-i18n=Request New Certificate
data-i18n=Request New Certificate
data-i18n=Title
-->
-->
<head>
<head>
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<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=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_erp5_page_slap_person_request_certificate.js"
></script>
<script
src=
"gadget_erp5_page_slap_person_request_certificate.js"
type=
"text/javascript"
></script>
</head>
</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 @@
...
@@ -287,7 +287,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
982.32516.46874.3959
</string>
</value>
<value>
<string>
1010.21499.31843.44083
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -307,7 +307,7 @@
...
@@ -307,7 +307,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1
584350630.01
</float>
<float>
1
691552889.43
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</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 @@
...
@@ -11,6 +11,8 @@
.
declareAcquiredMethod
(
"
updatePanel
"
,
"
updatePanel
"
)
.
declareAcquiredMethod
(
"
updatePanel
"
,
"
updatePanel
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
'
notifySubmitted
'
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
'
notifySubmitted
'
)
...
@@ -50,7 +52,12 @@
...
@@ -50,7 +52,12 @@
.
push
(
function
()
{
.
push
(
function
()
{
// Workaround, find a way to open document without break gadget.
// Workaround, find a way to open document without break gadget.
result
.
jio_key
=
doc
.
relative_url
;
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 @@
...
@@ -61,6 +68,24 @@
})
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
.
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
,
var
gadget
=
this
,
page_title_translation
,
page_title_translation
,
translation_list
=
[
translation_list
=
[
...
@@ -69,7 +94,8 @@
...
@@ -69,7 +94,8 @@
"
Parent Relative Url
"
,
"
Parent Relative Url
"
,
"
Your Certificate
"
,
"
Your Certificate
"
,
"
Your Key
"
,
"
Your Key
"
,
"
Request New Certificate
"
"
Request New Certificate
"
,
"
Title
"
];
];
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
.
push
(
function
()
{
...
@@ -82,13 +108,16 @@
...
@@ -82,13 +108,16 @@
gadget
.
msg1_translation
=
result
[
1
][
0
];
gadget
.
msg1_translation
=
result
[
1
][
0
];
gadget
.
msg2_translation
=
result
[
1
][
1
];
gadget
.
msg2_translation
=
result
[
1
][
1
];
page_title_translation
=
result
[
1
][
5
];
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
({
return
result
[
0
].
render
({
erp5_document
:
{
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
my_relative_url
"
:
{
"
my_relative_url
"
:
{
"
description
"
:
""
,
"
description
"
:
""
,
"
title
"
:
result
[
1
][
2
],
"
title
"
:
result
[
1
][
2
],
"
default
"
:
options
.
jio_key
,
"
default
"
:
gadget
.
state
.
jio_key
,
"
css_class
"
:
""
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
required
"
:
1
,
"
editable
"
:
1
,
"
editable
"
:
1
,
...
@@ -96,26 +125,37 @@
...
@@ -96,26 +125,37 @@
"
hidden
"
:
1
,
"
hidden
"
:
1
,
"
type
"
:
"
StringField
"
"
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
"
:
{
"
my_certificate
"
:
{
"
description
"
:
""
,
"
description
"
:
""
,
"
title
"
:
result
[
1
][
3
],
"
title
"
:
result
[
1
][
3
],
"
default
"
:
options
.
certificate
,
"
default
"
:
gadget
.
state
.
certificate
,
"
css_class
"
:
""
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
required
"
:
1
,
"
editable
"
:
1
,
"
editable
"
:
1
,
"
key
"
:
"
certificate
"
,
"
key
"
:
"
certificate
"
,
"
hidden
"
:
(
options
.
certificate
===
undefined
)
?
1
:
0
,
"
hidden
"
:
(
gadget
.
state
.
certificate
===
undefined
)
?
1
:
0
,
"
type
"
:
"
TextAreaField
"
"
type
"
:
"
TextAreaField
"
},
},
"
my_key
"
:
{
"
my_key
"
:
{
"
description
"
:
""
,
"
description
"
:
""
,
"
title
"
:
result
[
1
][
4
],
"
title
"
:
result
[
1
][
4
],
"
default
"
:
options
.
key
,
"
default
"
:
gadget
.
state
.
key
,
"
css_class
"
:
""
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
required
"
:
1
,
"
editable
"
:
1
,
"
editable
"
:
1
,
"
key
"
:
"
key
"
,
"
key
"
:
"
key
"
,
"
hidden
"
:
(
options
.
key
===
undefined
)
?
1
:
0
,
"
hidden
"
:
(
gadget
.
state
.
key
===
undefined
)
?
1
:
0
,
"
type
"
:
"
TextAreaField
"
"
type
"
:
"
TextAreaField
"
}
}
}},
}},
...
@@ -128,6 +168,10 @@
...
@@ -128,6 +168,10 @@
},
},
form_definition
:
{
form_definition
:
{
group_list
:
[[
group_list
:
[[
"
left
"
,
[[
"
my_title
"
]]
],
[
"
center
"
,
"
center
"
,
[[
"
my_key
"
],
[
"
my_certificate
"
],
[
"
my_relative_url
"
]]
[[
"
my_key
"
],
[
"
my_certificate
"
],
[
"
my_relative_url
"
]]
]]
]]
...
@@ -149,7 +193,7 @@
...
@@ -149,7 +193,7 @@
page_title
:
page_title_translation
,
page_title
:
page_title_translation
,
selection_url
:
url_list
[
0
]
selection_url
:
url_list
[
0
]
};
};
if
(
options
.
key
===
undefined
)
{
if
(
gadget
.
state
.
key
===
undefined
)
{
header_dict
.
submit_action
=
true
;
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 @@
...
@@ -283,7 +283,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1010.
19575.46252.59357
</string>
</value>
<value>
<string>
1010.
21512.39856.6519
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -303,7 +303,7 @@
...
@@ -303,7 +303,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1691
436974.71
</float>
<float>
1691
553296.49
</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