Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gabriel Monnerat
erp5
Commits
1aa8b2a6
Commit
1aa8b2a6
authored
Jun 17, 2016
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: Introduce Global Setting Gadget
parent
dfe25ac1
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1125 additions
and
0 deletions
+1125
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_setting_appcache.xml
...Item/web_page_module/gadget_officejs_setting_appcache.xml
+345
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_setting_html.html
...ateItem/web_page_module/gadget_officejs_setting_html.html
+23
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_setting_html.xml
...lateItem/web_page_module/gadget_officejs_setting_html.xml
+359
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_setting_js.js
...emplateItem/web_page_module/gadget_officejs_setting_js.js
+43
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_setting_js.xml
...mplateItem/web_page_module/gadget_officejs_setting_js.xml
+355
-0
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_setting_appcache.xml
0 → 100644
View file @
1aa8b2a6
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_setting_html.html
0 → 100644
View file @
1aa8b2a6
<!DOCTYPE html>
<html
manifest=
"gadget_officejs_setting.appcache"
>
<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>
<script
src=
"jiodev.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<script
src=
"gadget_officejs_setting.js"
type=
"text/javascript"
></script>
</head>
<body>
<div
data-gadget-url=
"gadget_officejs_jio.html"
data-gadget-scope=
"jio_gadget"
data-gadget-sandbox=
"public"
></div>
</body>
</html>
\ No newline at end of file
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_setting_html.xml
0 → 100644
View file @
1aa8b2a6
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_setting_js.js
0 → 100644
View file @
1aa8b2a6
/*global window, rJS, jIO, FormData, UriTemplate */
/*jslint indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
jIO
)
{
"
use strict
"
;
rJS
(
window
)
.
ready
(
function
(
gadget
)
{
// Initialize the gadget local parameters
gadget
.
state_parameter_dict
=
{};
gadget
.
state_parameter_dict
.
jio_storage
=
jIO
.
createJIO
({
type
:
"
indexeddb
"
,
database
:
"
global-setting
"
});
})
.
declareMethod
(
'
getSetting
'
,
function
(
key
,
default_value
)
{
var
gadget
=
this
;
return
gadget
.
state_parameter_dict
.
jio_storage
.
get
(
"
setting
"
)
.
push
(
function
(
doc
)
{
return
doc
[
key
]
||
default_value
;
},
function
(
error
)
{
if
(
error
.
status_code
===
404
)
{
return
default_value
;
}
throw
error
;
});
})
.
declareMethod
(
'
setSetting
'
,
function
(
key
,
value
)
{
var
gadget
=
this
;
return
gadget
.
state_parameter_dict
.
jio_storage
.
get
(
"
setting
"
)
.
push
(
undefined
,
function
(
error
)
{
if
(
error
.
status_code
===
404
)
{
return
{};
}
throw
error
;
})
.
push
(
function
(
doc
)
{
doc
[
key
]
=
value
;
return
gadget
.
state_parameter_dict
.
jio_storage
.
put
(
'
setting
'
,
doc
);
});
});
}(
window
,
rJS
,
jIO
));
\ No newline at end of file
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_setting_js.xml
0 → 100644
View file @
1aa8b2a6
This diff is collapsed.
Click to expand it.
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