Commit 6f95a2dd authored by Vincent Bechu's avatar Vincent Bechu

officejs_todomvc: use manifest in service worker and use Officejs Skin

parent d555aa80
......@@ -113,11 +113,11 @@
"short_name": "OfficeJS TodoMVC",\n
"name": "OfficeJS TodoMVC App",\n
"icons": [{\n
"src": "officejs_todomvc_icon.svg?format=svg",\n
"src": "officejs_todomvc_icon.svg",\n
"sizes": "any",\n
"type": "image/svg"\n
}, {\n
"src": "officejs_todomvc_icon.png?format=png",\n
"src": "officejs_todomvc_icon.png",\n
"sizes": "any",\n
"type": "image/png"\n
}],\n
......@@ -160,6 +160,12 @@
<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>
</dictionary>
</value>
</item>
......@@ -219,4 +225,63 @@
</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>960.34282.23500.6178</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>1499259585.11</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
/*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80*/
/*global self, caches, fetch*/
(function (self, caches, fetch) {
/*global self, caches, fetch, Request, Promise*/
(function (self, caches, fetch, Request, Promise) {
"use strict";
var CACHE_VERSION = 1,
......@@ -8,22 +8,50 @@
self.addEventListener("install", function (event) {
event.waitUntil(caches.open(CACHE_NAME)
.then(function (cache) {
return cache.addAll([
"./",
"rsvp.js",
"renderjs.js",
"jiodev.js",
"handlebars.js",
"officejs_todomvc_icon.svg?format=svg",
"officejs_todomvc_icon.png?format=png",
"officejs_todomvc.css",
"officejs_todomvc_gadget_index.html",
"officejs_todomvc_gadget_index.js",
"officejs_todomvc_gadget_model.html",
"officejs_todomvc_gadget_model.js",
"officejs_todomvc_gadget_router.html",
"officejs_todomvc_gadget_router.js"
]);
return fetch(new Request(
"officejs_todomvc.appcache",
{
method: 'GET',
headers: {
'Upgrade-Insecure-Requests': 1
}
}))
.then(function (cache_file) {
return cache_file.text();
})
.then(function (text) {
var relative_url_list = text.split('\r\n'),
i,
take = false;
self.cache_list = [];
self.console.log(text);
if (relative_url_list.length === 1) {
relative_url_list = text.split('\n');
}
if (relative_url_list.length === 1) {
relative_url_list = text.split('\r');
}
for (i = 0; i < relative_url_list.length; i += 1) {
if (relative_url_list[i].indexOf("NETWORK:") >= 0) {
take = false;
}
if (take &&
relative_url_list[i] !== "" &&
relative_url_list[i].charAt(0) !== '#' &&
relative_url_list[i].charAt(0) !== ' ') {
relative_url_list[i].replace("\r", "");
self.cache_list.push(relative_url_list[i]);
}
if (relative_url_list[i].indexOf("CACHE:") >= 0) {
take = true;
}
}
self.console.log(self.cache_list);
return cache.addAll(self.cache_list);
});
})
.catch(function (error) {
self.console.log(error);
})
.then(function () {
return self.skipWaiting();
......@@ -53,4 +81,4 @@
}));
});
}(self, caches, fetch));
\ No newline at end of file
}(self, caches, fetch, Request, Promise));
\ No newline at end of file
......@@ -138,6 +138,12 @@
<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>
</dictionary>
</value>
</item>
......@@ -197,4 +203,63 @@
</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>960.34534.37982.43332</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>1499268940.21</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -319,7 +319,7 @@
</item>
<item>
<key> <string>configuration_content_security_policy</string> </key>
<value> <string>default-src \'self\'; img-src \'self\' data:; media-src \'self\' blob:; connect-src \'self\' https://*.dropboxapi.com/ data: ; script-src \'self\' \'unsafe-eval\'; font-src \'self\'; style-src \'self\' data:; frame-src \'self\' data:</string> </value>
<value> <string>default-src \'self\'; img-src \'self\' data:; media-src \'self\' blob:; connect-src \'self\' https://*.dropboxapi.com/ data: ; script-src \'self\' \'unsafe-eval\'; font-src \'self\'; style-src \'self\' data:; frame-src \'self\' data:; manifest-src \'self\'</string> </value>
</item>
<item>
<key> <string>configuration_default_view_action_reference</string> </key>
......@@ -411,7 +411,7 @@
</item>
<item>
<key> <string>skin_selection_name</string> </key>
<value> <string>RJS</string> </value>
<value> <string>Officejs</string> </value>
</item>
<item>
<key> <string>static_language_selection</string> </key>
......@@ -590,7 +590,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>eyqs</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -604,7 +604,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>958.54619.44309.32563</string> </value>
<value> <string>960.34510.4262.4761</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -622,7 +622,7 @@
</tuple>
<state>
<tuple>
<float>1492782706.69</float>
<float>1499338097.81</float>
<string>UTC</string>
</tuple>
</state>
......
erp5_web_renderjs_ui
\ No newline at end of file
erp5_officejs
\ No newline at end of file
image_module/officejs_todomvc_icon_png
image_module/officejs_todomvc_icon_svg
web_page_module/officejs_todomvc_appcache
web_page_module/officejs_todomvc_css
web_page_module/officejs_todomvc_gadget_index_html
web_page_module/officejs_todomvc_gadget_index_js
......
image_module/officejs_todomvc_icon_png
image_module/officejs_todomvc_icon_svg
web_page_module/officejs_todomvc_appcache
web_page_module/officejs_todomvc_css
web_page_module/officejs_todomvc_gadget_index_html
web_page_module/officejs_todomvc_gadget_index_js
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment