Commit b2a2a413 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_jabber_client] Reuse ERP5JS gadgets

Use the ERP5 router.
Allow pagination from one contact to another.
Allow to search a contact.

Stop using data url for images.

Update to Strophe 1.2.15

Experiment CSS customizations.
Show that it's possible to surcharge default CSS.

Create a dialog gadget used by most pages.
parent c4acca90
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" 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>
</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>
</tuple>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>1ca3fac8e23a58eba21475d44693d01d</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/vnd.microsoft.icon</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_jabberclient_notification_ok.ico</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>filename</string> </key>
<value> <string>jabber_ok.ico</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>-1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jabber_gadget_notification_ok_ico</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Image</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Jabber Notification OK</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>-1</int> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<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">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<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>zope</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>1526979271.29</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="7" aka="AAAAAAAAAAc=">
<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>zope</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>967.46262.34250.682</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>1526979337.45</float>
<string>UTC</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="Image" 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>
</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>
</tuple>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>e65029eda61475cec9e46494806e754f</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/vnd.microsoft.icon</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_jabberclient_notification_warning.ico</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>filename</string> </key>
<value> <string>jabber_notif.ico</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>-1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jabber_gadget_notification_warning_ico</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Image</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Jabber Notification Warning</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>-1</int> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<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">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<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>zope</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>1526979436.98</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="7" aka="AAAAAAAAAAc=">
<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>zope</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>967.46265.18608.48981</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>1526979470.24</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>JabberClient Gadget Dialog</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_jabberclient_dialog.js" type="text/javascript"></script>
</head>
<body>
<form class="dialog_form">
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="form"
data-gadget-sandbox="public">
</div>
<input disabled name="action_confirm" type="submit"
data-i18n="[value]Proceed" value="Proceed" />
</form>
</body>
</html>
\ No newline at end of file
......@@ -16,7 +16,6 @@
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -59,16 +58,9 @@
<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>
......@@ -81,7 +73,7 @@
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_jabberclient_router.html</string> </value>
<value> <string>gadget_jabberclient_dialog.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -91,7 +83,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jabber_gadget_router_html</string> </value>
<value> <string>jabber_gadget_dialog_html</string> </value>
</item>
<item>
<key> <string>language</string> </key>
......@@ -109,7 +101,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>JabberClient Gadget Router</string> </value>
<value> <string>JabberClient Gadget Dialog</string> </value>
</item>
<item>
<key> <string>version</string> </key>
......@@ -195,7 +187,7 @@
</tuple>
<state>
<tuple>
<float>1456334074.25</float>
<float>1527841931.78</float>
<string>UTC</string>
</tuple>
</state>
......@@ -240,7 +232,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.24010.37433.15462</string> </value>
<value> <string>967.60678.30724.15172</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -258,7 +250,7 @@
</tuple>
<state>
<tuple>
<float>1456843272.44</float>
<float>1527844242.22</float>
<string>UTC</string>
</tuple>
</state>
......@@ -315,7 +307,7 @@
</tuple>
<state>
<tuple>
<float>1456333611.93</float>
<float>1527841832.01</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, rJS*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS) {
"use strict";
rJS(window)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("submitContent", "submitContent")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod('render', function (options) {
return this.changeState(options);
})
.onStateChange(function () {
var gadget = this;
return gadget.getDeclaredGadget('form')
.push(function (form_gadget) {
return form_gadget.render(gadget.state);
});
})
.declareMethod('triggerSubmit', function triggerSubmit() {
this.element.querySelector('input[name="action_confirm"]').click();
}, {mutex: 'changestate'})
.allowPublicAcquisition('notifySubmit', function notifySubmit() {
return this.triggerSubmit();
})
.onEvent('submit', function () {
var gadget = this;
return gadget.notifySubmitting()
.push(function () {
return gadget.getDeclaredGadget('form');
})
.push(function (form_gadget) {
return form_gadget.getContent();
})
.push(function (content) {
return gadget.submitContent(content);
});
})
.declareService(function enableButton() {
// click event listener is now activated
// Change the state of the gadget
this.element.querySelector('input[name="action_confirm"]').disabled = false;
});
}(window, rJS));
\ No newline at end of file
......@@ -16,7 +16,6 @@
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -59,16 +58,9 @@
<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>
......@@ -77,7 +69,7 @@
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_jabberclient_router.js</string> </value>
<value> <string>gadget_jabberclient_dialog.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -87,7 +79,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jabber_gadget_router_js</string> </value>
<value> <string>jabber_gadget_dialog_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
......@@ -105,7 +97,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>JabberClient Gadget Router JS</string> </value>
<value> <string>JabberClient Gadget Dialog JS</string> </value>
</item>
<item>
<key> <string>version</string> </key>
......@@ -191,7 +183,7 @@
</tuple>
<state>
<tuple>
<float>1456334186.39</float>
<float>1527841931.8</float>
<string>UTC</string>
</tuple>
</state>
......@@ -236,7 +228,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.35416.23201.12748</string> </value>
<value> <string>967.60735.37247.24337</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>1456845631.45</float>
<float>1527847880.81</float>
<string>UTC</string>
</tuple>
</state>
......@@ -311,7 +303,7 @@
</tuple>
<state>
<tuple>
<float>1456333611.91</float>
<float>1527841783.19</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -100,7 +100,7 @@
<item>
<key> <string>text_content</string> </key>
<value> <string>CACHE MANIFEST\n
# generated on Fri, 30Apr 2016 14:26:00 +0200\n
# generated on Thu, 08 Jun 2018 00:00:00 +0000\n
\n
CACHE:\n
font-awesome/font-awesome.css\n
......@@ -109,54 +109,76 @@ font-awesome/font-awesome-webfont.woff\n
font-awesome/font-awesome-webfont.woff2\n
font-awesome/font-awesome-webfont.ttf\n
font-awesome/font-awesome-webfont.svg\n
URI.js\n
gadget_translation.html\n
gadget_translation.js\n
gadget_translation_data.js\n
erp5_launcher.html\n
erp5_launcher.js\n
gadget_erp5.css\n
erp5_launcher_nojqm.js\n
gadget_global.js\n
gadget_erp5_global.js\n
gadget_jio.js\n
gadget_jio.html\n
handlebars.js\n
jiodev.js\n
jquery.js\n
jquerymobile.css\n
jquerymobile.js\n
renderjs.js\n
rsvp.js\n
gadget_translation.html\n
gadget_translation.js\n
gadget_translation_data.js\n
gadget_erp5_router.html\n
gadget_erp5_router.js\n
gadget_erp5_notification.html\n
gadget_erp5_notification.js\n
gadget_erp5_editor_panel.html\n
gadget_erp5_editor_panel.js\n
gadget_erp5_search_editor.html\n
gadget_erp5_search_editor.js\n
gadget_erp5_sort_editor.html\n
gadget_erp5_sort_editor.js\n
gadget_erp5_configure_editor.html\n
gadget_erp5_configure_editor.js\n
gadget_erp5_header.html\n
gadget_erp5_header.js\n
gadget_erp5_form.html\n
gadget_erp5_form.js\n
gadget_officejs_header.html\n
gadget_officejs_header.js\n
gadget_erp5_pt_form_list.html\n
gadget_erp5_pt_form_list.js\n
gadget_erp5_searchfield.html\n
gadget_erp5_searchfield.js\n
gadget_erp5_field_listbox.html\n
gadget_erp5_field_listbox.js\n
gadget_erp5_field_string.html\n
gadget_erp5_field_string.js\n
gadget_erp5_field_textarea.html\n
gadget_erp5_field_textarea.js\n
gadget_erp5_field_password.html\n
gadget_erp5_field_password.js\n
gadget_erp5_label_field.html\n
gadget_erp5_label_field.js\n
gadget_html5_input.html\n
gadget_html5_input.js\n
gadget_jabberclient_page_dialog.html\n
gadget_jabberclient_page_dialog.js\n
gadget_jabberclient_router.html\n
gadget_jabberclient_router.js\n
gadget_jabberclient_page_password.html\n
gadget_jabberclient_page_password.js\n
gadget_jabberclient_page_connect.html\n
gadget_jabberclient_page_connect.js\n
gadget_jabberclient_page_subscribe.js\n
gadget_jabberclient_page_subscribe.html\n
gadget_html5_textarea.html\n
gadget_html5_textarea.js\n
gadget_html5_element.html\n
gadget_html5_element.js\n
gadget_erp5_page_jabberclient_dialog.html\n
gadget_erp5_page_jabberclient_dialog.js\n
gadget_erp5_page_jabberclient_password.html\n
gadget_erp5_page_jabberclient_password.js\n
gadget_erp5_page_jabberclient_connect.html\n
gadget_erp5_page_jabberclient_connect.js\n
gadget_erp5_page_jabberclient_contact.html\n
gadget_erp5_page_jabberclient_contact.js\n
gadget_erp5_page_jabberclient_new_contact.html\n
gadget_erp5_page_jabberclient_new_contact.js\n
gadget_erp5_page_jabberclient_attachment.html\n
gadget_erp5_page_jabberclient_attachment.js\n
gadget_jabberclient_panel.html\n
gadget_jabberclient_panel.js\n
gadget_jabberclient_page_contact.js\n
gadget_jabberclient_page_contact.html\n
gadget_jabberclient_jio.html\n
gadget_jabberclient_jio.js\n
gadget_jabberclient_dialog.html\n
gadget_jabberclient_dialog.js\n
gadget_jabberclient.css\n
favicon.ico\n
gadget_jabberclient_notification_warning.ico\n
gadget_jabberclient_notification_ok.ico\n
connection/\n
NETWORK:\n
*</string> </value>
......@@ -280,7 +302,7 @@ NETWORK:\n
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>vincent</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -294,7 +316,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.17525.46862.41420</string> </value>
<value> <string>968.5260.61084.65058</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -312,7 +334,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1509358498.78</float>
<float>1528452535.81</float>
<string>UTC</string>
</tuple>
</state>
......
/**********************************************
* Colors
**********************************************/
/**********************************************
* Fonts (font-family)
**********************************************/
/**********************************************
* Shared
**********************************************/
/**********************************************
* http://meyerweb.com/eric/tools/css/reset/
* v2.0 | 20110126
* License: none (public domain)
**********************************************/
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
display: block;
}
body {
line-height: 1;
}
ol,
ul {
list-style: none;
}
blockquote,
q {
quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/**********************************************
* Default
**********************************************/
@font-face {
font-family: 'FontAwesome';
src: url('font-awesome/font-awesome-webfont.eot');
src: url('font-awesome/font-awesome-webfont.eot') format('embedded-opentype'), url('font-awesome/font-awesome-webfont.woff2') format('woff2'), url('font-awesome/font-awesome-webfont.woff') format('woff'), url('font-awesome/font-awesome-webfont.ttf') format('truetype'), url('font-awesome/font-awesome-webfont.svg') format('svg');
font-weight: normal;
font-style: normal;
}
html {
height: 100%;
width: 100%;
display: block;
background-color: #FFFFFF;
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
body {
height: 100%;
width: 100%;
display: block;
color: #1F1F1F;
word-wrap: break-word;
}
body,
button,
input,
textarea,
select {
font-family: 'Open Sans', Helvetica, Arial, sans-serif;
font-size: 12pt;
padding: 0;
margin: 0;
font-weight: 400;
line-height: 1.5;
}
@media only screen and (min-width: 45em) and (max-width: 85em) {
body,
button,
input,
textarea,
select {
font-size: 11pt;
}
}
@media not screen and (max-width: 85em) {
body,
button,
input,
textarea,
select {
font-size: 10pt;
}
}
/**********************************************
* Inline elements
**********************************************/
strong {
font-weight: bold;
}
i,
cite,
em,
var,
address,
dfn {
font-style: italic;
}
strong,
b {
font-weight: bold;
}
u,
ins {
text-decoration: underline;
}
s,
strike,
del {
text-decoration: line-through;
}
sup {
vertical-align: super;
font-size: smaller;
}
sub {
vertical-align: sub;
font-size: smaller;
}
small {
font-size: smaller;
}
tt,
code,
kbd,
samp {
font-family: "Courier New", Courier, monospace;
}
q {
display: inline;
quotes: initial;
}
q:before {
content: open-quote;
}
q:after {
content: close-quote;
}
mark {
color: #22CC22;
}
/**********************************************
* Link
**********************************************/
a {
color: #2FA2E4;
text-decoration: none;
}
a[href=""] {
color: #1F1F1F;
}
a:hover {
text-decoration: underline;
}
a:focus {
outline-offset: -2px;
outline: 2px solid #3388cc;
}
@media not screen and (max-width: 85em) {
a[accesskey]:after {
content: " (" attr(accesskey) ") ";
}
}
/**********************************************
* Button
**********************************************/
/**********************************************
* Preformatted
**********************************************/
pre,
xmp,
plaintext,
listing {
display: block;
white-space: pre-wrap;
}
/**********************************************
* hr
**********************************************/
hr {
display: block;
border-style: inset;
border-width: 1px;
border-color: #FF6600;
}
/**********************************************
* Text fields
**********************************************/
label {
display: block;
}
input:not([type=submit]):not([type=file]):not([type=checkbox]):not([type=radio]):not([type=color]),
textarea,
select {
width: 100%;
padding: 3pt;
background-color: #FFFFFF;
color: #1F1F1F;
border: 1px solid rgba(0, 0, 0, 0.3);
border-radius: 0.325em;
transition: border 0.2s ease-out, box-shadow 0.2s ease-out;
}
input:not([type=submit]):not([type=file]):not([type=checkbox]):not([type=radio]):not([type=color]):active,
textarea:active,
select:active,
input:not([type=submit]):not([type=file]):not([type=checkbox]):not([type=radio]):not([type=color]):focus,
textarea:focus,
select:focus {
outline: none;
}
input:not([type=submit]):not([type=file]):not([type=checkbox]):not([type=radio]):not([type=color]):focus,
textarea:focus,
select:focus {
border: 1px solid #3388cc;
box-shadow: 0 0 12pt #3388cc;
}
input:not([type=submit]):not([type=file]):not([type=checkbox]):not([type=radio]):not([type=color]):invalid,
textarea:invalid,
select:invalid {
border: 1px solid #FF6600;
}
input:not([type=submit]):not([type=file]):not([type=checkbox]):not([type=radio]):not([type=color]):invalid:focus,
textarea:invalid:focus,
select:invalid:focus {
box-shadow: 0 0 12pt #FF6600;
}
input[type="search"] {
-webkit-appearance: textfield;
}
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
select {
cursor: pointer;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background-image: none;
background-color: #FFFFFF;
padding-right: 24pt;
background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='50px' height='50px'><polyline fill-opacity='0.5' points='46.139,15.518 25.166,36.49 4.193,15.519'/></svg>") right no-repeat;
background-position: right 6pt top 50%;
background-size: 12pt 12pt;
}
select:-moz-focusring {
color: transparent;
text-shadow: 0 0 0 #000;
}
textarea {
word-wrap: break-word;
white-space: pre-wrap;
vertical-align: top;
transition: height 0.2s ease-out;
}
@media not screen and (min-width: 45em) {
textarea {
height: 4em;
}
textarea:focus {
height: 20em;
}
}
@media only screen and (min-width: 45em) and (max-width: 85em), not screen and (max-width: 85em) {
textarea {
min-height: 10em;
}
}
::-webkit-input-placeholder {
color: #575757;
}
:-moz-placeholder {
/* Firefox 18- */
color: #575757;
}
::-moz-placeholder {
/* Firefox 19+ */
color: #575757;
}
:-ms-input-placeholder {
color: #575757;
}
input[type=submit],
button {
margin: 0;
padding: 0;
border: none;
background: transparent;
color: #1F1F1F;
/*
// XXX TODO
// transition: background-color 0.2s ease-out;
&:hover, &:focus {
outline: none;
}
&:active {
// box-shadow: inset 0 0 0 5px darken(@colorblocklinkbackground, 10%);
background-color: darken(@colorblocklinkbackground, 20%);
}
*/
cursor: pointer;
}
input[type=submit]::-moz-focus-inner,
button::-moz-focus-inner {
border: 0px;
padding: 0px;
}
input[type=submit]:hover,
button:hover,
input[type=submit]:focus,
button:focus {
outline: none;
}
/**********************************************
* Media
**********************************************/
img,
iframe,
video,
svg {
max-width: 100%;
}
svg polyline {
stroke: #1F1F1F;
fill: none;
}
svg text {
stroke: #1F1F1F;
fill: #1F1F1F;
}
iframe {
width: 100%;
height: 20em;
background-color: #FFFFFF;
}
img {
image-orientation: from-image;
}
/**********************************************
* Gadget: panel
**********************************************/
div[data-gadget-scope='panel'] {
background-color: #393939;
color: #FFFFFF;
width: 180pt;
min-height: 100%;
max-height: 100%;
overflow-y: auto;
position: fixed;
top: 0;
left: 0;
display: block;
z-index: 2000;
transition: transform 200ms ease-out;
transform: translate3d(0, 0, 0);
}
@media not screen and (min-width: 45em), only screen and (min-width: 45em) and (max-width: 85em) {
div[data-gadget-scope='panel'] {
box-shadow: 5px 0 5px rgba(0, 0, 0, 0.15);
}
}
@media not screen and (min-width: 45em), only screen and (min-width: 45em) and (max-width: 85em) {
div[data-gadget-scope='panel'] {
left: -186pt;
}
div[data-gadget-scope='panel'].visible {
transform: translate3d(186pt, 0, 0);
}
}
div[data-gadget-scope='panel'] div[data-role="header"] {
display: flex;
justify-content: flex-start;
}
div[data-gadget-scope='panel'] div[data-role="header"] .panel_img {
text-align: center;
flex: 1;
height: 30pt;
}
div[data-gadget-scope='panel'] div[data-role="header"] button,
div[data-gadget-scope='panel'] div[data-role="header"] a {
width: 3em;
overflow: hidden;
text-indent: -9999px;
white-space: nowrap;
background-color: #393939;
display: block;
line-height: 30pt;
color: #FFFFFF;
}
div[data-gadget-scope='panel'] div[data-role="header"] button::before,
div[data-gadget-scope='panel'] div[data-role="header"] a::before {
float: left;
text-indent: 0;
margin-left: 12pt;
}
@media not screen and (max-width: 85em) {
div[data-role='page']:not(.desktop-panel-hidden) div[data-gadget-scope='panel'] div[data-role="header"] button[data-i18n="Close"],
div[data-role='page']:not(.desktop-panel-hidden) div[data-gadget-scope='panel'] div[data-role="header"] a[data-i18n="Close"] {
display: none;
}
}
div[data-gadget-scope='panel'] div[data-gadget-scope='erp5_searchfield'] {
padding: 3pt 12pt;
}
div[data-gadget-scope='panel'] div[data-gadget-scope='erp5_searchfield'] button {
color: #FFFFFF;
}
div[data-gadget-scope='panel'] div[data-gadget-scope='erp5_searchfield'] input[type="search"] {
color: #FFFFFF !important;
background-color: #767676 !important;
}
div[data-gadget-scope='panel'] img {
text-align: left;
height: 100%;
}
div[data-gadget-scope='panel'] div[data-gadget-scope="erp5_checkbox"] {
padding: 3pt;
padding-left: 12pt;
}
div[data-gadget-scope='panel'] div[data-gadget-scope="erp5_checkbox"] label,
div[data-gadget-scope='panel'] div[data-gadget-scope="erp5_checkbox"] span,
div[data-gadget-scope='panel'] div[data-gadget-scope="erp5_checkbox"] input {
cursor: pointer;
}
div[data-gadget-scope='panel'] div[data-gadget-scope="erp5_checkbox"] span {
width: 24pt;
display: inline-block;
}
div[data-gadget-scope='panel'] ul:first-child {
margin-top: 30pt;
}
div[data-gadget-scope='panel'] ul li a {
color: #FFFFFF;
display: block;
padding: 1.5pt;
padding-left: 12pt;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
div[data-gadget-scope='panel'] ul li a.active {
color: #1F1F1F;
background-color: #FFFFFF;
}
div[data-gadget-scope='panel'] ul li a:hover,
div[data-gadget-scope='panel'] ul li a:active {
color: #FFFFFF;
background-color: #1F1F1F;
}
div[data-gadget-scope='panel'] ul li a::before {
width: 24pt;
}
div[data-gadget-scope='panel'] dl {
background-color: #767676;
color: #1F1F1F;
transform-origin: 50% 0;
transform: scaleY(0);
transition: transform 0.2s ease-out;
}
div[data-gadget-scope='panel'] dl:not(:empty) {
transform: scaleY(1);
}
div[data-gadget-scope='panel'] dl dt {
padding: 1.5pt;
padding-left: 12pt;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
text-transform: uppercase;
}
div[data-gadget-scope='panel'] dl dt::before {
width: 24pt;
}
div[data-gadget-scope='panel'] dl dd a {
color: #FFFFFF;
display: block;
padding: 1.5pt;
padding-left: 12pt;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
padding-left: 36pt;
}
div[data-gadget-scope='panel'] dl dd a.active {
color: #1F1F1F;
background-color: #FFFFFF;
}
div[data-gadget-scope='panel'] dl dd a:hover,
div[data-gadget-scope='panel'] dl dd a:active {
color: #1F1F1F;
background-color: #FFFFFF;
}
div[data-gadget-scope='panel'] dl dd a::before {
width: 24pt;
}
/**********************************************
* Gadget: editor panel
**********************************************/
div[data-gadget-scope='editor_panel'] {
background-color: #FFFFFF;
width: 180pt;
min-height: 100%;
max-height: 100%;
overflow-y: auto;
position: fixed;
top: 0;
display: block;
z-index: 3000;
}
@media not screen and (max-width: 85em) {
div[data-gadget-scope='editor_panel'] {
left: -186pt;
transition: transform 200ms ease-out;
transform: translate3d(0, 0, 0);
box-shadow: 5px 0 5px rgba(0, 0, 0, 0.15);
}
div[data-gadget-scope='editor_panel'].visible {
transform: translate3d(186pt, 0, 0);
}
}
@media not screen and (min-width: 45em), only screen and (min-width: 45em) and (max-width: 85em) {
div[data-gadget-scope='editor_panel'] {
right: -186pt;
transition: transform 200ms ease-out;
transform: translate3d(0, 0, 0);
box-shadow: -5px 0 5px rgba(0, 0, 0, 0.15);
}
div[data-gadget-scope='editor_panel'].visible {
transform: translate3d(-186pt, 0, 0);
}
}
div[data-gadget-scope='editor_panel'] div[data-role="header"] {
display: flex;
justify-content: space-between;
flex-direction: row-reverse;
}
div[data-gadget-scope='editor_panel'] div[data-role="header"] h1 {
text-align: left;
line-height: 30pt;
max-height: 30pt;
}
div[data-gadget-scope='editor_panel'] div[data-role="header"] button,
div[data-gadget-scope='editor_panel'] div[data-role="header"] a {
width: 3em;
overflow: hidden;
text-indent: -9999px;
white-space: nowrap;
display: block;
line-height: 30pt;
}
div[data-gadget-scope='editor_panel'] div[data-role="header"] button::before,
div[data-gadget-scope='editor_panel'] div[data-role="header"] a::before {
float: left;
text-indent: 0;
margin-left: 12pt;
}
div[data-gadget-scope='editor_panel'] section {
padding: 12pt;
}
div[data-gadget-scope='editor_panel'] section fieldset > div {
display: inline-block;
}
div[data-gadget-scope='editor_panel'] section fieldset label {
display: inline-block;
text-align: center;
}
div[data-gadget-scope='editor_panel'] section fieldset input[type="radio"] {
display: inline-block;
}
div[data-gadget-scope='editor_panel'] section .filter_item_container > div,
div[data-gadget-scope='editor_panel'] section .sort_item_container > div,
div[data-gadget-scope='editor_panel'] section .column_item_container > div {
display: flex;
align-items: flex-start;
padding: 6pt 0;
}
div[data-gadget-scope='editor_panel'] section .filter_item_container > div .filter_item,
div[data-gadget-scope='editor_panel'] section .sort_item_container > div .filter_item,
div[data-gadget-scope='editor_panel'] section .column_item_container > div .filter_item,
div[data-gadget-scope='editor_panel'] section .filter_item_container > div .sort_item,
div[data-gadget-scope='editor_panel'] section .sort_item_container > div .sort_item,
div[data-gadget-scope='editor_panel'] section .column_item_container > div .sort_item,
div[data-gadget-scope='editor_panel'] section .filter_item_container > div .column_item,
div[data-gadget-scope='editor_panel'] section .sort_item_container > div .column_item,
div[data-gadget-scope='editor_panel'] section .column_item_container > div .column_item {
flex: 1;
}
div[data-gadget-scope='editor_panel'] section button {
padding: 3pt 6pt;
border: 1px solid rgba(0, 0, 0, 0.14);
border-radius: 0.325em;
margin-right: 6pt;
width: 2em;
overflow: hidden;
text-indent: -9999px;
white-space: nowrap;
}
div[data-gadget-scope='editor_panel'] section button:last-of-type {
margin-right: 0;
}
div[data-gadget-scope='editor_panel'] section button::before {
margin-right: 6pt;
float: left;
text-indent: 0;
}
div[data-gadget-scope='editor_panel'] section button.trash {
float: right;
}
/**********************************************
* Gadget: header
**********************************************/
div[data-gadget-scope='header'] .ui-header {
position: fixed;
z-index: 1000;
text-align: center;
display: flex;
flex-flow: row wrap;
width: 100%;
color: #FFFFFF;
background-color: #E9D758;
}
@media not screen and (max-width: 85em) {
div[data-gadget-scope='header'] .ui-header {
transition: transform 200ms ease-out;
transform: translate3d(180pt, 0, 0);
}
}
div[data-gadget-scope='header'] .ui-header button,
div[data-gadget-scope='header'] .ui-header a {
color: #FFFFFF;
transition: background-color 0.2s ease-out;
}
div[data-gadget-scope='header'] .ui-header button:hover,
div[data-gadget-scope='header'] .ui-header a:hover,
div[data-gadget-scope='header'] .ui-header button:active,
div[data-gadget-scope='header'] .ui-header a:active {
background-color: #ffcdb8;
}
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls button,
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls a {
display: block;
transition: background-color 0.2s ease-out;
line-height: 30pt;
}
@media not screen and (max-width: 85em) {
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls button,
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls a {
background-color: #E9D758;
}
}
@media not screen and (min-width: 45em) {
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls button,
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls a {
background-color: #FF8552;
width: 3em;
overflow: hidden;
text-indent: -9999px;
white-space: nowrap;
}
}
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls button:hover,
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls a:hover,
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls button:active,
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls a:active {
background-color: #ffcdb8;
}
@media only screen and (min-width: 45em) and (max-width: 85em) {
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls button,
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls a {
background-color: #FF8552;
width: 8em;
}
}
@media only screen and (min-width: 45em) and (max-width: 85em), not screen and (max-width: 85em) {
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls button::before,
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls a::before {
margin-right: 6pt;
text-align: center;
width: 1em;
}
}
@media not screen and (min-width: 45em) {
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls button::before,
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls a::before {
float: left;
text-indent: 0;
margin-left: 12pt;
}
}
@media not screen and (max-width: 85em) {
div[data-role='page']:not(.desktop-panel-hidden) div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls button[name="panel"],
div[data-role='page']:not(.desktop-panel-hidden) div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls a[name="panel"] {
display: none;
}
}
div[data-gadget-scope='header'] .ui-header > .ui-btn-left button,
div[data-gadget-scope='header'] .ui-header > .ui-btn-left a {
border-right: 1px solid rgba(255, 255, 255, 0.55);
}
@media not screen and (min-width: 45em), only screen and (min-width: 45em) and (max-width: 85em) {
div[data-gadget-scope='header'] .ui-header > .ui-btn-right button,
div[data-gadget-scope='header'] .ui-header > .ui-btn-right a {
border-left: 1px solid rgba(255, 255, 255, 0.55);
}
}
@media not screen and (max-width: 85em) {
div[data-role='page']:not(.desktop-panel-hidden) div[data-gadget-scope='header'] .ui-header > .ui-btn-right button,
div[data-role='page']:not(.desktop-panel-hidden) div[data-gadget-scope='header'] .ui-header > .ui-btn-right a {
padding-left: 24pt;
padding-right: 24pt;
min-width: 5em;
}
}
div[data-gadget-scope='header'] .ui-header > .ui-btn-right button.ui-icon-warning,
div[data-gadget-scope='header'] .ui-header > .ui-btn-right a.ui-icon-warning {
background-color: #FF6600;
}
div[data-gadget-scope='header'] .ui-header h1 {
text-align: left;
line-height: 30pt;
flex: 1;
background-color: #FF8552;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
@media not screen and (max-width: 85em) {
div[data-role='page']:not(.desktop-panel-hidden) div[data-gadget-scope='header'] .ui-header h1 {
flex: 1 100%;
}
}
div[data-gadget-scope='header'] .ui-header h1 > span {
padding-left: 24pt;
}
div[data-gadget-scope='header'] .ui-header h1 > span::before {
width: 1em;
margin-right: 6pt;
}
@media only screen and (min-width: 45em) and (max-width: 85em) {
div[data-gadget-scope='header'] .ui-header h1 > span {
padding-left: 16pt;
}
div[data-gadget-scope='header'] .ui-header h1 > span::before {
margin-right: 14pt;
}
}
@media not screen and (min-width: 45em) {
div[data-gadget-scope='header'] .ui-header h1 > span {
padding-left: 12pt;
}
div[data-gadget-scope='header'] .ui-header h1 > span::before {
margin-right: 6pt;
}
}
div[data-gadget-scope='header'] .ui-header h1 form {
height: 100%;
}
div[data-gadget-scope='header'] .ui-header h1 form button {
text-align: left;
height: 100%;
width: 100%;
}
div[data-gadget-scope='header'] .ui-header h1 a,
div[data-gadget-scope='header'] .ui-header h1 button {
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
div[data-gadget-scope='header'] .ui-header h1 a::before,
div[data-gadget-scope='header'] .ui-header h1 button::before {
display: inline-block;
width: 42pt;
}
@media only screen and (min-width: 45em) and (max-width: 85em), not screen and (min-width: 45em) {
div[data-gadget-scope='header'] .ui-header h1 a::before,
div[data-gadget-scope='header'] .ui-header h1 button::before {
text-align: center;
}
}
@media not screen and (max-width: 85em) {
div[data-role='page']:not(.desktop-panel-hidden) div[data-gadget-scope='header'] .ui-header h1 a::before,
div[data-role='page']:not(.desktop-panel-hidden) div[data-gadget-scope='header'] .ui-header h1 button::before {
width: 12pt;
margin-left: 24pt;
margin-right: 6pt;
}
}
@media not screen and (min-width: 45em) {
div[data-gadget-scope='header'] .ui-header h1 a::before,
div[data-gadget-scope='header'] .ui-header h1 button::before {
width: 30pt;
}
}
@media not screen and (max-width: 85em) {
div[data-gadget-scope='header'] .ui-header .ui-subheader {
text-align: left;
flex: 1;
}
}
@media not screen and (min-width: 45em), only screen and (min-width: 45em) and (max-width: 85em) {
div[data-gadget-scope='header'] .ui-header .ui-subheader {
flex: 1 100%;
}
}
div[data-gadget-scope='header'] .ui-header ul {
display: flex;
}
@media only screen and (min-width: 45em) and (max-width: 85em), not screen and (min-width: 45em) {
div[data-gadget-scope='header'] .ui-header ul li {
flex: 1;
border-left: 1px solid rgba(0, 0, 0, 0.55);
}
div[data-gadget-scope='header'] .ui-header ul li:first-child {
border-left: none;
}
div[data-gadget-scope='header'] .ui-header ul li a {
display: block;
}
}
@media only screen and (min-width: 45em) and (max-width: 85em) {
div[data-gadget-scope='header'] .ui-header ul li a {
padding-top: 3pt;
padding-bottom: 3pt;
line-height: inherit;
white-space: nowrap;
overflow: hidden;
}
div[data-gadget-scope='header'] .ui-header ul li a::before {
font-size: 1.2em;
display: block;
}
}
@media not screen and (min-width: 45em) {
div[data-gadget-scope='header'] .ui-header ul li a {
text-align: center;
vertical-align: middle;
font-size: 1.5em;
padding-top: 6pt;
padding-bottom: 6pt;
overflow: hidden;
text-indent: -9999px;
white-space: nowrap;
}
div[data-gadget-scope='header'] .ui-header ul li a::before {
float: left;
text-indent: 0;
width: 100%;
}
}
@media not screen and (max-width: 85em) {
div[data-gadget-scope='header'] .ui-header ul li a {
display: block;
line-height: 30pt;
white-space: nowrap;
overflow: hidden;
}
div[data-role='page']:not(.desktop-panel-hidden) div[data-gadget-scope='header'] .ui-header ul li a {
padding-left: 24pt;
padding-right: 24pt;
min-width: 5em;
}
div[data-gadget-scope='header'] .ui-header ul li a::before {
margin-right: 6pt;
text-align: center;
width: 1em;
}
}
/**********************************************
* Gadget: main
**********************************************/
.gadget-content {
padding: 24pt;
padding-top: 66pt;
/*
@media @smartphone {
.ui-field-contain {
// padding: 0.8em 0;
// make sure there is a bottom border
// XXX TODO: border should be visible only if not input
// XXX How to not show it on last field?
border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}
}
*/
}
.gadget-content div[data-gadget-scope='m'] {
animation: fadein 0.2s ease-out;
}
.gadget-content input[type='submit'] {
padding: 6pt;
margin-top: 30pt;
margin-right: 12pt;
background-color: #FF6600;
color: #FFFFFF;
border-radius: 0.325em;
border-width: 1px;
border-style: solid;
min-width: 8em;
}
.gadget-content input[type='submit']:hover,
.gadget-content input[type='submit']:focus {
background-color: #ff8533;
}
.gadget-content input[type='submit']:active {
background-color: #ffa366;
}
.gadget-content button[name='action_update'] {
padding: 6pt;
margin-top: 30pt;
margin-right: 12pt;
background-color: #767676;
color: #FFFFFF;
border-radius: 0.325em;
border-width: 1px;
border-style: solid;
min-width: 8em;
}
.gadget-content button[name='action_update']:hover,
.gadget-content button[name='action_update']:focus {
background-color: #909090;
}
.gadget-content button[name='action_update']:active {
background-color: #a9a9a9;
}
@media not screen and (max-width: 85em) {
div[data-role='page']:not(.desktop-panel-hidden) .gadget-content {
margin-left: 180pt;
}
}
@media only screen and (min-width: 45em) and (max-width: 85em) {
.gadget-content {
padding-top: 7em;
}
}
@media not screen and (min-width: 45em) {
.gadget-content {
padding: 6pt;
padding-top: 6em;
}
}
.gadget-content .field_container > div > div > div.ui-field-contain {
padding: 3pt 0;
}
.gadget-content .field_container > div > div > div.ui-field-contain div {
width: 100%;
}
.gadget-content .field_container > div > div.horizontal_align_form_box > .ui-field-contain {
padding: 0;
}
.gadget-content .field_container > div > div.horizontal_align_form_box > .ui-field-contain > label {
padding-top: 9pt;
}
.gadget-content .field_container > div > div.horizontal_align_form_box .field_container > div {
display: flex;
}
.gadget-content .field_container > div > div.horizontal_align_form_box .field_container > div > div {
flex: 1;
}
.gadget-content .ui-content-header-plain {
font-size: 150%;
}
.gadget-content .worklist-empty {
max-width: 442px;
/* original size of the embedded image */
width: 100%;
/* smaller screens than 442px will show full-width box */
margin: auto;
/* center with known width */
text-align: center;
}
.gadget-content .worklist-empty h2 {
font-size: 300%;
/* copy behaviour of previously used .first-loader */
margin-bottom: 0.5em;
}
.gadget-content .worklist-empty img {
width: 100%;
/* height will be computed automatically and proportionally */
}
.gadget-content ul.document-listview:not(:last-of-type) {
margin-bottom: 12pt;
}
.gadget-content ul.document-listview:first-child {
margin-top: 6pt;
}
.gadget-content ul.document-listview li {
border-color: rgba(0, 0, 0, 0.3);
border-width: 1px;
border-style: solid;
border-bottom-style: none;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.gadget-content ul.document-listview li:not(.ui-li-has-count) a:after {
font-family: FontAwesome;
content: "\f0da";
text-align: right;
float: right;
position: absolute;
right: 12pt;
}
.gadget-content ul.document-listview li a {
display: block;
position: relative;
padding: 6pt 12pt;
padding-right: 24pt;
color: #222222;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.gadget-content ul.document-listview li a:hover,
.gadget-content ul.document-listview li a:active {
background-color: #e0e0e0;
}
.gadget-content ul.document-listview li:first-child {
border-top-left-radius: 0.325em;
border-top-right-radius: 0.325em;
}
.gadget-content ul.document-listview li:last-child {
border-bottom-left-radius: 0.325em;
border-bottom-right-radius: 0.325em;
border-bottom-style: solid;
}
.gadget-content ul.document-listview li .ui-li-count {
float: right;
padding: 0 6pt;
border: 1px solid rgba(0, 0, 0, 0.14);
border-radius: 0.325em;
position: absolute;
right: 6pt;
}
@media only screen and (min-width: 45em) and (max-width: 85em), not screen and (max-width: 85em) {
.gadget-content .left,
.gadget-content .right {
vertical-align: top;
display: inline-block;
width: 50%;
}
.gadget-content .right {
padding-left: 24pt;
}
}
.gadget-content .ui-field-contain > label {
color: #767676;
}
.gadget-content .required > .ui-field-contain > label {
font-weight: bold;
}
.gadget-content .invisible > .ui-field-contain > label {
display: none;
}
@media only screen and (min-width: 45em) and (max-width: 85em), not screen and (max-width: 85em) {
.gadget-content .ui-field-contain {
display: flex;
}
.gadget-content .ui-field-contain > label {
flex: 1;
}
.gadget-content .ui-field-contain > label + div {
flex: 3;
}
}
@media only screen and (min-width: 45em) and (max-width: 85em), not screen and (max-width: 85em) {
.gadget-content .center .ui-field-contain > label + div {
flex: 7;
}
}
.gadget-content .bottom iframe {
height: 80vh;
}
.gadget-content form .ui-field-contain {
position: relative;
}
.gadget-content form .ui-field-contain > span {
animation: fadein 0.2s ease-out;
}
@media not screen and (max-width: 85em), only screen and (min-width: 45em) and (max-width: 85em) {
.gadget-content form .ui-field-contain > span {
background-color: #FF6600;
color: #f8fff3;
left: 25%;
position: absolute;
bottom: 110%;
white-space: pre;
padding: 6pt;
border-radius: 0.325em;
width: auto;
z-index: 1001;
}
.gadget-content form .ui-field-contain > span:before {
position: absolute;
top: 100%;
left: 2em;
display: inline-block;
border-right: 6pt solid transparent;
border-top: 6pt solid #FF6600;
border-left: 6pt solid transparent;
content: '';
}
}
@media not screen and (min-width: 45em) {
.gadget-content form .ui-field-contain > span {
margin-left: 6pt;
color: #FF6600;
}
}
/**********************************************
* Gadget: HTML5 input field
**********************************************/
.gadget-content .ui-field-contain .ui-input-has-appendinx,
.gadget-content .ui-field-contain .ui-input-has-prependinx {
display: flex;
}
.gadget-content .ui-field-contain .ui-input-has-appendinx i,
.gadget-content .ui-field-contain .ui-input-has-prependinx i {
display: block;
padding: 3pt;
color: #777777;
font-weight: 400;
}
/**********************************************
* Gadget: relation field
**********************************************/
.relation-input {
display: flex;
}
.relation-input a,
.relation-input button {
width: 24pt;
overflow: hidden;
text-indent: -9999px;
white-space: nowrap;
display: block;
padding-top: 3pt;
padding-bottom: 3pt;
}
.relation-input a::before,
.relation-input button::before {
float: left;
text-indent: 0;
margin-left: 6pt;
}
.relation-input div {
position: relative;
}
.relation-input ul {
position: absolute;
display: block;
width: 100%;
z-index: 501;
}
.relation-input ul li {
cursor: pointer;
background-color: #393939;
color: #FFFFFF;
padding: 3pt;
padding-left: 6pt;
display: block;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.relation-input ul li::before {
padding-right: 6pt;
}
.relation-input ul li:hover,
.relation-input ul li:active {
background-color: #1F1F1F;
}
.relation-input .ui-icon-warning {
color: #FF6600;
opacity: 1;
}
/**********************************************
* Gadget: datetime field
**********************************************/
.datetimefield {
display: flex;
}
.datetimefield div[data-gadget-scope=INPUT] {
flex: 2;
}
.datetimefield div[data-gadget-scope=SELECT] {
flex: 1;
}
/**********************************************
* Gadget: float/integer field
**********************************************/
.floatfield p,
.integerfield p,
.floatfield input,
.integerfield input {
text-align: right;
white-space: nowrap;
}
/**********************************************
* Listbox
**********************************************/
div[data-gadget-scope='erp5_searchfield'] {
padding-top: 6pt;
}
div[data-gadget-scope='erp5_searchfield'] .ui-input-text {
display: flex;
}
div[data-gadget-scope='erp5_searchfield'] .ui-input-text div[data-gadget-scope='input'] {
width: 100%;
}
div[data-gadget-scope='erp5_searchfield'] button {
padding: 3pt;
}
div[data-gadget-scope='erp5_searchfield'] div.search_parsed_value {
display: flex;
flex-direction: row;
}
div[data-gadget-scope='erp5_searchfield'] div.search_parsed_value button {
border: 1px solid rgba(0, 0, 0, 0.14);
border-radius: 0.325em;
margin-right: 6pt;
max-width: 6em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
-ms-text-overflow: ellipsis;
}
.document_table .ui-table-header {
display: flex;
padding-top: 3pt;
padding-bottom: 3pt;
}
@media not screen and (min-width: 45em) {
.document_table .ui-table-header {
border-bottom: 2px solid #FF8552;
}
}
.document_table .ui-table-header h1 {
color: #767676;
flex: 2;
align-self: flex-end;
}
@media not screen and (min-width: 45em) {
.document_table .ui-table-header h1 span.listboxloader {
display: none;
}
.document_table .ui-table-header h1 span.listboxloader.ui-icon-spinner {
display: initial;
}
}
.document_table .ui-table-header button {
padding: 3pt;
border: 1px solid rgba(0, 0, 0, 0.14);
border-radius: 0.325em;
margin-right: 6pt;
}
.document_table .ui-table-header button:last-of-type {
margin-right: 0;
}
@media not screen and (min-width: 45em) {
.document_table .ui-table-header button {
width: 2em;
overflow: hidden;
text-indent: -9999px;
white-space: nowrap;
}
}
.document_table .ui-table-header button::before {
margin-right: 6pt;
}
@media not screen and (min-width: 45em) {
.document_table .ui-table-header button::before {
float: left;
text-indent: 0;
}
}
.document_table table {
width: 100%;
text-align: left;
}
.document_table table th,
.document_table table td {
vertical-align: middle;
padding: 3pt;
}
.document_table table thead,
.document_table table tfoot {
background-color: #FF8552;
color: #FFFFFF;
}
.document_table table thead a,
.document_table table tfoot a {
color: #FFFFFF;
text-decoration: underline;
}
.document_table table thead tr th,
.document_table table tfoot tr th {
padding: 6pt 3pt;
}
@media not screen and (min-width: 45em) {
.document_table table thead,
.document_table table tfoot {
display: none;
}
}
.document_table table a {
color: #1F1F1F;
}
.document_table table tbody {
animation: fadein 0.2s ease-out;
}
.document_table table tbody tr:nth-child(even) {
background-color: #f2f2f2;
}
.document_table table tbody tr:hover,
.document_table table tbody tr:active {
background-color: #e0e0e0;
}
@media not screen and (max-width: 85em), only screen and (min-width: 45em) and (max-width: 85em) {
.document_table table tbody td:not(:last-child) {
border-right: 1px solid rgba(0, 0, 0, 0.14902);
}
}
@media not screen and (min-width: 45em) {
.document_table table tbody tr {
display: block;
overflow: hidden;
width: 100%;
position: relative;
height: 4em;
line-height: 2em;
}
.document_table table tbody tr td *,
.document_table table tbody tr th * {
display: inline;
}
.document_table table tbody tr td:first-child,
.document_table table tbody tr th:first-child {
display: inline-block;
width: 100%;
}
.document_table table tbody tr td:first-child a,
.document_table table tbody tr th:first-child a {
position: absolute;
width: 100%;
top: 0;
bottom: 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding-top: 6pt;
}
.document_table table tbody tr td:first-child a:after,
.document_table table tbody tr th:first-child a:after {
font-family: FontAwesome;
content: "\f0da";
font-size: 1.25em;
position: absolute;
right: 6pt;
top: 50%;
margin-top: -0.75em;
background-color: #FFFFFF;
border-radius: 0.5em;
width: 1em;
text-align: center;
line-height: 1em;
}
.document_table table tbody tr td:first-child ~ th,
.document_table table tbody tr th:first-child ~ th,
.document_table table tbody tr td:first-child ~ td,
.document_table table tbody tr th:first-child ~ td {
font-size: 0.8em;
display: inline;
word-break: break-word;
}
.document_table table tbody tr td:first-child ~ th a,
.document_table table tbody tr th:first-child ~ th a,
.document_table table tbody tr td:first-child ~ td a,
.document_table table tbody tr th:first-child ~ td a {
pointer-events: none;
color: #767676;
}
.document_table table tbody tr td:first-child ~ th:not(:last-child) a:not(:empty):after,
.document_table table tbody tr th:first-child ~ th:not(:last-child) a:not(:empty):after,
.document_table table tbody tr td:first-child ~ td:not(:last-child) a:not(:empty):after,
.document_table table tbody tr th:first-child ~ td:not(:last-child) a:not(:empty):after {
content: " ~ ";
}
}
.document_table nav {
display: flex;
padding-top: 6pt;
border-top: 2px solid rgba(0, 0, 0, 0.14902);
}
.document_table nav span {
opacity: .3;
flex: 2;
text-align: right;
float: right;
}
.document_table nav a {
padding: 6pt;
border: 1px solid rgba(0, 0, 0, 0.14);
border-radius: 0.325em;
margin-right: 6pt;
}
.document_table nav a::before {
margin-right: 6pt;
}
.document_table nav a:hover,
.document_table nav a:active {
background-color: #e0e0e0;
}
.document_table nav a:last-of-type {
margin-right: 0;
}
.document_table nav a:hover,
.document_table nav a:active {
background-color: #e0e0e0;
}
@media not screen and (min-width: 45em) {
.document_table nav a {
overflow: hidden;
text-indent: -9999px;
white-space: nowrap;
}
}
@media not screen and (min-width: 45em) {
.document_table nav a::before {
float: left;
text-indent: 6pt;
}
}
/**********************************************
* Notification
**********************************************/
div[data-gadget-scope='notification'] {
position: fixed;
z-index: 99999;
bottom: 12pt;
right: -192pt;
transition: transform 200ms ease-out;
transform: translate3d(0, 0, 0);
}
div[data-gadget-scope='notification'].visible {
transform: translate3d(-216pt, 0, 0);
}
div[data-gadget-scope='notification'].visible .error {
animation: pulseerrormobile 1s ease-in infinite;
}
@media not screen and (max-width: 85em) {
div[data-gadget-scope='notification'].visible .error {
animation: pulseerrordesktop 1s ease-in infinite;
}
}
@media not screen and (min-width: 45em) {
div[data-gadget-scope='notification'].visible {
transform: translate3d(-198pt, 0, 0);
}
}
div[data-gadget-scope='notification'] button {
text-align: left;
width: 180pt;
padding: 12pt;
color: #f8fff3;
border-radius: 0.325em;
}
div[data-gadget-scope='notification'] button.success {
background-color: #37A419;
}
div[data-gadget-scope='notification'] button.error {
background-color: #FF6600;
}
@keyframes pulseerrormobile {
0% {
box-shadow: 0 0 0 0 rgba(255, 102, 0, 0.6);
}
100% {
box-shadow: 0 0 0 12pt rgba(255, 102, 0, 0);
}
}
@keyframes pulseerrordesktop {
0% {
box-shadow: 0 0 0 0 rgba(255, 102, 0, 0.6);
}
100% {
box-shadow: 0 0 0 100pt rgba(255, 102, 0, 0);
}
}
/**********************************************
* JQM
**********************************************/
.ui-disabled {
opacity: .3;
cursor: default;
pointer-events: none;
}
.ui-screen-hidden {
display: none;
}
/**********************************************
* First loader
**********************************************/
.first-loader {
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
font-size: 300%;
}
/**********************************************
* Keyframes
**********************************************/
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/**********************************************
* Desktop Panel Hidden
**********************************************/
@media not screen and (max-width: 85em) {
.desktop-panel-hidden div[data-gadget-scope="header"] .ui-header {
margin-left: 0;
transform: translate3d(0, 0, 0);
}
.desktop-panel-hidden div[data-gadget-scope="header"] .ui-header h1 > span {
padding-left: 16pt;
}
.desktop-panel-hidden div[data-gadget-scope="header"] .ui-header h1 > span::before {
margin-right: 14pt;
}
.desktop-panel-hidden div[data-gadget-scope="header"] .ui-header h1 a::before,
.desktop-panel-hidden div[data-gadget-scope="header"] .ui-header h1 button::before {
text-align: center;
}
.desktop-panel-hidden div[data-gadget-scope="header"] .ui-header > .ui-btn-right button,
.desktop-panel-hidden div[data-gadget-scope="header"] .ui-header > .ui-btn-right a {
border-left: 1px solid rgba(255, 255, 255, 0.55);
}
.desktop-panel-hidden div[data-gadget-scope="header"] .ui-header .ui-controlgroup-controls button,
.desktop-panel-hidden div[data-gadget-scope="header"] .ui-header .ui-controlgroup-controls a {
background-color: #FF8552;
width: 8em;
}
.desktop-panel-hidden div[data-gadget-scope="header"] .ui-header .ui-controlgroup-controls button.ui-icon-warning,
.desktop-panel-hidden div[data-gadget-scope="header"] .ui-header .ui-controlgroup-controls a.ui-icon-warning {
background-color: #FF6600;
}
.desktop-panel-hidden div[data-gadget-scope="header"] .ui-header .ui-subheader {
flex: 1 100%;
text-align: center;
}
.desktop-panel-hidden div[data-gadget-scope="header"] .ui-header ul > li {
flex: 1;
border-left: 1px solid rgba(0, 0, 0, 0.55);
}
.desktop-panel-hidden div[data-gadget-scope="header"] .ui-header ul > li:first-child {
border-left: none;
}
.desktop-panel-hidden div[data-gadget-scope="header"] .ui-header ul > li a {
display: block;
}
.desktop-panel-hidden div[data-gadget-scope="header"] .ui-header ul > li a {
padding-top: 3pt;
padding-bottom: 3pt;
line-height: inherit;
white-space: nowrap;
overflow: hidden;
}
.desktop-panel-hidden div[data-gadget-scope="header"] .ui-header ul > li a::before {
font-size: 1.2em;
display: block;
}
.desktop-panel-hidden .gadget-content {
padding-top: 7em;
}
.desktop-panel-hidden div[data-gadget-scope='panel'] {
transform: translate3d(-186pt, 0, 0);
}
.desktop-panel-hidden div[data-gadget-scope='panel'].visible {
transform: translate3d(0, 0, 0);
}
}
/**********************************************
* Maximize
**********************************************/
div[data-gadget-scope='maximize'] button {
padding: 6pt;
border: 1px solid rgba(0, 0, 0, 0.14);
border-radius: 0.325em;
}
div[data-gadget-scope='maximize'] button::before {
margin-right: 6pt;
}
div[data-gadget-scope='maximize'] button:hover,
div[data-gadget-scope='maximize'] button:active {
background-color: #e0e0e0;
}
.editor-maximize div[data-gadget-scope='editor'] {
position: fixed;
z-index: 1500;
left: 0;
top: 30pt;
width: 100vw;
height: calc(100vh - 30pt );
}
.editor-maximize div[data-gadget-scope='editor'] iframe {
height: 100%;
}
/**********************************************
* Front page
**********************************************/
div[data-gadget-url$="gadget_erp5_page_front.html"] > ul {
display: flex;
align-items: flex-start;
flex-wrap: wrap;
}
div[data-gadget-url$="gadget_erp5_page_front.html"] > ul > li {
flex-shrink: 1;
vertical-align: top;
padding: 3pt;
border: 1px solid rgba(0, 0, 0, 0.3);
border-radius: 0.325em;
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
}
@media not screen and (min-width: 45em) {
div[data-gadget-url$="gadget_erp5_page_front.html"] > ul > li {
flex-basis: 100%;
margin-bottom: 6pt;
}
}
@media only screen and (min-width: 45em) and (max-width: 85em), not screen and (max-width: 85em) {
div[data-gadget-url$="gadget_erp5_page_front.html"] > ul > li {
margin-right: 24pt;
margin-bottom: 24pt;
flex-basis: 20em;
}
}
div[data-gadget-url$="gadget_erp5_page_front.html"] > ul > li h2 {
font-weight: 700;
background: #FF8552;
color: #FFFFFF;
padding: 6pt;
}
div[data-gadget-url$="gadget_erp5_page_front.html"] > ul > li li {
padding: 3pt 6pt;
}
/**********************************************
* Icons
**********************************************/
.ui-btn-icon-top::before,
.ui-btn-icon-left::before,
.ui-btn-icon-right::before,
.ui-icon::before,
.ui-btn-icon-notext::before {
font-family: FontAwesome;
display: inline-block;
content: "";
}
.ui-icon-spinner {
opacity: 1;
}
.ui-icon-spinner::before {
content: "\f110";
animation: spin .5s infinite linear;
}
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
readers do not read off random characters that represent icons */
.ui-icon-glass::before {
content: "\f000";
}
.ui-icon-music::before {
content: "\f001";
}
.ui-icon-search::before {
content: "\f002";
}
.ui-icon-envelope-o::before {
content: "\f003";
}
.ui-icon-heart::before {
content: "\f004";
}
.ui-icon-star::before {
content: "\f005";
}
.ui-icon-star-o::before {
content: "\f006";
}
.ui-icon-user::before {
content: "\f007";
}
.ui-icon-film::before {
content: "\f008";
}
.ui-icon-th-large::before {
content: "\f009";
}
.ui-icon-th::before {
content: "\f00a";
}
.ui-icon-th-list::before {
content: "\f00b";
}
.ui-icon-check::before {
content: "\f00c";
}
.ui-icon-times::before,
.ui-icon-delete::before {
content: "\f00d";
}
.ui-icon-search-plus::before {
content: "\f00e";
}
.ui-icon-search-minus::before {
content: "\f010";
}
.ui-icon-power-off::before {
content: "\f011";
}
.ui-icon-signal::before {
content: "\f012";
}
.ui-icon-gear::before,
.ui-icon-cog::before {
content: "\f013";
}
.ui-icon-trash-o::before {
content: "\f014";
}
.ui-icon-home::before {
content: "\f015";
}
.ui-icon-file-o::before {
content: "\f016";
}
.ui-icon-clock-o::before {
content: "\f017";
}
.ui-icon-road::before {
content: "\f018";
}
.ui-icon-download::before {
content: "\f019";
}
.ui-icon-arrow-circle-o-down::before {
content: "\f01a";
}
.ui-icon-arrow-circle-o-up::before {
content: "\f01b";
}
.ui-icon-inbox::before {
content: "\f01c";
}
.ui-icon-play-circle-o::before {
content: "\f01d";
}
.ui-icon-rotate-right::before,
.ui-icon-repeat::before {
content: "\f01e";
}
.ui-icon-refresh::before {
content: "\f021";
}
.ui-icon-list-alt::before {
content: "\f022";
}
.ui-icon-lock::before {
content: "\f023";
}
.ui-icon-flag::before {
content: "\f024";
}
.ui-icon-headphones::before {
content: "\f025";
}
.ui-icon-volume-off::before {
content: "\f026";
}
.ui-icon-volume-down::before {
content: "\f027";
}
.ui-icon-volume-up::before {
content: "\f028";
}
.ui-icon-qrcode::before {
content: "\f029";
}
.ui-icon-barcode::before {
content: "\f02a";
}
.ui-icon-tag::before {
content: "\f02b";
}
.ui-icon-tags::before {
content: "\f02c";
}
.ui-icon-book::before {
content: "\f02d";
}
.ui-icon-bookmark::before {
content: "\f02e";
}
.ui-icon-print::before {
content: "\f02f";
}
.ui-icon-camera::before {
content: "\f030";
}
.ui-icon-font::before {
content: "\f031";
}
.ui-icon-bold::before {
content: "\f032";
}
.ui-icon-italic::before {
content: "\f033";
}
.ui-icon-text-height::before {
content: "\f034";
}
.ui-icon-text-width::before {
content: "\f035";
}
.ui-icon-align-left::before {
content: "\f036";
}
.ui-icon-align-center::before {
content: "\f037";
}
.ui-icon-align-right::before {
content: "\f038";
}
.ui-icon-align-justify::before {
content: "\f039";
}
.ui-icon-list::before {
content: "\f03a";
}
.ui-icon-dedent::before,
.ui-icon-outdent::before {
content: "\f03b";
}
.ui-icon-indent::before {
content: "\f03c";
}
.ui-icon-video-camera::before {
content: "\f03d";
}
.ui-icon-photo::before,
.ui-icon-image::before,
.ui-icon-picture-o::before {
content: "\f03e";
}
.ui-icon-pencil::before {
content: "\f040";
}
.ui-icon-map-marker::before {
content: "\f041";
}
.ui-icon-adjust::before {
content: "\f042";
}
.ui-icon-tint::before {
content: "\f043";
}
.ui-icon-edit::before,
.ui-icon-pencil-square-o::before {
content: "\f044";
}
.ui-icon-share-square-o::before {
content: "\f045";
}
.ui-icon-check-square-o::before,
.ui-icon-checkbox-on::before,
.ui-checkbox-on::before {
content: "\f046";
}
.ui-icon-arrows::before {
content: "\f047";
}
.ui-icon-step-backward::before {
content: "\f048";
}
.ui-icon-fast-backward::before {
content: "\f049";
}
.ui-icon-backward::before {
content: "\f04a";
}
.ui-icon-play::before {
content: "\f04b";
}
.ui-icon-pause::before {
content: "\f04c";
}
.ui-icon-stop::before {
content: "\f04d";
}
.ui-icon-forward::before {
content: "\f04e";
}
.ui-icon-fast-forward::before {
content: "\f050";
}
.ui-icon-step-forward::before {
content: "\f051";
}
.ui-icon-eject::before {
content: "\f052";
}
.ui-icon-chevron-left::before {
content: "\f053";
}
.ui-icon-chevron-right::before {
content: "\f054";
}
.ui-icon-plus-circle::before {
content: "\f055";
}
.ui-icon-minus-circle::before {
content: "\f056";
}
.ui-icon-times-circle::before {
content: "\f057";
}
.ui-icon-check-circle::before {
content: "\f058";
}
.ui-icon-question-circle::before {
content: "\f059";
}
.ui-icon-info-circle::before {
content: "\f05a";
}
.ui-icon-crosshairs::before {
content: "\f05b";
}
.ui-icon-times-circle-o::before {
content: "\f05c";
}
.ui-icon-check-circle-o::before,
.ui-icon-radio-off::before,
.ui-radio-on::before {
content: "\f05d";
}
.ui-icon-ban::before {
content: "\f05e";
}
.ui-icon-arrow-left::before {
content: "\f060";
}
.ui-icon-arrow-right::before {
content: "\f061";
}
.ui-icon-arrow-up::before {
content: "\f062";
}
.ui-icon-arrow-down::before {
content: "\f063";
}
.ui-icon-mail-forward::before,
.ui-icon-share::before {
content: "\f064";
}
.ui-icon-expand::before {
content: "\f065";
}
.ui-icon-compress::before {
content: "\f066";
}
.ui-icon-plus::before {
content: "\f067";
}
.ui-icon-minus::before {
content: "\f068";
}
.ui-icon-asterisk::before {
content: "\f069";
}
.ui-icon-exclamation-circle::before {
content: "\f06a";
}
.ui-icon-gift::before {
content: "\f06b";
}
.ui-icon-leaf::before {
content: "\f06c";
}
.ui-icon-fire::before {
content: "\f06d";
}
.ui-icon-eye::before {
content: "\f06e";
}
.ui-icon-eye-slash::before {
content: "\f070";
}
.ui-icon-warning::before {
content: "\f071";
}
.ui-icon-low-vision::before {
content: "\f2a8";
}
.ui-icon-exclamation-triangle::before {
content: "\f071";
}
.ui-icon-plane::before {
content: "\f072";
}
.ui-icon-calendar::before {
content: "\f073";
}
.ui-icon-random::before {
content: "\f074";
}
.ui-icon-comment::before {
content: "\f075";
}
.ui-icon-magnet::before {
content: "\f076";
}
.ui-icon-chevron-up::before {
content: "\f077";
}
.ui-icon-chevron-down::before {
content: "\f078";
}
.ui-icon-retweet::before {
content: "\f079";
}
.ui-icon-shopping-cart::before {
content: "\f07a";
}
.ui-icon-folder::before {
content: "\f07b";
}
.ui-icon-folder-open::before {
content: "\f07c";
}
.ui-icon-arrows-v::before {
content: "\f07d";
}
.ui-icon-arrows-h::before {
content: "\f07e";
}
.ui-icon-bar-chart-o::before {
content: "\f080";
}
.ui-icon-twitter-square::before {
content: "\f081";
}
.ui-icon-facebook-square::before {
content: "\f082";
}
.ui-icon-camera-retro::before {
content: "\f083";
}
.ui-icon-key::before {
content: "\f084";
}
.ui-icon-gears::before,
.ui-icon-cogs::before {
content: "\f085";
}
.ui-icon-comments::before {
content: "\f086";
}
.ui-icon-thumbs-o-up::before {
content: "\f087";
}
.ui-icon-thumbs-o-down::before {
content: "\f088";
}
.ui-icon-star-half::before {
content: "\f089";
}
.ui-icon-heart-o::before {
content: "\f08a";
}
.ui-icon-sign-out::before {
content: "\f08b";
}
.ui-icon-linkedin-square::before {
content: "\f08c";
}
.ui-icon-thumb-tack::before {
content: "\f08d";
}
.ui-icon-external-link::before {
content: "\f08e";
}
.ui-icon-sign-in::before {
content: "\f090";
}
.ui-icon-trophy::before {
content: "\f091";
}
.ui-icon-github-square::before {
content: "\f092";
}
.ui-icon-upload::before {
content: "\f093";
}
.ui-icon-lemon-o::before {
content: "\f094";
}
.ui-icon-phone::before {
content: "\f095";
}
.ui-icon-square-o::before,
.ui-icon-checkbox-off::before,
.ui-checkbox-off::before {
content: "\f096";
}
.ui-icon-bookmark-o::before {
content: "\f097";
}
.ui-icon-phone-square::before {
content: "\f098";
}
.ui-icon-twitter::before {
content: "\f099";
}
.ui-icon-facebook::before {
content: "\f09a";
}
.ui-icon-github::before {
content: "\f09b";
}
.ui-icon-unlock::before {
content: "\f09c";
}
.ui-icon-credit-card::before {
content: "\f09d";
}
.ui-icon-rss::before {
content: "\f09e";
}
.ui-icon-hdd-o::before {
content: "\f0a0";
}
.ui-icon-bullhorn::before {
content: "\f0a1";
}
.ui-icon-bell::before {
content: "\f0f3";
}
.ui-icon-certificate::before {
content: "\f0a3";
}
.ui-icon-hand-o-right::before {
content: "\f0a4";
}
.ui-icon-hand-o-left::before {
content: "\f0a5";
}
.ui-icon-hand-o-up::before {
content: "\f0a6";
}
.ui-icon-hand-o-down::before {
content: "\f0a7";
}
.ui-icon-arrow-circle-left::before {
content: "\f0a8";
}
.ui-icon-arrow-circle-right::before {
content: "\f0a9";
}
.ui-icon-arrow-circle-up::before {
content: "\f0aa";
}
.ui-icon-arrow-circle-down::before {
content: "\f0ab";
}
.ui-icon-globe::before {
content: "\f0ac";
}
.ui-icon-wrench::before {
content: "\f0ad";
}
.ui-icon-tasks::before {
content: "\f0ae";
}
.ui-icon-filter::before {
content: "\f0b0";
}
.ui-icon-briefcase::before {
content: "\f0b1";
}
.ui-icon-arrows-alt::before {
content: "\f0b2";
}
.ui-icon-group::before,
.ui-icon-users::before {
content: "\f0c0";
}
.ui-icon-chain::before,
.ui-icon-link::before {
content: "\f0c1";
}
.ui-icon-cloud::before {
content: "\f0c2";
}
.ui-icon-flask::before {
content: "\f0c3";
}
.ui-icon-cut::before,
.ui-icon-scissors::before {
content: "\f0c4";
}
.ui-icon-copy::before,
.ui-icon-files-o::before {
content: "\f0c5";
}
.ui-icon-paperclip::before {
content: "\f0c6";
}
.ui-icon-save::before,
.ui-icon-floppy-o::before {
content: "\f0c7";
}
.ui-icon-square::before {
content: "\f0c8";
}
.ui-icon-navicon::before,
.ui-icon-reorder::before,
.ui-icon-bars::before {
content: "\f0c9";
}
.ui-icon-list-ul::before {
content: "\f0ca";
}
.ui-icon-list-ol::before {
content: "\f0cb";
}
.ui-icon-strikethrough::before {
content: "\f0cc";
}
.ui-icon-underline::before {
content: "\f0cd";
}
.ui-icon-table::before {
content: "\f0ce";
}
.ui-icon-magic::before {
content: "\f0d0";
}
.ui-icon-truck::before {
content: "\f0d1";
}
.ui-icon-pinterest::before {
content: "\f0d2";
}
.ui-icon-pinterest-square::before {
content: "\f0d3";
}
.ui-icon-google-plus-square::before {
content: "\f0d4";
}
.ui-icon-google-plus::before {
content: "\f0d5";
}
.ui-icon-money::before {
content: "\f0d6";
}
.ui-icon-caret-down::before,
.ui-icon-carat-d::before {
content: "\f0d7";
}
.ui-icon-caret-up::before,
hmtl .ui-icon-carat-u::before {
content: "\f0d8";
}
.ui-icon-caret-left::before,
.ui-icon-carat-l::before {
content: "\f0d9";
}
.ui-icon-caret-right::before,
.ui-icon-carat-r::before {
content: "\f0da";
}
.ui-icon-columns::before {
content: "\f0db";
}
.ui-icon-unsorted::before,
.ui-icon-sort::before {
content: "\f0dc";
}
.ui-icon-sort-down::before,
.ui-icon-sort-desc::before {
content: "\f0dd";
}
.ui-icon-sort-up::before,
.ui-icon-sort-asc::before {
content: "\f0de";
}
.ui-icon-envelope::before {
content: "\f0e0";
}
.ui-icon-linkedin::before {
content: "\f0e1";
}
.ui-icon-rotate-left::before,
.ui-icon-undo::before {
content: "\f0e2";
}
.ui-icon-legal::before,
.ui-icon-gavel::before {
content: "\f0e3";
}
.ui-icon-dashboard::before,
.ui-icon-tachometer::before {
content: "\f0e4";
}
.ui-icon-comment-o::before {
content: "\f0e5";
}
.ui-icon-comments-o::before {
content: "\f0e6";
}
.ui-icon-flash::before,
.ui-icon-bolt::before {
content: "\f0e7";
}
.ui-icon-sitemap::before {
content: "\f0e8";
}
.ui-icon-umbrella::before {
content: "\f0e9";
}
.ui-icon-paste::before,
.ui-icon-clipboard::before {
content: "\f0ea";
}
.ui-icon-lightbulb-o::before {
content: "\f0eb";
}
.ui-icon-exchange::before {
content: "\f0ec";
}
.ui-icon-cloud-download::before {
content: "\f0ed";
}
.ui-icon-cloud-upload::before {
content: "\f0ee";
}
.ui-icon-user-md::before {
content: "\f0f0";
}
.ui-icon-stethoscope::before {
content: "\f0f1";
}
.ui-icon-suitcase::before {
content: "\f0f2";
}
.ui-icon-bell-o::before {
content: "\f0a2";
}
.ui-icon-coffee::before {
content: "\f0f4";
}
.ui-icon-cutlery::before {
content: "\f0f5";
}
.ui-icon-file-text-o::before {
content: "\f0f6";
}
.ui-icon-building-o::before {
content: "\f0f7";
}
.ui-icon-hospital-o::before {
content: "\f0f8";
}
.ui-icon-ambulance::before {
content: "\f0f9";
}
.ui-icon-medkit::before {
content: "\f0fa";
}
.ui-icon-fighter-jet::before {
content: "\f0fb";
}
.ui-icon-beer::before {
content: "\f0fc";
}
.ui-icon-h-square::before {
content: "\f0fd";
}
.ui-icon-plus-square::before {
content: "\f0fe";
}
.ui-icon-angle-double-left::before {
content: "\f100";
}
.ui-icon-angle-double-right::before {
content: "\f101";
}
.ui-icon-angle-double-up::before {
content: "\f102";
}
.ui-icon-angle-double-down::before {
content: "\f103";
}
.ui-icon-angle-left::before {
content: "\f104";
}
.ui-icon-angle-right::before {
content: "\f105";
}
.ui-icon-angle-up::before {
content: "\f106";
}
.ui-icon-angle-down::before {
content: "\f107";
}
.ui-icon-desktop::before {
content: "\f108";
}
.ui-icon-laptop::before {
content: "\f109";
}
.ui-icon-tablet::before {
content: "\f10a";
}
.ui-icon-mobile-phone::before,
.ui-icon-mobile::before {
content: "\f10b";
}
.ui-icon-circle-o::before,
.ui-radio-off::before {
content: "\f10c";
}
.ui-icon-quote-left::before {
content: "\f10d";
}
.ui-icon-quote-right::before {
content: "\f10e";
}
.ui-icon-circle::before {
content: "\f111";
}
.ui-icon-mail-reply::before,
.ui-icon-reply::before {
content: "\f112";
}
.ui-icon-github-alt::before {
content: "\f113";
}
.ui-icon-folder-o::before {
content: "\f114";
}
.ui-icon-folder-open-o::before {
content: "\f115";
}
.ui-icon-smile-o::before {
content: "\f118";
}
.ui-icon-frown-o::before {
content: "\f119";
}
.ui-icon-meh-o::before {
content: "\f11a";
}
.ui-icon-gamepad::before {
content: "\f11b";
}
.ui-icon-keyboard-o::before {
content: "\f11c";
}
.ui-icon-flag-o::before {
content: "\f11d";
}
.ui-icon-flag-checkered::before {
content: "\f11e";
}
.ui-icon-terminal::before {
content: "\f120";
}
.ui-icon-code::before {
content: "\f121";
}
.ui-icon-mail-reply-all::before,
.ui-icon-reply-all::before {
content: "\f122";
}
.ui-icon-star-half-empty::before,
.ui-icon-star-half-full::before,
.ui-icon-star-half-o::before {
content: "\f123";
}
.ui-icon-location-arrow::before {
content: "\f124";
}
.ui-icon-crop::before {
content: "\f125";
}
.ui-icon-code-fork::before {
content: "\f126";
}
.ui-icon-unlink::before,
.ui-icon-chain-broken::before {
content: "\f127";
}
.ui-icon-question::before {
content: "\f128";
}
.ui-icon-info::before {
content: "\f129";
}
.ui-icon-exclamation::before {
content: "\f12a";
}
.ui-icon-superscript::before {
content: "\f12b";
}
.ui-icon-subscript::before {
content: "\f12c";
}
.ui-icon-eraser::before {
content: "\f12d";
}
.ui-icon-puzzle-piece::before {
content: "\f12e";
}
.ui-icon-microphone::before {
content: "\f130";
}
.ui-icon-microphone-slash::before {
content: "\f131";
}
.ui-icon-shield::before {
content: "\f132";
}
.ui-icon-calendar-o::before {
content: "\f133";
}
.ui-icon-fire-extinguisher::before {
content: "\f134";
}
.ui-icon-rocket::before {
content: "\f135";
}
.ui-icon-maxcdn::before {
content: "\f136";
}
.ui-icon-chevron-circle-left::before {
content: "\f137";
}
.ui-icon-chevron-circle-right::before {
content: "\f138";
}
.ui-icon-chevron-circle-up::before {
content: "\f139";
}
.ui-icon-chevron-circle-down::before {
content: "\f13a";
}
.ui-icon-html5::before {
content: "\f13b";
}
.ui-icon-css3::before {
content: "\f13c";
}
.ui-icon-anchor::before {
content: "\f13d";
}
.ui-icon-unlock-alt::before {
content: "\f13e";
}
.ui-icon-bullseye::before {
content: "\f140";
}
.ui-icon-ellipsis-h::before {
content: "\f141";
}
.ui-icon-ellipsis-v::before {
content: "\f142";
}
.ui-icon-rss-square::before {
content: "\f143";
}
.ui-icon-play-circle::before {
content: "\f144";
}
.ui-icon-ticket::before {
content: "\f145";
}
.ui-icon-minus-square::before {
content: "\f146";
}
.ui-icon-minus-square-o::before {
content: "\f147";
}
.ui-icon-level-up::before {
content: "\f148";
}
.ui-icon-level-down::before {
content: "\f149";
}
.ui-icon-check-square::before {
content: "\f14a";
}
.ui-icon-pencil-square::before {
content: "\f14b";
}
.ui-icon-external-link-square::before {
content: "\f14c";
}
.ui-icon-share-square::before {
content: "\f14d";
}
.ui-icon-compass::before {
content: "\f14e";
}
.ui-icon-toggle-down::before,
.ui-icon-caret-square-o-down::before {
content: "\f150";
}
.ui-icon-toggle-up::before,
.ui-icon-caret-square-o-up::before {
content: "\f151";
}
.ui-icon-toggle-right::before,
.ui-icon-caret-square-o-right::before {
content: "\f152";
}
.ui-icon-euro::before,
.ui-icon-eur::before {
content: "\f153";
}
.ui-icon-gbp::before {
content: "\f154";
}
.ui-icon-dollar::before,
.ui-icon-usd::before {
content: "\f155";
}
.ui-icon-rupee::before,
.ui-icon-inr::before {
content: "\f156";
}
.ui-icon-cny::before,
.ui-icon-rmb::before,
.ui-icon-yen::before,
.ui-icon-jpy::before {
content: "\f157";
}
.ui-icon-ruble::before,
.ui-icon-rouble::before,
.ui-icon-rub::before {
content: "\f158";
}
.ui-icon-won::before,
.ui-icon-krw::before {
content: "\f159";
}
.ui-icon-bitcoin::before,
.ui-icon-btc::before {
content: "\f15a";
}
.ui-icon-file::before {
content: "\f15b";
}
.ui-icon-file-text::before {
content: "\f15c";
}
.ui-icon-sort-alpha-asc::before {
content: "\f15d";
}
.ui-icon-sort-alpha-desc::before {
content: "\f15e";
}
.ui-icon-sort-amount-asc::before {
content: "\f160";
}
.ui-icon-sort-amount-desc::before {
content: "\f161";
}
.ui-icon-sort-numeric-asc::before {
content: "\f162";
}
.ui-icon-sort-numeric-desc::before {
content: "\f163";
}
.ui-icon-thumbs-up::before {
content: "\f164";
}
.ui-icon-thumbs-down::before {
content: "\f165";
}
.ui-icon-youtube-square::before {
content: "\f166";
}
.ui-icon-youtube::before {
content: "\f167";
}
.ui-icon-xing::before {
content: "\f168";
}
.ui-icon-xing-square::before {
content: "\f169";
}
.ui-icon-youtube-play::before {
content: "\f16a";
}
.ui-icon-dropbox::before {
content: "\f16b";
}
.ui-icon-stack-overflow::before {
content: "\f16c";
}
.ui-icon-instagram::before {
content: "\f16d";
}
.ui-icon-flickr::before {
content: "\f16e";
}
.ui-icon-adn::before {
content: "\f170";
}
.ui-icon-bitbucket::before {
content: "\f171";
}
.ui-icon-bitbucket-square::before {
content: "\f172";
}
.ui-icon-tumblr::before {
content: "\f173";
}
.ui-icon-tumblr-square::before {
content: "\f174";
}
.ui-icon-long-arrow-down::before {
content: "\f175";
}
.ui-icon-long-arrow-up::before {
content: "\f176";
}
.ui-icon-long-arrow-left::before {
content: "\f177";
}
.ui-icon-long-arrow-right::before {
content: "\f178";
}
.ui-icon-apple::before {
content: "\f179";
}
.ui-icon-windows::before {
content: "\f17a";
}
.ui-icon-android::before {
content: "\f17b";
}
.ui-icon-linux::before {
content: "\f17c";
}
.ui-icon-dribbble::before {
content: "\f17d";
}
.ui-icon-skype::before {
content: "\f17e";
}
.ui-icon-foursquare::before {
content: "\f180";
}
.ui-icon-trello::before {
content: "\f181";
}
.ui-icon-female::before {
content: "\f182";
}
.ui-icon-male::before {
content: "\f183";
}
.ui-icon-gittip::before {
content: "\f184";
}
.ui-icon-sun-o::before {
content: "\f185";
}
.ui-icon-moon-o::before {
content: "\f186";
}
.ui-icon-archive::before {
content: "\f187";
}
.ui-icon-bug::before {
content: "\f188";
}
.ui-icon-vk::before {
content: "\f189";
}
.ui-icon-weibo::before {
content: "\f18a";
}
.ui-icon-renren::before {
content: "\f18b";
}
.ui-icon-pagelines::before {
content: "\f18c";
}
.ui-icon-stack-exchange::before {
content: "\f18d";
}
.ui-icon-arrow-circle-o-right::before {
content: "\f18e";
}
.ui-icon-arrow-circle-o-left::before {
content: "\f190";
}
.ui-icon-toggle-left::before,
.ui-icon-caret-square-o-left::before {
content: "\f191";
}
.ui-icon-dot-circle-o::before {
content: "\f192";
}
.ui-icon-wheelchair::before {
content: "\f193";
}
.ui-icon-vimeo-square::before {
content: "\f194";
}
.ui-icon-turkish-lira::before,
.ui-icon-try::before {
content: "\f195";
}
.ui-icon-plus-square-o::before {
content: "\f196";
}
.ui-icon-space-shuttle::before {
content: "\f197";
}
.ui-icon-slack::before {
content: "\f198";
}
.ui-icon-envelope-square::before {
content: "\f199";
}
.ui-icon-wordpress::before {
content: "\f19a";
}
.ui-icon-openid::before {
content: "\f19b";
}
.ui-icon-institution::before,
.ui-icon-bank::before,
.ui-icon-university::before {
content: "\f19c";
}
.ui-icon-mortar-board::before,
.ui-icon-graduation-cap::before {
content: "\f19d";
}
.ui-icon-yahoo::before {
content: "\f19e";
}
.ui-icon-google::before {
content: "\f1a0";
}
.ui-icon-reddit::before {
content: "\f1a1";
}
.ui-icon-reddit-square::before {
content: "\f1a2";
}
.ui-icon-stumbleupon-circle::before {
content: "\f1a3";
}
.ui-icon-stumbleupon::before {
content: "\f1a4";
}
.ui-icon-delicious::before {
content: "\f1a5";
}
.ui-icon-digg::before {
content: "\f1a6";
}
.ui-icon-pied-piper-square::before,
.ui-icon-pied-piper::before {
content: "\f1a7";
}
.ui-icon-pied-piper-alt::before {
content: "\f1a8";
}
.ui-icon-drupal::before {
content: "\f1a9";
}
.ui-icon-joomla::before {
content: "\f1aa";
}
.ui-icon-language::before {
content: "\f1ab";
}
.ui-icon-fax::before {
content: "\f1ac";
}
.ui-icon-building::before {
content: "\f1ad";
}
.ui-icon-child::before {
content: "\f1ae";
}
.ui-icon-paw::before {
content: "\f1b0";
}
.ui-icon-spoon::before {
content: "\f1b1";
}
.ui-icon-cube::before {
content: "\f1b2";
}
.ui-icon-cubes::before {
content: "\f1b3";
}
.ui-icon-behance::before {
content: "\f1b4";
}
.ui-icon-behance-square::before {
content: "\f1b5";
}
.ui-icon-steam::before {
content: "\f1b6";
}
.ui-icon-steam-square::before {
content: "\f1b7";
}
.ui-icon-recycle::before {
content: "\f1b8";
}
.ui-icon-automobile::before,
.ui-icon-car::before {
content: "\f1b9";
}
.ui-icon-cab::before,
.ui-icon-taxi::before {
content: "\f1ba";
}
.ui-icon-tree::before {
content: "\f1bb";
}
.ui-icon-spotify::before {
content: "\f1bc";
}
.ui-icon-deviantart::before {
content: "\f1bd";
}
.ui-icon-soundcloud::before {
content: "\f1be";
}
.ui-icon-database::before {
content: "\f1c0";
}
.ui-icon-file-pdf-o::before {
content: "\f1c1";
}
.ui-icon-file-word-o::before {
content: "\f1c2";
}
.ui-icon-file-excel-o::before {
content: "\f1c3";
}
.ui-icon-file-powerpoint-o::before {
content: "\f1c4";
}
.ui-icon-file-photo-o::before,
.ui-icon-file-picture-o::before,
.ui-icon-file-image-o::before {
content: "\f1c5";
}
.ui-icon-file-zip-o::before,
.ui-icon-file-archive-o::before {
content: "\f1c6";
}
.ui-icon-file-sound-o::before,
.ui-icon-file-audio-o::before {
content: "\f1c7";
}
.ui-icon-file-movie-o::before,
.ui-icon-file-video-o::before {
content: "\f1c8";
}
.ui-icon-file-code-o::before {
content: "\f1c9";
}
.ui-icon-vine::before {
content: "\f1ca";
}
.ui-icon-codepen::before {
content: "\f1cb";
}
.ui-icon-jsfiddle::before {
content: "\f1cc";
}
.ui-icon-life-bouy::before,
.ui-icon-life-saver::before,
.ui-icon-support::before,
.ui-icon-life-ring::before {
content: "\f1cd";
}
.ui-icon-circle-o-notch::before {
content: "\f1ce";
}
.ui-icon-ra::before,
.ui-icon-rebel::before {
content: "\f1d0";
}
.ui-icon-ge::before,
.ui-icon-empire::before {
content: "\f1d1";
}
.ui-icon-git-square::before {
content: "\f1d2";
}
.ui-icon-git::before {
content: "\f1d3";
}
.ui-icon-hacker-news::before {
content: "\f1d4";
}
.ui-icon-tencent-weibo::before {
content: "\f1d5";
}
.ui-icon-qq::before {
content: "\f1d6";
}
.ui-icon-wechat::before,
.ui-icon-weixin::before {
content: "\f1d7";
}
.ui-icon-send::before,
.ui-icon-paper-plane::before {
content: "\f1d8";
}
.ui-icon-send-o::before,
.ui-icon-paper-plane-o::before {
content: "\f1d9";
}
.ui-icon-history::before {
content: "\f1da";
}
.ui-icon-circle-thin::before {
content: "\f1db";
}
.ui-icon-header::before {
content: "\f1dc";
}
.ui-icon-paragraph::before {
content: "\f1dd";
}
.ui-icon-sliders::before {
content: "\f1de";
}
.ui-icon-share-alt::before {
content: "\f1e0";
}
.ui-icon-share-alt-square::before {
content: "\f1e1";
}
.ui-icon-bomb::before {
content: "\f1e2";
}
.ui-icon-clone::before {
content: "\f24d";
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Style" 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>
</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>
</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>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_jabberclient.css</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jabber_gadget_jabberclient_css</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 Style</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>RenderJS Gadget Jabber Client CSS</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>zope</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>1527842368.9</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>zope</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>968.5279.51717.38963</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>1528452643.41</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>zope</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>1527842362.94</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -100,7 +100,7 @@
<item>
<key> <string>text_content</string> </key>
<value> <string>CACHE MANIFEST\n
# generated on Mon, 1 Mar 2016 16:00:00 +0000\n
# generated on Mon, 8 Jun 2018 00:00:00 +0000\n
\n
CACHE:\n
gadget_global.js\n
......@@ -244,7 +244,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>960.4006.61190.60910</string> </value>
<value> <string>963.11851.42215.35874</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -262,7 +262,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1497524164.53</float>
<float>1528450792.31</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -52,7 +52,7 @@
}
function disconnectOnbeforeunload(connection) {
return function (event) {
return function () {
/* XXX it can be interfere with changed warning
if (changed && $('button.save')) {
return unsaved_warn_message;
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.56116.24375.61559</string> </value>
<value> <string>963.11851.42215.35874</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1458087635.15</float>
<float>1509724529.27</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -12,11 +12,12 @@
<script src="jiodev.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_jabberclient_jio.js" type="text/javascript"></script>
</head>
<body>
<div class="ui-hidden-accessible connection-gadget-container"></div>
<div class="ui-screen-hidden connection-gadget-container"></div>
<div data-gadget-url='gadget_jio.html' data-gadget-scope='persistent_jio'></div>
</body>
......
......@@ -232,7 +232,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.35373.28357.37512</string> </value>
<value> <string>963.13564.52429.46011</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -250,7 +250,7 @@
</tuple>
<state>
<tuple>
<float>1456843116.28</float>
<float>1509720807.28</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -8,7 +8,7 @@
JIO_GADGET_URL = "gadget_jio.html";
function dropNotification() {
document.querySelector("link[rel='shortcut icon']").setAttribute("href", "data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAADf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAERAAAAAAAAEQEAAAAAAAEQARAAAAAAARAAEQAAAAARAAARAAAAABAAAAEQAAAAAAAAABEAAAAAAAAAEQAAAAAAAAABEAAAAAAAAAARAAAAAAAAABEAAAAAAAAAAQAAAAAAAAAAD//wAA//8AAP7/AAD8fwAA+X8AAPM/AADznwAA558AAO/PAAD/5wAA/+cAAP/zAAD/+QAA//kAAP/9AAD//wAA");
document.querySelector("link[rel='shortcut icon']").setAttribute("href", "gadget_jabberclient_notification_ok.ico");
}
function wrapJioCall(gadget, method_name, argument_list) {
......@@ -140,7 +140,7 @@
function markOffline(key) {
return gadget.state_parameter_dict.volatile_jio.get(key)
.push(function (doc) {
doc.offline = true;
doc.connected = false;
return gadget.state_parameter_dict.volatile_jio.put(key, doc);
});
}
......@@ -178,8 +178,8 @@
(error.status_code === 404)) {
return {
jid: jid,
offline: true,
read: true
connected: false,
notification: false
};
}
throw error;
......@@ -252,9 +252,9 @@
.push(function (doc) {
if ((type === "unavailable") || (type === "unsubscribed")) {
// Bye dear contact
doc.offline = true;
doc.connected = false;
} else {
doc.offline = false;
doc.connected = true;
}
return gadget.state_parameter_dict.volatile_jio.put(from, doc);
})
......@@ -269,7 +269,7 @@
if (!document.hasFocus()) {
// Only notify when page has no focused.
// It simplifies a lot notification status
document.querySelector("link[rel='shortcut icon']").setAttribute("href", "data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEREAAAAAAAAREQAAAAAAABERAAAAAAAAEREAAAAAAAAAAAAAAAAAABERAAAAAAAAEREAAAAAAAAREQAAAAAAABERAAAAAAAAEREAAAAAAAAREQAAAAAAABERAAAAAAAAEREAAAAAAAAREQAAAAAAABERAAAAAAAAEREAAAD8PwAA/D8AAPw/AAD8PwAA//8AAPw/AAD8PwAA/D8AAPw/AAD8PwAA/D8AAPw/AAD8PwAA/D8AAPw/AAD8PwAA");
document.querySelector("link[rel='shortcut icon']").setAttribute("href", "gadget_jabberclient_notification_warning.ico");
}
var gadget = this;
......@@ -278,7 +278,7 @@
return initializeContact(gadget, argument_list[0]);
})
.push(function (doc) {
doc.read = false;
doc.notification = true;
return gadget.state_parameter_dict.volatile_jio.put(argument_list[0], doc);
})
.push(function () {
......@@ -327,7 +327,7 @@
.allowPublicAcquisition("notifyXMPPDisconnected", function () {
var gadget = this;
// Notify about disconnection
document.querySelector("link[rel='shortcut icon']").setAttribute("href", "data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEREAAAAAAAAREQAAAAAAABERAAAAAAAAEREAAAAAAAAAAAAAAAAAABERAAAAAAAAEREAAAAAAAAREQAAAAAAABERAAAAAAAAEREAAAAAAAAREQAAAAAAABERAAAAAAAAEREAAAAAAAAREQAAAAAAABERAAAAAAAAEREAAAD8PwAA/D8AAPw/AAD8PwAA//8AAPw/AAD8PwAA/D8AAPw/AAD8PwAA/D8AAPw/AAD8PwAA/D8AAPw/AAD8PwAA");
document.querySelector("link[rel='shortcut icon']").setAttribute("href", "gadget_jabberclient_notification_warning.ico");
return dropConnectionGadget(gadget)
.push(function () {
return this.redirect({command: 'display', options: {page: 'connect'}});
......@@ -337,7 +337,7 @@
.allowPublicAcquisition("notifyXMPPConnectionError", function () {
var gadget = this;
// Notify about disconnection
document.querySelector("link[rel='shortcut icon']").setAttribute("href", "data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEREAAAAAAAAREQAAAAAAABERAAAAAAAAEREAAAAAAAAAAAAAAAAAABERAAAAAAAAEREAAAAAAAAREQAAAAAAABERAAAAAAAAEREAAAAAAAAREQAAAAAAABERAAAAAAAAEREAAAAAAAAREQAAAAAAABERAAAAAAAAEREAAAD8PwAA/D8AAPw/AAD8PwAA//8AAPw/AAD8PwAA/D8AAPw/AAD8PwAA/D8AAPw/AAD8PwAA/D8AAPw/AAD8PwAA");
document.querySelector("link[rel='shortcut icon']").setAttribute("href", "gadget_jabberclient_notification_warning.ico");
return dropConnectionGadget(gadget)
.push(function () {
......@@ -348,7 +348,7 @@
.allowPublicAcquisition("notifyXMPPError", function () {
var gadget = this;
// Notify about disconnection
document.querySelector("link[rel='shortcut icon']").setAttribute("href", "data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEREAAAAAAAAREQAAAAAAABERAAAAAAAAEREAAAAAAAAAAAAAAAAAABERAAAAAAAAEREAAAAAAAAREQAAAAAAABERAAAAAAAAEREAAAAAAAAREQAAAAAAABERAAAAAAAAEREAAAAAAAAREQAAAAAAABERAAAAAAAAEREAAAD8PwAA/D8AAPw/AAD8PwAA//8AAPw/AAD8PwAA/D8AAPw/AAD8PwAA/D8AAPw/AAD8PwAA/D8AAPw/AAD8PwAA");
document.querySelector("link[rel='shortcut icon']").setAttribute("href", "gadget_jabberclient_notification_warning.ico");
return dropConnectionGadget(gadget)
.push(function () {
......@@ -423,7 +423,7 @@
.declareMethod('allDocs', function (options) {
if (!this.state_parameter_dict.connected) {
return this.redirect({command: 'display', options: {page: 'connect'}});
return this.redirect({command: 'display', options: {page: 'jabberclient_connect'}});
}
return this.state_parameter_dict.volatile_jio.allDocs(options);
})
......@@ -432,7 +432,7 @@
var gadget = this,
result;
if (!this.state_parameter_dict.connected) {
return this.redirect({command: 'display', options: {page: 'connect'}});
return this.redirect({command: 'display', options: {page: 'jabberclient_connect'}});
}
if (name === 'enclosure') {
return getLog(this, id, options)
......@@ -441,7 +441,7 @@
return initializeContact(gadget, id);
})
.push(function (doc) {
doc.read = true;
doc.notification = false;
return gadget.state_parameter_dict.volatile_jio.put(id, doc);
})
.push(function () {
......@@ -454,7 +454,7 @@
.declareMethod('putAttachment', function (id, name, blob) {
var gadget = this;
if (!this.state_parameter_dict.connected) {
return this.redirect({command: 'display', options: {page: 'connect'}});
return this.redirect({command: 'display', options: {page: 'jabberclient_connect'}});
}
if (name === 'MESSAGE') {
return this.getDeclaredGadget(CONNECTION_GADGET_SCOPE)
......
......@@ -216,7 +216,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>vincent</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.49433.64509.32819</string> </value>
<value> <string>967.46266.46579.39065</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1519651476.88</float>
<float>1526979580.7</float>
<string>UTC</string>
</tuple>
</state>
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>Router Gadget</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>JabberClient Gadget Page Attachment</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="gadget_jabberclient_router.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_erp5_page_jabberclient_attachment.js" type="text/javascript"></script>
</head>
<body>
<div data-gadget-url="gadget_jabberclient_dialog.html"
data-gadget-scope="form_dialog"
data-gadget-sandbox="public">
</div>
</body>
</html>
</html>
\ No newline at end of file
<?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>
</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>
</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_erp5_page_jabberclient_attachment.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jabber_gadget_page_attachment_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>title</string> </key>
<value> <string>JabberClient Gadget Page Attachment</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>zope</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>1527840465.5</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>zope</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>967.60680.32362.43025</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>1527844358.46</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>zope</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>1527840297.84</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
/*global window, rJS*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS) {
"use strict";
rJS(window)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("jio_putAttachment", "jio_putAttachment")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod('render', function (options) {
return this.changeState({
jio_key: options.jio_key,
first_render: true
});
})
.onStateChange(function (modification_dict) {
var gadget = this,
url_for_queue,
queue;
if (modification_dict.hasOwnProperty('first_render')) {
queue = gadget.getDeclaredGadget('form_dialog')
.push(function (form_gadget) {
return form_gadget.render({
erp5_document: {'_embedded': {'_view': {
your_text: {
description: '',
title: 'Text',
default: '',
css_class: '',
required: 1,
editable: 1,
key: 'your_text',
hidden: 0,
type: "TextAreaField"
}
}}},
form_definition: {
group_list: [[
"center",
[["your_text"]]
]]
}
});
});
}
if (modification_dict.hasOwnProperty('jio_key')) {
url_for_queue = gadget.getUrlFor({command: 'change',
options: {page: 'jabberclient_dialog'}});
if (queue === undefined) {
queue = url_for_queue;
} else {
queue.push(function () {
return url_for_queue;
});
}
queue
.push(function (url) {
return gadget.updateHeader({
cancel_url: url,
page_title: gadget.state.jio_key
});
});
}
return queue;
})
.allowPublicAcquisition("submitContent", function submitContent(param_list) {
var gadget = this,
content = param_list[0];
return gadget.jio_putAttachment(
gadget.state.jio_key,
'MESSAGE',
content.your_text
)
.push(function () {
return gadget.redirect({
command: 'display',
options: {
jio_key: gadget.state.jio_key,
page: 'jabberclient_dialog'
}
});
});
});
}(window, rJS));
\ No newline at end of file
<?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>
</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>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_jabberclient_attachment.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jabber_gadget_page_attachment_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>JabberClient Gadget Page Attachment 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>zope</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>1527840465.54</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>zope</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>967.60728.63160.9523</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>1528384889.29</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>zope</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>1527840330.79</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -10,18 +10,12 @@
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_jabberclient_page_connect.js" type="text/javascript"></script>
<script src="gadget_erp5_page_jabberclient_connect.js" type="text/javascript"></script>
</head>
<body>
<pre></pre>
<form class="dialog_form">
<button type="submit" data-i18n="Submit" class="ui-btn ui-btn-b ui-btn-inline
ui-icon-action ui-btn-icon-right ui-screen-hidden">Submit</button>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="erp5_form"
data-gadget-sandbox="public">
</div>
</form>
<div data-gadget-url="gadget_jabberclient_dialog.html"
data-gadget-scope="form_dialog"
data-gadget-sandbox="public">
</div>
</body>
</html>
\ No newline at end of file
......@@ -75,7 +75,7 @@
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_jabberclient_page_connect.html</string> </value>
<value> <string>gadget_erp5_page_jabberclient_connect.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.25270.37532.52872</string> </value>
<value> <string>968.5110.19242.11434</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1456843234.23</float>
<float>1528445551.4</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, rJS, RSVP, loopEventListener*/
/*global window, rJS*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, loopEventListener) {
(function (window, rJS) {
"use strict";
rJS(window)
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Init local properties
.ready(function (g) {
g.props = {};
})
// Assign the element to a variable
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", "notifySubmitted")
.declareAcquiredMethod("jio_put", "jio_put")
.declareAcquiredMethod("jio_get", "jio_get")
.declareAcquiredMethod("redirect", "redirect")
......@@ -33,22 +16,26 @@
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod('triggerSubmit', function () {
this.props.element.querySelector('button').click();
.declareMethod('render', function () {
var gadget = this;
return gadget.jio_get("CONNECTION")
.push(function (data) {
return gadget.changeState({
server: data.server,
jid: data.jid,
passwd: data.passwd
});
});
})
.declareMethod("render", function () {
var page_gadget = this,
data;
return page_gadget.updateHeader({
page_title: 'Connect to a Jabber server',
submit_action: true
.onStateChange(function () {
var gadget = this;
return gadget.updateHeader({
page_title: 'Connect to a Jabber server'
})
.push(function () {
return page_gadget.jio_get("CONNECTION");
})
.push(function (result) {
data = result;
return page_gadget.getDeclaredGadget("erp5_form");
return gadget.getDeclaredGadget("form_dialog");
})
.push(function (form_gadget) {
return form_gadget.render({
......@@ -56,7 +43,7 @@
"server": {
"description": "",
"title": "Server URL",
"default": data.server,
"default": gadget.state.server,
"css_class": "",
"required": 1,
"editable": 1,
......@@ -67,7 +54,7 @@
"jid": {
"description": "",
"title": "Jabber ID",
"default": data.jid,
"default": gadget.state.jid,
"css_class": "",
"required": 1,
"editable": 1,
......@@ -78,7 +65,7 @@
"passwd": {
"description": "",
"title": "Password",
"default": data.passwd,
"default": gadget.state.passwd,
"css_class": "",
"required": 1,
"editable": 1,
......@@ -89,7 +76,7 @@
}}},
form_definition: {
group_list: [[
"center",
"left",
[["server"], ["jid"], ["passwd"]]
]]
}
......@@ -97,44 +84,19 @@
});
})
.declareService(function () {
var form_gadget = this;
function formSubmit() {
return form_gadget.notifySubmitting()
.push(function () {
return form_gadget.getDeclaredGadget("erp5_form");
})
.push(function (erp5_form) {
return erp5_form.getContent();
})
.push(function (content_dict) {
return form_gadget.jio_put(
'CONNECTION',
content_dict
);
})
.push(function () {
return RSVP.all([
form_gadget.notifySubmitted(),
form_gadget.redirect({command: 'display', options: {page: 'contact'}})
]);
})
.push(undefined, function (error) {
return form_gadget.notifySubmitted()
.push(function () {
form_gadget.props.element.querySelector('pre').textContent = error;
});
.allowPublicAcquisition("submitContent", function submitContent(param_list) {
var gadget = this,
content_dict = param_list[0];
return gadget.jio_put(
'CONNECTION',
content_dict
)
.push(function () {
return gadget.redirect({
command: 'display_stored_state',
options: {page: "jabberclient_contact"}
});
}
// Listen to form submit
return loopEventListener(
form_gadget.props.element.querySelector('form'),
'submit',
false,
formSubmit
);
});
});
}(window, rJS, RSVP, loopEventListener));
\ No newline at end of file
}(window, rJS));
\ No newline at end of file
......@@ -71,7 +71,7 @@
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_jabberclient_page_connect.js</string> </value>
<value> <string>gadget_erp5_page_jabberclient_connect.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.35328.64444.1843</string> </value>
<value> <string>968.5178.51949.22050</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1456843227.61</float>
<float>1528447738.91</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -5,45 +5,17 @@
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>JabberClient Gadget Page Contact</title>
<script id="contact-list-template" type="text/x-handlebars-template">
<ul data-role="listview" data-inset="true">
{{#each contact}}
<li>
{{#if status}}
{{#if url}}
<a href="{{url}}" class="ui-btn ui-btn-icon-left ui-icon-check">
{{#if new_message}}
<span class="ui-li-count">!</span>
{{/if}}
{{jid}}</a>
{{else}}
{{jid}}
{{/if}}
{{else}}
{{#if url}}
<a href="{{url}}" class="ui-btn ui-btn-icon-left ui-icon-forbidden">
{{#if new_message}}
<span class="ui-li-count">!</span>
{{/if}}
{{jid}}</a>
{{else}}
{{jid}}
{{/if}}
{{/if}}
</li>
{{/each}}
</ul>
</script>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_jabberclient_page_contact.js" type="text/javascript"></script>
<script src="gadget_erp5_page_jabberclient_contact.js" type="text/javascript"></script>
</head>
<body>
<div data-gadget-url="gadget_erp5_pt_form_list.html"
data-gadget-scope="form_list"
data-gadget-sandbox="public">
</div>
</body>
</html>
\ No newline at end of file
......@@ -75,7 +75,7 @@
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_jabberclient_page_contact.html</string> </value>
<value> <string>gadget_erp5_page_jabberclient_contact.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.26690.60508.50432</string> </value>
<value> <string>963.12017.54400.15923</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1456843145.34</float>
<float>1509628438.87</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, rJS, RSVP, Handlebars*/
/*global window, rJS*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, Handlebars) {
(function (window, rJS) {
"use strict";
function compareContact(a, b) {
var result;
if (a.new_message && (!b.new_message)) {
result = -1;
} else if (b.new_message && (!a.new_message)) {
result = 1;
} else if (a.status && (!b.status)) {
result = -1;
} else if (b.status && (!a.status)) {
result = 1;
} else if (b.jid < a.jid) {
result = 1;
} else if (a.jid < b.jid) {
result = -1;
} else {
result = 0;
}
return result;
}
/////////////////////////////////////////////////////////////////
// Handlebars
/////////////////////////////////////////////////////////////////
// Precompile the templates while loading the first gadget instance
var gadget_klass = rJS(window),
source = gadget_klass.__template_element
.getElementById("contact-list-template")
.innerHTML,
table_template = Handlebars.compile(source);
rJS(window)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("getUrlParameter", "getUrlParameter")
.declareAcquiredMethod("getUrlForList", "getUrlForList")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
gadget_klass
/////////////////////////////////////////////////////////////////
// ready
// declared methods
/////////////////////////////////////////////////////////////////
// Init local properties
.ready(function (g) {
g.props = {};
.allowPublicAcquisition('updateHeader', function () {
return;
})
// Assign the element to a variable
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
.allowPublicAcquisition("jio_allDocs", function (param_list) {
var gadget = this;
return gadget.jio_allDocs(param_list[0])
.push(function (result) {
var i,
len = result.data.total_rows;
for (i = 0; i < len; i += 1) {
result.data.rows[i].value.connected =
result.data.rows[i].value.connected ? '' : '';
result.data.rows[i].value.notification =
result.data.rows[i].value.notification ? '' : '';
}
return result;
});
})
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareMethod("triggerSubmit", function () {
var argument_list = arguments;
return this.getDeclaredGadget('form_list')
.push(function (gadget) {
return gadget.triggerSubmit.apply(gadget, argument_list);
});
})
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod("render", function () {
var page_gadget = this,
contact_list = [],
gadget = this;
var gadget = this;
return page_gadget.updateHeader({
page_title: 'Contact'
return gadget.getUrlFor({
command: 'change',
options: {page: "jabberclient_new_contact"}
})
.push(function () {
return page_gadget.jio_allDocs({select_list: ['jid', 'read', 'offline']});
.push(function (url) {
return gadget.updateHeader({
page_title: 'Contacts',
page_icon: 'puzzle-piece',
filter_action: true,
add_url: url
});
})
.push(function (result) {
var i,
contact,
promise_list = [];
for (i = 0; i < result.data.total_rows; i += 1) {
contact = result.data.rows[i].value;
contact_list.push({
jid: contact.jid,
new_message: !contact.read,
status: !contact.offline
});
promise_list.push(gadget.getUrlFor({command: 'display', options: {page: 'dialog', jid: contact.jid}}));
}
return RSVP.all(promise_list);
.push(function () {
return gadget.getDeclaredGadget('form_list');
})
.push(function (url_list) {
var i;
for (i = 0; i < url_list.length; i += 1) {
contact_list[i].url = url_list[i];
}
contact_list.sort(compareContact);
gadget.props.element.innerHTML =
table_template({
contact: contact_list
});
.push(function (form_gadget) {
var column_list = [
['jid', 'Name'],
['notification', 'Notification'],
['connected', 'Connected']
];
return form_gadget.render({
erp5_document: {"_embedded": {"_view": {
"listbox": {
"column_list": column_list,
"show_anchor": 0,
"default_params": {},
"editable": 0,
"editable_column_list": [],
"key": "field_listbox",
"lines": 20,
"list_method": "portal_catalog",
"query": "urn:jio:allDocs",
"portal_type": [],
"search_column_list": column_list,
"sort_column_list": column_list,
"sort": [['notification', 'descending'], ['connected', 'descending'], ['jid', 'ascending']],
"title": "Contacts",
"type": "ListBox"
}
}},
"_links": {
"type": {
// form_list display portal_type in header
name: ""
}
}
},
form_definition: {
group_list: [[
"bottom",
[["listbox"]]
]]
}
});
});
});
}(window, rJS, RSVP, Handlebars));
\ No newline at end of file
}(window, rJS));
\ No newline at end of file
......@@ -71,7 +71,7 @@
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_jabberclient_page_contact.js</string> </value>
<value> <string>gadget_erp5_page_jabberclient_contact.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.36448.18833.13141</string> </value>
<value> <string>968.4124.44320.51336</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1456907564.65</float>
<float>1528383833.91</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -10,31 +10,20 @@
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_jabberclient_page_dialog.js" type="text/javascript"></script>
<script src="gadget_erp5_page_jabberclient_dialog.js" type="text/javascript"></script>
<script id="input-template" type="text/x-handlebars-template">
<input class="input-content" type="text" data-enhanced="true" name="content"
placeholder="Write something..." value="" required>
</script>
<script id="textarea-template" type="text/x-handlebars-template">
<textarea class="textarea-content" type="text" data-enhanced="true" name="content"
placeholder="Write a multi-line message..." value="" required></textarea>
</script>
</head>
<body>
<div class="discussion-content"></div>
<div data-role="footer" data-position="fixed" data-tap-toggle="false">
<form class="message-form">
<div class="ui-input-text ui-corner-all ui-body-inherit ui-shadow-inset ui-input-has-clear ui-input-has-multiline">
<div class="custom-mode-change ui-btn ui-btn-icon-notext ui-input-clear ui-input-btn ui-corner-all ui-icon-comment ui-btn-left">
<input data-enhanced="true" type="button" value="">
</div>
<div class="ui-btn ui-input-clear ui-input-btn ui-corner-all ui-icon-edit ui-btn-icon-notext">
<input data-enhanced="true" type="submit" value="Send">
</div>
</div>
</form>
<form class="dialog_form">
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="discussion_form"
data-gadget-sandbox="public">
</div>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="input_form"
data-gadget-sandbox="public">
</div>
<input class="dialogconfirm" data-theme="b" data-inline="true" type="submit" data-i18n="[value]Send" value="Send" data-icon="check" />
</form>
</body>
</html>
\ No newline at end of file
......@@ -75,7 +75,7 @@
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_jabberclient_page_dialog.html</string> </value>
<value> <string>gadget_erp5_page_jabberclient_dialog.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>950.63332.2255.41369</string> </value>
<value> <string>963.13312.9778.47496</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1462370312.21</float>
<float>1509718172.58</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, document, rJS, RSVP, Handlebars, loopEventListener*/
/*global window, document, rJS, RSVP*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, document, rJS, RSVP, Handlebars, loopEventListener) {
(function (window, document, rJS, RSVP) {
"use strict";
function scroll(g) {
var gadget = g;
RSVP.Queue()
.push(function () {
return RSVP.delay(0);
})
.push(function () {
window.scrollTo(0, gadget.props.element.scrollHeight || document.body.scrollHeight || document.documentElement.scrollHeight);
});
}
// 30 minutes
var MESSAGE_FRESHNESS = 1800000;
function getDomFromString(str) {
var temp_div = document.createElement('div');
temp_div.innerHTML = str.trim();
return temp_div.firstChild;
}
function calculateMessageList(text) {
var message_list = [],
line_list = text.split('\n'),
line_count = line_list.length,
line,
tmp_line,
i,
index,
displayed_text = '',
is_incoming = true,
is_handled,
is_old,
message_date,
previous_message_date,
message_is_incoming;
/////////////////////////////////////////////////////////////////
// Handlebars
/////////////////////////////////////////////////////////////////
// Precompile the templates while loading the first gadget instance
var gadget_klass = rJS(window),
input_source = gadget_klass.__template_element
.getElementById("input-template")
.innerHTML,
input_template = Handlebars.compile(input_source),
textarea_source = gadget_klass.__template_element
.getElementById("textarea-template")
.innerHTML,
textarea_template = Handlebars.compile(textarea_source),
// MESSAGE_FRESHNESS 30 minutes
MESSAGE_FRESHNESS = 1800000;
function appendMessage(displayed_text, incoming, date) {
if (displayed_text) {
message_list.push({
text: displayed_text,
incoming: incoming,
message_date: date
});
}
}
gadget_klass
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Init local properties
.ready(function (g) {
g.props = {};
})
for (i = 0; i < line_count - 1; i += 1) {
line = line_list[i];
// Assign the element to a variable
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
g.props.template_container = element.querySelector('.ui-input-has-multiline');
g.props.keep_text_dict = {'oneline': '', 'textarea': ''};
g.props.template_container.insertBefore(getDomFromString(input_template()),
g.props.template_container.firstChild);
});
})
is_handled = false;
is_old = false;
if (line.indexOf('[') === 0) {
index = line.indexOf('] ');
if (index !== -1) {
// Check message freshness
// If we receive one multiline message, then the lines after the first
// would not start with the date. So this would return Invalid Date
message_date = new Date(line.substring(1, index));
// Check direction and cut the date from the start of the line.
// This should be done only if it is a unique line or the first
// line of a multi-line message. Other lines will retain direction
// of the first
if (isNaN(message_date) === false) {
if (previous_message_date === undefined) {
previous_message_date = new Date(message_date - MESSAGE_FRESHNESS - 2);
}
if (message_date - previous_message_date > MESSAGE_FRESHNESS) {
is_old = true;
}
tmp_line = line.substring(index + 2);
if (tmp_line.indexOf('> ') === 0) {
message_is_incoming = false;
} else if (tmp_line.indexOf('< ') === 0) {
message_is_incoming = true;
}
line = tmp_line.substring(2);
}
if (message_is_incoming !== is_incoming || is_old) {
appendMessage(displayed_text, is_incoming, previous_message_date);
is_incoming = message_is_incoming;
is_handled = true;
displayed_text = line + '\n';
}
}
}
previous_message_date = message_date;
if (!is_handled) {
displayed_text += line + '\n';
}
}
appendMessage(displayed_text, is_incoming, message_date);
return message_list;
}
rJS(window)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
......@@ -64,203 +89,182 @@
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", "notifySubmitted")
.declareAcquiredMethod("refresh", "refresh")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("jio_putAttachment", "jio_putAttachment")
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
.declareJob('scroll', function () {
window.scrollTo(0, this.element.scrollHeight ||
document.body.scrollHeight ||
document.documentElement.scrollHeight);
})
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod("render", function (options) {
var gadget = this,
ul = document.createElement("ul"),
template_container = gadget.props.template_container;
ul.setAttribute("data-role", "listview");
gadget.props.jid = options.jid;
template_container.children[0].focus();
return gadget.updateHeader({
page_title: options.jid
})
.push(function () {
return gadget.jio_getAttachment(options.jid, "enclosure", {format: 'text'});
})
.declareMethod('render', function (options) {
var gadget = this;
return gadget.jio_getAttachment(options.jio_key, "enclosure", {format: 'text'})
.push(function (text) {
var line_list = text.split('\n'),
line,
tmp_line,
i,
index,
displayed_text = '',
is_incoming = true,
is_handled,
previous_message_date,
is_old,
message_date,
message_is_incoming;
function appendText(txt, incoming) {
var li, pre;
if (txt) {
li = document.createElement("li");
if (incoming) {
li.setAttribute("style", "padding-right: 5em;");
} else {
li.setAttribute("style", "text-align: right; padding-left: 5em;");
}
pre = document.createElement("pre");
pre.setAttribute("style", "white-space: pre-wrap;");
pre.textContent = txt;
li.appendChild(pre);
ul.appendChild(li);
}
}
function appendDate(date) {
var li,
i_element;
li = document.createElement("li");
li.setAttribute("style", "text-align: center; padding-left: 5em; padding: 0;");
i_element = document.createElement("i");
i_element.setAttribute("style", "white-space: pre-wrap; padding: 0.5em 0 0.5em 0; display: block;");
i_element.textContent = date.toLocaleString();
li.appendChild(i_element);
ul.appendChild(li);
}
for (i = 0; i < line_list.length - 1; i += 1) {
line = line_list[i];
is_handled = false;
is_old = false;
if (line.indexOf('[') === 0) {
index = line.indexOf('] ');
if (index !== -1) {
// Check message freshness
// If we receive one multiline message, then the lines after the first
// would not start with the date. So this would return Invalid Date
message_date = new Date(line.substring(1, index));
// Check direction and cut the date from the start of the line.
// This should be done only if it is a unique line or the first
// line of a multi-line message. Other lines will retain direction
// of the first
if (isNaN(message_date) === false) {
if (previous_message_date === undefined) {
previous_message_date = new Date(message_date - MESSAGE_FRESHNESS - 2);
}
if (message_date - previous_message_date > MESSAGE_FRESHNESS) {
is_old = true;
}
tmp_line = line.substring(index + 2);
if (tmp_line.indexOf('> ') === 0) {
message_is_incoming = false;
} else if (tmp_line.indexOf('< ') === 0) {
message_is_incoming = true;
}
line = tmp_line.substring(2);
}
if (message_is_incoming !== is_incoming || is_old) {
appendText(displayed_text, is_incoming);
is_incoming = message_is_incoming;
is_handled = true;
displayed_text = line + '\n';
}
if (is_old) {
appendDate(message_date);
}
}
}
previous_message_date = message_date;
if (!is_handled) {
displayed_text += line + '\n';
}
}
appendText(displayed_text, is_incoming);
gadget.props.element.querySelector(".discussion-content").innerHTML = "";
gadget.props.element.querySelector(".discussion-content").appendChild(ul);
return scroll(gadget);
return gadget.changeState({
jio_key: options.jio_key,
text: text,
refresh: options.refresh || 1
});
});
})
.declareService(function () {
var form_gadget = this,
template_container = form_gadget.props.template_container,
keep_text_dict = form_gadget.props.keep_text_dict;
function formSubmit(submit_event) {
return form_gadget.notifySubmitting()
.push(function () {
var text = submit_event.target[0].value;
submit_event.target[0].value = "";
keep_text_dict.oneline = "";
keep_text_dict.textarea = "";
template_container.removeChild(template_container.firstChild);
template_container.insertBefore(getDomFromString(input_template()),
template_container.firstChild);
template_container.children[0].focus();
template_container.children[0].select();
return form_gadget.jio_putAttachment(
form_gadget.props.jid,
'MESSAGE',
text
);
})
.onStateChange(function (modification_dict) {
var gadget = this,
queue = new RSVP.Queue();
if (modification_dict.hasOwnProperty('jio_key')) {
queue
.push(function () {
return form_gadget.refresh();
return RSVP.all([
gadget.getUrlFor({command: 'display_stored_state',
options: {page: 'jabberclient_contact'}}),
gadget.getUrlFor({command: 'change',
options: {page: 'jabberclient_attachment'}}),
gadget.getUrlFor({command: 'selection_previous'}),
gadget.getUrlFor({command: 'selection_next'})
]);
})
.push(function (all_result) {
return gadget.updateHeader({
selection_url: all_result[0],
previous_url: all_result[2],
next_url: all_result[3],
page_title: gadget.state.jio_key,
actions_url: all_result[1]
});
});
}
if (modification_dict.hasOwnProperty('refresh')) {
queue
.push(function () {
return form_gadget.notifySubmitted();
return gadget.getDeclaredGadget('input_form');
})
.push(undefined, function (error) {
return form_gadget.notifySubmitted()
.push(function () {
throw error;
});
.push(function (form_gadget) {
var field_dict = {};
field_dict.your_message = {
"description": "",
"title": "Message",
"default": "",
"css_class": "",
"required": 1,
"editable": 1,
"key": "your_message",
"hidden": 0,
"type": "StringField"
};
return form_gadget.render({
erp5_document: {"_embedded": {"_view": field_dict}},
form_definition: {
group_list: [
["bottom", [["your_message"]]]
]
}
});
});
}
// Listen to form submit
return loopEventListener(
form_gadget.props.element.querySelector('form'),
'submit',
false,
formSubmit
);
})
if (modification_dict.hasOwnProperty('text')) {
queue
.push(function () {
return gadget.getDeclaredGadget('discussion_form');
})
.push(function (form_gadget) {
var text = gadget.state.text,
message_list = calculateMessageList(text),
field_list = [],
field_dict = {},
i,
now = (new Date()).toDateString();
.declareService(function () {
var gadget = this,
template_container = gadget.props.template_container,
keep_text_dict = gadget.props.keep_text_dict;
function changeMode() {
if (template_container.children[0].className === 'input-content') {
keep_text_dict.oneline = template_container.children[0].value;
template_container.removeChild(template_container.firstChild);
template_container.insertBefore(getDomFromString(textarea_template()),
template_container.firstChild);
template_container.children[0].value = keep_text_dict.textarea;
} else {
keep_text_dict.textarea = template_container.children[0].value;
template_container.removeChild(template_container.firstChild);
template_container.insertBefore(getDomFromString(input_template()),
template_container.firstChild);
template_container.children[0].value = keep_text_dict.oneline;
}
var typing_field = template_container.children[0];
typing_field.focus();
typing_field.select();
typing_field.selectionStart = typing_field.selectionEnd = typing_field.value.length;
function appendField(message) {
var field_id,
field_title,
current_field;
field_id = message.message_date.toLocaleString();
if (message.incoming) {
field_title = '< ';
} else {
field_title = '> ';
}
if (now === message.message_date.toDateString()) {
field_title += message.message_date.toLocaleTimeString();
} else {
field_title += message.message_date.toLocaleDateString();
}
field_list.push([field_id]);
current_field = {
"description": "",
"title": field_title,
"default": message.text,
"css_class": "",
"required": 0,
"editable": 0,
"key": field_id,
"hidden": 0,
"type": "TextAreaField"
};
field_dict[field_id] = current_field;
}
for (i = 0; i < message_list.length; i += 1) {
appendField(message_list[i]);
}
return form_gadget.render({
erp5_document: {"_embedded": {"_view": field_dict}},
form_definition: {
group_list: [
["center", field_list]
]
}
});
});
}
// Listen to button click
return loopEventListener(
gadget.props.element.querySelector('.custom-mode-change'),
'click',
false,
changeMode
);
if (modification_dict.hasOwnProperty('jio_key') ||
modification_dict.hasOwnProperty('refresh')) {
// Only scroll when displaying a new user discussion
// This allow to read discussion history without being annoyed by scroll
queue
.push(function () {
return gadget.scroll();
});
}
return queue;
})
.declareService(function () {
return scroll(this);
.onEvent('submit', function () {
var page_gadget = this;
return page_gadget.notifySubmitting()
.push(function () {
return page_gadget.getDeclaredGadget('input_form');
})
.push(function (input_form_gadget) {
return input_form_gadget.getContent();
})
.push(function (content) {
return page_gadget.jio_putAttachment(
page_gadget.state.jio_key,
'MESSAGE',
content.your_message
);
})
.push(function () {
return page_gadget.notifySubmitted();
})
.push(function () {
return page_gadget.render({
jio_key: page_gadget.state.jio_key,
refresh: new Date().getTime()
});
});
});
}(window, document, rJS, RSVP, Handlebars, loopEventListener));
\ No newline at end of file
}(window, document, rJS, RSVP));
\ No newline at end of file
......@@ -71,7 +71,7 @@
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_jabberclient_page_dialog.js</string> </value>
<value> <string>gadget_erp5_page_jabberclient_dialog.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>951.19073.8210.16640</string> </value>
<value> <string>968.4142.21164.34304</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1463643257.07</float>
<float>1528384260.05</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -10,18 +10,12 @@
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_jabberclient_page_password.js" type="text/javascript"></script>
<script src="gadget_erp5_page_jabberclient_password.js" type="text/javascript"></script>
</head>
<body>
<pre></pre>
<form class="dialog_form">
<button type="submit" data-i18n="Submit" class="ui-btn ui-btn-b ui-btn-inline
ui-icon-action ui-btn-icon-right ui-screen-hidden">Submit</button>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="erp5_form"
data-gadget-sandbox="public">
</div>
</form>
<div data-gadget-url="gadget_jabberclient_dialog.html"
data-gadget-scope="form_dialog"
data-gadget-sandbox="public">
</div>
</body>
</html>
\ No newline at end of file
......@@ -75,7 +75,7 @@
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_jabberclient_page_password.html</string> </value>
<value> <string>gadget_erp5_page_jabberclient_password.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.26853.9657.64102</string> </value>
<value> <string>967.24634.17714.15001</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1456843254.57</float>
<float>1528447865.96</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, rJS, RSVP, loopEventListener*/
/*global window, rJS*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, loopEventListener) {
(function (window, rJS) {
"use strict";
function validatePassword(password1, password2) {
......@@ -8,50 +8,40 @@
}
rJS(window)
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Init local properties
.ready(function (g) {
g.props = {};
})
// Assign the element to a variable
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", "notifySubmitted")
.declareAcquiredMethod("jio_put", "jio_put")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("notifySubmitted", "notifySubmitted")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod('triggerSubmit', function () {
this.props.element.querySelector('button').click();
.declareMethod('render', function () {
return this.changeState({
first_render: true
});
})
.declareMethod("render", function () {
var page_gadget = this;
return page_gadget.updateHeader({
page_title: 'Reset Password',
submit_action: true
.onStateChange(function () {
var gadget = this;
return gadget.getUrlFor({
command: 'display_stored_state',
options: {page: 'jabberclient_contact'}
})
.push(function () {
// Ensure user is connected...
return page_gadget.jio_allDocs();
.push(function (url) {
return gadget.updateHeader({
page_title: 'Reset Password',
page_icon: 'power-off',
cancel_url: url
});
})
.push(function () {
return page_gadget.getDeclaredGadget("erp5_form");
return gadget.getDeclaredGadget("form_dialog");
})
.push(function (form_gadget) {
return form_gadget.render({
......@@ -92,7 +82,7 @@
}}},
form_definition: {
group_list: [[
"center",
"left",
[["server"], ["new_passwd"], ["repeat_passwd"]]
]]
}
......@@ -100,48 +90,25 @@
});
})
.declareService(function () {
var form_gadget = this;
function formSubmit() {
return form_gadget.notifySubmitting()
.allowPublicAcquisition("submitContent", function submitContent(param_list) {
var gadget = this,
content_dict = param_list[0];
if (validatePassword(content_dict.new_passwd, content_dict.repeat_passwd)) {
return gadget.jio_put(
'PASSWORD',
content_dict
)
.push(function () {
return form_gadget.getDeclaredGadget("erp5_form");
})
.push(function (erp5_form) {
return erp5_form.getContent();
})
.push(function (content_dict) {
if (validatePassword(content_dict.new_passwd, content_dict.repeat_passwd)) {
return form_gadget.jio_put(
'PASSWORD',
content_dict
);
}
// XXX Uses field validation instead...
throw new Error('Password does not match.');
})
.push(function () {
return RSVP.all([
form_gadget.notifySubmitted(),
form_gadget.redirect({command: 'display', options: {page: 'contact'}})
]);
})
.push(undefined, function (error) {
return form_gadget.notifySubmitted()
.push(function () {
throw error;
});
return gadget.redirect({
command: 'display_stored_state',
options: {page: 'jabberclient_contact'}
});
});
}
// Listen to form submit
return loopEventListener(
form_gadget.props.element.querySelector('form'),
'submit',
false,
formSubmit
);
return gadget.notifySubmitted({
'message': "Passwords do not match.",
'status': 'error'
});
});
}(window, rJS, RSVP, loopEventListener));
\ No newline at end of file
}(window, rJS));
\ No newline at end of file
......@@ -71,7 +71,7 @@
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_jabberclient_page_password.js</string> </value>
<value> <string>gadget_erp5_page_jabberclient_password.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -216,7 +216,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>vincent</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.49433.64509.32819</string> </value>
<value> <string>968.5229.15375.33723</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1519651582.05</float>
<float>1528449441.42</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -10,18 +10,12 @@
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_jabberclient_page_subscribe.js" type="text/javascript"></script>
<script src="gadget_erp5_page_jabberclient_new_contact.js" type="text/javascript"></script>
</head>
<body>
<pre></pre>
<form class="dialog_form">
<button type="submit" data-i18n="Submit" class="ui-btn ui-btn-b ui-btn-inline
ui-icon-action ui-btn-icon-right ui-screen-hidden">Submit</button>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="erp5_form"
data-gadget-sandbox="public">
</div>
</form>
<div data-gadget-url="gadget_jabberclient_dialog.html"
data-gadget-scope="form_dialog"
data-gadget-sandbox="public">
</div>
</body>
</html>
\ No newline at end of file
......@@ -75,7 +75,7 @@
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_jabberclient_page_subscribe.html</string> </value>
<value> <string>gadget_erp5_page_jabberclient_new_contact.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -103,7 +103,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>JabberClient Gadget Page Subscribe</string> </value>
<value> <string>JabberClient Gadget Page New Contact</string> </value>
</item>
<item>
<key> <string>version</string> </key>
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.26823.54523.58094</string> </value>
<value> <string>968.4104.35023.29269</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1456843200.45</float>
<float>1528382866.49</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, rJS, RSVP, loopEventListener*/
/*global window, rJS*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, loopEventListener) {
(function (window, rJS) {
"use strict";
rJS(window)
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Init local properties
.ready(function (g) {
g.props = {};
})
// Assign the element to a variable
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
/////////////////////////////////////////////////////////////////
// Acquired methods
......@@ -26,92 +11,79 @@
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", "notifySubmitted")
.declareAcquiredMethod("notifyChange", "notifyChange")
.declareAcquiredMethod("jio_put", "jio_put")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod('triggerSubmit', function () {
this.props.element.querySelector('button').click();
})
.declareMethod("render", function () {
var page_gadget = this;
return page_gadget.updateHeader({
page_title: 'New Contact',
submit_action: true
})
.push(function () {
// Ensure user is connected...
return page_gadget.jio_allDocs();
})
.push(function () {
return page_gadget.getDeclaredGadget("erp5_form");
})
.push(function (form_gadget) {
return form_gadget.render({
erp5_document: {"_embedded": {"_view": {
"jid": {
"description": "",
"title": "Jabber ID",
"default": "",
"css_class": "",
"required": 1,
"editable": 1,
"key": "jid",
"hidden": 0,
"type": "StringField"
}
}}},
form_definition: {
group_list: [[
"center",
[["jid"]]
]]
}
});
});
.declareMethod('render', function () {
return this.changeState({
// No need to update the form if render is called twice
first_render: true
});
})
.declareService(function () {
var form_gadget = this;
.onStateChange(function (modification_dict) {
var gadget = this;
function formSubmit() {
return form_gadget.notifySubmitting()
.push(function () {
return form_gadget.getDeclaredGadget("erp5_form");
})
.push(function (erp5_form) {
return erp5_form.getContent();
})
.push(function (content_dict) {
return form_gadget.jio_put(
'SUBSCRIBE',
content_dict
);
if (modification_dict.hasOwnProperty('first_render')) {
return gadget.getUrlFor({
command: 'change',
options: {page: "jabberclient_contact"}
})
.push(function (url) {
return gadget.updateHeader({
page_title: 'New Contact',
cancel_url: url
});
})
.push(function () {
return RSVP.all([
form_gadget.notifySubmitted(),
form_gadget.redirect({command: 'display', options: {page: 'contact'}})
]);
return gadget.getDeclaredGadget("form_dialog");
})
.push(undefined, function (error) {
return form_gadget.notifySubmitted()
.push(function () {
throw error;
});
.push(function (form_gadget) {
return form_gadget.render({
erp5_document: {"_embedded": {"_view": {
"jid": {
"description": "",
"title": "Jabber ID",
"default": "",
"css_class": "",
"required": 1,
"editable": 1,
"key": "jid",
"hidden": 0,
"type": "StringField"
}
}}},
form_definition: {
group_list: [[
"left",
[["jid"]]
]]
}
});
});
}
})
// Listen to form submit
return loopEventListener(
form_gadget.props.element.querySelector('form'),
'submit',
false,
formSubmit
);
.allowPublicAcquisition("submitContent", function submitContent(param_list) {
var gadget = this,
content_dict = param_list[0];
return gadget.jio_put(
'SUBSCRIBE',
content_dict
)
.push(function () {
return gadget.redirect({
command: 'change',
options: {page: "jabberclient_contact"}
});
});
});
}(window, rJS, RSVP, loopEventListener));
\ No newline at end of file
}(window, rJS));
\ No newline at end of file
......@@ -71,7 +71,7 @@
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_jabberclient_page_subscribe.js</string> </value>
<value> <string>gadget_erp5_page_jabberclient_new_contact.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -99,7 +99,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>JabberClient Gadget Page Subscribe JS</string> </value>
<value> <string>JabberClient Gadget Page New Contact JS</string> </value>
</item>
<item>
<key> <string>version</string> </key>
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.26838.22974.62054</string> </value>
<value> <string>968.4120.24174.54050</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1456843207.84</float>
<float>1528446473.57</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -3,43 +3,69 @@
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>ERP5 Panel</title>
<title>Jabber Panel</title>
<!--
data-i18n=Editable
-->
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="handlebars.js" type="text/javascript"></script>
<script src="gadget_global.js" type="text/javascript"></script>
<script src="jquery.js" type="text/javascript"></script>
<script src="jquerymobile.js" type="text/javascript"></script>
<script id="panel-template-header" type="text/x-handlebars-template">
<div data-role="header" class="ui-bar-inherit">
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-left">
<div class="ui-controlgroup-controls">
<form action="#" method="post">
<input type="submit" data-i18n="[value]Close" data-icon="delete" data-iconpos="notext" value="Close" />
</form>
</div>
</div>
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-right">
<div class="ui-controlgroup-controls">
<a href="#" class="ui-btn ui-btn-icon-notext ui-icon-home" data-i18n="Home">Home</a>
<button data-i18n="Close" class="ui-btn ui-btn-icon-notext ui-icon-delete">Close</button>
</div>
</div>
<!--div class="panel_img">
<img class="ui-title" alt="ERP5" src="gadget_erp5_panel.png?format=png"/>
</div-->
</div>
</script>
<script id="panel-template-body" type="text/x-handlebars-template">
<div class="ui-content">
<ul data-role="listview" class="ui-listview" data-enhanced="true">
<li class="ui-first-child"><a href="{{contact_href}}" class="ui-btn ui-btn-icon-left ui-icon-puzzle-piece" data-i18n="Contacts">Contacts</a></li>
<li><a href="{{subscribe_href}}" class="ui-btn ui-btn-icon-left ui-icon-gear" data-i18n="New Contact">New Contact</a></li>
<li class="ui-last-child"><a href="{{password_href}}" class="ui-btn ui-btn-icon-left ui-icon-power-off" data-i18n="Password">Password</a></li>
</ul>
<!--form class="dialog_form">
<button type="submit" class="ui-btn ui-btn-b ui-btn-inline
ui-icon-action ui-btn-icon-right ui-screen-hidden">Submit</button>
<div data-gadget-url="gadget_erp5_searchfield.html"
data-gadget-scope="erp5_searchfield"
data-gadget-sandbox="public"></div>
</form-->
<ul data-role="listview" class="ui-listview" data-enhanced="true"></ul>
<div data-gadget-url="gadget_erp5_field_checkbox.html"
data-gadget-scope="erp5_checkbox"
data-gadget-sandbox="public"></div>
<dl></dl>
</div>
</script>
<script id="panel-template-body-list" type="text/x-handlebars-template">
<li class="ui-first-child"><a href="{{contact_href}}" class="ui-btn ui-btn-icon-left ui-icon-puzzle-piece" data-i18n="Contacts">Contacts</a></li>
<li><a href="{{password_href}}" class="ui-btn ui-btn-icon-left ui-icon-power-off" data-i18n="Password" accesskey="w">Password</a></li>
</script>
<!--script id="panel-template-body-desktop" type="text/x-handlebars-template">
<dt class="ui-content-title ui-body-c ui-btn ui-btn-icon-left ui-icon-eye" data-i18n="Views">Views</dt>
{{#each view_list}}
<dd data-role="listview" data-theme="c" data-inset="true" class="document-listview">
<a data-i18n="{{title}}" class="ui-body-inherit" href="{{href}}">{{title}}</a>
</dd>
{{/each}}
<dt class="ui-content-title ui-body-c ui-btn ui-btn-icon-left ui-icon-cogs" data-i18n="Decisions">Decisions</dt>
{{#each workflow_list}}
<dd data-role="listview" data-theme="c" data-inset="true" class="document-listview">
<a data-i18n="{{title}}" class="ui-body-inherit" href="{{href}}">{{title}}</a>
</dd>
{{/each}}
</script-->
<!-- custom script -->
<script src="gadget_jabberclient_panel.js" type="text/javascript"></script>
......@@ -47,6 +73,5 @@
<body>
<div class="jqm-navmenu-panel"></div>
</body>
</html>
\ No newline at end of file
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.35375.42111.29422</string> </value>
<value> <string>967.24634.17714.15001</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1456843184.4</float>
<float>1528380040.19</float>
<string>UTC</string>
</tuple>
</state>
......
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, rJS, Handlebars, jQuery, RSVP, loopEventListener */
(function (window, rJS, Handlebars, $, RSVP, loopEventListener) {
/*jslint nomen: true, indent: 2, maxerr: 3, unparam: true */
/*global window, document, rJS, Handlebars, RSVP, Node, loopEventListener */
(function (window, document, rJS, Handlebars, RSVP, Node, loopEventListener) {
"use strict";
/////////////////////////////////////////////////////////////////
......@@ -8,108 +8,233 @@
/////////////////////////////////////////////////////////////////
// Precompile templates while loading the first gadget instance
var gadget_klass = rJS(window),
source_header = gadget_klass.__template_element
template_element = gadget_klass.__template_element,
panel_template_header = Handlebars.compile(template_element
.getElementById("panel-template-header")
.innerHTML,
panel_template_header = Handlebars.compile(source_header),
source_body = gadget_klass.__template_element
.innerHTML),
panel_template_body = Handlebars.compile(template_element
.getElementById("panel-template-body")
.innerHTML,
panel_template_body = Handlebars.compile(source_body);
.innerHTML),
panel_template_body_list = Handlebars.compile(template_element
.getElementById("panel-template-body-list")
.innerHTML);
gadget_klass
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Init local properties
.ready(function (g) {
g.props = {};
.setState({
visible: false,
desktop: false
})
//////////////////////////////////////////////
// acquired method
//////////////////////////////////////////////
.declareAcquiredMethod("translateHtml", "translateHtml")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
// Assign the element to a variable
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
g.props.jelement = $(element.querySelector("div"));
g.props.render_deferred = RSVP.defer();
});
})
.ready(function (g) {
g.props.jelement.panel({
display: "overlay",
position: "left",
theme: "d"
// animate: false
});
})
.declareAcquiredMethod("translateHtml", "translateHtml")
.declareAcquiredMethod("translate", "translate")
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("getUrlParameter", "getUrlParameter")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod('toggle', function () {
this.props.jelement.panel("toggle");
return this.changeState({
visible: !this.state.visible
});
})
.declareMethod('close', function () {
this.props.jelement.panel("close");
return this.changeState({
visible: false
});
})
.declareMethod('render', function () {
var g = this;
return new RSVP.Queue()
.push(function () {
return RSVP.all([
g.getUrlFor({command: 'display', options: {page: "contact"}}),
g.getUrlFor({command: 'display', options: {page: "subscribe"}}),
g.getUrlFor({command: 'display', options: {page: "password"}})
]);
})
.push(function (all_result) {
// XXX: Customize panel header!
var tmp = panel_template_header();
tmp += panel_template_body({
"contact_href": all_result[0],
"subscribe_href": all_result[1],
"password_href": all_result[2]
.declareMethod('render', function (options) {
var erp5_document = options.erp5_document,
workflow_list,
view_list,
context = this;
if (erp5_document !== undefined) {
workflow_list = erp5_document._links.action_workflow || [];
view_list = erp5_document._links.action_object_view || [];
if (workflow_list.constructor !== Array) {
workflow_list = [workflow_list];
}
if (view_list.constructor !== Array) {
view_list = [view_list];
}
// Prevent has much as possible to modify the DOM panel
// stateChange prefer to compare strings
workflow_list = JSON.stringify(workflow_list);
view_list = JSON.stringify(view_list);
}
return context.getUrlParameter('editable')
.push(function (editable) {
return context.changeState({
workflow_list: workflow_list,
view_list: view_list,
global: true,
editable: options.editable || editable || false
});
return tmp;
})
.push(function (my_translated_or_plain_html) {
g.props.jelement.html(my_translated_or_plain_html);
g.props.jelement.trigger("create");
g.props.render_deferred.resolve();
});
})
/////////////////////////////////////////////////////////////////
// declared services
/////////////////////////////////////////////////////////////////
.declareService(function () {
var panel_gadget = this;
.onStateChange(function (modification_dict) {
var context = this,
queue = new RSVP.Queue(),
tmp_element;
function formSubmit() {
panel_gadget.toggle();
if (modification_dict.hasOwnProperty("visible")) {
if (this.state.visible) {
if (!this.element.classList.contains('visible')) {
this.element.classList.toggle('visible');
}
} else {
if (this.element.classList.contains('visible')) {
this.element.classList.remove('visible');
}
}
}
return new RSVP.Queue()
.push(function () {
return panel_gadget.props.render_deferred.promise;
})
.push(function () {
return loopEventListener(
panel_gadget.props.element.querySelector('form'),
'submit',
false,
formSubmit
);
if (modification_dict.hasOwnProperty("global")) {
queue
.push(function () {
// XXX: Customize panel header!
return context.translateHtml(
panel_template_header() +
panel_template_body()
);
})
.push(function (my_translated_or_plain_html) {
tmp_element = document.createElement('div');
tmp_element.innerHTML = my_translated_or_plain_html;
context.element.querySelector("div").appendChild(tmp_element);
return context.listenResize();
});
}
if (modification_dict.hasOwnProperty("editable")) {
queue
// Update the global links
.push(function () {
return RSVP.all([
context.getUrlFor({command: 'display_stored_state', options: {page: "jabberclient_contact"}}),
context.getUrlFor({command: 'display', options: {page: "jabberclient_password"}})
]);
})
.push(function (result_list) {
return context.translateHtml(
panel_template_body_list({
"contact_href": result_list[0],
"password_href": result_list[1]
})
);
})
.push(function (result) {
context.element.querySelector("ul").innerHTML = result;
});
}
/*
if ((this.state.global === true) &&
(modification_dict.hasOwnProperty("desktop") ||
modification_dict.hasOwnProperty("editable") ||
modification_dict.hasOwnProperty("workflow_list") ||
modification_dict.hasOwnProperty("view_list"))) {
if (!(this.state.desktop && (this.state.view_list !== undefined))) {
queue
.push(function () {
gadget.element.querySelector("dl").textContent = '';
});
} else {
queue
.push(function () {
var i = 0,
promise_list = [],
workflow_list = JSON.parse(gadget.state.workflow_list),
view_list = JSON.parse(gadget.state.view_list);
for (i = 0; i < workflow_list.length; i += 1) {
promise_list.push(
gadget.getUrlFor({
command: 'change',
options: {
view: workflow_list[i].href,
page: undefined
}
})
);
}
for (i = 0; i < view_list.length; i += 1) {
promise_list.push(
gadget.getUrlFor({
command: 'change',
options: {
view: view_list[i].href,
page: undefined
}
})
);
}
return RSVP.all(promise_list);
})
.push(function (result_list) {
var i,
result_workflow_list = [],
result_view_list = [],
workflow_list = JSON.parse(gadget.state.workflow_list),
view_list = JSON.parse(gadget.state.view_list);
for (i = 0; i < workflow_list.length; i += 1) {
result_workflow_list.push({
title: workflow_list[i].title,
href: result_list[i]
});
}
for (i = 0; i < view_list.length; i += 1) {
result_view_list.push({
title: view_list[i].title,
href: result_list[i + workflow_list.length]
});
}
gadget.element.querySelector("dl").innerHTML = panel_template_body_desktop({
workflow_list: result_workflow_list,
view_list: result_view_list
});
});
}
}
*/
return queue;
})
.declareJob('listenResize', function () {
// resize should be only trigger after the render method
// as displaying the panel rely on external gadget (for translation for example)
var result,
event,
context = this;
function extractSizeAndDispatch() {
if (window.matchMedia("(min-width: 85em)").matches) {
return context.changeState({
desktop: true
});
}
return context.changeState({
desktop: false
});
}
result = loopEventListener(window, 'resize', false,
extractSizeAndDispatch);
event = document.createEvent("Event");
event.initEvent('resize', true, true);
window.dispatchEvent(event);
return result;
})
});
.onEvent('click', function (evt) {
if ((evt.target.nodeType === Node.ELEMENT_NODE) &&
(evt.target.tagName === 'BUTTON')) {
return this.toggle();
}
}, false, false);
}(window, rJS, Handlebars, jQuery, RSVP, loopEventListener));
\ No newline at end of file
}(window, document, rJS, Handlebars, RSVP, Node, loopEventListener));
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.26657.64277.54118</string> </value>
<value> <string>968.4100.33585.63641</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1456843167.64</float>
<float>1528383004.79</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, rJS, RSVP, loopEventListener, document, URL */
/*jslint nomen: true, indent: 2 */
(function (window, rJS, RSVP, loopEventListener, document, URL) {
"use strict";
// Keep reference of the latest allDocs params which reach to this view
// var SELECTION_KEY = "s",
// Keep reference in the global navigation pattern
// HISTORY KEY = "h"
// Current display parameter
// DISPLAY KEY = "d"
var PREVIOUS_KEY = "p",
NEXT_KEY = "n",
DROP_KEY = "u",
PREFIX_DISPLAY = "/",
PREFIX_COMMAND = "!",
// PREFIX_ERROR = "?",
COMMAND_DISPLAY_STATE = "display",
COMMAND_LOGIN = "login",
COMMAND_RAW = "raw",
COMMAND_RELOAD = "reload",
COMMAND_DISPLAY_STORED_STATE = "display_stored_state",
COMMAND_CHANGE_STATE = "change",
COMMAND_STORE_AND_CHANGE_STATE = "store_and_change",
COMMAND_INDEX_STATE = "index",
COMMAND_SELECTION_PREVIOUS = "selection_previous",
COMMAND_SELECTION_NEXT = "selection_next",
COMMAND_HISTORY_PREVIOUS = "history_previous",
COMMAND_PUSH_HISTORY = "push_history",
REDIRECT_TIMEOUT = 5000,
VALID_URL_COMMAND_DICT = {};
VALID_URL_COMMAND_DICT[COMMAND_DISPLAY_STATE] = null;
VALID_URL_COMMAND_DICT[COMMAND_DISPLAY_STORED_STATE] = null;
VALID_URL_COMMAND_DICT[COMMAND_CHANGE_STATE] = null;
VALID_URL_COMMAND_DICT[COMMAND_STORE_AND_CHANGE_STATE] = null;
VALID_URL_COMMAND_DICT[COMMAND_INDEX_STATE] = null;
VALID_URL_COMMAND_DICT[COMMAND_SELECTION_PREVIOUS] = null;
VALID_URL_COMMAND_DICT[COMMAND_SELECTION_NEXT] = null;
VALID_URL_COMMAND_DICT[COMMAND_HISTORY_PREVIOUS] = null;
VALID_URL_COMMAND_DICT[COMMAND_PUSH_HISTORY] = null;
VALID_URL_COMMAND_DICT[COMMAND_LOGIN] = null;
VALID_URL_COMMAND_DICT[COMMAND_RAW] = null;
VALID_URL_COMMAND_DICT[COMMAND_RELOAD] = null;
function endsWith(str, suffix) {
return str.indexOf(suffix, str.length - suffix.length) !== -1;
}
//////////////////////////////////////////////////////////////////
// Change URL functions
//////////////////////////////////////////////////////////////////
function changeState(hash) {
// window.location = hash;
return window.location.replace(hash);
}
function synchronousChangeState(hash) {
changeState(hash);
// prevent returning unexpected response
// wait for the hash change to occur
// fail if nothing happens
return RSVP.timeout(REDIRECT_TIMEOUT);
}
//////////////////////////////////////////////////////////////////
// Build URL functions
//////////////////////////////////////////////////////////////////
function getCommandUrlFor(gadget, command, options) {
if (command === COMMAND_RAW) {
return options.url;
}
var result = "#" + PREFIX_COMMAND + (command || ""),
prefix = "?",
key,
tmp,
tmp_dict;
tmp_dict = gadget.props.options;
for (key in tmp_dict) {
if (tmp_dict.hasOwnProperty(key) && (tmp_dict[key] !== undefined)) {
tmp = tmp_dict[key];
if (endsWith(key, ":json")) {
tmp = JSON.stringify(tmp);
}
result += prefix + PREVIOUS_KEY + "." + encodeURIComponent(key) + "=" + encodeURIComponent(tmp);
prefix = "&";
}
}
for (key in options) {
if (options.hasOwnProperty(key)) {
tmp = options[key];
if (tmp === undefined) {
// Key should be dropped from the URL
result += prefix + DROP_KEY + "." + encodeURIComponent(key) + "=";
} else {
if (endsWith(key, ":json")) {
tmp = JSON.stringify(tmp);
}
result += prefix + NEXT_KEY + "." + encodeURIComponent(key) + "=" + encodeURIComponent(tmp);
}
prefix = "&";
}
}
if (command === COMMAND_LOGIN) {
// Build URL template to allow getting user information
result += '{' + prefix + 'n.me}';
}
return result;
}
function getDisplayUrlFor(jio_key, options) {
var prefix = '?',
result,
tmp,
key;
result = "#" + PREFIX_DISPLAY + (jio_key || "");
for (key in options) {
if (options.hasOwnProperty(key) && options[key] !== undefined) {
// Don't keep empty values
tmp = options[key];
if (endsWith(key, ":json")) {
tmp = JSON.stringify(tmp);
}
result += prefix + encodeURIComponent(key) + "=" + encodeURIComponent(tmp);
prefix = '&';
}
}
return result;
}
//////////////////////////////////////////////////////////////////
// exec command functions
//////////////////////////////////////////////////////////////////
function execDisplayCommand(next_options) {
// console.warn(command_options);
var jio_key = next_options.jio_key,
hash;
delete next_options.jio_key;
hash = getDisplayUrlFor(jio_key, next_options);
return new RSVP.Queue()
.push(function () {
return synchronousChangeState(hash);
});
}
//////////////////////////////////////////////////////////////////
// Command URL functions
//////////////////////////////////////////////////////////////////
function routeMethodLess() {
// Nothing. Go to front page
return synchronousChangeState(
getDisplayUrlFor(undefined, {page: 'contact'})
);
}
function routeDisplay(command_options) {
if (command_options.args.page === undefined) {
return routeMethodLess();
}
return {
url: "gadget_jabberclient_page_" + command_options.args.page + ".html",
options: command_options.args
};
}
function routeCommand(command_options) {
var args = command_options.args,
key,
split_list,
previous_options = {},
next_options = {},
drop_options = {},
valid = true;
// Rebuild the previous and next parameter dict
for (key in args) {
if (args.hasOwnProperty(key)) {
split_list = key.split('.', 2);
if (split_list.length !== 2) {
valid = false;
break;
}
if (split_list[0] === PREVIOUS_KEY) {
previous_options[split_list[1]] = args[key];
} else if (split_list[0] === NEXT_KEY) {
next_options[split_list[1]] = args[key];
} else if (split_list[0] === DROP_KEY) {
drop_options[split_list[1]] = args[key];
} else {
valid = false;
break;
}
}
}
if (!valid) {
throw new Error('Unsupported parameters: ' + key);
}
if (command_options.path === COMMAND_DISPLAY_STATE) {
return execDisplayCommand(next_options);
}
throw new Error('Unsupported command ' + command_options.path);
}
function listenHashChange(gadget) {
// Handle hash in this format: #$path1/path2?a=b&c=d
function extractHashAndDispatch(evt) {
var hash = (evt.newURL || window.location.toString()).split('#')[1],
split,
command = "",
query = "",
subhashes,
subhash,
keyvalue,
index,
key,
tmp,
args = {};
if (hash !== undefined) {
split = hash.split('?');
command = split[0] || "";
query = split[1] || "";
}
subhashes = query.split('&');
for (index in subhashes) {
if (subhashes.hasOwnProperty(index)) {
subhash = subhashes[index];
if (subhash !== '') {
keyvalue = subhash.split('=');
if (keyvalue.length === 2) {
key = decodeURIComponent(keyvalue[0]);
tmp = decodeURIComponent(keyvalue[1]);
if (endsWith(key, ":json")) {
tmp = JSON.parse(tmp);
}
args[key] = tmp;
}
}
}
}
return gadget.renderApplication({
method: command[0],
path: command.substr(1),
args: args
});
}
var result = loopEventListener(window, 'hashchange', false,
extractHashAndDispatch),
event = document.createEvent("Event");
event.initEvent('hashchange', true, true);
event.newURL = window.location.toString();
window.dispatchEvent(event);
return result;
}
rJS(window)
.ready(function (gadget) {
gadget.props = {
options: {},
start_deferred: RSVP.defer()
};
})
.declareMethod('getCommandUrlFor', function (options) {
var command = options.command,
absolute_url = options.absolute_url,
hash,
args = options.options,
valid = true,
key;
// Only authorize 'command', 'options', 'absolute_url' keys
// Drop all other kind of parameters, to detect issue more easily
for (key in options) {
if (options.hasOwnProperty(key)) {
if ((key !== 'command') && (key !== 'options') && (key !== 'absolute_url')) {
valid = false;
}
}
}
if (valid && (options.command) && (VALID_URL_COMMAND_DICT.hasOwnProperty(options.command))) {
hash = getCommandUrlFor(this, command, args);
} else {
hash = getCommandUrlFor(this, 'error', options);
}
if (absolute_url) {
hash = new URL(hash, window.location.href).href;
}
return hash;
})
.declareMethod('redirect', function (options) {
return this.getCommandUrlFor(options)
.push(function (hash) {
window.location.replace(hash);
// prevent returning unexpected response
// wait for the hash change to occur
// fail if nothing happens
return RSVP.timeout(REDIRECT_TIMEOUT);
});
})
.declareMethod('getUrlParameter', function (key) {
return this.props.options[key];
})
.declareMethod('route', function (command_options) {
if (command_options.method === PREFIX_DISPLAY) {
return routeDisplay(command_options);
}
if (command_options.method === PREFIX_COMMAND) {
return routeCommand(command_options);
}
if (command_options.method) {
throw new Error('Unsupported hash method: ' + command_options.method);
}
return routeMethodLess();
})
.declareMethod('start', function () {
this.props.start_deferred.resolve();
})
.declareAcquiredMethod('renderApplication', 'renderApplication')
.declareService(function () {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return gadget.props.start_deferred.promise;
})
.push(function () {
// console.info('router service: listen to hash change');
return listenHashChange(gadget);
});
});
}(window, rJS, RSVP, loopEventListener, document, URL));
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -99,11 +99,11 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>strophe</string> </value>
<value> <string>Strophe 1.2.15</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
<value> <string>002</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
......@@ -216,7 +216,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>romain</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>939.33839.60138.34338</string> </value>
<value> <string>967.46309.29568.62310</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,8 +248,8 @@
</tuple>
<state>
<tuple>
<float>1418207076.94</float>
<string>GMT</string>
<float>1526982220.12</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
......@@ -249,6 +249,46 @@
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_frontpage_gadget_url</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_webapp_manifest_url</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_stylesheet_url</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_default_jio_document_page_gadget_url</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
......@@ -283,7 +323,7 @@
<value>
<tuple>
<string>caching_policy/must-revalidate</string>
<string>aggregate/web_page_module/rjs_gadget_erp5_html</string>
<string>aggregate/web_page_module/rjs_gadget_erp5_launcher_html</string>
</tuple>
</value>
</item>
......@@ -293,11 +333,21 @@
</item>
<item>
<key> <string>configuration_content_security_policy</string> </key>
<value> <string>default-src \'none\'; img-src \'self\' data:; media-src \'self\' blob:; connect-src \'self\' data:; script-src \'self\' \'unsafe-eval\'; font-src \'self\'; style-src \'self\' netdna.bootstrapcdn.com \'unsafe-inline\' data:; frame-src \'self\' data:</string> </value>
<value> <string>default-src \'none\'; img-src \'self\' data:; media-src \'self\' blob:; connect-src \'self\' data:; script-src \'self\' \'unsafe-eval\'; font-src \'self\'; style-src \'self\' \'unsafe-inline\' data:; frame-src \'self\' data:</string> </value>
</item>
<item>
<key> <string>configuration_default_jio_document_page_gadget_url</string> </key>
<value> <string>jabberclient_dialog</string> </value>
</item>
<item>
<key> <string>configuration_frontpage_gadget_url</string> </key>
<value> <string>jabberclient_contact</string> </value>
</item>
<item>
<key> <string>configuration_header_gadget_url</string> </key>
<value> <string>gadget_officejs_header.html</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>configuration_jio_gadget_url</string> </key>
......@@ -313,12 +363,24 @@
</item>
<item>
<key> <string>configuration_router_gadget_url</string> </key>
<value> <string>gadget_jabberclient_router.html</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>configuration_stylesheet_url</string> </key>
<value> <string>gadget_jabberclient.css</string> </value>
</item>
<item>
<key> <string>configuration_translation_gadget_url</string> </key>
<value> <string>gadget_translation.html</string> </value>
</item>
<item>
<key> <string>configuration_webapp_manifest_url</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>configuration_x_frame_options</string> </key>
<value> <string>SAMEORIGIN</string> </value>
......@@ -540,7 +602,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>vincent</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -554,7 +616,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.17525.46862.41420</string> </value>
<value> <string>968.4134.56436.18022</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -572,7 +634,7 @@
</tuple>
<state>
<tuple>
<float>1509358218.96</float>
<float>1528452522.1</float>
<string>UTC</string>
</tuple>
</state>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_web_jabberclient_ui</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jabberclient.less</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal tal:omit-tag="" tal:content="structure python: here.portal_skins.erp5_web_renderjs_ui['erp5css.less']"></tal>
@colorheaderbackground: #FF8552;
@colorsubheaderbackground: #E9D758;
\ No newline at end of file
image_module/jabber_*
web_site_module/jabber_client
web_page_module/jabber_**
\ No newline at end of file
image_module/jabber_*
web_site_module/jabber_client
web_page_module/jabber_**
\ No newline at end of file
image_module/jabber_*
web_page_module/jabber_*
web_site_module/jabber_client
web_site_module/jabber_client/**
\ No newline at end of file
erp5_web_jabberclient_ui
\ 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