Commit 71e8f118 authored by Vincent Bechu's avatar Vincent Bechu

[erp5_officejs] Simplify bootloader: no more separate app and editor gadget

parent 69511d90
......@@ -200,6 +200,7 @@ gadget_html5_textarea.js\n
gadget_erp5_configure_editor.html\n
gadget_erp5_configure_editor.js\n
\n
#bookmark\n
gadget_erp5_field_checkbox.html\n
gadget_erp5_field_checkbox.js\n
gadget_officejs_bookmark_manager_router.html\n
......@@ -215,8 +216,10 @@ gadget_erp5_page_ojs_bookmark_dispatcher.html\n
gadget_erp5_page_ojs_bookmark_dispatcher.js\n
gadget_erp5_page_ojs_bookmark_preference.html\n
gadget_erp5_page_ojs_bookmark_preference.js\n
GADGET:\n
officejs_setting_gadget/\n
\n
#setting\n
gadget_officejs_setting.html\n
gadget_officejs_setting.js\n
NETWORK:\n
*</string> </value>
</item>
......@@ -359,7 +362,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.45561.47559.9591</string> </value>
<value> <string>964.48513.5538.10342</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -377,7 +380,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1515590093.02</float>
<float>1516115771.45</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -8,7 +8,6 @@
<script src="${latest_version}/rsvp.js"></script>
<script src="${latest_version}/renderjs.js"></script>
<script src="${latest_version}/jiodev.js"></script>
<script src="jio_limitalldocsstorage.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>963.23296.14479.51302</string> </value>
<value> <string>964.45561.47559.9591</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -259,7 +259,7 @@
</tuple>
<state>
<tuple>
<float>1510305002.75</float>
<float>1515750984.26</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -19,14 +19,10 @@ var repair = false;
check_local_deletion: false,
check_local_modification: false,
signature_sub_storage: {
type: "limitalldocs",
document: window.location.href,
type: "query",
sub_storage: {
type: "query",
sub_storage: {
type: "indexeddb",
database: "officejs-hash"
}
type: "indexeddb",
database: "officejs-hash"
}
},
local_sub_storage: {
......@@ -41,8 +37,8 @@ var repair = false;
},
remote_sub_storage: {
type: "appcache",
manifest: gadget.state.cache_file,
version: gadget.state.version_url,
manifest: gadget.props.cache_file,
version: gadget.props.version_url,
take_installer: true
}
});
......@@ -58,7 +54,7 @@ var repair = false;
serviceWorker = registration.active;
}
if (serviceWorker.state !== "activated") {
RSVP.Promise(function (resolve, reject) {
return RSVP.Promise(function (resolve, reject) {
serviceWorker.addEventListener('statechange', function (e) {
if (e.target.state === "activated") {
resolve();
......@@ -75,125 +71,80 @@ var repair = false;
.setState({error_amount: 0})
.ready(function (gadget) {
var i,
state = {},
element_list =
gadget.element.querySelectorAll('[data-install-configuration]');
if (window.Bootloader === undefined) {
window.Bootloader = gadget;
}
gadget.props = {};
for (i = 0; i < element_list.length; i += 1) {
state[element_list[i].getAttribute('data-install-configuration')] =
element_list[i].textContent;
gadget.props[element_list[i].getAttribute(
'data-install-configuration'
)] = element_list[i].textContent;
}
state.redirect_url = new URL(window.location);
state.redirect_url.pathname += state.version_url;
if (state.redirect_url.hash) {
if (state.redirect_url.hash.startsWith('#access_token')) {
gadget.props.redirect_url = new URL(window.location);
gadget.props.redirect_url.pathname += gadget.props.version_url;
if (gadget.props.redirect_url.hash) {
if (gadget.props.redirect_url.hash.startsWith('#access_token')) {
// This is a bad hack to support dropbox.
state.redirect_url.hash = state.redirect_url.hash.replace(
gadget.props.redirect_url.hash =
gadget.props.redirect_url.hash.replace(
'#access_token',
'#/?page=ojs_dropbox_configurator&access_token'
);
} else if (state.redirect_url.hash
} else if (gadget.props.redirect_url.hash
.startsWith('#page=settings_configurator')) {
// Make monitoring app still compatible with old instances setup URLs
state.redirect_url.hash = state.redirect_url.hash.replace(
gadget.props.redirect_url.hash =
gadget.props.redirect_url.hash.replace(
'#page=settings_configurator',
'#/?page=settings_configurator'
);
}
}
return gadget.changeState(state);
})
.allowPublicAcquisition('isChildren', function () {
return true;
})
.declareAcquiredMethod('isChildren', 'isChildren')
.declareAcquiredMethod('renderError', 'renderError')
.declareService(function () {
var gadget = this;
return gadget.isChildren()
.push(undefined, function (error) {
if (error instanceof rJS.AcquisitionError) {
return RSVP.all([
new RSVP.Queue()
.push(function () {
return RSVP.delay(600);
})
.push(function () {
return gadget.changeState({main: true});
}),
gadget.install()
.push(function () {
window.location = gadget.state.redirect_url;
})
]);
}
throw error;
});
})
.allowPublicAcquisition('renderError', function (param_list) {
param_list[0].error_amount = this.state.error_amount + 1;
return this.changeState(param_list[0]);
return RSVP.all([
new RSVP.Queue()
.push(function () {
return RSVP.delay(600);
})
.push(function () {
return gadget.changeState({
app_name: gadget.props.app_name,
redirect_url: gadget.props.redirect_url
});
}),
gadget.install()
.push(function () {
window.location = gadget.props.redirect_url;
})
]);
})
.declareMethod('render', function (options) {
return this.getDeclaredGadget('view_gadget')
var gadget = this;
return new RSVP.Queue()
.push(function () {
var element = gadget.element.querySelector('.presentation');
if (element) {
return gadget.getDeclaredGadget('view');
}
element = document.createElement("div");
element.className = "presentation";
gadget.element.appendChild(element);
return gadget.declareGadget(
"gadget_officejs_bootloader_presentation.html",
{"scope": "view", "element": element}
);
})
.push(function (view_gadget) {
return view_gadget.render(options);
});
})
.onStateChange(function (modification_dict) {
var gadget = this, element, options;
if (modification_dict.main) {
element = document.createElement("div");
element.className = "presentation";
gadget.element.insertBefore(element, gadget.element.firstChild);
return gadget.declareGadget(
"gadget_officejs_bootloader_presentation.html",
{"scope": "view_gadget", "element": element}
)
.push(function (view_gadget) {
return view_gadget.render({
app_name: gadget.state.app_name,
redirect_url: gadget.state.redirect_url
});
});
}
if (modification_dict.error) {
options = {
error: gadget.state.error,
error_amount: gadget.state.error_amount
};
if (modification_dict.error_source) {
options.error_source = gadget.state.error_source;
}
if (gadget.state.main) {
return gadget.render(options);
}
options.error_source = gadget.state.app_name;
return gadget.renderError(options);
}
})
.declareMethod('declareAndInstall', function (url) {
var element = document.createElement("div");
element.setAttribute("style", "display: none");
this.element.appendChild(element);
return this.declareGadget(url,
{
"element": element,
"scope": url,
"sandbox": "iframe"
})
.push(function (sub_gadget) {
return sub_gadget.install();
});
return this.render(modification_dict);
})
.declareMethod("install", function () {
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.29130.48991.23978</string> </value>
<value> <string>964.54546.48173.5239</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1510654966.6</float>
<float>1516029576.45</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -24,7 +24,6 @@
<div class="loader"></div>
<a class="skip-link" href="#">Skip</a>
<div class="error-message"></div>
<div class="error-source"></div>
<div class="error-amount"></div>
</div>
</center>
......
......@@ -232,7 +232,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <string>vincent</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -246,7 +246,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.59243.21205.33843</string> </value>
<value> <string>964.45561.47559.9591</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -264,7 +264,7 @@
</tuple>
<state>
<tuple>
<float>1504683723.57</float>
<float>1515751622.79</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -16,10 +16,6 @@
app_name_div.textContent = gadget.state.app_name +
" is being prepared for 100 % offline mode";
}
if (modification_dict.error_source) {
app_name_div = gadget.element.querySelector(".error-source");
app_name_div.textContent = "Source: " + gadget.state.error_source;
}
if (modification_dict.error_amount) {
app_name_div = gadget.element.querySelector(".error-amount");
app_name_div.textContent = "Retry: " + gadget.state.error_amount;
......
......@@ -222,7 +222,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <string>vincent</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.59243.59705.49169</string> </value>
<value> <string>964.45561.47559.9591</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1504683865.92</float>
<float>1515751635.24</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -179,9 +179,47 @@ gadget_officejs_jio_crib_from.html\n
gadget_officejs_page_jio_crib_configurator.html\n
gadget_officejs_page_jio_crib_configurator.js\n
gadget_officejs_crib_panel.html\n
GADGET:\n
officejs_codemirror/\n
officejs_setting_gadget/\n
\n
#setting\n
gadget_officejs_setting.js\n
gadget_officejs_setting.html\n
\n
#codemirror\n
codemirror/lib/codemirror.js\n
codemirror/lib/codemirror.css\n
codemirror/addon/cm_edit/matchbrackets.js\n
codemirror/addon/cm_edit/trailingspace.js\n
codemirror/addon/dialog/dialog.css\n
codemirror/addon/dialog/dialog.js\n
codemirror/addon/display/fullscreen.css\n
codemirror/addon/display/fullscreen.js\n
codemirror/addon/display/rulers.js\n
codemirror/addon/search/searchcursor.js\n
codemirror/addon/search/search.js\n
codemirror/addon/search/jump-to-line.js\n
codemirror/addon/selection/active-line.js\n
codemirror/addon/hint/show-hint.css\n
codemirror/addon/hint/show-hint.js\n
codemirror/addon/hint/anyword-hint.js\n
codemirror/addon/fold/foldgutter.css\n
codemirror/addon/fold/foldcode.js\n
codemirror/addon/fold/foldgutter.js\n
codemirror/addon/fold/indent-fold.js\n
codemirror/addon/fold/comment-fold.js\n
codemirror/addon/merge/merge.css\n
diff_match_patch/javascript/diff_match_patch_uncompressed.js\n
codemirror/addon/merge/merge.js\n
codemirror/addon/lint/lint.css\n
codemirror/addon/lint/lint.js\n
jshint.js\n
codemirror/addon/lint/javascript-lint.js\n
csslint.js\n
codemirror/addon/lint/css-lint.js\n
codemirror/mode/xml/xml.js\n
codemirror/mode/javascript/javascript.js\n
codemirror/mode/css/css.js\n
codemirror/mode/htmlmixed/htmlmixed.js\n
codemirror.gadget.js\n
NETWORK:\n
*</string> </value>
</item>
......@@ -310,7 +348,7 @@ NETWORK:\n
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <string>vincent</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -324,7 +362,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.11887.7068.10717</string> </value>
<value> <string>964.56117.35717.62617</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -342,7 +380,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1515517761.42</float>
<float>1516267653.77</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -220,8 +220,10 @@ drive_app_landing_page.html\n
gadget_officejs_drive_app_router.html\n
gadget_officejs_jio_drive_record_view.html\n
gadget_officejs_jio_drive_record_view.js\n
GADGET:\n
officejs_setting_gadget/\n
\n
#setting\n
gadget_officejs_setting.js\n
gadget_officejs_setting.html\n
NETWORK:\n
*</string> </value>
</item>
......@@ -350,7 +352,7 @@ NETWORK:\n
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <string>vincent</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -364,7 +366,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.52711.11260.52684</string> </value>
<value> <string>964.45561.47559.9591</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -382,8 +384,8 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1508137848.27</float>
<string>GMT+9</string>
<float>1515771172.06</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
......@@ -7,12 +7,10 @@
function AppCacheStorage(spec) {
this._manifest = spec.manifest;
this._gadget = spec.gadget;
this._take_installer = spec.take_installer || false;
this._origin_url = spec.origin_url !== undefined ?
spec.origin_url : window.location.href;
this._version = spec.version || "";
this._gadget_list = [];
this._prefix = spec.prefix || "./";
this._documents = {};
// Harcoded here, find a better way.
......@@ -26,8 +24,7 @@
this._prefix + "gadget_officejs_bootloader_serviceworker.js",
this._prefix + "gadget_erp5_nojqm.css",
this._prefix + "officejs_logo.png",
this._prefix + "jio_appcachestorage.js",
this._prefix + "jio_limitalldocsstorage.js"
this._prefix + "jio_appcachestorage.js"
];
} else {
this._relative_url_list = [this._prefix + "/"];
......@@ -51,13 +48,6 @@
AppCacheStorage.prototype.getAttachment = function (origin_url,
relative_url) {
var storage = this;
if (storage._gadget_list.indexOf(relative_url) >= 0) {
return window.Bootloader.declareAndInstall(relative_url)
.push(function () {
return new Blob([]);
});
}
return new RSVP.Queue()
.push(function () {
return jIO.util.ajax({
......@@ -77,9 +67,6 @@
for (i = 0; i < len; i += 1) {
result[this._relative_url_list[i]] = {};
}
for (i = 0; i < this._gadget_list.length; i += 1) {
result[this._gadget_list[i]] = {};
}
return result;
}
return [];
......@@ -120,22 +107,17 @@
storage._relative_url_list.push(storage._version + storage._manifest);
for (i = 0; i < relative_url_list.length; i += 1) {
if (relative_url_list[i].indexOf("NETWORK:") >= 0) {
take = 3;
} else if (relative_url_list[i].indexOf('GADGET:') >= 0) {
take = 2;
take = false;
} else if (relative_url_list[i] !== "" &&
relative_url_list[i].charAt(0) !== '#' &&
relative_url_list[i].charAt(0) !== ' ') {
if (take === 1) {
storage._relative_url_list.push(
storage._version + relative_url_list[i]
);
} else if (take === 2) {
storage._gadget_list.push(relative_url_list[i]);
}
relative_url_list[i].charAt(0) !== ' ' &&
take) {
storage._relative_url_list.push(
storage._version + relative_url_list[i]
);
}
if (relative_url_list[i].indexOf("CACHE:") >= 0) {
take = 1;
take = true;
}
}
})
......
......@@ -239,7 +239,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.23286.30579.38041</string> </value>
<value> <string>964.50005.13436.62685</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -257,7 +257,7 @@
</tuple>
<state>
<tuple>
<float>1510304670.05</float>
<float>1515753347.5</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -9,138 +9,85 @@
application_dict = {
"Text Editor": {
"url": "officejs_text_editor/",
"cache": "gadget_officejs_text_editor.appcache",
"sub_gadget": ["officejs_setting_gadget"]
"cache": "gadget_officejs_text_editor.appcache"
},
"Illustration Editor": {
"url": "officejs_svg_editor/",
"cache": "gadget_officejs_illustration.appcache",
"sub_gadget": ["officejs_svg_editor_gadget", "officejs_setting_gadget"]
"cache": "gadget_officejs_illustration.appcache"
},
"PDF Viewer": {
"url": "officejs_pdf_viewer/",
"cache": "gadget_officejs_pdf_viewer.appcache",
"sub_gadget": ["officejs_pdf_viewer_gadget", "officejs_setting_gadget"]
"cache": "gadget_officejs_pdf_viewer.appcache"
},
"Cribjs": {
"url": "officejs_cribjs/",
"cache": "gadget_officejs_crib.appcache",
"sub_gadget": ["officejs_codemirror", "officejs_setting_gadget"]
"cache": "gadget_officejs_crib.appcache"
},
"Bookmark Manager": {
"url": "officejs_bookmark_manager/",
"cache" : "gadget_officejs_bookmark_manager.appcache",
"sub_gadget": ["officejs_setting_gadget"]
"cache" : "gadget_officejs_bookmark_manager.appcache"
},
"Onlyoffice Text": {
"url": "ooffice_text/",
"cache": "gadget_ooffice_text.appcache",
"sub_gadget": ["ooffice_onlyoffice_gadget", "officejs_setting_gadget"]
"cache": "gadget_ooffice_text.appcache"
},
"Onlyoffice Spreadsheet": {
"url": "ooffice_spreadsheet/",
"cache": "gadget_ooffice_spreadsheet.appcache",
"sub_gadget": ["ooffice_onlyoffice_gadget", "officejs_setting_gadget"]
"cache": "gadget_ooffice_spreadsheet.appcache"
},
"Onlyoffice Presentation": {
"url": "ooffice_presentation/",
"cache": "gadget_ooffice_presentation.appcache",
"sub_gadget": ["ooffice_onlyoffice_gadget", "officejs_setting_gadget"]
"cache": "gadget_ooffice_presentation.appcache"
},
"Web Table Editor": {
"url": "officejs_web_table_editor/",
"cache": "gadget_officejs_web_table.appcache",
"sub_gadget": [
"officejs_web_table_editor_gadget",
"officejs_setting_gadget"
]
"cache": "gadget_officejs_web_table.appcache"
},
"Image Editor": {
"url": "officejs_image_editor/",
"cache": "gadget_officejs_image_editor.appcache",
"sub_gadget": [
"officejs_image_editor_gadget",
"officejs_setting_gadget"
]
"cache": "gadget_officejs_image_editor.appcache"
},
"Awesome Free Software Publisher List": {
"url": "afs/",
"cache": "gadget_erp5_afs.appcache",
"no_installer": true,
"sub_gadget": []
"no_installer": true
},
"Jabber Client": {
"url": "jabber_client/",
"cache": "gadget_jabberclient.appcache",
"no_installer": true,
"sub_gadget": ["connection"]
"no_installer": true
},
"Monitoring App": {
"url": "officejs_monitoring/",
"cache" : "gadget_officejs_monitoring.appcache",
"sub_gadget": []
"cache" : "gadget_officejs_monitoring.appcache"
},
"App Store": {
"url": "officejsoldv1/",
"cache": "officejs_store.appcache",
"no_installer": true,
"sub_gadget": []
"no_installer": true
},
"MediaPlayer": {
"url": "officejs_audioplayer/",
"cache": "gadget_officejs_audioplayer.appcache",
"no_installer": true,
"sub_gadget": []
"no_installer": true
},
"Trade Application": {
"url": "osp-9/",
"cache": "gadget_trade_application.appcache",
"no_installer": true,
"sub_gadget": []
"no_installer": true
},
"Todomvc": {
"url": "officejs_todomvc/",
"cache": "officejs_todomvc.appcache",
"no_installer": true,
"sub_gadget": []
"no_installer": true
},
"Wall Search": {
"url": "officejs_wallsearch/",
"cache": "gadget_erp5_page_ojs_wallsearch.appcache",
"sub_gadget": []
"cache": "gadget_erp5_page_ojs_wallsearch.appcache"
},
"Drive App": {
"url": "officejs_drive_app/",
"cache": "gadget_officejs_drive_app.appcache",
"sub_gadget": ["officejs_setting_gadget"]
},
"connection": {
"cache": "gadget_jabberconnection.appcache",
"no_installer": true
},
"officejs_ckeditor_gadget": {
"cache": "gadget_ckeditor.appcache"
},
"officejs_setting_gadget": {
"cache": "gadget_officejs_setting.appcache"
},
"officejs_svg_editor_gadget": {
"cache": "gadget_officejs_svg_editor.appcache"
},
"officejs_pdf_viewer_gadget": {
"cache": "gadget_officejs_pdf_viewer_gadget.appcache"
},
"officejs_codemirror": {
"cache": "gadget_officejs_codemirror.appcache"
},
"ooffice_onlyoffice_gadget": {
"cache": "onlyoffice.gadget.appcache"
},
"officejs_web_table_editor_gadget": {
"cache": "gadget_officejs_web_table_editor.appcache"
},
"officejs_image_editor_gadget": {
"cache": "gadget_officejs_image_editor_gadget.appcache"
"cache": "gadget_officejs_drive_app.appcache"
}
};
......@@ -157,32 +104,10 @@
}
app = application_dict[form_result.web_site];
zip_name = form_result.filename;
len = app.sub_gadget.length;
function fill(zip_file) {
if (i < len) {
var sub_app = app.sub_gadget[i];
return gadget.fillZip(
application_dict[sub_app].cache,
origin_url + app.url,
application_dict[sub_app].no_installer,
zip_file,
sub_app + "/"
)
.push(function (zip_file) {
i += 1;
return fill(zip_file);
});
}
return zip_file;
}
return gadget.fillZip(app.cache, origin_url + app.url, app.no_installer)
.push(function (zip_file) {
return fill(zip_file);
})
.push(function (zip_file) {
var element = gadget.props.element,
var element = gadget.element,
a = document.createElement("a"),
url = URL.createObjectURL(zip_file),
default_name = form_result.web_site.toLocaleLowerCase()
......@@ -200,13 +125,8 @@
rJS(window)
.ready(function (g) {
g.props = {};
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
.declareMethod("fillZip", function (cache_file, site_url, no_installer,
zip_file, prefix) {
.declareMethod("fillZip", function (cache_file, site_url, no_installer) {
var gadget = this,
file_storage = jIO.createJIO({
type: "replicate",
......@@ -225,7 +145,7 @@
take_installer: no_installer === undefined,
manifest: cache_file,
origin_url: site_url,
prefix: './' + (prefix || "")
prefix: './'
}
},
signature_sub_storage: {
......@@ -235,8 +155,7 @@
}
},
local_sub_storage: {
type: "zipfile",
file: zip_file
type: "zipfile"
}
});
return file_storage.repair()
......@@ -253,7 +172,7 @@
return new RSVP.Queue()
.push(function () {
return loopEventListener(
gadget.props.element.querySelector('form.export-form'),
gadget.element.querySelector('form.export-form'),
'submit',
true,
function (event) {
......
......@@ -254,7 +254,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.45862.32132.53930</string> </value>
<value> <string>964.50048.10199.31402</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -272,7 +272,7 @@
</tuple>
<state>
<tuple>
<float>1515504420.29</float>
<float>1515755593.09</float>
<string>UTC</string>
</tuple>
</state>
......
/*jslint indent:2, maxlen: 80, nomen: true */
/*global jIO */
(function (jIO) {
"use strict";
function LimitAllDocsStorage(spec) {
this._document = spec.document;
this._sub_storage = jIO.createJIO(spec.sub_storage);
}
LimitAllDocsStorage.prototype.get = function () {
return this._sub_storage.get.apply(this._sub_storage, arguments);
};
LimitAllDocsStorage.prototype.allAttachments = function () {
return this._sub_storage.allAttachments.apply(this._sub_storage, arguments);
};
LimitAllDocsStorage.prototype.post = function () {
return this._sub_storage.post.apply(this._sub_storage, arguments);
};
LimitAllDocsStorage.prototype.put = function () {
return this._sub_storage.put.apply(this._sub_storage, arguments);
};
LimitAllDocsStorage.prototype.remove = function () {
return this._sub_storage.remove.apply(this._sub_storage, arguments);
};
LimitAllDocsStorage.prototype.getAttachment = function () {
return this._sub_storage.getAttachment.apply(this._sub_storage, arguments);
};
LimitAllDocsStorage.prototype.putAttachment = function () {
return this._sub_storage.putAttachment.apply(this._sub_storage, arguments);
};
LimitAllDocsStorage.prototype.removeAttachment = function () {
return this._sub_storage.removeAttachment.apply(this._sub_storage,
arguments);
};
LimitAllDocsStorage.prototype.repair = function () {
return this._sub_storage.repair.apply(this._sub_storage, arguments);
};
LimitAllDocsStorage.prototype.hasCapacity = function (name) {
return this._sub_storage.hasCapacity(name);
};
LimitAllDocsStorage.prototype.buildQuery = function (options) {
var storage = this;
return this._sub_storage.allDocs(options)
.push(function (result) {
var i;
for (i = 0; i < result.data.total_rows; i += 1) {
if (result.data.rows[i].id === storage._document) {
return [result.data.rows[i]];
}
}
return [];
});
};
jIO.addStorage('limitalldocs', LimitAllDocsStorage);
}(jIO));
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<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>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<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>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>classification/collaborative/team</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>jio_limitalldocsstorage.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jio_limitalldocsstorage_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>jio_limitalldocsstorage.js</string> </value>
</item>
<item>
<key> <string>url_string</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<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>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>vincent</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></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>1510304598.08</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</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>vincent</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>963.23304.55584.3447</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>1510305441.52</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>vincent</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</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>1510304182.99</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -198,7 +198,6 @@ gadget_erp5_search_editor.html\n
jio_cachealldocsstorage.js\n
wallsearch_privacy_policy.html\n
fb_sdk.js\n
GADGET:\n
NETWORK:\n
*</string> </value>
</item>
......@@ -327,7 +326,7 @@ NETWORK:\n
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <string>vincent</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -341,7 +340,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.22868.65392.39372</string> </value>
<value> <string>964.45561.47559.9591</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -359,7 +358,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1506433645.19</float>
<float>1515773947.57</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