Commit b70fcf9a authored by Boris Kocherov's avatar Boris Kocherov Committed by Romain Courteaud

[erp5_hal_json_style][erp5_officejs][erp5_travel_expense] fix login page for officejs project

parent 1a48926e
......@@ -144,17 +144,86 @@
</value>
</item>
<item>
<key> <string>_identity_criterion</string> </key>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_x_frame_options</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_content_security_policy</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_login</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_logout</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent>
</value>
</item>
<item>
<key> <string>authorization_forced</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>available_language</string> </key>
<value>
......@@ -163,6 +232,28 @@
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>configuration_content_security_policy</string> </key>
<value> <string>default-src \'self\'; img-src \'self\' data:; media-src \'self\' blob:; connect-src \'self\' https://localhost:5000 mail.tiolive.com data: *.host.vifib.net *.node.vifib.com *.erp5.net *.erp5.ru; 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>
</item>
<item>
<key> <string>configuration_login</string> </key>
<value> <string>connection/login_form{?came_from}</string> </value>
</item>
<item>
<key> <string>configuration_logout</string> </key>
<value> <string>connection/WebSite_logout{?came_from}</string> </value>
</item>
<item>
<key> <string>configuration_x_frame_options</string> </key>
<value> <string>ALLOW-FROM-ALL</string> </value>
</item>
<item>
<key> <string>container_layout</string> </key>
<value> <string>ERP5Document_getHateoas</string> </value>
......@@ -187,7 +278,7 @@
</item>
<item>
<key> <string>layout_configuration_form_id</string> </key>
<value> <string>WebSection_viewDefaultThemeConfiguration</string> </value>
<value> <string>WebSection_viewHateoasPreference</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......@@ -201,7 +292,7 @@
</item>
<item>
<key> <string>skin_selection_name</string> </key>
<value> <string>Hal</string> </value>
<value> <string>HalRestricted</string> </value>
</item>
<item>
<key> <string>static_language_selection</string> </key>
......@@ -218,7 +309,7 @@
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAg=</string> </persistent>
</value>
</item>
</dictionary>
......@@ -233,6 +324,12 @@
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
......@@ -247,7 +344,15 @@
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
......@@ -262,7 +367,15 @@
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<record id="7" aka="AAAAAAAAAAc=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="8" aka="AAAAAAAAAAg=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
......@@ -275,13 +388,13 @@
<item>
<key> <string>category_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAk=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAo=</string> </persistent>
</value>
</item>
</dictionary>
......@@ -290,7 +403,7 @@
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<record id="9" aka="AAAAAAAAAAk=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
......@@ -343,7 +456,7 @@
</tuple>
</pickle>
</record>
<record id="7" aka="AAAAAAAAAAc=">
<record id="10" aka="AAAAAAAAAAo=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
......@@ -372,7 +485,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>932.120.18159.59989</string> </value>
<value> <string>964.45855.48292.47786</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -390,8 +503,8 @@
</tuple>
<state>
<tuple>
<float>1389263689.67</float>
<string>GMT+1</string>
<float>1515504053.68</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Section" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_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>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>__before_publishing_traverse__</string> </key>
<value>
<object>
<klass>
<global name="MultiHook" module="ZPublisher.BeforeTraverse"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_defined_in_class</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>_hookname</string> </key>
<value> <string>__before_publishing_traverse__</string> </value>
</item>
<item>
<key> <string>_list</string> </key>
<value>
<list>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</list>
</value>
</item>
<item>
<key> <string>_prior</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>__before_traverse__</string> </key>
<value>
<dictionary>
<item>
<key>
<tuple>
<int>99</int>
<string>ERP5 Web Section/connection</string>
</tuple>
</key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>caching_policy/no-cache</string>
</tuple>
</value>
</item>
<item>
<key> <string>container_layout</string> </key>
<value> <string>WebSection_renderDefaultPageAsGadget</string> </value>
</item>
<item>
<key> <string>content_layout</string> </key>
<value> <string>WebSection_renderDefaultPageAsGadget</string> </value>
</item>
<item>
<key> <string>custom_render_method_id</string> </key>
<value> <string>WebSection_renderDefaultPageAsGadget</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>empty_criterion_valid</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>connection</string> </value>
</item>
<item>
<key> <string>layout_configuration_form_id</string> </key>
<value> <string>WebSection_viewRenderJSPreference</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Section</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>skin_selection_name</string> </key>
<value> <string>RJS</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Connection</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="WebSectionTraversalHook" module="Products.ERP5.Document.WebSection"/>
</pickle>
<pickle>
<dictionary/>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -139,8 +139,6 @@ gadget_officejs_page_add_document.html\n
gadget_officejs_page_jio_configurator.html\n
gadget_officejs_page_jio_dav_configurator.html\n
gadget_officejs_page_jio_erp5_configurator.html\n
gadget_officejs_page_login.html\n
gadget_officejs_page_logout.html\n
gadget_officejs_page_share_webrtc_jio.html\n
gadget_officejs_page_sync.html\n
gadget_officejs_page_document_list.html\n
......@@ -156,8 +154,6 @@ gadget_officejs_page_add_document.js\n
gadget_officejs_page_jio_configurator.js\n
gadget_officejs_page_jio_dav_configurator.js\n
gadget_officejs_page_jio_erp5_configurator.js\n
gadget_officejs_page_login.js\n
gadget_officejs_page_logout.js\n
gadget_officejs_page_share_webrtc_jio.js\n
gadget_officejs_page_sync.js\n
gadget_officejs_page_document_list.js\n
......@@ -313,7 +309,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>959.28053.22886.7526</string> </value>
<value> <string>960.52124.17632.64989</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -331,7 +327,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1495094344.5</float>
<float>1515517086.82</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -142,8 +142,6 @@ gadget_officejs_page_jio_configurator.html\n
gadget_officejs_page_jio_dav_configurator.html\n
gadget_officejs_page_jio_erp5_configurator.html\n
gadget_officejs_page_jio_dropbox_configurator.html\n
gadget_officejs_page_login.html\n
gadget_officejs_page_logout.html\n
gadget_officejs_page_share_webrtc_jio.html\n
gadget_officejs_page_sync.html\n
gadget_officejs_page_document_list.html\n
......@@ -159,8 +157,6 @@ gadget_officejs_page_jio_configurator.js\n
gadget_officejs_page_jio_dav_configurator.js\n
gadget_officejs_page_jio_erp5_configurator.js\n
gadget_officejs_page_jio_dropbox_configurator.js\n
gadget_officejs_page_login.js\n
gadget_officejs_page_logout.js\n
gadget_officejs_page_share_webrtc_jio.js\n
gadget_officejs_page_sync.js\n
gadget_officejs_page_document_list.js\n
......@@ -328,7 +324,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>960.34163.780.59682</string> </value>
<value> <string>962.11887.7068.10717</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -346,7 +342,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1501062971.88</float>
<float>1515517761.42</float>
<string>UTC</string>
</tuple>
</state>
......
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>OfficeJS Login Page </title>
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="gadget_global.js" ></script>
<script src="gadget_officejs_page_login.js"></script>
</head>
<body>
<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-user">&nbsp;</span>
Login
</h3>
</section>
<section class="ui-body-c ui-content-section">
<form class="login-form">
<div class="ui-field-contain">
<label data-i18n="Login">Login</label>
<input type="text" name="jid" placeholder="Ex: john" value="" required>
</div>
<div class="ui-field-contain">
<label data-i18n="Password">Password</label>
<input type="password" name="passwd" placeholder="Ex: A1bcF$99" value="" required>
</div>
<div class="ui-grid-b ui-responsive">
<div class="ui-block-a">
</div>
<div class="ui-block-b">
</div>
<div class="ui-block-c">
<button class="ui-btn ui-btn-b" type="submit" data-i18n="Log In">Log In</button>
</div>
</div>
</form>
</section>
</article>
</body>
</html>
\ No newline at end of file
/*globals window, document, RSVP, rJS, promiseEventListener*/
/*jslint indent: 2, maxlen: 80, nomen: true*/
(function (window, document, RSVP, rJS, promiseEventListener) {
"use strict";
/////////////////////////////////////////////////////////////////
// templates
/////////////////////////////////////////////////////////////////
rJS(window)
.ready(function (g) {
g.props = {};
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("translateHtml", "translateHtml")
.declareMethod("render", function () {
var gadget = this;
return gadget.updateHeader({
title: "Connect"
});
})
.declareAcquiredMethod("redirect", "redirect")
.declareService(function () {
var gadget = this;
return new RSVP.Queue()
.push(function () {
gadget.props.element.querySelector("input[type=text]")
.focus();
return promiseEventListener(
gadget.props.element.querySelector('form.login-form'),
'submit',
false
);
})
.push(function (evt) {
gadget.props.element.querySelector("button")
.disabled = true;
var login = evt.target.elements[0].value,
passwd = evt.target.elements[1].value;
document.cookie = "__ac=" + window.btoa(login + ":" + passwd) +
"; path=/";
return gadget.redirect({page:"sync"});
});
});
}(window, document, RSVP, rJS, promiseEventListener));
\ 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 Logout 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">
<div class="ui-grid-b ui-responsive">
<div class="ui-block-a"></div>
<div class="ui-block-b">
<form class="logout-form">
<input data-inline="true" type="submit" data-i18n="[value]Confirm" value="Confirm" data-theme="b">
</form>
</div>
<div class="ui-block-c"></div>
</div>
</script>
<script src="gadget_officejs_page_logout.js"></script>
</head>
<body>
</body>
</html>
\ No newline at end of file
/*globals window, RSVP, rJS, promiseEventListener, document, Handlebars*/
/*jslint indent: 2, maxlen: 80, nomen: true*/
(function (window, RSVP, rJS, promiseEventListener, document, Handlebars) {
"use strict";
/////////////////////////////////////////////////////////////////
// templates
/////////////////////////////////////////////////////////////////
var gadget_klass = rJS(window),
templater = gadget_klass.__template_element,
template = Handlebars.compile(
templater.getElementById("page-template").innerHTML
);
gadget_klass
.ready(function (g) {
g.props = {};
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("translateHtml", "translateHtml")
.declareMethod("render", function () {
var gadget = this;
return gadget.updateHeader({
title: "Logout"
})
.push(function () {
return gadget.translateHtml(template());
})
.push(function (html) {
gadget.props.element.innerHTML = html;
});
})
.declareAcquiredMethod("redirect", "redirect")
.declareService(function () {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return promiseEventListener(
gadget.props.element.querySelector('form.logout-form'),
'submit',
false
);
})
.push(function () {
gadget.props.element.querySelector("input[type=submit]")
.disabled = true;
document.cookie = "__ac=; path=/";
return gadget.redirect({});
});
});
}(window, RSVP, rJS, promiseEventListener, document, Handlebars));
\ No newline at end of file
......@@ -136,8 +136,6 @@ renderjs.js\n
rsvp.js\n
gadget_officejs_header.html\n
gadget_officejs_page_add_document.html\n
gadget_officejs_page_login.html\n
gadget_officejs_page_logout.html\n
gadget_officejs_page_sync.html\n
gadget_hr_translation.html\n
gadget_officejs_widget_listbox.html\n
......@@ -145,8 +143,6 @@ gadget_erp5_editor_panel.html\n
gadget_erp5_editor_panel.js\n
gadget_officejs_header.js\n
gadget_officejs_page_add_document.js\n
gadget_officejs_page_login.js\n
gadget_officejs_page_logout.js\n
gadget_officejs_page_sync.js\n
gadget_officejs_router.js\n
gadget_hr_translation.js\n
......@@ -334,7 +330,7 @@ NETWORK:\n
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>cedric.le.ninivin</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -348,7 +344,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.4237.40225.21589</string> </value>
<value> <string>964.46131.23570.5051</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -366,7 +362,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1505399179.25</float>
<float>1515520816.9</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