Commit 45f33fb3 authored by Vincent Bechu's avatar Vincent Bechu

[erp5_officejs] Add favicon to export site

parent 647405f1
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
this._gadget_list = []; this._gadget_list = [];
this._prefix = spec.prefix || ""; this._prefix = spec.prefix || "";
this._documents = {}; this._documents = {};
this._favicon = spec.favicon;
// Harcoded here, find a better way. // Harcoded here, find a better way.
if (this._take_installer) { if (this._take_installer) {
this._relative_url_list = [ this._relative_url_list = [
...@@ -34,6 +35,9 @@ ...@@ -34,6 +35,9 @@
if (this._take_installer) { if (this._take_installer) {
this._version = 'app/'; this._version = 'app/';
} }
if (this._favicon) {
this._relative_url_list.push('favicon.ico');
}
this._version = this._prefix + this._version; this._version = this._prefix + this._version;
} }
...@@ -59,6 +63,9 @@ ...@@ -59,6 +63,9 @@
} }
return new RSVP.Queue() return new RSVP.Queue()
.push(function () { .push(function () {
if (relative_url === '/favicon.ico') {
relative_url = storage._favicon;
}
return jIO.util.ajax({ return jIO.util.ajax({
type: "GET", type: "GET",
url: (relative_url.startsWith("http") || url: (relative_url.startsWith("http") ||
......
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.48080.27649.65467</string> </value> <value> <string>962.2788.21589.60364</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -257,7 +257,7 @@ ...@@ -257,7 +257,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1504083085.19</float> <float>1505228503.61</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -138,7 +138,8 @@ ...@@ -138,7 +138,8 @@
"officejs_image_editor_gadget": { "officejs_image_editor_gadget": {
"cache": "gadget_officejs_image_editor_gadget.appcache" "cache": "gadget_officejs_image_editor_gadget.appcache"
} }
}; },
favicon = "officejs_logo.png";
function exportZip(gadget, event) { function exportZip(gadget, event) {
var j, var j,
...@@ -154,6 +155,9 @@ ...@@ -154,6 +155,9 @@
app = application_dict[form_result.web_site]; app = application_dict[form_result.web_site];
zip_name = form_result.filename; zip_name = form_result.filename;
len = app.sub_gadget.length; len = app.sub_gadget.length;
if (app.favicon !== undefined) {
favicon = app.favicon;
}
function fill(zip_file) { function fill(zip_file) {
if (i < len) { if (i < len) {
...@@ -221,7 +225,8 @@ ...@@ -221,7 +225,8 @@
take_installer: no_installer === undefined, take_installer: no_installer === undefined,
manifest: cache_file, manifest: cache_file,
origin_url: site_url, origin_url: site_url,
prefix: prefix || "" prefix: prefix || "",
favicon: favicon
} }
}, },
signature_sub_storage: { signature_sub_storage: {
......
...@@ -227,7 +227,7 @@ ...@@ -227,7 +227,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.62121.21824.18124</string> </value> <value> <string>962.2780.32923.23278</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1504856376.66</float> <float>1505228525.41</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </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