Commit d8629357 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_officejs] Add a generic HTML5 application launcher

This top gadget can be reused by any HTML5 application who want the same layout.
The configuration is done on the Web Site level with the 'WebSection_viewHateoasPreference' configuration form.
parent 8149ac3d
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Page" 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>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_officejs_header.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_officejs_header_html</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 Page</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!DOCTYPE html>\n
<html>\n
<head>\n
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />\n
<meta name="viewport" content="width=device-width, user-scalable=no" />\n
<title>OfficeJS Header</title>\n
\n
<!-- renderjs -->\n
<script src="rsvp.js" type="text/javascript"></script>\n
<script src="renderjs.js" type="text/javascript"></script>\n
<script src="handlebars.js" type="text/javascript"></script>\n
<script src="gadget_global.js" type="text/javascript"></script>\n
\n
<!-- custom script -->\n
<script src="gadget_officejs_header.js" type="text/javascript"></script>\n
\n
<script id="header-title-link-template" type="text/x-handlebars-template"><a data-i18n="{{title}}" class="ui-btn ui-btn-icon-left ui-icon-arrow-down" href="{{url}}">{{title}}</a></script>\n
<script id="header-title-template" type="text/x-handlebars-template"><span data-i18n="{{title}}">{{title}}</span></script>\n
\n
<script id="header-link-template" type="text/x-handlebars-template">\n
<a role="button" data-i18n="{{title}}" href="{{url}}" class="responsive ui-btn ui-icon-{{icon}} ui-btn-icon-left ui-first-child ui-last-child {{class}}">{{title}}</a>\n
</script>\n
\n
<script id="header-button-template" type="text/x-handlebars-template">\n
<form><button name=\'{{name}}\' data-i18n="{{title}}" type=\'submit\' class=\'responsive ui-btn ui-icon-{{icon}} ui-btn-icon-left ui-first-child ui-last-child {{class}}\'>{{title}}</button></form>\n
</script>\n
\n
</head>\n
<body>\n
\n
<!--div data-role="header" data-theme="a" class="ui-header ui-bar-a" data-position="fixed" data-tap-toggle="false"-->\n
<div data-role="header" data-theme="a" class="ui-header ui-bar-a" data-tap-toggle="false">\n
\n
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-left">\n
<div class="ui-controlgroup-controls">\n
</div>\n
</div>\n
\n
<h1 class="ui-title"></h1>\n
\n
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-right">\n
<div class="ui-controlgroup-controls">\n
</div>\n
</div>\n
\n
</div>\n
\n
</body>\n
</html>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget OfficeJS Header</string> </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>romain</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>1441100902.46</float>
<string>GMT</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>romain</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>945.33687.51029.49834</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>1441358902.36</float>
<string>GMT</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>romain</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>1441100852.06</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?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>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_officejs_header.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_officejs_header_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>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*jslint nomen: true, indent: 2, maxerr: 3 */\n
/*global window, rJS, Handlebars, document, loopEventListener, RSVP */\n
(function (window, rJS, Handlebars, document, loopEventListener, RSVP) {\n
"use strict";\n
\n
/////////////////////////////////////////////////////////////////\n
// Handlebars\n
/////////////////////////////////////////////////////////////////\n
// Precompile the templates while loading the first gadget instance\n
var gadget_klass = rJS(window),\n
\n
header_title_source = gadget_klass.__template_element\n
.getElementById("header-title-template")\n
.innerHTML,\n
header_title_template = Handlebars.compile(header_title_source),\n
\n
header_title_link_source = gadget_klass.__template_element\n
.getElementById("header-title-link-template")\n
.innerHTML,\n
header_title_link_template = Handlebars.compile(header_title_link_source),\n
\n
header_button_source = gadget_klass.__template_element\n
.getElementById("header-button-template")\n
.innerHTML,\n
header_button_template = Handlebars.compile(header_button_source),\n
header_link_source = gadget_klass.__template_element\n
.getElementById("header-link-template")\n
.innerHTML,\n
header_link_template = Handlebars.compile(header_link_source);\n
\n
gadget_klass\n
/////////////////////////////////////////////////////////////////\n
// ready\n
/////////////////////////////////////////////////////////////////\n
// Init local properties\n
.ready(function (g) {\n
g.props = {};\n
g.stats = {\n
loaded: false,\n
modified: false,\n
submitted: true,\n
error: false,\n
options: {}\n
};\n
})\n
\n
// Assign the element to a variable\n
.ready(function (g) {\n
return g.getElement()\n
.push(function (element) {\n
g.props.element = element;\n
g.props.left_link = element.querySelector(".ui-btn-left > div");\n
g.props.right_link = element.querySelector(".ui-btn-right > div");\n
g.props.title_element = element.querySelector("h1");\n
});\n
})\n
/*\n
.ready(function (g) {\n
return g.render(g.stats.options);\n
})\n
*/\n
//////////////////////////////////////////////\n
// acquired methods\n
//////////////////////////////////////////////\n
.declareAcquiredMethod("translateHtml", "translateHtml")\n
.declareAcquiredMethod("getUrlFor", "getUrlFor")\n
.declareAcquiredMethod("triggerSubmit", "triggerSubmit")\n
.declareAcquiredMethod("triggerPanel", "triggerPanel")\n
\n
/////////////////////////////////////////////////////////////////\n
// declared methods\n
/////////////////////////////////////////////////////////////////\n
/*\n
.declareMethod(\'notifyError\', function () {\n
this.stats.loaded = true;\n
this.stats.submitted = true;\n
this.stats.error = true;\n
var gadget = this;\n
return this.render(this.stats.options)\n
.push(function () {\n
gadget.stats.error = false;\n
});\n
})\n
.declareMethod(\'notifyUpdate\', function () {\n
return this.render(this.stats.options);\n
})\n
*/\n
.declareMethod(\'notifyLoading\', function () {\n
if (this.stats.loaded) {\n
this.stats.loaded = false;\n
return this.render(this.stats.options);\n
}\n
})\n
.declareMethod(\'notifyLoaded\', function () {\n
if (!this.stats.loaded) {\n
this.stats.loaded = true;\n
return this.render(this.stats.options);\n
}\n
})\n
/*\n
.declareMethod(\'notifyChange\', function () {\n
if (!this.stats.modified) {\n
this.stats.modified = true;\n
return this.render(this.stats.options);\n
}\n
})\n
.declareMethod(\'notifySubmitting\', function () {\n
if (this.stats.submitted) {\n
this.stats.submitted = false;\n
return this.render(this.stats.options);\n
}\n
})\n
.declareMethod(\'notifySubmitted\', function () {\n
if (!this.stats.submitted) {\n
this.stats.submitted = true;\n
// Change modify here, to allow user to redo some modification and being correctly notified\n
this.stats.modified = false;\n
return this.render(this.stats.options);\n
}\n
})\n
*/\n
.declareMethod(\'render\', function (options) {\n
var gadget = this,\n
possible_left_link_list = [\n
// [\'menu_url\', \'Menu\', \'bars\'],\n
[\'selection_url\', \'Back\', \'arrow-left\'],\n
[\'view_url\', \'View\', \'check\'],\n
[\'cancel_url\', \'Cancel\', \'times\'],\n
[\'back_url\', \'Back\', \'arrow-left\']\n
],\n
possible_left_button_list = [\n
[\'panel_action\', \'Menu\', \'bars\', \'panel\']\n
],\n
possible_right_link_list = [\n
[\'edit_url\', \'Edit\', \'pencil\'],\n
[\'add_url\', \'Add\', \'plus\'],\n
[\'new_url\', \'New\', \'plus\']\n
],\n
possible_right_button_list = [\n
[\'save_action\', \'Save\', \'check\', \'submit\'],\n
[\'submit_action\', \'Proceed\', \'check\', \'submit\']\n
],\n
i,\n
klass,\n
//left_link = {\n
// title: "Menu",\n
// icon: "bars",\n
// url: "#leftpanel",\n
// class: "ui-disabled"\n
// },\n
left_link,\n
left_button,\n
right_link,\n
right_button,\n
default_right_text,\n
default_right_icon = "",\n
title_link = {},\n
promise_list = [];\n
\n
gadget.stats.options = options;\n
// Handle main title\n
if (options.hasOwnProperty("title")) {\n
title_link.title = options.title;\n
// Updating globally the page title. Does not follow RenderJS philosophy, but, it is enough for now\n
document.title = title_link.title;\n
}\n
if (options.hasOwnProperty("breadcrumb_url")) {\n
title_link.url = options.breadcrumb_url;\n
promise_list.push(gadget.translateHtml(header_title_link_template(title_link)));\n
} else {\n
promise_list.push(gadget.translateHtml(header_title_template(title_link)));\n
}\n
\n
// Handle left link\n
for (i = 0; i < possible_left_link_list.length; i += 1) {\n
if (options.hasOwnProperty(possible_left_link_list[i][0])) {\n
klass = "";\n
if (!options[possible_left_link_list[i][0]]) {\n
klass = "ui-disabled";\n
}\n
left_link = {\n
title: possible_left_link_list[i][1],\n
icon: possible_left_link_list[i][2],\n
url: options[possible_left_link_list[i][0]],\n
class: klass\n
};\n
}\n
}\n
for (i = 0; i < possible_left_button_list.length; i += 1) {\n
if (options.hasOwnProperty(possible_left_button_list[i][0])) {\n
left_button = {\n
title: possible_left_button_list[i][1],\n
icon: possible_left_button_list[i][2],\n
name: possible_left_button_list[i][3]\n
};\n
}\n
}\n
if (left_button !== undefined) {\n
promise_list.push(gadget.translateHtml(header_button_template(left_button)));\n
} else if (left_link === undefined) {\n
promise_list.push(gadget.translateHtml(""));\n
} else {\n
promise_list.push(gadget.translateHtml(header_link_template(left_link)));\n
}\n
\n
// Handle right link\n
if (gadget.stats.error) {\n
default_right_icon = "exclamation";\n
} else if (!gadget.stats.loaded) {\n
default_right_icon = "spinner";\n
// Show default loading information\n
right_link = {\n
title: "Loading",\n
icon: default_right_icon,\n
url: "",\n
class: "ui-disabled ui-icon-spin"\n
};\n
} else if (!gadget.stats.submitted) {\n
default_right_icon = "spinner";\n
} else if (gadget.stats.modified) {\n
default_right_text = "Save";\n
default_right_icon = "warning";\n
}\n
for (i = 0; i < possible_right_link_list.length; i += 1) {\n
if (options.hasOwnProperty(possible_right_link_list[i][0])) {\n
klass = "";\n
if (!options[possible_right_link_list[i][0]]) {\n
klass = "ui-disabled";\n
}\n
right_link = {\n
title: possible_right_link_list[i][1],\n
icon: default_right_icon || possible_right_link_list[i][2],\n
url: options[possible_right_link_list[i][0]],\n
class: klass\n
};\n
}\n
}\n
for (i = 0; i < possible_right_button_list.length; i += 1) {\n
if (options.hasOwnProperty(possible_right_button_list[i][0])) {\n
right_button = {\n
title: default_right_text || possible_right_button_list[i][1],\n
icon: default_right_icon || possible_right_button_list[i][2],\n
name: possible_right_button_list[i][3]\n
};\n
if (gadget.stats.error) {\n
right_button.class = "ui-disabled";\n
}\n
}\n
}\n
if (right_button !== undefined) {\n
promise_list.push(gadget.translateHtml(header_button_template(right_button)));\n
} else if (right_link !== undefined) {\n
promise_list.push(gadget.translateHtml(header_link_template(right_link)));\n
} else {\n
promise_list.push(gadget.translateHtml(""));\n
}\n
\n
return new RSVP.Queue()\n
.push(function () {\n
return RSVP.all(promise_list);\n
})\n
.push(function (my_translated_html_list) {\n
gadget.props.title_element.innerHTML = my_translated_html_list[0];\n
gadget.props.left_link.innerHTML = my_translated_html_list[1];\n
gadget.props.right_link.innerHTML = my_translated_html_list[2];\n
});\n
})\n
\n
//////////////////////////////////////////////\n
// handle button click\n
//////////////////////////////////////////////\n
.declareService(function () {\n
var form_gadget = this;\n
\n
function formSubmit(evt) {\n
var button = evt.target[0],\n
name = button.getAttribute("name");\n
if (name === "panel") {\n
return form_gadget.triggerPanel();\n
}\n
if (name === "submit") {\n
return form_gadget.triggerSubmit();\n
}\n
throw new Error("Unsupported button " + name);\n
}\n
\n
// Listen to form submit\n
return loopEventListener(\n
form_gadget.props.element,\n
\'submit\',\n
false,\n
formSubmit\n
);\n
});\n
\n
}(window, rJS, Handlebars, document, loopEventListener, RSVP));
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget OfficeJS Header JS</string> </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>romain</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>1441100988.32</float>
<string>GMT</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>romain</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>945.33689.22724.47940</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>1441358975.69</float>
<string>GMT</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>romain</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>1441100929.74</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Page" 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/>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>contributors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>officejs_launcher.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>officejs_launcher_html</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 Page</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!doctype html>\n
<html manifest="${manifest_url}">\n
<head>\n
<meta charset="utf-8">\n
<meta name="viewport" content="width=device-width, initial-scale=1">\n
<link rel="shortcut icon" href="favicon.ico">\n
\n
<title>${application_title}</title>\n
\n
<link href="//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />\n
<link rel="stylesheet" href="jquerymobile.css">\n
<link rel="stylesheet" href="gadget_erp5.css">\n
\n
<script data-renderjs-configuration="application_title" type="text/x-renderjs-configuration">${application_title}</script>\n
<script data-renderjs-configuration="panel_gadget" type="text/x-renderjs-configuration">${panel_gadget}</script>\n
<script data-renderjs-configuration="action_view" type="text/x-renderjs-configuration">${action_view}</script>\n
<script data-renderjs-configuration="default_view_reference" type="text/x-renderjs-configuration">${default_view_reference}</script>\n
<script data-renderjs-configuration="hateoas_url" type="text/x-renderjs-configuration">${hateoas_url}</script>\n
\n
<script src="jquery.js"></script>\n
<script src="jquerymobile.js"></script>\n
<script src="rsvp.js"></script>\n
<script src="renderjs.js"></script>\n
<script src="gadget_global.js" ></script>\n
<script src="officejs_launcher.js"></script>\n
\n
</head>\n
\n
<body>\n
<div data-role="page">\n
\n
<!--div data-role="panel" id="mypanel" data-position="left" data-display="overlay" data-theme="d">\n
</div-->\n
\n
<!--div data-role="header" class="gadget-header" data-theme="a">\n
<a href="#mypanel" class="ui-btn-left ui-btn ui-btn-inline ui-mini ui-corner-all"></a>\n
<div><h1 class="ui-title"></h1></div>\n
</div-->\n
\n
<div data-gadget-url="${router_gadget}"\n
data-gadget-scope="router"\n
data-gadget-sandbox="public"></div>\n
\n
<div data-gadget-url="${translation_gadget}"\n
data-gadget-scope="translation_gadget"\n
data-gadget-sandbox="public"></div>\n
\n
<div data-gadget-url="gadget_officejs_header.html"\n
data-gadget-scope="header"\n
data-gadget-sandbox="public"></div>\n
\n
<div data-gadget-url="${jio_gadget}"\n
data-gadget-scope="jio_gadget"\n
data-gadget-sandbox="public"></div>\n
\n
<div data-gadget-url="${panel_gadget}"\n
data-gadget-scope="panel"\n
data-gadget-sandbox="public"></div>\n
\n
<div role="main" class="ui-content gadget-content"></div>\n
</div>\n
\n
</body>\n
</html>\n
]]></string> </value>
</item>
<item>
<key> <string>text_content_substitution_mapping_method_id</string> </key>
<value> <string>WebPage_getRenderJSSubstitutionMappingDict</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>OfficeJS Application Launcher</string> </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>romain</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>1440771124.2</float>
<string>GMT</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>romain</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>945.31049.20388.20360</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>1441200593.5</float>
<string>GMT</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>romain</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>1440770776.61</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?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/>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>contributors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>officejs_launcher.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>officejs_launcher_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>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*globals window, document, RSVP, rJS,\n
loopEventListener, jQuery, URI, location, XMLHttpRequest, console*/\n
/*jslint indent: 2, maxlen: 80*/\n
(function (window, document, RSVP, rJS, loopEventListener,\n
$, XMLHttpRequest, location, console) {\n
"use strict";\n
\n
$.mobile.ajaxEnabled = false;\n
$.mobile.linkBindingEnabled = false;\n
$.mobile.hashListeningEnabled = false;\n
$.mobile.pushStateEnabled = false;\n
\n
var MAIN_SCOPE = "m";\n
\n
function renderMainGadget(gadget, url, options) {\n
return gadget.declareGadget(url, {\n
scope: MAIN_SCOPE\n
})\n
.push(function (page_gadget) {\n
if (page_gadget.render === undefined) {\n
return [page_gadget];\n
}\n
return RSVP.all([\n
page_gadget,\n
page_gadget.render(options)\n
]);\n
})\n
.push(function (all_result) {\n
return all_result[0];\n
});\n
}\n
\n
function initHeaderOptions(gadget) {\n
gadget.props.header_argument_list = {\n
panel_action: true,\n
title: gadget.props.application_title || "OfficeJS"\n
};\n
}\n
\n
function route(my_root_gadget, my_scope, my_method, my_param_list) {\n
return RSVP.Queue()\n
.push(function () {\n
return my_root_gadget.getDeclaredGadget(my_scope);\n
})\n
.push(function (my_gadget) {\n
if (my_param_list) {\n
return my_gadget[my_method].apply(my_gadget, my_param_list);\n
}\n
return my_gadget[my_method]();\n
});\n
}\n
\n
function updateHeader(gadget) {\n
return gadget.getDeclaredGadget("header")\n
.push(function (header_gadget) {\n
return header_gadget.render(gadget.props.header_argument_list);\n
});\n
}\n
\n
function increaseLoadingCounter(gadget) {\n
return new RSVP.Queue()\n
.push(function () {\n
gadget.props.loading_counter += 1;\n
if (gadget.props.loading_counter === 1) {\n
return gadget.getDeclaredGadget("header")\n
.push(function (header_gadget) {\n
return header_gadget.notifyLoading();\n
});\n
}\n
});\n
}\n
\n
function decreaseLoadingCounter(gadget) {\n
return new RSVP.Queue()\n
.push(function () {\n
gadget.props.loading_counter -= 1;\n
if (gadget.props.loading_counter < 0) {\n
gadget.props.loading_counter = 0;\n
// throw new Error("Unexpected negative loading counter");\n
}\n
if (gadget.props.loading_counter === 0) {\n
return gadget.getDeclaredGadget("header")\n
.push(function (header_gadget) {\n
return header_gadget.notifyLoaded();\n
});\n
}\n
});\n
}\n
\n
function callJioGadget(gadget, method, param_list) {\n
var called = false;\n
return new RSVP.Queue()\n
.push(function () {\n
called = true;\n
return increaseLoadingCounter(gadget);\n
})\n
.push(function () {\n
return gadget.getDeclaredGadget("jio_gadget");\n
})\n
.push(function (jio_gadget) {\n
return jio_gadget[method].apply(jio_gadget, param_list);\n
})\n
.push(function (result) {\n
return decreaseLoadingCounter(gadget)\n
.push(function () {\n
return result;\n
});\n
}, function (error) {\n
if (called) {\n
return decreaseLoadingCounter(gadget)\n
.push(function () {\n
throw error;\n
});\n
}\n
throw error;\n
});\n
}\n
\n
function displayErrorContent(gadget, error) {\n
// Do not break the application in case of errors.\n
// Display it to the user for now,\n
// and allow user to go back to the frontpage\n
var error_text = "";\n
\n
if (error instanceof XMLHttpRequest) {\n
error_text = error.toString() + " " +\n
error.status + " " +\n
error.statusText;\n
} else if (error instanceof Error) {\n
error_text = error.toString();\n
} else {\n
error_text = JSON.stringify(error);\n
}\n
\n
console.error(error);\n
if (error instanceof Error) {\n
console.error(error.stack);\n
}\n
// XXX Improve error rendering\n
gadget.props.content_element.innerHTML = "<br/><br/><br/><pre></pre>";\n
gadget.props.content_element.querySelector(\'pre\').textContent =\n
"Error: " + error_text;\n
// XXX Notify error\n
}\n
\n
function displayError(gadget, error) {\n
return new RSVP.Queue()\n
.push(function () {\n
return displayErrorContent(gadget, error);\n
})\n
.push(function () {\n
return gadget.dropGadget(MAIN_SCOPE)\n
.push(undefined, function () {\n
// Do not crash the app if the pg gadget in not defined\n
// ie, keep the original error on screen\n
return;\n
});\n
});\n
}\n
\n
//////////////////////////////////////////\n
// Page rendering\n
//////////////////////////////////////////\n
/*\n
function redirectToDefaultPage(gadget) {\n
return gadget.pleaseRedirectMyHash(\'#\');\n
}\n
*/\n
rJS(window)\n
.ready(function (g) {\n
g.props = {};\n
return g.getElement()\n
.push(function (element) {\n
$(element).trigger("create");\n
g.props.loading_counter = 0;\n
g.props.element = element;\n
g.props.content_element = element.querySelector(\'.gadget-content\');\n
});\n
})\n
\n
.ready(function (g) {\n
// Extract configuration parameters stored in HTML\n
// XXX Will work only if top gadget...\n
var element_list =\n
document.querySelectorAll("[data-renderjs-configuration]"),\n
len = element_list.length,\n
key,\n
value,\n
i;\n
\n
for (i = 0; i < len; i += 1) {\n
key = element_list[i].getAttribute(\'data-renderjs-configuration\');\n
value = element_list[i].textContent;\n
if (value !== "") {\n
g.props[key] = value;\n
}\n
}\n
})\n
\n
// Configure jIO storage\n
.ready(function (g) {\n
return g.getDeclaredGadget("jio_gadget")\n
.push(function (jio_gadget) {\n
return jio_gadget.createJio({\n
hateoas_url: (new URI(g.props.hateoas_url))\n
.absoluteTo(location.href)\n
.toString()\n
});\n
});\n
})\n
.ready(function (g) {\n
return g.getDeclaredGadget(\'panel\')\n
.push(function (panel_gadget) {\n
return panel_gadget.render();\n
});\n
})\n
\n
//////////////////////////////////////////\n
// Acquired method\n
//////////////////////////////////////////\n
.declareAcquiredMethod(\'pleaseRedirectMyHash\', \'pleaseRedirectMyHash\')\n
\n
//////////////////////////////////////////\n
// Allow Acquisition\n
//////////////////////////////////////////\n
.allowPublicAcquisition("translateHtml", function (argument_list) {\n
return this.getDeclaredGadget("translation_gadget")\n
.push(function (translation_gadget) {\n
return translation_gadget.translateHtml(argument_list[0]);\n
});\n
})\n
.allowPublicAcquisition("translate", function (argument_list) {\n
return this.getDeclaredGadget("translation_gadget")\n
.push(function (translation_gadget) {\n
return translation_gadget.translate(argument_list[0]);\n
});\n
})\n
.allowPublicAcquisition("redirect", function (param_list) {\n
var gadget = this;\n
return gadget.aq_pleasePublishMyState.apply(gadget, param_list)\n
.push(gadget.pleaseRedirectMyHash.bind(gadget));\n
})\n
.allowPublicAcquisition("getUrlFor", function (param_list) {\n
var options = param_list[0],\n
key;\n
for (key in options) {\n
if (options.hasOwnProperty(key)) {\n
if (options[key] === undefined) {\n
throw new Error("Can not generate URL for: " +\n
JSON.stringify(options));\n
}\n
}\n
}\n
return this.aq_pleasePublishMyState(options);\n
})\n
\n
.allowPublicAcquisition("updateHeader", function (param_list) {\n
var gadget = this;\n
initHeaderOptions(gadget);\n
return this.getDeclaredGadget("translation_gadget")\n
.push(function (translation_gadget) {\n
var promise_list = [],\n
key;\n
for (key in param_list[0]) {\n
if (param_list[0].hasOwnProperty(key)) {\n
gadget.props.header_argument_list[key] = param_list[0][key];\n
}\n
}\n
\n
promise_list.push(translation_gadget.translate(\n
gadget.props.header_argument_list.title\n
));\n
if (gadget.props.header_argument_list.hasOwnProperty(\'right_title\')) {\n
promise_list.push(translation_gadget.translate(\n
gadget.props.header_argument_list.right_title\n
));\n
}\n
return RSVP.all(promise_list);\n
})\n
.push(function (result_list) {\n
gadget.props.header_argument_list.title = result_list[0];\n
if (result_list.length === 2) {\n
gadget.props.header_argument_list.right_title = result_list[1];\n
}\n
});\n
})\n
\n
.allowPublicAcquisition(\'triggerPanel\', function () {\n
return route(this, "panel", "toggle");\n
})\n
\n
.allowPublicAcquisition("jio_allDocs", function (param_list) {\n
return callJioGadget(this, "allDocs", param_list);\n
})\n
.allowPublicAcquisition("jio_post", function (param_list) {\n
return callJioGadget(this, "post", param_list);\n
})\n
.allowPublicAcquisition("jio_put", function (param_list) {\n
return callJioGadget(this, "put", param_list);\n
})\n
.allowPublicAcquisition("jio_get", function (param_list) {\n
return callJioGadget(this, "get", param_list);\n
})\n
.allowPublicAcquisition("jio_repair", function (param_list) {\n
return callJioGadget(this, "repair", param_list);\n
})\n
/////////////////////////////////////////////////////////////////\n
// declared methods\n
/////////////////////////////////////////////////////////////////\n
// Render the page\n
.declareMethod(\'render\', function (options) {\n
var gadget = this;\n
\n
gadget.props.options = options;\n
// Reinitialize the loading counter\n
gadget.props.loading_counter = 0;\n
// By default, init the header options to be empty\n
// (ERP5 title by default + sidebar)\n
initHeaderOptions(gadget);\n
return new RSVP.Queue()\n
.push(function () {\n
return increaseLoadingCounter(gadget);\n
})\n
.push(function () {\n
return gadget.getDeclaredGadget(\'router\');\n
})\n
.push(function (router_gadget) {\n
return router_gadget.route(options);\n
})\n
.push(function (route_result) {\n
return renderMainGadget(\n
gadget,\n
route_result.url,\n
route_result.options\n
);\n
})\n
.push(function (main_gadget) {\n
var input;\n
// Append loaded gadget in the page\n
if (main_gadget !== undefined) {\n
return main_gadget.getElement()\n
.push(function (fragment) {\n
var element = gadget.props.content_element,\n
content_container = document.createElement("div");\n
content_container.className = "ui-content " +\n
(gadget.props.sub_header_class || "");\n
// reset subheader indicator\n
delete gadget.props.sub_header_class;\n
\n
// go to the top of the page\n
window.scrollTo(0, 0);\n
\n
updateHeader(gadget);\n
\n
// Clear first to DOM, append after to reduce flickering/manip\n
while (element.firstChild) {\n
element.removeChild(element.firstChild);\n
}\n
content_container.appendChild(fragment);\n
element.appendChild(content_container);\n
\n
$(element).trigger("create");\n
\n
input = element.querySelector("input");\n
if (input !== null) {\n
input.focus();\n
input.select();\n
}\n
// XXX Drop notification\n
// return header_gadget.notifyLoaded();\n
});\n
}\n
})\n
.push(function () {\n
return decreaseLoadingCounter(gadget);\n
}, function (error) {\n
return decreaseLoadingCounter(gadget)\n
.push(function () {\n
throw error;\n
});\n
})\n
.push(undefined, function (error) {\n
return displayError(gadget, error);\n
});\n
})\n
\n
/////////////////////////////////\n
// Handle sub gadgets services\n
/////////////////////////////////\n
.allowPublicAcquisition(\'reportServiceError\', function (param_list,\n
gadget_scope) {\n
if (gadget_scope === undefined) {\n
// don\'t fail in case of dropped subgadget (like previous page)\n
return;\n
}\n
return displayError(this, param_list[0]);\n
})\n
\n
.declareService(function () {\n
////////////////////////////////////\n
// Form submit listening. Prevent browser to automatically\n
// handle the form submit in case of a bug\n
////////////////////////////////////\n
var gadget = this;\n
\n
function catchFormSubmit() {\n
return displayError(gadget, new Error("Unexpected form submit"));\n
}\n
\n
// Listen to form submit\n
return loopEventListener(\n
gadget.props.element,\n
\'submit\',\n
false,\n
catchFormSubmit\n
);\n
});\n
\n
}(window, document, RSVP, rJS, loopEventListener, jQuery,\n
XMLHttpRequest, location, console));
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>OfficeJS Application Launcher JS</string> </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>romain</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>1440771133.94</float>
<string>GMT</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>romain</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>945.33658.35295.955</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>1441357144.63</float>
<string>GMT</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>romain</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>1440770776.62</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -2,3 +2,4 @@ web_page_module/gadget_officejs_**
web_page_module/gadget_ckeditor_**
web_site_module/officejs_text_editor
web_site_module/officejs_text_editor/**
web_page_module/officejs_launcher_**
\ No newline at end of file
......@@ -2,3 +2,4 @@ web_page_module/gadget_officejs_**
web_page_module/gadget_ckeditor_**
web_site_module/officejs_text_editor
web_site_module/officejs_text_editor/**
web_page_module/officejs_launcher_**
\ No newline at end of file
web_page_module/gadget_ckeditor_**
web_page_module/gadget_officejs_**
web_page_module/officejs_launcher_**
web_site_module/officejs_text_editor
web_site_module/officejs_text_editor/**
\ No newline at end of file
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