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 @@ ...@@ -113,11 +113,11 @@
"short_name": "OfficeJS TodoMVC",\n "short_name": "OfficeJS TodoMVC",\n
"name": "OfficeJS TodoMVC App",\n "name": "OfficeJS TodoMVC App",\n
"icons": [{\n "icons": [{\n
"src": "officejs_todomvc_icon.svg?format=svg",\n "src": "officejs_todomvc_icon.svg",\n
"sizes": "any",\n "sizes": "any",\n
"type": "image/svg"\n "type": "image/svg"\n
}, {\n }, {\n
"src": "officejs_todomvc_icon.png?format=png",\n "src": "officejs_todomvc_icon.png",\n
"sizes": "any",\n "sizes": "any",\n
"type": "image/png"\n "type": "image/png"\n
}],\n }],\n
...@@ -160,6 +160,12 @@ ...@@ -160,6 +160,12 @@
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
...@@ -219,4 +225,63 @@ ...@@ -219,4 +225,63 @@
</tuple> </tuple>
</pickle> </pickle>
</record> </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> </ZopeData>
/*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80*/ /*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80*/
/*global self, caches, fetch*/ /*global self, caches, fetch, Request, Promise*/
(function (self, caches, fetch) { (function (self, caches, fetch, Request, Promise) {
"use strict"; "use strict";
var CACHE_VERSION = 1, var CACHE_VERSION = 1,
...@@ -8,22 +8,50 @@ ...@@ -8,22 +8,50 @@
self.addEventListener("install", function (event) { self.addEventListener("install", function (event) {
event.waitUntil(caches.open(CACHE_NAME) event.waitUntil(caches.open(CACHE_NAME)
.then(function (cache) { .then(function (cache) {
return cache.addAll([ return fetch(new Request(
"./", "officejs_todomvc.appcache",
"rsvp.js", {
"renderjs.js", method: 'GET',
"jiodev.js", headers: {
"handlebars.js", 'Upgrade-Insecure-Requests': 1
"officejs_todomvc_icon.svg?format=svg", }
"officejs_todomvc_icon.png?format=png", }))
"officejs_todomvc.css", .then(function (cache_file) {
"officejs_todomvc_gadget_index.html", return cache_file.text();
"officejs_todomvc_gadget_index.js", })
"officejs_todomvc_gadget_model.html", .then(function (text) {
"officejs_todomvc_gadget_model.js", var relative_url_list = text.split('\r\n'),
"officejs_todomvc_gadget_router.html", i,
"officejs_todomvc_gadget_router.js" 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 () { .then(function () {
return self.skipWaiting(); return self.skipWaiting();
...@@ -53,4 +81,4 @@ ...@@ -53,4 +81,4 @@
})); }));
}); });
}(self, caches, fetch)); }(self, caches, fetch, Request, Promise));
\ No newline at end of file \ No newline at end of file
...@@ -138,6 +138,12 @@ ...@@ -138,6 +138,12 @@
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
...@@ -197,4 +203,63 @@ ...@@ -197,4 +203,63 @@
</tuple> </tuple>
</pickle> </pickle>
</record> </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> </ZopeData>
...@@ -319,7 +319,7 @@ ...@@ -319,7 +319,7 @@
</item> </item>
<item> <item>
<key> <string>configuration_content_security_policy</string> </key> <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>
<item> <item>
<key> <string>configuration_default_view_action_reference</string> </key> <key> <string>configuration_default_view_action_reference</string> </key>
...@@ -411,7 +411,7 @@ ...@@ -411,7 +411,7 @@
</item> </item>
<item> <item>
<key> <string>skin_selection_name</string> </key> <key> <string>skin_selection_name</string> </key>
<value> <string>RJS</string> </value> <value> <string>Officejs</string> </value>
</item> </item>
<item> <item>
<key> <string>static_language_selection</string> </key> <key> <string>static_language_selection</string> </key>
...@@ -590,7 +590,7 @@ ...@@ -590,7 +590,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>eyqs</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -604,7 +604,7 @@ ...@@ -604,7 +604,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>958.54619.44309.32563</string> </value> <value> <string>960.34510.4262.4761</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -622,7 +622,7 @@ ...@@ -622,7 +622,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1492782706.69</float> <float>1499338097.81</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
erp5_web_renderjs_ui erp5_officejs
\ No newline at end of file \ No newline at end of file
image_module/officejs_todomvc_icon_png image_module/officejs_todomvc_icon_png
image_module/officejs_todomvc_icon_svg image_module/officejs_todomvc_icon_svg
web_page_module/officejs_todomvc_appcache
web_page_module/officejs_todomvc_css web_page_module/officejs_todomvc_css
web_page_module/officejs_todomvc_gadget_index_html web_page_module/officejs_todomvc_gadget_index_html
web_page_module/officejs_todomvc_gadget_index_js web_page_module/officejs_todomvc_gadget_index_js
......
image_module/officejs_todomvc_icon_png image_module/officejs_todomvc_icon_png
image_module/officejs_todomvc_icon_svg image_module/officejs_todomvc_icon_svg
web_page_module/officejs_todomvc_appcache
web_page_module/officejs_todomvc_css web_page_module/officejs_todomvc_css
web_page_module/officejs_todomvc_gadget_index_html web_page_module/officejs_todomvc_gadget_index_html
web_page_module/officejs_todomvc_gadget_index_js 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