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
Carlos Ramos Carreño
slapos.core
Commits
2c603b2c
Commit
2c603b2c
authored
Jul 02, 2019
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: Add gadget to generate a invitation link to an Organisation
parent
7e382c9b
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
880 additions
and
2 deletions
+880
-2
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_organisation_get_invitation_link_html.html
...erp5_page_slap_organisation_get_invitation_link_html.html
+26
-0
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_organisation_get_invitation_link_html.xml
..._erp5_page_slap_organisation_get_invitation_link_html.xml
+365
-0
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_organisation_get_invitation_link_js.js
...get_erp5_page_slap_organisation_get_invitation_link_js.js
+120
-0
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_organisation_get_invitation_link_js.xml
...et_erp5_page_slap_organisation_get_invitation_link_js.xml
+361
-0
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_appcache.xml
...mplateItem/web_page_module/rjs_gadget_slapos_appcache.xml
+4
-2
master/bt5/slapos_jio/bt/template_keep_last_workflow_history_only_path_list
...jio/bt/template_keep_last_workflow_history_only_path_list
+2
-0
master/bt5/slapos_jio/bt/template_path_list
master/bt5/slapos_jio/bt/template_path_list
+2
-0
No files found.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_organisation_get_invitation_link_html.html
0 → 100644
View file @
2c603b2c
<!doctype html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
OfficeJS Add Text Document
</title>
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"gadget_erp5_page_slap_organisation_get_invitation_link.js"
></script>
</head>
<body>
<form
class=
"save_form ui-body-c"
novalidate
>
<button
type=
"submit"
class=
"ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right ui-screen-hidden"
></button>
<div
data-gadget-url=
"gadget_erp5_form.html"
data-gadget-scope=
"form_view"
data-gadget-sandbox=
"public"
>
</div>
</form>
</body>
</html>
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_organisation_get_invitation_link_html.xml
0 → 100644
View file @
2c603b2c
This diff is collapsed.
Click to expand it.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_organisation_get_invitation_link_js.js
0 → 100644
View file @
2c603b2c
/*global window, rJS, RSVP */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
)
{
"
use strict
"
;
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
jio_post
"
,
"
jio_post
"
)
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
'
notifySubmitted
'
)
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
allowPublicAcquisition
(
'
notifySubmit
'
,
function
()
{
return
this
.
triggerSubmit
();
})
.
onEvent
(
'
submit
'
,
function
()
{
var
gadget
=
this
;
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
})
.
push
(
function
(
form_gadget
)
{
return
form_gadget
.
getContent
();
})
.
push
(
function
(
doc
)
{
return
gadget
.
getSetting
(
"
hateoas_url
"
)
.
push
(
function
(
url
)
{
return
gadget
.
jio_getAttachment
(
doc
.
relative_url
,
url
+
doc
.
relative_url
+
"
/Base_getInvitationLink
"
);
})
.
push
(
function
(
result
)
{
return
gadget
.
notifySubmitted
({
message
:
"
New Invitation link generated.
"
,
status
:
'
success
'
})
.
push
(
function
()
{
// Workaround, find a way to open document without break gadget.
result
.
jio_key
=
doc
.
relative_url
;
return
gadget
.
render
(
result
);
});
});
});
})
.
declareMethod
(
"
triggerSubmit
"
,
function
()
{
return
this
.
element
.
querySelector
(
'
button[type="submit"]
'
).
click
();
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
;
return
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getDeclaredGadget
(
'
form_view
'
)
]);
})
.
push
(
function
(
result
)
{
return
result
[
0
].
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
my_relative_url
"
:
{
"
description
"
:
""
,
"
title
"
:
"
Parent Relative Url
"
,
"
default
"
:
options
.
jio_key
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
,
"
key
"
:
"
relative_url
"
,
"
hidden
"
:
1
,
"
type
"
:
"
StringField
"
},
"
my_invitation_link
"
:
{
"
description
"
:
""
,
"
title
"
:
"
Your Invitation Link
"
,
"
default
"
:
options
.
invitation_link
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
0
,
"
key
"
:
"
invitation_link
"
,
"
hidden
"
:
(
options
.
invitation_link
===
undefined
)
?
1
:
0
,
"
type
"
:
"
StringField
"
}
}},
"
_links
"
:
{
"
type
"
:
{
// form_list display portal_type in header
name
:
""
}
}
},
form_definition
:
{
group_list
:
[[
"
center
"
,
[[
"
my_invitation_link
"
],
[
"
my_relative_url
"
]]
]]
}
});
})
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getUrlFor
({
command
:
'
history_previous
'
})
]);
})
.
push
(
function
(
url_list
)
{
var
header_dict
=
{
page_title
:
"
Generate New Invitation Link
"
,
submit_action
:
true
,
selection_url
:
url_list
[
0
]
};
return
gadget
.
updateHeader
(
header_dict
);
});
});
}(
window
,
rJS
,
RSVP
));
\ No newline at end of file
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_organisation_get_invitation_link_js.xml
0 → 100644
View file @
2c603b2c
This diff is collapsed.
Click to expand it.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_appcache.xml
View file @
2c603b2c
...
@@ -259,6 +259,8 @@ gadget_erp5_page_slap_add_network.html\n
...
@@ -259,6 +259,8 @@ gadget_erp5_page_slap_add_network.html\n
gadget_erp5_page_slap_add_network.js\n
gadget_erp5_page_slap_add_network.js\n
gadget_erp5_page_slap_add_organisation.html\n
gadget_erp5_page_slap_add_organisation.html\n
gadget_erp5_page_slap_add_organisation.js\n
gadget_erp5_page_slap_add_organisation.js\n
gadget_erp5_page_slap_organisation_get_invitation_link.js\n
gadget_erp5_page_slap_organisation_get_invitation_link.html\n
gadget_erp5_page_slap_add_project.html\n
gadget_erp5_page_slap_add_project.html\n
gadget_erp5_page_slap_add_project.js\n
gadget_erp5_page_slap_add_project.js\n
gadget_erp5_page_slap_add_related_event.html\n
gadget_erp5_page_slap_add_related_event.html\n
...
@@ -569,7 +571,7 @@ NETWORK:\n
...
@@ -569,7 +571,7 @@ NETWORK:\n
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
976.4066
3.4126.2484
9
</string>
</value>
<value>
<string>
976.4066
6.4477.5969
9
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -587,7 +589,7 @@ NETWORK:\n
...
@@ -587,7 +589,7 @@ NETWORK:\n
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
156
1428124.08
</float>
<float>
156
2033682.52
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
master/bt5/slapos_jio/bt/template_keep_last_workflow_history_only_path_list
View file @
2c603b2c
...
@@ -17,6 +17,8 @@ web_page_module/rjs_gadget_erp5_page_slap_add_network_html
...
@@ -17,6 +17,8 @@ web_page_module/rjs_gadget_erp5_page_slap_add_network_html
web_page_module/rjs_gadget_erp5_page_slap_add_network_js
web_page_module/rjs_gadget_erp5_page_slap_add_network_js
web_page_module/rjs_gadget_erp5_page_slap_add_organisation_html
web_page_module/rjs_gadget_erp5_page_slap_add_organisation_html
web_page_module/rjs_gadget_erp5_page_slap_add_organisation_js
web_page_module/rjs_gadget_erp5_page_slap_add_organisation_js
web_page_module/rjs_gadget_erp5_page_slap_organisation_get_invitation_link_html
web_page_module/rjs_gadget_erp5_page_slap_organisation_get_invitation_link_js
web_page_module/rjs_gadget_erp5_page_slap_add_project_html
web_page_module/rjs_gadget_erp5_page_slap_add_project_html
web_page_module/rjs_gadget_erp5_page_slap_add_project_js
web_page_module/rjs_gadget_erp5_page_slap_add_project_js
web_page_module/rjs_gadget_erp5_page_slap_add_related_event_html
web_page_module/rjs_gadget_erp5_page_slap_add_related_event_html
...
...
master/bt5/slapos_jio/bt/template_path_list
View file @
2c603b2c
...
@@ -71,6 +71,8 @@ web_page_module/rjs_gadget_erp5_page_slap_load_schema_html
...
@@ -71,6 +71,8 @@ web_page_module/rjs_gadget_erp5_page_slap_load_schema_html
web_page_module/rjs_gadget_erp5_page_slap_load_schema_js
web_page_module/rjs_gadget_erp5_page_slap_load_schema_js
web_page_module/rjs_gadget_erp5_page_slap_network_list_html
web_page_module/rjs_gadget_erp5_page_slap_network_list_html
web_page_module/rjs_gadget_erp5_page_slap_network_list_js
web_page_module/rjs_gadget_erp5_page_slap_network_list_js
web_page_module/rjs_gadget_erp5_page_slap_organisation_get_invitation_link_html
web_page_module/rjs_gadget_erp5_page_slap_organisation_get_invitation_link_js
web_page_module/rjs_gadget_erp5_page_slap_organisation_view_html
web_page_module/rjs_gadget_erp5_page_slap_organisation_view_html
web_page_module/rjs_gadget_erp5_page_slap_organisation_view_js
web_page_module/rjs_gadget_erp5_page_slap_organisation_view_js
web_page_module/rjs_gadget_erp5_page_slap_parameter_form_css
web_page_module/rjs_gadget_erp5_page_slap_parameter_form_css
...
...
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