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 @@ ...@@ -16,7 +16,6 @@
<string>Associate</string> <string>Associate</string>
<string>Auditor</string> <string>Auditor</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -59,16 +58,9 @@ ...@@ -59,16 +58,9 @@
<string>Associate</string> <string>Associate</string>
<string>Auditor</string> <string>Auditor</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string>
</tuple> </tuple>
</value> </value>
</item> </item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple/>
</value>
</item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <value>
...@@ -81,7 +73,7 @@ ...@@ -81,7 +73,7 @@
</item> </item>
<item> <item>
<key> <string>default_reference</string> </key> <key> <string>default_reference</string> </key>
<value> <string>gadget_jabberclient_router.html</string> </value> <value> <string>gadget_jabberclient_dialog.html</string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -91,7 +83,7 @@ ...@@ -91,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>jabber_gadget_router_html</string> </value> <value> <string>jabber_gadget_dialog_html</string> </value>
</item> </item>
<item> <item>
<key> <string>language</string> </key> <key> <string>language</string> </key>
...@@ -109,7 +101,7 @@ ...@@ -109,7 +101,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>JabberClient Gadget Router</string> </value> <value> <string>JabberClient Gadget Dialog</string> </value>
</item> </item>
<item> <item>
<key> <string>version</string> </key> <key> <string>version</string> </key>
...@@ -195,7 +187,7 @@ ...@@ -195,7 +187,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1456334074.25</float> <float>1527841931.78</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
...@@ -240,7 +232,7 @@ ...@@ -240,7 +232,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.24010.37433.15462</string> </value> <value> <string>967.60678.30724.15172</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -258,7 +250,7 @@ ...@@ -258,7 +250,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1456843272.44</float> <float>1527844242.22</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
...@@ -315,7 +307,7 @@ ...@@ -315,7 +307,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1456333611.93</float> <float>1527841832.01</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </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 @@ ...@@ -16,7 +16,6 @@
<string>Associate</string> <string>Associate</string>
<string>Auditor</string> <string>Auditor</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -59,16 +58,9 @@ ...@@ -59,16 +58,9 @@
<string>Associate</string> <string>Associate</string>
<string>Auditor</string> <string>Auditor</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string>
</tuple> </tuple>
</value> </value>
</item> </item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple/>
</value>
</item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <value>
...@@ -77,7 +69,7 @@ ...@@ -77,7 +69,7 @@
</item> </item>
<item> <item>
<key> <string>default_reference</string> </key> <key> <string>default_reference</string> </key>
<value> <string>gadget_jabberclient_router.js</string> </value> <value> <string>gadget_jabberclient_dialog.js</string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -87,7 +79,7 @@ ...@@ -87,7 +79,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>jabber_gadget_router_js</string> </value> <value> <string>jabber_gadget_dialog_js</string> </value>
</item> </item>
<item> <item>
<key> <string>language</string> </key> <key> <string>language</string> </key>
...@@ -105,7 +97,7 @@ ...@@ -105,7 +97,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>JabberClient Gadget Router JS</string> </value> <value> <string>JabberClient Gadget Dialog JS</string> </value>
</item> </item>
<item> <item>
<key> <string>version</string> </key> <key> <string>version</string> </key>
...@@ -191,7 +183,7 @@ ...@@ -191,7 +183,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1456334186.39</float> <float>1527841931.8</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
...@@ -236,7 +228,7 @@ ...@@ -236,7 +228,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.35416.23201.12748</string> </value> <value> <string>967.60735.37247.24337</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -254,7 +246,7 @@ ...@@ -254,7 +246,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1456845631.45</float> <float>1527847880.81</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
...@@ -311,7 +303,7 @@ ...@@ -311,7 +303,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1456333611.91</float> <float>1527841783.19</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<item> <item>
<key> <string>text_content</string> </key> <key> <string>text_content</string> </key>
<value> <string>CACHE MANIFEST\n <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 \n
CACHE:\n CACHE:\n
font-awesome/font-awesome.css\n font-awesome/font-awesome.css\n
...@@ -109,54 +109,76 @@ font-awesome/font-awesome-webfont.woff\n ...@@ -109,54 +109,76 @@ font-awesome/font-awesome-webfont.woff\n
font-awesome/font-awesome-webfont.woff2\n font-awesome/font-awesome-webfont.woff2\n
font-awesome/font-awesome-webfont.ttf\n font-awesome/font-awesome-webfont.ttf\n
font-awesome/font-awesome-webfont.svg\n font-awesome/font-awesome-webfont.svg\n
URI.js\n erp5_launcher_nojqm.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
gadget_global.js\n gadget_global.js\n
gadget_erp5_global.js\n
gadget_jio.js\n gadget_jio.js\n
gadget_jio.html\n gadget_jio.html\n
handlebars.js\n handlebars.js\n
jiodev.js\n jiodev.js\n
jquery.js\n
jquerymobile.css\n
jquerymobile.js\n
renderjs.js\n renderjs.js\n
rsvp.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.html\n
gadget_erp5_editor_panel.js\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.html\n
gadget_erp5_form.js\n gadget_erp5_form.js\n
gadget_officejs_header.html\n gadget_erp5_pt_form_list.html\n
gadget_officejs_header.js\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.html\n
gadget_erp5_field_string.js\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.html\n
gadget_erp5_field_password.js\n gadget_erp5_field_password.js\n
gadget_erp5_label_field.html\n gadget_erp5_label_field.html\n
gadget_erp5_label_field.js\n gadget_erp5_label_field.js\n
gadget_html5_input.html\n gadget_html5_input.html\n
gadget_html5_input.js\n gadget_html5_input.js\n
gadget_jabberclient_page_dialog.html\n gadget_html5_textarea.html\n
gadget_jabberclient_page_dialog.js\n gadget_html5_textarea.js\n
gadget_jabberclient_router.html\n gadget_html5_element.html\n
gadget_jabberclient_router.js\n gadget_html5_element.js\n
gadget_jabberclient_page_password.html\n gadget_erp5_page_jabberclient_dialog.html\n
gadget_jabberclient_page_password.js\n gadget_erp5_page_jabberclient_dialog.js\n
gadget_jabberclient_page_connect.html\n gadget_erp5_page_jabberclient_password.html\n
gadget_jabberclient_page_connect.js\n gadget_erp5_page_jabberclient_password.js\n
gadget_jabberclient_page_subscribe.js\n gadget_erp5_page_jabberclient_connect.html\n
gadget_jabberclient_page_subscribe.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.html\n
gadget_jabberclient_panel.js\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.html\n
gadget_jabberclient_jio.js\n gadget_jabberclient_jio.js\n
gadget_jabberclient_dialog.html\n
gadget_jabberclient_dialog.js\n
gadget_jabberclient.css\n
favicon.ico\n favicon.ico\n
gadget_jabberclient_notification_warning.ico\n
gadget_jabberclient_notification_ok.ico\n
connection/\n connection/\n
NETWORK:\n NETWORK:\n
*</string> </value> *</string> </value>
...@@ -280,7 +302,7 @@ NETWORK:\n ...@@ -280,7 +302,7 @@ NETWORK:\n
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>vincent</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -294,7 +316,7 @@ NETWORK:\n ...@@ -294,7 +316,7 @@ NETWORK:\n
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.17525.46862.41420</string> </value> <value> <string>968.5260.61084.65058</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -312,7 +334,7 @@ NETWORK:\n ...@@ -312,7 +334,7 @@ NETWORK:\n
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1509358498.78</float> <float>1528452535.81</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<item> <item>
<key> <string>text_content</string> </key> <key> <string>text_content</string> </key>
<value> <string>CACHE MANIFEST\n <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 \n
CACHE:\n CACHE:\n
gadget_global.js\n gadget_global.js\n
...@@ -244,7 +244,7 @@ NETWORK:\n ...@@ -244,7 +244,7 @@ NETWORK:\n
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>960.4006.61190.60910</string> </value> <value> <string>963.11851.42215.35874</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -262,7 +262,7 @@ NETWORK:\n ...@@ -262,7 +262,7 @@ NETWORK:\n
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1497524164.53</float> <float>1528450792.31</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
} }
function disconnectOnbeforeunload(connection) { function disconnectOnbeforeunload(connection) {
return function (event) { return function () {
/* XXX it can be interfere with changed warning /* XXX it can be interfere with changed warning
if (changed && $('button.save')) { if (changed && $('button.save')) {
return unsaved_warn_message; return unsaved_warn_message;
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.56116.24375.61559</string> </value> <value> <string>963.11851.42215.35874</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1458087635.15</float> <float>1509724529.27</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -12,11 +12,12 @@ ...@@ -12,11 +12,12 @@
<script src="jiodev.js" type="text/javascript"></script> <script src="jiodev.js" type="text/javascript"></script>
<!-- custom script --> <!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_jabberclient_jio.js" type="text/javascript"></script> <script src="gadget_jabberclient_jio.js" type="text/javascript"></script>
</head> </head>
<body> <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> <div data-gadget-url='gadget_jio.html' data-gadget-scope='persistent_jio'></div>
</body> </body>
......
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.35373.28357.37512</string> </value> <value> <string>963.13564.52429.46011</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1456843116.28</float> <float>1509720807.28</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
JIO_GADGET_URL = "gadget_jio.html"; JIO_GADGET_URL = "gadget_jio.html";
function dropNotification() { 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) { function wrapJioCall(gadget, method_name, argument_list) {
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
function markOffline(key) { function markOffline(key) {
return gadget.state_parameter_dict.volatile_jio.get(key) return gadget.state_parameter_dict.volatile_jio.get(key)
.push(function (doc) { .push(function (doc) {
doc.offline = true; doc.connected = false;
return gadget.state_parameter_dict.volatile_jio.put(key, doc); return gadget.state_parameter_dict.volatile_jio.put(key, doc);
}); });
} }
...@@ -178,8 +178,8 @@ ...@@ -178,8 +178,8 @@
(error.status_code === 404)) { (error.status_code === 404)) {
return { return {
jid: jid, jid: jid,
offline: true, connected: false,
read: true notification: false
}; };
} }
throw error; throw error;
...@@ -252,9 +252,9 @@ ...@@ -252,9 +252,9 @@
.push(function (doc) { .push(function (doc) {
if ((type === "unavailable") || (type === "unsubscribed")) { if ((type === "unavailable") || (type === "unsubscribed")) {
// Bye dear contact // Bye dear contact
doc.offline = true; doc.connected = false;
} else { } else {
doc.offline = false; doc.connected = true;
} }
return gadget.state_parameter_dict.volatile_jio.put(from, doc); return gadget.state_parameter_dict.volatile_jio.put(from, doc);
}) })
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
if (!document.hasFocus()) { if (!document.hasFocus()) {
// Only notify when page has no focused. // Only notify when page has no focused.
// It simplifies a lot notification status // 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; var gadget = this;
...@@ -278,7 +278,7 @@ ...@@ -278,7 +278,7 @@
return initializeContact(gadget, argument_list[0]); return initializeContact(gadget, argument_list[0]);
}) })
.push(function (doc) { .push(function (doc) {
doc.read = false; doc.notification = true;
return gadget.state_parameter_dict.volatile_jio.put(argument_list[0], doc); return gadget.state_parameter_dict.volatile_jio.put(argument_list[0], doc);
}) })
.push(function () { .push(function () {
...@@ -327,7 +327,7 @@ ...@@ -327,7 +327,7 @@
.allowPublicAcquisition("notifyXMPPDisconnected", function () { .allowPublicAcquisition("notifyXMPPDisconnected", function () {
var gadget = this; var gadget = this;
// Notify about disconnection // 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) return dropConnectionGadget(gadget)
.push(function () { .push(function () {
return this.redirect({command: 'display', options: {page: 'connect'}}); return this.redirect({command: 'display', options: {page: 'connect'}});
...@@ -337,7 +337,7 @@ ...@@ -337,7 +337,7 @@
.allowPublicAcquisition("notifyXMPPConnectionError", function () { .allowPublicAcquisition("notifyXMPPConnectionError", function () {
var gadget = this; var gadget = this;
// Notify about disconnection // 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) return dropConnectionGadget(gadget)
.push(function () { .push(function () {
...@@ -348,7 +348,7 @@ ...@@ -348,7 +348,7 @@
.allowPublicAcquisition("notifyXMPPError", function () { .allowPublicAcquisition("notifyXMPPError", function () {
var gadget = this; var gadget = this;
// Notify about disconnection // 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) return dropConnectionGadget(gadget)
.push(function () { .push(function () {
...@@ -423,7 +423,7 @@ ...@@ -423,7 +423,7 @@
.declareMethod('allDocs', function (options) { .declareMethod('allDocs', function (options) {
if (!this.state_parameter_dict.connected) { 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); return this.state_parameter_dict.volatile_jio.allDocs(options);
}) })
...@@ -432,7 +432,7 @@ ...@@ -432,7 +432,7 @@
var gadget = this, var gadget = this,
result; result;
if (!this.state_parameter_dict.connected) { 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') { if (name === 'enclosure') {
return getLog(this, id, options) return getLog(this, id, options)
...@@ -441,7 +441,7 @@ ...@@ -441,7 +441,7 @@
return initializeContact(gadget, id); return initializeContact(gadget, id);
}) })
.push(function (doc) { .push(function (doc) {
doc.read = true; doc.notification = false;
return gadget.state_parameter_dict.volatile_jio.put(id, doc); return gadget.state_parameter_dict.volatile_jio.put(id, doc);
}) })
.push(function () { .push(function () {
...@@ -454,7 +454,7 @@ ...@@ -454,7 +454,7 @@
.declareMethod('putAttachment', function (id, name, blob) { .declareMethod('putAttachment', function (id, name, blob) {
var gadget = this; var gadget = this;
if (!this.state_parameter_dict.connected) { 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') { if (name === 'MESSAGE') {
return this.getDeclaredGadget(CONNECTION_GADGET_SCOPE) return this.getDeclaredGadget(CONNECTION_GADGET_SCOPE)
......
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>vincent</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>965.49433.64509.32819</string> </value> <value> <string>967.46266.46579.39065</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1519651476.88</float> <float>1526979580.7</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" /> <title>JabberClient Gadget Page Attachment</title>
<title>Router Gadget</title>
<!-- renderjs --> <!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script> <script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.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> </head>
<body> <body>
<div data-gadget-url="gadget_jabberclient_dialog.html"
data-gadget-scope="form_dialog"
data-gadget-sandbox="public">
</div>
</body> </body>
</html> </html>
\ No newline at end of file
/*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
...@@ -10,18 +10,12 @@ ...@@ -10,18 +10,12 @@
<script src="renderjs.js" type="text/javascript"></script> <script src="renderjs.js" type="text/javascript"></script>
<!-- custom script --> <!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script> <script src="gadget_erp5_page_jabberclient_connect.js" type="text/javascript"></script>
<script src="gadget_jabberclient_page_connect.js" type="text/javascript"></script>
</head> </head>
<body> <body>
<pre></pre> <div data-gadget-url="gadget_jabberclient_dialog.html"
<form class="dialog_form"> data-gadget-scope="form_dialog"
<button type="submit" data-i18n="Submit" class="ui-btn ui-btn-b ui-btn-inline data-gadget-sandbox="public">
ui-icon-action ui-btn-icon-right ui-screen-hidden">Submit</button> </div>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="erp5_form"
data-gadget-sandbox="public">
</div>
</form>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</item> </item>
<item> <item>
<key> <string>default_reference</string> </key> <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>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.25270.37532.52872</string> </value> <value> <string>968.5110.19242.11434</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1456843234.23</float> <float>1528445551.4</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
</item> </item>
<item> <item>
<key> <string>default_reference</string> </key> <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>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.35328.64444.1843</string> </value> <value> <string>968.5178.51949.22050</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1456843227.61</float> <float>1528447738.91</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -5,45 +5,17 @@ ...@@ -5,45 +5,17 @@
<meta name="viewport" content="width=device-width, user-scalable=no" /> <meta name="viewport" content="width=device-width, user-scalable=no" />
<title>JabberClient Gadget Page Contact</title> <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 --> <!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script> <script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script> <script src="renderjs.js" type="text/javascript"></script>
<!-- custom script --> <!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script> <script src="gadget_erp5_page_jabberclient_contact.js" type="text/javascript"></script>
<script src="gadget_jabberclient_page_contact.js" type="text/javascript"></script>
</head> </head>
<body> <body>
<div data-gadget-url="gadget_erp5_pt_form_list.html"
data-gadget-scope="form_list"
data-gadget-sandbox="public">
</div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</item> </item>
<item> <item>
<key> <string>default_reference</string> </key> <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>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.26690.60508.50432</string> </value> <value> <string>963.12017.54400.15923</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1456843145.34</float> <float>1509628438.87</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
<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
This diff is collapsed.
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