Commit 9740fe89 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

erp5_travel_expense: Fix travel Expense after update of OfficeJS

parent 647405f1
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
CACHE MANIFEST\n CACHE MANIFEST\n
# generated on Fri, 24 March 2017 11:45:33 +0000\n # generated on Fri, 24 March 2017 11:46:33 +0000\n
# XXX + fonts\n # XXX + fonts\n
# images/ajax-loader.gif\n # images/ajax-loader.gif\n
# version 1.0\n # version 1.0\n
...@@ -135,7 +135,6 @@ jquerymobile.js\n ...@@ -135,7 +135,6 @@ jquerymobile.js\n
renderjs.js\n renderjs.js\n
rsvp.js\n rsvp.js\n
gadget_officejs_header.html\n gadget_officejs_header.html\n
gadget_officejs_jio.html\n
gadget_officejs_page_add_document.html\n gadget_officejs_page_add_document.html\n
gadget_officejs_page_login.html\n gadget_officejs_page_login.html\n
gadget_officejs_page_logout.html\n gadget_officejs_page_logout.html\n
...@@ -145,7 +144,6 @@ gadget_officejs_widget_listbox.html\n ...@@ -145,7 +144,6 @@ gadget_officejs_widget_listbox.html\n
gadget_erp5_editor_panel.html\n gadget_erp5_editor_panel.html\n
gadget_erp5_editor_panel.js\n gadget_erp5_editor_panel.js\n
gadget_officejs_header.js\n gadget_officejs_header.js\n
gadget_officejs_jio.js\n
gadget_officejs_page_add_document.js\n gadget_officejs_page_add_document.js\n
gadget_officejs_page_login.js\n gadget_officejs_page_login.js\n
gadget_officejs_page_logout.js\n gadget_officejs_page_logout.js\n
...@@ -336,7 +334,7 @@ NETWORK:\n ...@@ -336,7 +334,7 @@ NETWORK:\n
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>supercedriclen</string> </value> <value> <string>cedric.le.ninivin</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -350,7 +348,7 @@ NETWORK:\n ...@@ -350,7 +348,7 @@ NETWORK:\n
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>957.20828.35466.8669</string> </value> <value> <string>962.4237.4185.13038</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -368,7 +366,7 @@ NETWORK:\n ...@@ -368,7 +366,7 @@ NETWORK:\n
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1490349225.88</float> <float>1505315376.77</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
<!DOCTYPE html>
<html manifest="${manifest_url}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="favicon.ico">
<title>${application_title}</title>
<link href="font-awesome/font-awesome.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="jquerymobile.css">
<link rel="stylesheet" href="gadget_erp5.css">
<script data-renderjs-configuration="application_title" type="text/x-renderjs-configuration">${application_title}</script>
<script data-renderjs-configuration="panel_gadget" type="text/x-renderjs-configuration">${panel_gadget}</script>
<script data-renderjs-configuration="action_view" type="text/x-renderjs-configuration">${action_view}</script>
<script data-renderjs-configuration="default_view_reference" type="text/x-renderjs-configuration">${default_view_reference}</script>
<script data-renderjs-configuration="hateoas_url" type="text/x-renderjs-configuration">${hateoas_url}</script>
<script data-renderjs-configuration="frontpage_gadget" type="text/x-renderjs-configuration">${frontpage_gadget}</script>
<script data-renderjs-configuration="language_map" type="text/x-renderjs-configuration">${language_map}</script>
<script data-renderjs-configuration="default_selected_language" type="text/x-renderjs-configuration">${default_selected_language}</script>
<script data-renderjs-configuration="website_url_set" type="text/x-renderjs-configuration">${website_url_set}</script>
<script src="jquery.js"></script>
<script src="jquerymobile.js"></script>
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="gadget_global.js" ></script>
<script src="erp5_launcher.js"></script>
</head>
<body>
<div data-role="page">
<div data-gadget-url="gadget_jio.html"
data-gadget-scope="setting_gadget"
data-gadget-sandbox="public"></div>
<div data-gadget-url="${router_gadget}"
data-gadget-scope="router"
data-gadget-sandbox="public"></div>
<div data-gadget-url="${translation_gadget}"
data-gadget-scope="translation_gadget"
data-gadget-sandbox="public"></div>
<div data-gadget-url="${header_gadget}"
data-gadget-scope="header"
data-gadget-sandbox="public"></div>
<div data-gadget-url="${jio_gadget}"
data-gadget-scope="jio_gadget"
data-gadget-sandbox="public"></div>
<div data-gadget-url="gadget_erp5_editor_panel.html"
data-gadget-scope="editor_panel"
data-gadget-sandbox="public"></div>
<div data-gadget-url="${panel_gadget}"
data-gadget-scope="panel"
data-gadget-sandbox="public"></div>
<div role="main" class="ui-content gadget-content"></div>
</div>
</body>
</html>
\ No newline at end of file
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>OfficeJS Sync Page</title>
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="handlebars.js"></script>
<script src="gadget_global.js" ></script>
<script id="page-template" type="text/x-handlebars-template">
<article class="ui-content ui-body-c">
<section class="ui-content-header-plain">
<h3 class="ui-content-title ui-body-c">
<span class="ui-icon ui-icon-custom ui-icon-refresh">&nbsp;</span>
Synchronize your data
</h3>
</section>
<section class="ui-body-c ui-content-section">
<div class="ui-controlgroup ui-controlgroup-horizontal">
<div class="ui-grid-b ui-responsive">
<div class="ui-block-a"></div>
<div class="ui-block-b">
<form class="synchro-form view-web-page-form">
<button type="submit" data-i18n="Launch Synchronization" data-theme="b">Launch Synchronization</button>
</form>
</div>
<div class="ui-block-c"></div>
</div>
</div>
</section>
</article>
</script>
<script src="gadget_officejs_page_sync.js"></script>
</head>
<body>
</body>
</html>
\ No newline at end of file
/*globals window, RSVP, rJS, promiseEventListener, Handlebars*/
/*jslint indent: 2, maxlen: 80, nomen: true*/
(function (window, RSVP, rJS, promiseEventListener, Handlebars) {
"use strict";
var gadget_klass = rJS(window),
templater = gadget_klass.__template_element,
template = Handlebars.compile(
templater.getElementById("page-template").innerHTML
);
function repair_and_redirect(gadget) {
gadget.props.element.querySelector("button").disabled = true;
return new RSVP.Queue()
.push(function(){
return gadget.getSetting('sync_reload', false);
})
.push(function (sync_reload) {
if (sync_reload) {
return gadget.setSetting('sync_reload', false)
.push(function () {
return gadget.reload();
});
}
return gadget.repair()
.push(function (result) {
if (result !== undefined && result.hasOwnProperty('redirect')){
return gadget.redirect(result.redirect);
}
return gadget.redirect({});
});
});
}
gadget_klass
.ready(function (g) {
g.props = {};
g.props.auto_repair = false;
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("translateHtml", "translateHtml")
.declareMethod("render", function () {
var gadget = this;
if (arguments[0].auto_repair === "true") {
gadget.props.auto_repair = true;
}
return gadget.updateHeader({
title: "Synchronize"
})
.push(function () {
return gadget.translateHtml(template());
})
.push(function (html) {
gadget.props.element.innerHTML = html;
});
})
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("repair", "jio_repair")
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("setSetting", "setSetting")
.declareAcquiredMethod("reload", "reload")
.declareService(function () {
var gadget = this;
if (gadget.props.auto_repair === true) {
return repair_and_redirect(gadget);
}
return new RSVP.Queue()
.push(function () {
return promiseEventListener(
gadget.props.element.querySelector('form.synchro-form'),
'submit',
false
);
})
.push(function () {
return repair_and_redirect(gadget);
});
});
}(window, RSVP, rJS, promiseEventListener, Handlebars));
\ No newline at end of file
...@@ -333,7 +333,7 @@ ...@@ -333,7 +333,7 @@
<value> <value>
<tuple> <tuple>
<string>caching_policy/must-revalidate</string> <string>caching_policy/must-revalidate</string>
<string>aggregate/web_page_module/rjs_gadget_erp5_html</string> <string>aggregate/web_page_module/gadget_hr_landing_html</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -343,7 +343,7 @@ ...@@ -343,7 +343,7 @@
</item> </item>
<item> <item>
<key> <string>configuration_content_security_policy</string> </key> <key> <string>configuration_content_security_policy</string> </key>
<value> <string>default-src \'none\'; img-src \'self\' https://*.tile.openstreetmap.org data:; media-src \'self\' blob:; connect-src \'self\' https://localhost:5000 mail.tiolive.com data: *.host.vifib.net *.node.vifib.com *.erp5.net; script-src \'self\' \'unsafe-eval\'; font-src netdna.bootstrapcdn.com; style-src \'self\' netdna.bootstrapcdn.com \'unsafe-inline\' data:; frame-src \'self\' data: *.app.officejs.com</string> </value> <value> <string>default-src \'none\'; img-src \'self\' https://*.tile.openstreetmap.org data:; media-src \'self\' blob:; connect-src \'self\' https://localhost:5000 mail.tiolive.com data: *.host.vifib.net *.node.vifib.com *.erp5.net; script-src \'self\' \'unsafe-eval\'; font-src \'self\' netdna.bootstrapcdn.com; style-src \'self\' netdna.bootstrapcdn.com \'unsafe-inline\' data:; frame-src \'self\' data: *.app.officejs.com</string> </value>
</item> </item>
<item> <item>
<key> <string>configuration_default_view_action_reference</string> </key> <key> <string>configuration_default_view_action_reference</string> </key>
...@@ -551,7 +551,7 @@ ...@@ -551,7 +551,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>zope</string> </value> <value> <string>cedric.le.ninivin</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -565,7 +565,7 @@ ...@@ -565,7 +565,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>957.10753.62758.1638</string> </value> <value> <string>962.4233.53000.41642</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -583,7 +583,7 @@ ...@@ -583,7 +583,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1486477789.33</float> <float>1505315259.92</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment