Commit f238c4f9 authored by Vincent Bechu's avatar Vincent Bechu

erp5_officejs: add bootloader in zip export

parent a072b4af
......@@ -8,9 +8,9 @@
<title> OfficeJS Install </title>
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="jiodev.js"></script>
<script src="${latest_version}/rsvp.js"></script>
<script src="${latest_version}/renderjs.js"></script>
<script src="${latest_version}/jiodev.js"></script>
<script src="jio_appcachestorage.js"></script>
<script src="gadget_officejs_bootloader.js"></script>
......
......@@ -241,7 +241,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>958.44234.50599.921</string> </value>
<value> <string>958.64448.11495.58999</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -259,7 +259,7 @@
</tuple>
<state>
<tuple>
<float>1492159460.13</float>
<float>1493373509.97</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -141,6 +141,7 @@ var repair = false;
if (!gadget.props.sub) {
window.location.pathname += gadget.props.version_url;
}
return;
})
.push(undefined, function (error) {
if (error instanceof ProgressEvent) {
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>958.43127.34376.48742</string> </value>
<value> <string>958.61634.43604.13073</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1492093057.34</float>
<float>1493203361.07</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -8,8 +8,8 @@
<link rel="stylesheet" href="gadget_officejs_bootloader_presentation.css">
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="development/rsvp.js" type="text/javascript"></script>
<script src="development/renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_officejs_bootloader_presentation.js" type="text/javascript"></script>
......
......@@ -101,6 +101,12 @@
<none/>
</value>
</item>
<item>
<key> <string>text_content_substitution_mapping_method_id</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Officejs BootLoader Presentation Gadget</string> </value>
......@@ -240,7 +246,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.64506.921.51985</string> </value>
<value> <string>958.64452.27945.28586</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -258,7 +264,7 @@
</tuple>
<state>
<tuple>
<float>1485770530.16</float>
<float>1493372430.42</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -14,7 +14,7 @@ var global = self, window = self;
self.DOMError = {};
self.postMessage = function () {return; };
self.importScripts('rsvp.js', 'jiodev.js');
self.importScripts('development/rsvp.js', 'development/jiodev.js');
self.storage = {};
......
......@@ -227,7 +227,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>958.43172.7083.11724</string> </value>
<value> <string>958.61563.34886.11246</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -245,7 +245,7 @@
</tuple>
<state>
<tuple>
<float>1492095766.17</float>
<float>1493383031.83</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -5,12 +5,28 @@
function AppCacheStorage(spec) {
this._manifest = spec.manifest;
this._take_installer = spec.take_installer || false;
this._origin_url = spec.origin_url !== undefined ? spec.origin_url :
(window.location.origin + window.location.pathname +
(window.location.pathname.endsWith('/') ? '' : '/') +
((spec.version !== undefined) ?
(spec.version + (spec.version.endsWith('/') ? '' : '/')) : ""));
this._relative_url_list = [this._origin_url, spec.manifest];
if (this._take_installer) {
this._relative_url_list = [
this._origin_url,
"development/" + spec.manifest,
this._origin_url + "development/",
"gadget_officejs_bootloader.js",
"gadget_officejs_bootloader.appcache",
"gadget_officejs_bootloader_presentation.html",
"gadget_officejs_bootloader_presentation.js",
"gadget_officejs_bootloader_presentation.css",
"gadget_officejs_bootloader_serviceworker.js",
"gadget_erp5_nojqm.css",
"jio_appcachestorage.js"
];
}
}
AppCacheStorage.prototype.get = function (id) {
......@@ -50,7 +66,8 @@
};
AppCacheStorage.prototype.repair = function () {
var storage = this;
var storage = this,
prefix = storage._take_installer ? "development/" : "";
return new RSVP.Queue()
.push(function () {
return jIO.util.ajax({
......@@ -78,7 +95,7 @@
relative_url_list[i].charAt(0) !== '#' &&
relative_url_list[i].charAt(0) !== ' ') {
relative_url_list[i].replace("\r", "");
storage._relative_url_list.push(relative_url_list[i]);
storage._relative_url_list.push(prefix + relative_url_list[i]);
}
if (relative_url_list[i].indexOf("CACHE:") >= 0) {
take = true;
......
......@@ -239,7 +239,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>958.41792.31362.1314</string> </value>
<value> <string>958.64585.2539.29713</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -257,7 +257,7 @@
</tuple>
<state>
<tuple>
<float>1492082677.03</float>
<float>1493380404.6</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -38,6 +38,8 @@
var gadget = this,
file_storage = jIO.createJIO({
type: "replicate",
parallel_operation_attachment_amount: 400,
parallel_operation_amount: 400,
check_remote_attachment_creation: true,
check_local_creation: false,
check_local_modification: false,
......@@ -49,8 +51,9 @@
document: site_url,
sub_storage: {
type: "appcache",
take_installer: true,
manifest: cache_file,
url: site_url
origin_url: site_url
}
},
signature_storage: {
......
......@@ -227,7 +227,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>958.33101.25469.11605</string> </value>
<value> <string>958.64457.39610.60262</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -245,7 +245,7 @@
</tuple>
<state>
<tuple>
<float>1491491776.79</float>
<float>1493379956.25</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -6,7 +6,10 @@
function FileSystemStorage(spec) {
this._document = spec.document;
this._sub_storage = jIO.createJIO(spec.sub_storage);
this._id_dict = {"/": {"index.html": {}}};
this._id_dict = {
"/": {"index.html": {}},
"/development/": {"index.html": {}}
};
}
FileSystemStorage.prototype.get = function (url) {
......@@ -20,9 +23,9 @@
FileSystemStorage.prototype.getAttachment = function (doc_id, attachment_id) {
return this._sub_storage.getAttachment(
this._document,
(attachment_id === "index.html") ?
"/" : (doc_id === "/") ?
attachment_id : doc_id + attachment_id
(attachment_id === "index.html") ? ((doc_id === "/") ?
"/" : "development/") : ((doc_id === "/") ?
attachment_id : doc_id + attachment_id)
);
};
......@@ -66,9 +69,8 @@
}
if (!context._id_dict.hasOwnProperty(path)) {
context._id_dict[path] = {};
} else {
context._id_dict[path][filename] = {};
}
context._id_dict[path][filename] = {};
}
}
});
......
......@@ -239,7 +239,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>958.33063.40118.853</string> </value>
<value> <string>958.64589.19815.17083</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -257,7 +257,7 @@
</tuple>
<state>
<tuple>
<float>1491489660.03</float>
<float>1493382071.89</float>
<string>UTC</string>
</tuple>
</state>
......
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