Commit d85c2c40 authored by Vincent Bechu's avatar Vincent Bechu

[erp5_officejs]

parent 3603d4cd
......@@ -121,6 +121,7 @@ font-awesome/font-awesome-webfont.svg\n
gadget_erp5_nojqm.css\n
jio_mappingstorage.js\n
jio_fixstorage.js\n
jio_saferepairstorage.js\n
gadget_erp5_global.js\n
URI.js\n
dygraph.js\n
......@@ -358,7 +359,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.40807.30284.14097</string> </value>
<value> <string>961.48046.49272.25173</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -376,7 +377,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1503579323.73</float>
<float>1504533585.48</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -112,7 +112,7 @@
"editable": 1,
"key": "description",
"hidden": 0,
"type": "StringField"
"type": "TextAreaField"
},
"my_portal_type": {
"description": "The name of a document in ERP5",
......
......@@ -270,7 +270,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.12010.33696.37768</string> </value>
<value> <string>961.46357.14957.50005</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -288,7 +288,7 @@
</tuple>
<state>
<tuple>
<float>1501849925.58</float>
<float>1504618800.97</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -118,6 +118,7 @@ font-awesome/font-awesome-webfont.svg\n
gadget_erp5_nojqm.css\n
jio_mappingstorage.js\n
jio_fixstorage.js\n
jio_saferepairstorage.js\n
gadget_erp5_global.js\n
URI.js\n
dygraph.js\n
......@@ -346,7 +347,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.10686.10882.5973</string> </value>
<value> <string>961.46357.14957.50005</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -364,7 +365,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1502956838.21</float>
<float>1504533593.45</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -143,7 +143,7 @@
"editable": 1 - editable,
"key": "description",
"hidden": editable,
"type": "StringField"
"type": "TextAreaField"
},
"my_content": {
"default": data,
......
......@@ -233,7 +233,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.12213.27723.62088</string> </value>
<value> <string>961.46357.14957.50005</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -251,7 +251,7 @@
</tuple>
<state>
<tuple>
<float>1502094255.96</float>
<float>1504618660.74</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -120,7 +120,7 @@
"editable": 1 - editable,
"key": "description",
"hidden": editable,
"type": "StringField"
"type": "TextAreaField"
},
"my_content": {
"default": gadget.state.doc.text_content,
......
......@@ -273,7 +273,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.12101.58364.13175</string> </value>
<value> <string>961.46357.14957.50005</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -291,7 +291,7 @@
</tuple>
<state>
<tuple>
<float>1502094277.86</float>
<float>1504618708.1</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -165,11 +165,13 @@
var header_dict = {
page_title: gadget.state.doc.title,
selection_url: url_list[0],
previous_url: url_list[1],
next_url: url_list[2],
save_action: true
};
if (!gadget.state.editable) {
header_dict.previous_url = url_list[1];
header_dict.next_url = url_list[2];
if (gadget.state.editable) {
header_dict.edit_properties = url_list[3].replace("n.editable=true", "").replace("p.editable=true", "");
} else {
header_dict.edit_content = url_list[3];
}
return gadget.updateHeader(header_dict);
......
......@@ -232,7 +232,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.56676.15315.62907</string> </value>
<value> <string>961.12101.47166.29371</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -250,7 +250,7 @@
</tuple>
<state>
<tuple>
<float>1504534090.64</float>
<float>1502094289.32</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -32,7 +32,6 @@
conflict_handling: 1,
parallel_operation_attachment_amount: 10,
parallel_operation_amount: 10,
signature_hash_key: "modification_date",
check_local_attachment_modification: attachment_synchro,
check_local_attachment_creation: attachment_synchro,
check_remote_attachment_modification: attachment_synchro,
......@@ -55,46 +54,37 @@
}
},
local_sub_storage: {
type: "mapping",
property: {
"modification_date": ["formatDate", ["toISOString", "rfc822"]]
},
type: "query",
sub_storage: {
type: "query",
type: "uuid",
sub_storage: {
type: "uuid",
sub_storage: {
type: "indexeddb",
database: "officejs-erp5"
}
type: "indexeddb",
database: "officejs-erp5"
}
}
},
remote_sub_storage: {
type: "saferepair",
sub_storage: {
type: "mapping",
attachment_list: ["data"],
attachment: {
"data": {
"get": {
"uri_template": (new URI("hateoas"))
.absoluteTo(erp5_url)
.toString() + extended_attachment_url
},
"put": {
"erp5_put_template": (new URI("hateoas")).absoluteTo(erp5_url)
.toString() + "/{+id}/Base_edit"
}
type: "mapping",
attachment_list: ["data"],
attachment: {
"data": {
"get": {
"uri_template": (new URI("hateoas"))
.absoluteTo(erp5_url)
.toString() + extended_attachment_url
},
"put": {
"erp5_put_template": (new URI("hateoas")).absoluteTo(erp5_url)
.toString() + "/{+id}/Base_edit"
}
},
sub_storage: {
type: "erp5",
url: (new URI("hateoas"))
.absoluteTo(erp5_url)
.toString(),
default_view_reference: result[2]
}
},
sub_storage: {
type: "erp5",
url: (new URI("hateoas"))
.absoluteTo(erp5_url)
.toString(),
default_view_reference: result[2]
}
}
};
......
......@@ -273,7 +273,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.49200.15936.15257</string> </value>
<value> <string>961.22099.5660.20138</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -291,7 +291,7 @@
</tuple>
<state>
<tuple>
<float>1504084622.06</float>
<float>1502460802.37</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -119,10 +119,9 @@ font-awesome/font-awesome-webfont.woff\n
font-awesome/font-awesome-webfont.woff2\n
font-awesome/font-awesome-webfont.ttf\n
font-awesome/font-awesome-webfont.svg\n
gadget_officejs_nojqm.css\n
gadget_erp5_nojqm.css\n
jio_mappingstorage.js\n
jio_fixstorage.js\n
jio_saferepairstorage.js\n
gadget_erp5_global.js\n
URI.js\n
dygraph.js\n
......@@ -351,7 +350,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.56686.22927.2474</string> </value>
<value> <string>961.10686.10882.5973</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -369,7 +368,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1504533633.59</float>
<float>1502956848.36</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -133,21 +133,6 @@
}
}
}
},
"formatDate": {
"mapToSubProperty": function (property, sub_doc, doc, args) {
sub_doc[property] = (new Date(doc[property]))[args[0]]();
return property;
},
"mapToMainProperty": function (property, sub_doc, doc, args) {
if (args[1] === 'rfc822') {
doc[property] = (new Date(sub_doc[property]))
.toUTCString().replace('GMT', '+0000');
} else {
doc[property] = (new Date(sub_doc[property]))[args[1]]();
}
return property;
}
}
};
/*jslint unparam: false*/
......
......@@ -239,7 +239,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.48123.48206.12014</string> </value>
<value> <string>960.25496.14411.56081</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -257,7 +257,7 @@
</tuple>
<state>
<tuple>
<float>1504018014.82</float>
<float>1502900157.25</float>
<string>UTC</string>
</tuple>
</state>
......
/*globals jIO*/
/*jslint indent: 2, maxlen: 80, nomen: true*/
(function (jIO) {
"use strict";
function OfficejsStorage(spec) {
this._sub_storage = jIO.createJIO({
type: "mapping",
sub_storage: {
type: "query",
sub_storage: {
type: "indexeddb",
database: "officejs"
}
}
});
}
OfficejsStorage.prototype.get = function () {
return this._sub_storage.get.apply(this._sub_storage, arguments);
};
OfficejsStorage.prototype.put = function (id, document) {
return this._sub_storage.put.apply(this._sub_storage, arguments);
};
OfficejsStorage.prototype.post = function (document) {
return this._sub_storage.post.apply(this._sub_storage, arguments);
};
OfficejsStorage.prototype.remove = function () {
return this._sub_storage.removeAttachment
.apply(this._sub_storage, arguments);
};
OfficejsStorage.prototype.hasCapacity = function () {
return this._sub_storage.hasCapacity.apply(this._sub_storage, arguments);
};
OfficejsStorage.prototype.repair = function () {
return this._sub_storage.repair.apply(this._sub_storage, arguments);
};
OfficejsStorage.prototype.allAttachments = function (doc_id) {
return this._sub_storage.allAttachments.apply(
this._sub_storage,
arguments
);
};
OfficejsStorage.prototype.getAttachment = function (doc_id) {
return this._sub_storage.getAttachment.apply(
this._sub_storage,
arguments
);
};
OfficejsStorage.prototype.putAttachment = function (doc_id) {
var storage = this;
return this._sub_storage.putAttachment.apply(this._sub_storage, arguments);
};
OfficejsStorage.prototype.removeAttachment = function (doc_id) {
return this._sub_storage.removeAttachment
.apply(this._sub_storage, arguments);
};
OfficejsStorage.prototype.buildQuery = function () {
return this._sub_storage.buildQuery.apply(
this._sub_storage,
arguments
);
};
jIO.addStorage('officejs', OfficejsStorage);
}(jIO));
\ No newline at end of file
......@@ -2,7 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Style" module="erp5.portal_type"/>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
......@@ -24,7 +24,6 @@
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
......@@ -43,8 +42,6 @@
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
......@@ -63,12 +60,6 @@
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
......@@ -77,13 +68,11 @@
</item>
<item>
<key> <string>content_type</string> </key>
<value>
<none/>
</value>
<value> <string>text/javascript</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_officejs_nojqm.css</string> </value>
<value> <string>jio_officejsstorage.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -93,15 +82,17 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_officejs_nojqm_css</string> </value>
<value> <string>jio_officejsstorage_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Style</string> </value>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
......@@ -111,7 +102,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>RenderJS Gadget OfficeJS CSS</string> </value>
<value> <string>OfficeJS Storage</string> </value>
</item>
<item>
<key> <string>version</string> </key>
......@@ -171,7 +162,7 @@
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
<value> <string>publish</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
......@@ -197,7 +188,7 @@
</tuple>
<state>
<tuple>
<float>1504529334.71</float>
<float>1499090600.24</float>
<string>UTC</string>
</tuple>
</state>
......@@ -206,7 +197,7 @@
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
<value> <string>published</string> </value>
</item>
</dictionary>
</list>
......@@ -242,7 +233,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.56680.37314.15803</string> </value>
<value> <string>961.52338.55389.716</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +251,7 @@
</tuple>
<state>
<tuple>
<float>1504530088.63</float>
<float>1504269346.53</float>
<string>UTC</string>
</tuple>
</state>
......@@ -317,7 +308,7 @@
</tuple>
<state>
<tuple>
<float>1504528848.47</float>
<float>1499090140.66</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -10,8 +10,11 @@
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
......@@ -24,7 +27,6 @@
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -44,7 +46,6 @@
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -52,8 +53,11 @@
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
......@@ -167,9 +171,7 @@
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
......@@ -195,7 +197,7 @@
</tuple>
<state>
<tuple>
<float>1504533404.15</float>
<float>1504534212.45</float>
<string>UTC</string>
</tuple>
</state>
......@@ -204,7 +206,7 @@
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>draft</string> </value>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
......
......@@ -391,7 +391,9 @@
</item>
<item>
<key> <string>configuration_stylesheet_url</string> </key>
<value> <string>gadget_officejs_nojqm.css</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>configuration_translation_gadget_url</string> </key>
......@@ -664,7 +666,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.16277.24517.44253</string> </value>
<value> <string>961.56843.9723.38348</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -682,7 +684,7 @@
</tuple>
<state>
<tuple>
<float>1504529296.63</float>
<float>1504539684.91</float>
<string>UTC</string>
</tuple>
</state>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Type" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_property_domain_dict</string> </key>
<value>
<dictionary>
<item>
<key> <string>short_title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>acquire_local_roles</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>content_icon</string> </key>
<value> <string>web_page.png</string> </value>
</item>
<item>
<key> <string>content_meta_type</string> </key>
<value> <string>ERP5 Text Document</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>A Web Page is an HTML document which contains images and files.</string> </value>
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addTextDocument</string> </value>
</item>
<item>
<key> <string>filter_content_types</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<tuple>
<string>document</string>
<string>my_document</string>
<string>recent_document</string>
<string>web_document</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Web Illustration</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
<value> <string>WebIllustration_init</string> </value>
</item>
<item>
<key> <string>permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>TextDocument</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_mixin</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>short_title</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>title</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>ojscss.less</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/plain</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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