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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Vincent Bechu
erp5
Commits
84348d7e
Commit
84348d7e
authored
Apr 16, 2018
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_travel_expense: add storage selection
parent
b63d0819
Changes
22
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
3539 additions
and
18 deletions
+3539
-18
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_appcache.xml
...e/PathTemplateItem/web_page_module/gadget_hr_appcache.xml
+11
-4
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_configurator_html.html
...web_page_module/gadget_hr_page_jio_configurator_html.html
+79
-0
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_configurator_html.xml
.../web_page_module/gadget_hr_page_jio_configurator_html.xml
+330
-0
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_configurator_js.js
...tem/web_page_module/gadget_hr_page_jio_configurator_js.js
+128
-0
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_configurator_js.xml
...em/web_page_module/gadget_hr_page_jio_configurator_js.xml
+330
-0
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_dav_configurator_html.html
...page_module/gadget_hr_page_jio_dav_configurator_html.html
+75
-0
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_dav_configurator_html.xml
..._page_module/gadget_hr_page_jio_dav_configurator_html.xml
+328
-0
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_dav_configurator_js.js
...web_page_module/gadget_hr_page_jio_dav_configurator_js.js
+136
-0
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_dav_configurator_js.xml
...eb_page_module/gadget_hr_page_jio_dav_configurator_js.xml
+329
-0
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_erp5_configurator_html.html
...age_module/gadget_hr_page_jio_erp5_configurator_html.html
+72
-0
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_erp5_configurator_html.xml
...page_module/gadget_hr_page_jio_erp5_configurator_html.xml
+330
-0
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_erp5_configurator_js.js
...eb_page_module/gadget_hr_page_jio_erp5_configurator_js.js
+175
-0
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_erp5_configurator_js.xml
...b_page_module/gadget_hr_page_jio_erp5_configurator_js.xml
+329
-0
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_html.html
...TemplateItem/web_page_module/gadget_hr_page_jio_html.html
+20
-0
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_html.xml
...hTemplateItem/web_page_module/gadget_hr_page_jio_html.xml
+330
-0
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_js.js
...PathTemplateItem/web_page_module/gadget_hr_page_jio_js.js
+135
-0
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_js.xml
...athTemplateItem/web_page_module/gadget_hr_page_jio_js.xml
+329
-0
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_panel_html.html
...athTemplateItem/web_page_module/gadget_hr_panel_html.html
+1
-0
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_panel_html.xml
...PathTemplateItem/web_page_module/gadget_hr_panel_html.xml
+2
-2
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_router_html.html
...thTemplateItem/web_page_module/gadget_hr_router_html.html
+0
-1
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_router_html.xml
...athTemplateItem/web_page_module/gadget_hr_router_html.xml
+4
-4
bt5/erp5_travel_expense/PathTemplateItem/web_site_module/officejs_hr.xml
..._expense/PathTemplateItem/web_site_module/officejs_hr.xml
+66
-7
No files found.
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_appcache.xml
View file @
84348d7e
...
@@ -172,6 +172,13 @@ gadget_officejs_page_add_travel_request_record.js\n
...
@@ -172,6 +172,13 @@ gadget_officejs_page_add_travel_request_record.js\n
gadget_officejs_jio_travel_request_record_view.html\n
gadget_officejs_jio_travel_request_record_view.html\n
gadget_officejs_jio_travel_request_record_view.js\n
gadget_officejs_jio_travel_request_record_view.js\n
\n
\n
gadget_officejs_page_jio_configurator.html\n
gadget_officejs_page_jio_configurator.js\n
gadget_officejs_page_jio_erp5_configurator.html\n
gadget_officejs_page_jio_erp5_configurator.js\n
gadget_officejs_page_jio_dav_configurator.html\n
gadget_officejs_page_jio_dav_configurator.js\n
\n
\n
\n
gadget_officejs_page_expense_sheet_list.html\n
gadget_officejs_page_expense_sheet_list.html\n
gadget_officejs_page_expense_sheet_list.js\n
gadget_officejs_page_expense_sheet_list.js\n
...
@@ -195,8 +202,8 @@ gadget_officejs_hr_panel.html\n
...
@@ -195,8 +202,8 @@ gadget_officejs_hr_panel.html\n
gadget_officejs_application_panel.js\n
gadget_officejs_application_panel.js\n
chartist.min.js\n
chartist.min.js\n
chartist.min.css\n
chartist.min.css\n
gadget_hr_jio.html\n
gadget_
officejs_
hr_jio.html\n
gadget_hr_jio.js\n
gadget_
officejs_
hr_jio.js\n
gadget_officejs_jio_text_post.html\n
gadget_officejs_jio_text_post.html\n
gadget_officejs_jio_text_post.js\n
gadget_officejs_jio_text_post.js\n
\n
\n
...
@@ -350,7 +357,7 @@ NETWORK:\n
...
@@ -350,7 +357,7 @@ NETWORK:\n
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
966.5412
5.49590.58624
</string>
</value>
<value>
<string>
966.5412
8.62182.28825
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -368,7 +375,7 @@ NETWORK:\n
...
@@ -368,7 +375,7 @@ NETWORK:\n
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1523605
496.88
</float>
<float>
1523605
559.57
</float>
<string>
GMT+2
</string>
<string>
GMT+2
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_configurator_html.html
0 → 100644
View file @
84348d7e
<!DOCTYPE html>
<html>
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no"
/>
<title>
OfficeJS Router Gadget
</title>
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<script
src=
"gadget_officejs_page_jio_configurator.js"
type=
"text/javascript"
></script>
</head>
<body>
<article
class=
"ui-content ui-body-c message"
style=
"display: none;"
>
<section
class=
"ui-content-header-plain"
>
<h3
class=
"ui-content-title ui-body-c"
style=
"color: #085078;"
>
<span
class=
"ui-icon ui-icon-custom ui-icon-info-circle"
>
</span>
</3>
</section>
</article>
<article
class=
"ui-content ui-body-c document-access"
>
<section
class=
"ui-content-header-plain"
>
<h3
class=
"ui-content-title ui-body-c"
>
<span
class=
"ui-icon ui-icon-custom ui-icon-file-text-o"
>
</span>
Your Documents
</h3>
</section>
<section
class=
"ui-body-c ui-content-section"
>
<p
style=
"color: red"
>
Continue by
<b>
synchronizing
</b>
with your remote storage or
<b>
accessing
</b>
your documents
</p>
<div
class=
"ui-controlgroup ui-controlgroup-horizontal"
>
<div
class=
"ui-grid-a ui-responsive"
>
<div
class=
"ui-block-a"
>
<a
class=
"ui-btn"
href=
"#page=sync&auto_repair=true"
data-i18n=
"Synchronize"
>
Synchronize
</a>
</div>
<div
class=
"ui-block-b"
>
<a
class=
"ui-btn"
href=
"#page=hr_front"
data-i18n=
"Go to document List"
>
Access document List
</a>
</div>
</div>
</div>
</section>
</article>
<article
class=
"ui-content ui-body-c"
>
<section
class=
"ui-content-header-plain"
>
<h3
class=
"ui-content-title ui-body-c"
>
<span
class=
"ui-icon ui-icon-custom ui-icon-database"
>
</span>
Your Storage Choice
</h3>
</section>
<section
class=
"ui-body-c ui-content-section"
>
<p>
Select a storage to synchronize your data with
</p>
<!--div class="select-storage ui-controlgroup ui-controlgroup-horizontal"-->
<div
class=
"ui-grid-b ui-responsive"
>
<div
class=
"ui-block-a"
>
<form
class=
"select-dav-form"
style=
"margin-right: .3125em; margin-left: .3125em;"
>
<button
class=
"ui-btn ui-btn-b"
type=
"submit"
data-i18n=
"DAV Storage"
>
DAV Storage
</button>
</form>
</div>
<div
class=
"ui-block-b"
>
<form
class=
"select-erp5-form"
style=
"margin-right: .3125em; margin-left: .3125em;"
>
<button
class=
"ui-btn ui-btn-b"
type=
"submit"
data-i18n=
"ERP5"
>
ERP5
</button>
</form>
</div>
<div
class=
"ui-block-c"
>
<form
class=
"select-local-form"
style=
"margin-right: .3125em; margin-left: .3125em;"
>
<button
class=
"ui-btn ui-btn-b"
type=
"submit"
data-i18n=
"Local is Enough"
>
Local is Enough
</button>
</form>
</div>
</div>
<!--/div-->
</section>
</article>
</body>
</html>
\ No newline at end of file
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_configurator_html.xml
0 → 100644
View file @
84348d7e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web Page"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Change_local_roles_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_officejs_page_jio_configurator.html
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
gadget_hr_page_jio_configurator_html
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Gadget HR Jio Configurator
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
document_publication_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
edit_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
processing_status_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
publish_alive
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523377871.35
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
published_alive
</string>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
edit
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
966.52960.48271.18005
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
<value>
<string>
current
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523607812.4
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_processing_state
</string>
</key>
<value>
<string>
empty
</string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
0.0.0.0
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523377779.51
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_configurator_js.js
0 → 100644
View file @
84348d7e
/*global window, document, rJS, RSVP, URI, location,
loopEventListener*/
/*jslint nomen: true, indent: 2, maxerr: 3*/
(
function
(
window
,
rJS
,
RSVP
)
{
"
use strict
"
;
function
setERP5Configuration
(
gadget
)
{
return
gadget
.
redirect
({
page
:
'
jio_erp5_configurator
'
});
}
function
setLocalConfiguration
(
gadget
)
{
var
configuration
=
{
type
:
"
query
"
,
sub_storage
:
{
type
:
"
uuid
"
,
sub_storage
:
{
type
:
"
indexeddb
"
,
database
:
"
officejs
"
}
}
};
return
gadget
.
setSetting
(
'
jio_storage_description
'
,
configuration
)
.
push
(
function
()
{
return
gadget
.
setSetting
(
'
jio_storage_name
'
,
"
LOCAL
"
);
})
.
push
(
function
()
{
return
gadget
.
reload
();
})
.
push
(
function
()
{
return
gadget
.
redirect
({
page
:
'
sync
'
,
auto_repair
:
'
true
'
});
});
}
function
setDAVConfiguration
(
gadget
)
{
return
gadget
.
redirect
({
page
:
'
jio_dav_configurator
'
});
}
var
gadget_klass
=
rJS
(
window
);
gadget_klass
.
ready
(
function
(
g
)
{
g
.
props
=
{};
return
g
.
getElement
()
.
push
(
function
(
element
)
{
g
.
props
.
element
=
element
;
g
.
props
.
deferred
=
RSVP
.
defer
();
});
})
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
translateHtml
"
,
"
translateHtml
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
reload
"
,
"
reload
"
)
.
declareAcquiredMethod
(
"
setSetting
"
,
"
setSetting
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareMethod
(
"
render
"
,
function
()
{
var
gadget
=
this
;
return
gadget
.
updateHeader
({
title
:
"
Storage Configuration
"
}).
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getSetting
(
'
jio_storage_name
'
),
gadget
.
getSetting
(
'
application_title
'
)
]);
}).
push
(
function
(
setting_list
)
{
switch
(
setting_list
[
0
])
{
case
"
ERP5
"
:
gadget
.
props
.
element
.
querySelector
(
"
form.select-erp5-form button
"
).
classList
.
add
(
"
ui-btn-active
"
);
break
;
case
"
DAV
"
:
gadget
.
props
.
element
.
querySelector
(
"
form.select-dav-form button
"
).
classList
.
add
(
"
ui-btn-active
"
);
break
;
case
"
LOCAL
"
:
gadget
.
props
.
element
.
querySelector
(
"
form.select-local-form button
"
).
classList
.
add
(
"
ui-btn-active
"
);
break
;
default
:
gadget
.
props
.
element
.
querySelector
(
"
.message h3
"
).
appendChild
(
document
.
createTextNode
(
"
Welcome in OfficeJS
"
+
setting_list
[
1
]
+
"
. Please start by choosing a storage.
"
));
gadget
.
props
.
element
.
querySelector
(
"
.message
"
).
setAttribute
(
"
style
"
,
""
);
gadget
.
props
.
element
.
querySelector
(
"
.document-access
"
).
setAttribute
(
"
style
"
,
"
display: none;
"
);
break
;
}
return
;
}).
push
(
function
()
{
return
gadget
.
props
.
deferred
.
resolve
();
});
})
/////////////////////////////////////////
// Form submit
/////////////////////////////////////////
.
declareService
(
function
()
{
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
props
.
deferred
.
promise
;
})
.
push
(
function
()
{
return
RSVP
.
all
([
loopEventListener
(
gadget
.
props
.
element
.
querySelector
(
'
form.select-erp5-form
'
),
'
submit
'
,
true
,
function
()
{
return
setERP5Configuration
(
gadget
);
}
),
loopEventListener
(
gadget
.
props
.
element
.
querySelector
(
'
form.select-local-form
'
),
'
submit
'
,
true
,
function
()
{
return
setLocalConfiguration
(
gadget
);
}
),
loopEventListener
(
gadget
.
props
.
element
.
querySelector
(
'
form.select-dav-form
'
),
'
submit
'
,
true
,
function
()
{
return
setDAVConfiguration
(
gadget
);
}
)
]);
});
});
}(
window
,
rJS
,
RSVP
));
\ No newline at end of file
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_configurator_js.xml
0 → 100644
View file @
84348d7e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web Script"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Change_local_roles_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/javascript
</string>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_officejs_page_jio_configurator.js
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
gadget_hr_page_jio_configurator_js
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Gadget HR Jio Configurator JS
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
document_publication_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
edit_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
processing_status_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
publish_alive
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523377897.58
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
published_alive
</string>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
edit
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
966.51247.9185.33604
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
<value>
<string>
current
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523433333.88
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_processing_state
</string>
</key>
<value>
<string>
empty
</string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
0.0.0.0
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523377878.31
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_dav_configurator_html.html
0 → 100644
View file @
84348d7e
<!doctype html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
OfficeJS jIO DAV Configurator Page
</title>
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"gadget_officejs_page_jio_dav_configurator.js"
></script>
</head>
<body>
<article
class=
"ui-content ui-body-c"
>
<section
class=
"ui-content-header-plain"
>
<h3
class=
"ui-content-title ui-body-c"
>
<span
class=
"ui-icon ui-icon-custom ui-icon-database"
>
</span>
Your WebDAV Connection parameters
</h3>
</section>
<section
class=
"ui-body-c ui-content-section"
>
<form
class=
"dav-configuration-form"
>
<div
class=
"ui-form"
>
<div
class=
"ui-field-contain"
>
<label
data-i18n=
"Connection URL:"
>
Connection URL:
</label>
<input
type=
"url"
name=
"dav_url"
required
value=
""
/>
</div>
<div
class=
"ui-field-contain"
>
<label
data-i18n=
"Username:"
>
Username:
</label>
<input
type=
"text"
name=
"dav_username"
value=
""
/>
</div>
<div
class=
"ui-field-contain"
>
<label
data-i18n=
"Password:"
>
Password:
</label>
<input
type=
"password"
name=
"dav_password"
value=
""
/>
</div>
</div>
<div
class=
"select-storage ui-controlgroup ui-controlgroup-horizontal"
>
<div
class=
"ui-grid-b ui-responsive"
>
<div
class=
"ui-block-a"
></div>
<div
class=
"ui-block-b"
></div>
<div
class=
"ui-block-c"
>
<button
type=
"submit"
data-i18n=
"Connect"
class=
"ui-btn-btn-right"
>
Connect
</button>
</div>
</div>
</div>
</form>
</section>
</article>
<article
class=
"ui-content ui-body-c document-access"
>
<section
class=
"ui-content-header-plain"
>
<h3
class=
"ui-content-title ui-body-c"
>
<span
class=
"ui-icon ui-icon-custom ui-icon-file-text-o"
>
</span>
Your Documents
</h3>
</section>
<section
class=
"ui-body-c ui-content-section"
>
<p
style=
"color: red"
>
Continue by
<b>
synchronizing
</b>
with your remote storage or
<b>
accessing
</b>
your documents
</p>
<div
class=
"ui-controlgroup ui-controlgroup-horizontal"
>
<div
class=
"ui-grid-a ui-responsive"
>
<div
class=
"ui-block-a"
>
<a
class=
"ui-btn"
href=
"#page=sync"
data-i18n=
"Synchronize"
>
Synchronize
</a>
</div>
<div
class=
"ui-block-b"
>
<a
class=
"ui-btn"
href=
"#page=hr_front"
data-i18n=
"Go to document List"
>
Access document List
</a>
</div>
</div>
</div>
</section>
</article>
</body>
</html>
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_dav_configurator_html.xml
0 → 100644
View file @
84348d7e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web Page"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Change_local_roles_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_officejs_page_jio_dav_configurator.html
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Jio access
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
gadget_hr_page_jio_dav_configurator_html
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Jio Gadget for HR
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
001
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
document_publication_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
edit_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
processing_status_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
publish_alive
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523378196.05
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
published_alive
</string>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
edit
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
966.52963.42678.61491
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
<value>
<string>
current
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523537141.09
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
detect_converted_file
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_processing_state
</string>
</key>
<value>
<string>
converted
</string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
0.0.0.0
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523377946.87
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_dav_configurator_js.js
0 → 100644
View file @
84348d7e
/*global window, rJS, RSVP, URI, location,
loopEventListener, btoa */
/*jslint nomen: true, indent: 2, maxerr: 3*/
(
function
(
window
,
rJS
,
RSVP
)
{
"
use strict
"
;
function
setjIODAVConfiguration
(
gadget
)
{
return
gadget
.
getSetting
(
"
portal_type
"
)
.
push
(
function
(
portal_type
)
{
var
old_date
=
new
Date
(),
configuration
=
{};
// We are looking for documents modified in the past 3 month
old_date
=
new
Date
(
old_date
.
getFullYear
(),
old_date
.
getMonth
()
-
3
);
configuration
=
{
type
:
"
replicate
"
,
// XXX This drop the signature lists...
query
:
{
query
:
'
(portal_type: "Expense Record" AND (simulation_state:"draft" OR simulation_state:"sent" OR simulation_state:"stopped"))
'
+
'
OR (portal_type: "Travel Request Record" AND (simulation_state:"draft" OR simulation_state:"sent" OR simulation_state:"stopped"))
'
+
'
OR (portal_type: "Leave Report Record" AND simulation_state:"stopped")
'
+
'
OR (portal_type: "Leave Request Record" AND (simulation_state:"draft" OR simulation_state:"sent" OR simulation_state:"stopped"))
'
+
'
OR (portal_type: "Localisation Record" AND (simulation_state:"draft" OR simulation_state:"stopped"))
'
+
'
OR (portal_type: "Expense Sheet" AND (reference: "expense_sheet"))
'
+
'
OR (portal_type: "Currency" AND validation_state:"validated")
'
+
'
OR (portal_type: "Service" AND validation_state:"validated")
'
,
// XX Synchonizing the whole module is too much, here is a way to start quietly
//+ 'AND local_roles: ("Owner") '
//+ 'AND validation_state: ("draft", "released_alive", "shared_alive", "published_alive") ',
limit
:
[
0
,
1234567890
]
},
use_remote_post
:
false
,
conflict_handling
:
2
,
check_local_modification
:
true
,
check_local_creation
:
true
,
check_local_deletion
:
true
,
check_remote_modification
:
true
,
check_remote_creation
:
true
,
check_remote_deletion
:
true
,
local_sub_storage
:
{
type
:
"
query
"
,
sub_storage
:
{
type
:
"
uuid
"
,
sub_storage
:
{
type
:
"
indexeddb
"
,
database
:
"
officejs-dav
"
}
}
},
remote_sub_storage
:
{
type
:
"
query
"
,
sub_storage
:
{
type
:
"
drivetojiomapping
"
,
sub_storage
:
{
type
:
"
dav
"
,
url
:
gadget
.
props
.
element
.
querySelector
(
"
input[name='dav_url']
"
).
value
,
basic_login
:
btoa
(
gadget
.
props
.
element
.
querySelector
(
"
input[name='dav_username']
"
).
value
+
'
:
'
+
gadget
.
props
.
element
.
querySelector
(
"
input[name='dav_password']
"
).
value
),
with_credentials
:
true
}
}
}
};
return
gadget
.
setSetting
(
'
jio_storage_description
'
,
configuration
);
})
.
push
(
function
()
{
return
gadget
.
setSetting
(
'
jio_storage_name
'
,
"
DAV
"
);
})
.
push
(
function
()
{
return
gadget
.
setSetting
(
'
sync_reload
'
,
true
);
})
.
push
(
function
()
{
return
gadget
.
redirect
({
page
:
'
sync
'
,
auto_repair
:
'
true
'
});
});
}
var
gadget_klass
=
rJS
(
window
);
gadget_klass
.
ready
(
function
(
g
)
{
g
.
props
=
{};
return
g
.
getElement
()
.
push
(
function
(
element
)
{
g
.
props
.
element
=
element
;
g
.
props
.
deferred
=
RSVP
.
defer
();
return
g
.
getSetting
(
'
jio_storage_name
'
);
})
.
push
(
function
(
jio_storage_name
)
{
if
(
jio_storage_name
===
"
DAV
"
)
{
return
g
.
getSetting
(
'
jio_storage_description
'
)
.
push
(
function
(
jio_storage_description
)
{
g
.
props
.
element
.
querySelector
(
"
input[name='dav_url']
"
).
value
=
jio_storage_description
.
remote_sub_storage
.
sub_storage
.
sub_storage
.
url
;
});
}
});
})
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
reload
"
,
"
reload
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
setSetting
"
,
"
setSetting
"
)
.
declareMethod
(
"
render
"
,
function
()
{
var
gadget
=
this
;
return
gadget
.
updateHeader
({
title
:
"
Connect To DAV Storage
"
,
back_url
:
"
#page=jio_configurator
"
,
panel_action
:
false
}).
push
(
function
()
{
return
gadget
.
props
.
deferred
.
resolve
();
});
})
/////////////////////////////////////////
// Form submit
/////////////////////////////////////////
.
declareService
(
function
()
{
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
props
.
deferred
.
promise
;
})
.
push
(
function
()
{
return
loopEventListener
(
gadget
.
props
.
element
.
querySelector
(
'
form
'
),
'
submit
'
,
true
,
function
()
{
return
setjIODAVConfiguration
(
gadget
);
}
);
});
});
}(
window
,
rJS
,
RSVP
));
\ No newline at end of file
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_dav_configurator_js.xml
0 → 100644
View file @
84348d7e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web Script"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Change_local_roles_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
contributor/person_module/2
</string>
<string>
contributor/person_module/5
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_officejs_page_jio_dav_configurator.js
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
gadget_hr_page_jio_dav_configurator_js
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
HR Gadget JS
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
001
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
document_publication_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
edit_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
processing_status_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
publish_alive
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523378191.75
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
published_alive
</string>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
edit
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
966.51243.41162.51080
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
<value>
<string>
current
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523438631.38
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
detect_converted_file
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_processing_state
</string>
</key>
<value>
<string>
converted
</string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
0.0.0.0
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523377948.63
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_erp5_configurator_html.html
0 → 100644
View file @
84348d7e
<!doctype html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
OfficeJS jIO ERP5 Configurator Page
</title>
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"jiodev.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_officejs_page_jio_erp5_configurator.js"
></script>
</head>
<body>
<article
class=
"ui-content ui-body-c"
>
<section
class=
"ui-content-header-plain"
>
<h3
class=
"ui-content-title ui-body-c"
>
<span
class=
"ui-icon ui-icon-custom ui-icon-database"
>
</span>
Your ERP5 Connection parameters
</h3>
</section>
<section
class=
"ui-content-header-plain"
>
<p>
You have to be logged in this ERP5 prior to synchronising
</p>
</section>
<section
class=
"ui-body-c ui-content-section"
>
<form
class=
"erp5-configuration-form"
>
<div
class=
"ui-form"
>
<div
class=
"ui-field-contain"
>
<label
data-i18n=
"Connection URL:"
>
Connection URL:
</label>
<input
type=
"url"
name=
"erp5_url"
class=
"ui-focus"
required
disabled
/>
</div>
<div
class=
"select-storage ui-controlgroup ui-controlgroup-horizontal"
>
<div
class=
"ui-grid-b ui-responsive"
>
<div
class=
"ui-block-a"
></div>
<div
class=
"ui-block-b"
></div>
<div
class=
"ui-block-c"
>
<button
type=
"submit"
data-i18n=
"Connect"
class=
"ui-btn-btn-right"
>
Connect
</button>
</div>
</div>
</div>
</form>
</section>
</article>
<article
class=
"ui-content ui-body-c document-access"
>
<section
class=
"ui-content-header-plain"
>
<h3
class=
"ui-content-title ui-body-c"
>
<span
class=
"ui-icon ui-icon-custom ui-icon-file-text-o"
>
</span>
Your Documents
</h3>
</section>
<section
class=
"ui-body-c ui-content-section"
>
<p
style=
"color: red"
>
Continue by
<b>
synchronizing
</b>
with your remote storage or
<b>
accessing
</b>
your documents
</p>
<div
class=
"ui-controlgroup ui-controlgroup-horizontal"
>
<div
class=
"ui-grid-a ui-responsive"
>
<div
class=
"ui-block-a"
>
<a
class=
"ui-btn"
href=
"#page=sync&auto_repair=true"
data-i18n=
"Synchronize"
>
Synchronize
</a>
</div>
<div
class=
"ui-block-b"
>
<a
class=
"ui-btn"
href=
"#page=hr_front"
data-i18n=
"Go to document List"
>
Access document List
</a>
</div>
</div>
</div>
</section>
</article>
<div
class=
"global_setting_gadget"
style=
"display: none;"
></div>
</body>
</html>
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_erp5_configurator_html.xml
0 → 100644
View file @
84348d7e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web Page"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Change_local_roles_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
contributor/person_module/2
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_officejs_page_jio_erp5_configurator.html
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Jio access
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
gadget_hr_page_jio_erp5_configurator_html
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Jio Gadget for HR
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
001
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
document_publication_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
edit_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
processing_status_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
publish_alive
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523377397.67
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
published_alive
</string>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
edit
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
966.52991.40280.18790
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
<value>
<string>
current
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523626101.75
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
detect_converted_file
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_processing_state
</string>
</key>
<value>
<string>
converted
</string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
0.0.0.0
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523377354.75
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_erp5_configurator_js.js
0 → 100644
View file @
84348d7e
/*global window, rJS, RSVP, URI, location,
loopEventListener, btoa */
/*jslint nomen: true, indent: 2, maxerr: 3*/
(
function
(
window
,
rJS
,
RSVP
)
{
"
use strict
"
;
function
setjIOERP5Configuration
(
gadget
)
{
var
erp5_url
=
gadget
.
props
.
element
.
querySelector
(
"
input[name='erp5_url']
"
).
value
;
return
gadget
.
setSetting
(
"
me
"
,
''
)
.
push
(
function
()
{
var
configuration
=
{
type
:
"
replicate
"
,
query
:
{
query
:
'
(portal_type: "Expense Record" AND (simulation_state:"draft" OR simulation_state:"sent" OR simulation_state:"stopped"))
'
+
'
OR (portal_type: "Travel Request Record" AND (simulation_state:"draft" OR simulation_state:"sent" OR simulation_state:"stopped"))
'
+
'
OR (portal_type: "Leave Report Record" AND simulation_state:"stopped")
'
+
'
OR (portal_type: "Leave Request Record" AND (simulation_state:"draft" OR simulation_state:"sent" OR simulation_state:"stopped"))
'
+
'
OR (portal_type: "Localisation Record" AND (simulation_state:"draft" OR simulation_state:"stopped"))
'
+
'
OR (portal_type: "Expense Sheet" AND (reference: "expense_sheet"))
'
+
'
OR (portal_type: "Currency" AND validation_state:"validated")
'
+
'
OR (portal_type: "Service" AND validation_state:"validated")
'
,
limit
:
[
0
,
1234567890
]
},
use_remote_post
:
true
,
conflict_handling
:
2
,
check_local_modification
:
false
,
check_local_creation
:
true
,
check_local_deletion
:
false
,
check_remote_modification
:
false
,
check_remote_creation
:
true
,
check_remote_deletion
:
true
,
local_sub_storage
:
{
type
:
"
query
"
,
sub_storage
:
{
type
:
"
uuid
"
,
sub_storage
:
{
type
:
"
indexeddb
"
,
database
:
"
officejs-erp5-hr
"
}
}
},
remote_sub_storage
:
{
type
:
"
erp5
"
,
url
:
(
new
URI
(
"
hateoas
"
))
.
absoluteTo
(
erp5_url
)
.
toString
(),
default_view_reference
:
"
jio_view
"
},
signature_sub_storage
:
{
type
:
"
query
"
,
sub_storage
:
{
type
:
"
indexeddb
"
,
database
:
"
expense-hash-list
"
}
}
};
return
gadget
.
setSetting
(
'
jio_storage_description
'
,
configuration
);
})
.
push
(
function
()
{
return
gadget
.
setSetting
(
'
jio_storage_name
'
,
"
ERP5
"
);
})
.
push
(
function
()
{
return
gadget
.
setGlobalSetting
(
'
erp5_url
'
,
erp5_url
);
})
.
push
(
function
()
{
return
gadget
.
setSetting
(
'
sync_reload
'
,
true
);
})
.
push
(
function
()
{
return
gadget
.
redirect
({
page
:
'
sync
'
,
auto_repair
:
'
true
'
});
});
}
var
gadget_klass
=
rJS
(
window
);
gadget_klass
.
ready
(
function
(
g
)
{
g
.
props
=
{};
return
g
.
getElement
()
.
push
(
function
(
element
)
{
g
.
props
.
element
=
element
;
g
.
props
.
deferred
=
RSVP
.
defer
();
});
})
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
reload
"
,
"
reload
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
setSetting
"
,
"
setSetting
"
)
.
declareMethod
(
"
getGlobalSetting
"
,
function
(
key
)
{
var
gadget
=
this
;
return
gadget
.
getDeclaredGadget
(
"
global_setting_gadget
"
)
.
push
(
function
(
global_setting_gadget
)
{
return
global_setting_gadget
.
getSetting
(
key
);
});
})
.
declareMethod
(
"
setGlobalSetting
"
,
function
(
key
,
value
)
{
var
gadget
=
this
;
return
gadget
.
getDeclaredGadget
(
"
global_setting_gadget
"
)
.
push
(
function
(
global_setting_gadget
)
{
return
global_setting_gadget
.
setSetting
(
key
,
value
);
});
})
.
declareMethod
(
"
render
"
,
function
()
{
var
gadget
=
this
;
return
gadget
.
updateHeader
({
title
:
"
Connect To ERP5 Storage
"
,
back_url
:
"
#page=jio_configurator
"
,
panel_action
:
false
})
.
push
(
function
()
{
return
gadget
.
getSetting
(
'
jio_storage_name
'
);
})
.
push
(
function
(
jio_storage_name
)
{
if
(
!
jio_storage_name
)
{
gadget
.
props
.
element
.
querySelector
(
"
.document-access
"
).
setAttribute
(
"
style
"
,
"
display: none;
"
);
}
})
.
push
(
function
()
{
return
gadget
.
props
.
deferred
.
resolve
();
});
})
/////////////////////////////////////////
// Form submit
/////////////////////////////////////////
.
declareService
(
function
()
{
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
props
.
deferred
.
promise
;
})
.
push
(
function
()
{
return
loopEventListener
(
gadget
.
props
.
element
.
querySelector
(
'
form
'
),
'
submit
'
,
true
,
function
()
{
return
setjIOERP5Configuration
(
gadget
);
}
);
});
})
.
declareService
(
function
()
{
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
props
.
deferred
.
promise
;
})
.
push
(
function
()
{
return
gadget
.
declareGadget
(
'
gadget_officejs_setting.html
'
,
{
scope
:
"
global_setting_gadget
"
,
sandbox
:
"
iframe
"
,
element
:
gadget
.
props
.
element
.
querySelector
(
"
.global_setting_gadget
"
)
}
);
})
.
push
(
function
(
global_setting_gadget
)
{
return
global_setting_gadget
.
getSetting
(
"
erp5_url
"
);
})
.
push
(
function
(
erp5_url
)
{
var
erp5_url_input
=
gadget
.
props
.
element
.
querySelector
(
"
input[name='erp5_url']
"
);
erp5_url_input
.
value
=
erp5_url
||
"
https://nexedijs.erp5.net
"
;
erp5_url_input
.
removeAttribute
(
"
disabled
"
);
erp5_url_input
.
parentNode
.
classList
.
remove
(
'
ui-state-disabled
'
);
erp5_url_input
.
focus
();
});
});
}(
window
,
rJS
,
RSVP
));
\ No newline at end of file
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_erp5_configurator_js.xml
0 → 100644
View file @
84348d7e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web Script"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Change_local_roles_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
contributor/person_module/2
</string>
<string>
contributor/person_module/5
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_officejs_page_jio_erp5_configurator.js
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
gadget_hr_page_jio_erp5_configurator_js
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
HR Gadget JS
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
001
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
document_publication_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
edit_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
processing_status_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
publish_alive
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523377473.27
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
published_alive
</string>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
edit
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
966.58919.23896.19148
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
<value>
<string>
current
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1524126116.01
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
detect_converted_file
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_processing_state
</string>
</key>
<value>
<string>
converted
</string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
0.0.0.0
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523377452.06
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_html.html
0 → 100644
View file @
84348d7e
<!DOCTYPE html>
<html>
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no"
/>
<title>
Jio Gadget
</title>
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"jiodev.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<script
src=
"gadget_officejs_hr_jio.js"
type=
"text/javascript"
></script>
</head>
<body>
</body>
</html>
\ No newline at end of file
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_html.xml
0 → 100644
View file @
84348d7e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web Page"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Change_local_roles_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
contributor/person_module/2
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_officejs_hr_jio.html
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Jio access
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
gadget_hr_page_jio_html
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Jio Gadget for HR
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
001
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
document_publication_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
edit_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
processing_status_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
publish_alive
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523518286.12
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
published_alive
</string>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
edit
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
966.52672.52784.27187
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
<value>
<string>
current
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523518145.13
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
detect_converted_file
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_processing_state
</string>
</key>
<value>
<string>
converted
</string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
0.0.0.0
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523518117.42
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_js.js
0 → 100644
View file @
84348d7e
/*global window, rJS, jIO, FormData, UriTemplate */
/*jslint indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
jIO
)
{
"
use strict
"
;
// jIO call wrapper for redirection to authentication page if needed
function
wrapJioCall
(
gadget
,
method_name
,
argument_list
)
{
var
storage
=
gadget
.
state_parameter_dict
.
jio_storage
;
if
(
storage
===
undefined
)
{
return
gadget
.
redirect
({
page
:
"
jio_configurator
"
});
}
return
storage
[
method_name
].
apply
(
storage
,
argument_list
)
.
push
(
undefined
,
function
(
error
)
{
if
((
error
.
target
!==
undefined
)
&&
(
error
.
target
.
status
===
401
))
{
var
regexp
,
site
,
auth_page
;
if
(
gadget
.
state_parameter_dict
.
jio_storage_name
===
"
ERP5
"
)
{
regexp
=
/^X-Delegate uri=
\"(
http
[
s
]?
:
\/\/[\/\-\[\]
{}()*+=:?&.,
\\\^
$|#
\s\w
%
]
+
)\"
$/
;
auth_page
=
error
.
target
.
getResponseHeader
(
'
WWW-Authenticate
'
);
if
(
regexp
.
test
(
auth_page
))
{
site
=
UriTemplate
.
parse
(
regexp
.
exec
(
auth_page
)[
1
]
).
expand
({
came_from
:
window
.
location
.
href
,
cors_origin
:
window
.
location
.
origin
,
});
}
}
if
(
gadget
.
state_parameter_dict
.
jio_storage_name
===
"
DAV
"
)
{
regexp
=
/^Nayookie login_url=
(
http
[
s
]?
:
\/\/[\/\-\[\]
{}()*+=:?&.,
\\\^
$|#
\s\w
%
]
+
)
$/
;
auth_page
=
error
.
target
.
getResponseHeader
(
'
WWW-Authenticate
'
);
if
(
regexp
.
test
(
auth_page
))
{
site
=
UriTemplate
.
parse
(
regexp
.
exec
(
auth_page
)[
1
]
).
expand
({
back_url
:
window
.
location
.
href
,
origin
:
window
.
location
.
origin
,
});
}
}
if
(
site
)
{
return
gadget
.
redirect
({
toExternal
:
true
,
url
:
site
});
}
}
throw
error
;
});
}
rJS
(
window
)
.
ready
(
function
(
gadget
)
{
// Initialize the gadget local parameters
gadget
.
state_parameter_dict
=
{};
})
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
setSetting
"
,
"
setSetting
"
)
.
declareMethod
(
'
createJio
'
,
function
(
jio_options
)
{
var
gadget
=
this
;
if
(
jio_options
===
undefined
)
{
return
;
}
this
.
state_parameter_dict
.
jio_storage
=
jIO
.
createJIO
(
jio_options
);
return
this
.
getSetting
(
"
jio_storage_name
"
)
.
push
(
function
(
jio_storage_name
)
{
gadget
.
state_parameter_dict
.
jio_storage_name
=
jio_storage_name
;
});
})
.
declareMethod
(
'
allDocs
'
,
function
()
{
return
wrapJioCall
(
this
,
'
allDocs
'
,
arguments
);
})
.
declareMethod
(
'
allAttachments
'
,
function
()
{
return
wrapJioCall
(
this
,
'
allAttachments
'
,
arguments
);
})
.
declareMethod
(
'
get
'
,
function
()
{
return
wrapJioCall
(
this
,
'
get
'
,
arguments
);
})
.
declareMethod
(
'
put
'
,
function
()
{
return
wrapJioCall
(
this
,
'
put
'
,
arguments
);
})
.
declareMethod
(
'
post
'
,
function
()
{
return
wrapJioCall
(
this
,
'
post
'
,
arguments
);
})
.
declareMethod
(
'
remove
'
,
function
()
{
return
wrapJioCall
(
this
,
'
remove
'
,
arguments
);
})
.
declareMethod
(
'
getAttachment
'
,
function
()
{
return
wrapJioCall
(
this
,
'
gettAttachment
'
,
arguments
);
})
.
declareMethod
(
'
putAttachment
'
,
function
()
{
return
wrapJioCall
(
this
,
'
putAttachment
'
,
arguments
);
})
.
declareMethod
(
'
removeAttachment
'
,
function
()
{
return
wrapJioCall
(
this
,
'
removeAttachment
'
,
arguments
);
})
.
declareMethod
(
'
repair
'
,
function
()
{
var
gadget
=
this
;
return
this
.
getSetting
(
"
jio_storage_name
"
)
.
push
(
function
(
jio_storage_name
)
{
//try to specify me
if
(
jio_storage_name
===
'
ERP5
'
)
{
return
gadget
.
getSetting
(
'
me
'
)
.
push
(
function
(
me
)
{
if
(
!
me
)
{
return
gadget
.
getSetting
(
'
jio_storage_description
'
)
.
push
(
function
(
configuration
)
{
gadget
.
state_parameter_dict
.
jio_storage
=
jIO
.
createJIO
(
configuration
.
remote_sub_storage
);
return
wrapJioCall
(
gadget
,
'
getAttachment
'
,
[
'
acl_users
'
,
configuration
.
remote_sub_storage
.
url
,
{
format
:
"
json
"
}])
.
push
(
function
(
result
)
{
//recreate erp5 storage with indexeddb
me
=
result
.
_links
.
me
?
result
.
_links
.
me
.
href
:
'
manager
'
;
configuration
.
query
.
query
+=
'
OR (portal_type: "Person" AND id: "
'
+
me
.
split
(
"
/
"
)[
1
]
+
'
")
'
,
gadget
.
state_parameter_dict
.
jio_storage
=
jIO
.
createJIO
(
configuration
);
return
gadget
.
setSetting
(
'
me
'
,
me
);
})
.
push
(
function
()
{
return
gadget
.
setSetting
(
'
jio_storage_description
'
,
configuration
);
});
});
}
});
}
})
.
push
(
function
()
{
return
wrapJioCall
(
gadget
,
'
repair
'
,
arguments
);
})
.
push
(
function
()
{
return
gadget
.
setSetting
(
'
last_sync_date
'
,
new
Date
().
toLocaleString
());
});
});
}(
window
,
rJS
,
jIO
));
\ No newline at end of file
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_page_jio_js.xml
0 → 100644
View file @
84348d7e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web Script"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Change_local_roles_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
contributor/person_module/2
</string>
<string>
contributor/person_module/5
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_officejs_hr_jio.js
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
gadget_hr_page_jio_js
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
HR Gadget JS
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
001
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
document_publication_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
edit_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
processing_status_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
publish_alive
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523518290.56
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
published_alive
</string>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
edit
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
966.59878.54409.55825
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
<value>
<string>
current
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523950559.17
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
detect_converted_file
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_processing_state
</string>
</key>
<value>
<string>
converted
</string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
0.0.0.0
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523518120.17
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_panel_html.html
View file @
84348d7e
...
@@ -46,6 +46,7 @@
...
@@ -46,6 +46,7 @@
<
li
><
a
href
=
"
#page=expense_report
"
data
-
i18n
=
"
Reports
"
>
Reports
<
/a></
li
>
<
li
><
a
href
=
"
#page=expense_report
"
data
-
i18n
=
"
Reports
"
>
Reports
<
/a></
li
>
<!--
li
><
a
href
=
"
#page=jio_configurator
"
data
-
i18n
=
"
Storage Configuration
"
>
Storage
Configuration
<
/a></
li
-->
<!--
li
><
a
href
=
"
#page=jio_configurator
"
data
-
i18n
=
"
Storage Configuration
"
>
Storage
Configuration
<
/a></
li
-->
<
li
><
a
href
=
"
#page=preference
"
data
-
i18n
=
"
Preferences
"
>
PReferences
<
/a></
li
>
<
li
><
a
href
=
"
#page=preference
"
data
-
i18n
=
"
Preferences
"
>
PReferences
<
/a></
li
>
<
li
><
a
href
=
"
#page=jio_configurator
"
data
-
i18n
=
"
Storages
"
>
Storages
<
/a></
li
>
<
li
><
a
href
=
"
#page=sync&auto_repair=true
"
data
-
i18n
=
"
Synchronize
"
>
Synchronize
<
/a></
li
>
<
li
><
a
href
=
"
#page=sync&auto_repair=true
"
data
-
i18n
=
"
Synchronize
"
>
Synchronize
<
/a></
li
>
<
/ul
>
<
/ul
>
<
/div
>
<
/div
>
...
...
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_panel_html.xml
View file @
84348d7e
...
@@ -269,7 +269,7 @@
...
@@ -269,7 +269,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
966.488
04.57481.19029
</string>
</value>
<value>
<string>
966.488
12.55170.9762
</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>
1523
286530.45
</float>
<float>
1523
438716.34
</float>
<string>
GMT+2
</string>
<string>
GMT+2
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_router_html.html
View file @
84348d7e
...
@@ -19,6 +19,5 @@
...
@@ -19,6 +19,5 @@
<script
data-renderjs-configuration=
"document_title"
type=
"text/x-renderjs-configuration"
>
Expense
Record
</script>
<script
data-renderjs-configuration=
"document_title"
type=
"text/x-renderjs-configuration"
>
Expense
Record
</script>
<script
data-renderjs-configuration=
"document_title_plural"
type=
"text/x-renderjs-configuration"
>
Expense
Records
</script>
<script
data-renderjs-configuration=
"document_title_plural"
type=
"text/x-renderjs-configuration"
>
Expense
Records
</script>
<script
data-renderjs-configuration=
"query"
type=
"text/x-renderjs-configuration"
>
portal_type
:
"
Expense Record
"
OR
(
portal_type
:
"
Currency
"
AND
validation_state
:
"
validated
"
)
</script>
<script
data-renderjs-configuration=
"query"
type=
"text/x-renderjs-configuration"
>
portal_type
:
"
Expense Record
"
OR
(
portal_type
:
"
Currency
"
AND
validation_state
:
"
validated
"
)
</script>
<script
data-renderjs-configuration=
"global_setting_gadget_url"
type=
"text/x-renderjs-configuration"
>
https
:
//setting-gadget.app.officejs.com/0.1.1/
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
bt5/erp5_travel_expense/PathTemplateItem/web_page_module/gadget_hr_router_html.xml
View file @
84348d7e
...
@@ -256,7 +256,7 @@
...
@@ -256,7 +256,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
supercedriclen
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
@@ -270,7 +270,7 @@
...
@@ -270,7 +270,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
55.64150.43979.250
8
</string>
</value>
<value>
<string>
9
66.48777.48028.1257
8
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -288,8 +288,8 @@
...
@@ -288,8 +288,8 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1
481817049.16
</float>
<float>
1
523437340.15
</float>
<string>
UTC
</string>
<string>
GMT+2
</string>
</tuple>
</tuple>
</state>
</state>
</object>
</object>
...
...
bt5/erp5_travel_expense/PathTemplateItem/web_site_module/officejs_hr.xml
View file @
84348d7e
...
@@ -339,7 +339,7 @@
...
@@ -339,7 +339,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
configuration_application_title
</string>
</key>
<key>
<string>
configuration_application_title
</string>
</key>
<value>
<string>
Officejs
HR
</string>
</value>
<value>
<string>
HR
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
configuration_content_security_policy
</string>
</key>
<key>
<string>
configuration_content_security_policy
</string>
</key>
...
@@ -363,7 +363,7 @@
...
@@ -363,7 +363,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
configuration_jio_gadget_url
</string>
</key>
<key>
<string>
configuration_jio_gadget_url
</string>
</key>
<value>
<string>
gadget_hr_jio.html
</string>
</value>
<value>
<string>
gadget_
officejs_
hr_jio.html
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
configuration_manifest_url
</string>
</key>
<key>
<string>
configuration_manifest_url
</string>
</key>
...
@@ -525,11 +525,17 @@
...
@@ -525,11 +525,17 @@
<value>
<value>
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
edit
_workflow
</string>
</key>
<key>
<string>
category_publication
_workflow
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAk=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAk=
</string>
</persistent>
</value>
</value>
</item>
</item>
<item>
<key>
<string>
edit_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAo=
</string>
</persistent>
</value>
</item>
</dictionary>
</dictionary>
</value>
</value>
</item>
</item>
...
@@ -537,6 +543,59 @@
...
@@ -537,6 +543,59 @@
</pickle>
</pickle>
</record>
</record>
<record
id=
"9"
aka=
"AAAAAAAAAAk="
>
<record
id=
"9"
aka=
"AAAAAAAAAAk="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
publish
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523435963.64
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
published
</string>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record
id=
"10"
aka=
"AAAAAAAAAAo="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
</pickle>
...
@@ -551,7 +610,7 @@
...
@@ -551,7 +610,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
cedric.le.ninivin
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
@@ -565,7 +624,7 @@
...
@@ -565,7 +624,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
2.4233.53000.41642
</string>
</value>
<value>
<string>
96
6.51303.25888.32000
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -583,8 +642,8 @@
...
@@ -583,8 +642,8 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
05315259.92
</float>
<float>
15
23518073.81
</float>
<string>
UTC
</string>
<string>
GMT+2
</string>
</tuple>
</tuple>
</state>
</state>
</object>
</object>
...
...
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