Commit b34042dd authored by Romain Courteaud's avatar Romain Courteaud

WIP [erp5_web_jabber_client] Reuse ERP5JS gadgets

This is still a not working prototype.
Pasting multitext has not yet been reimplemented.
Way to slow to be usable.
parent 7f1415a0
...@@ -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>
......
...@@ -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);
}) })
...@@ -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 () {
...@@ -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)
......
...@@ -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.57481.62457.42496</string> </value> <value> <string>963.13623.60350.63692</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>1458172700.61</float> <float>1509724327.32</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -10,11 +10,9 @@ ...@@ -10,11 +10,9 @@
<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>
<form class="dialog_form"> <form class="dialog_form">
<button type="submit" data-i18n="Submit" class="ui-btn ui-btn-b ui-btn-inline <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> ui-icon-action ui-btn-icon-right ui-screen-hidden">Submit</button>
......
...@@ -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>963.11985.30461.59170</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>1509627042.14</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
/*global window, rJS, RSVP, loopEventListener*/ /*global window, rJS, RSVP*/
/*jslint nomen: true, indent: 2, maxerr: 3 */ /*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, loopEventListener) { (function (window, rJS, RSVP) {
"use strict"; "use strict";
rJS(window) 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 // Acquired methods
...@@ -26,6 +11,7 @@ ...@@ -26,6 +11,7 @@
.declareAcquiredMethod("updateHeader", "updateHeader") .declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting") .declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", "notifySubmitted") .declareAcquiredMethod("notifySubmitted", "notifySubmitted")
.declareAcquiredMethod("notifyChange", "notifyChange")
.declareAcquiredMethod("jio_put", "jio_put") .declareAcquiredMethod("jio_put", "jio_put")
.declareAcquiredMethod("jio_get", "jio_get") .declareAcquiredMethod("jio_get", "jio_get")
.declareAcquiredMethod("redirect", "redirect") .declareAcquiredMethod("redirect", "redirect")
...@@ -34,11 +20,11 @@ ...@@ -34,11 +20,11 @@
// declared methods // declared methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
.declareMethod('triggerSubmit', function () { .declareMethod('triggerSubmit', function () {
this.props.element.querySelector('button').click(); this.element.querySelector('button').click();
}) })
.declareMethod("render", function () { .declareMethod("render", function () {
var page_gadget = this, var page_gadget = this;
data;
return page_gadget.updateHeader({ return page_gadget.updateHeader({
page_title: 'Connect to a Jabber server', page_title: 'Connect to a Jabber server',
submit_action: true submit_action: true
...@@ -46,17 +32,25 @@ ...@@ -46,17 +32,25 @@
.push(function () { .push(function () {
return page_gadget.jio_get("CONNECTION"); return page_gadget.jio_get("CONNECTION");
}) })
.push(function (result) { .push(function (data) {
data = result; return page_gadget.changeState({
return page_gadget.getDeclaredGadget("erp5_form"); server: data.server,
jid: data.jid,
passwd: data.passwd
});
});
}) })
.onStateChange(function () {
var page_gadget = this;
return page_gadget.getDeclaredGadget("erp5_form")
.push(function (form_gadget) { .push(function (form_gadget) {
return form_gadget.render({ return form_gadget.render({
erp5_document: {"_embedded": {"_view": { erp5_document: {"_embedded": {"_view": {
"server": { "server": {
"description": "", "description": "",
"title": "Server URL", "title": "Server URL",
"default": data.server, "default": page_gadget.state.server,
"css_class": "", "css_class": "",
"required": 1, "required": 1,
"editable": 1, "editable": 1,
...@@ -67,7 +61,7 @@ ...@@ -67,7 +61,7 @@
"jid": { "jid": {
"description": "", "description": "",
"title": "Jabber ID", "title": "Jabber ID",
"default": data.jid, "default": page_gadget.state.jid,
"css_class": "", "css_class": "",
"required": 1, "required": 1,
"editable": 1, "editable": 1,
...@@ -78,7 +72,7 @@ ...@@ -78,7 +72,7 @@
"passwd": { "passwd": {
"description": "", "description": "",
"title": "Password", "title": "Password",
"default": data.passwd, "default": page_gadget.state.passwd,
"css_class": "", "css_class": "",
"required": 1, "required": 1,
"editable": 1, "editable": 1,
...@@ -97,44 +91,36 @@ ...@@ -97,44 +91,36 @@
}); });
}) })
.declareService(function () { .onEvent('submit', function () {
var form_gadget = this; var page_gadget = this;
function formSubmit() { return page_gadget.notifySubmitting()
return form_gadget.notifySubmitting()
.push(function () { .push(function () {
return form_gadget.getDeclaredGadget("erp5_form"); return page_gadget.getDeclaredGadget("erp5_form");
}) })
.push(function (erp5_form) { .push(function (erp5_form) {
return erp5_form.getContent(); return erp5_form.getContent();
}) })
.push(function (content_dict) { .push(function (content_dict) {
return form_gadget.jio_put( return page_gadget.jio_put(
'CONNECTION', 'CONNECTION',
content_dict content_dict
); );
}) })
.push(function () { .push(function () {
return RSVP.all([ return RSVP.all([
form_gadget.notifySubmitted(), page_gadget.notifySubmitted(),
form_gadget.redirect({command: 'display', options: {page: 'contact'}}) page_gadget.redirect({command: 'display', options: {page: 'jabberclient_contact'}})
]); ]);
}, function (error) {
return RSVP.all([
page_gadget.notifySubmitted(),
page_gadget.notifyChange({
'message': error,
'status': 'error'
}) })
.push(undefined, function (error) { ]);
return form_gadget.notifySubmitted()
.push(function () {
form_gadget.props.element.querySelector('pre').textContent = error;
});
}); });
}
// Listen to form submit
return loopEventListener(
form_gadget.props.element.querySelector('form'),
'submit',
false,
formSubmit
);
}); });
}(window, rJS, RSVP, loopEventListener)); }(window, rJS, RSVP));
\ No newline at end of file \ No newline at end of file
...@@ -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>963.13625.4155.47957</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>1509724755.89</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>
......
/*global window, rJS, RSVP, Handlebars*/ /*global window, rJS*/
/*jslint nomen: true, indent: 2, maxerr: 3 */ /*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, Handlebars) { (function (window, rJS) {
"use strict"; "use strict";
function compareContact(a, b) { rJS(window)
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 // Acquired methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// Precompile the templates while loading the first gadget instance .declareAcquiredMethod("updateHeader", "updateHeader")
var gadget_klass = rJS(window), .declareAcquiredMethod("getUrlParameter", "getUrlParameter")
source = gadget_klass.__template_element .declareAcquiredMethod("getUrlFor", "getUrlFor")
.getElementById("contact-list-template") .declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.innerHTML,
table_template = Handlebars.compile(source);
gadget_klass
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// ready // declared methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// Init local properties .allowPublicAcquisition('updateHeader', function () {
.ready(function (g) { return;
g.props = {};
}) })
// Assign the element to a variable .allowPublicAcquisition('getUrlFor', function (argument_list) {
.ready(function (g) { if (argument_list[0].command === 'index') {
return g.getElement() return this.getUrlFor({command: 'display', options: {jio_key: argument_list[0].options.jio_key,
.push(function (element) { page: 'jabberclient_dialog'}});
g.props.element = element; }
return this.getUrlFor.apply(this, argument_list);
})
.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) {
if (result.data.rows[i].value.hasOwnProperty("connected")) {
result.data.rows[i].value.connected = {
editable: 0,
hidden: 0,
"default": result.data.rows[i].value.connected,
key: "field_connected",
required: 0,
type: "CheckBoxField"
};
result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list",
value: 2713
};
}
if (result.data.rows[i].value.hasOwnProperty("notification")) {
result.data.rows[i].value.notification = {
editable: 0,
hidden: 0,
"default": result.data.rows[i].value.notification,
key: "field_notification",
required: 0,
type: "CheckBoxField"
};
result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list",
value: 2713
};
}
}
return result;
}); });
}) })
///////////////////////////////////////////////////////////////// .declareMethod("triggerSubmit", function () {
// Acquired methods var argument_list = arguments;
///////////////////////////////////////////////////////////////// return this.getDeclaredGadget('form_list')
.declareAcquiredMethod("updateHeader", "updateHeader") .push(function (gadget) {
.declareAcquiredMethod("jio_allDocs", "jio_allDocs") return gadget.triggerSubmit.apply(gadget, argument_list);
.declareAcquiredMethod("getUrlFor", "getUrlFor") });
})
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod("render", function () { .declareMethod("render", function () {
var page_gadget = this, var gadget = this,
contact_list = [], header_dict = {
gadget = this; page_title: 'Contacts',
page_icon: 'puzzle-piece',
filter_action: true
};
return page_gadget.updateHeader({ return gadget.updateHeader(header_dict)
page_title: 'Contact'
})
.push(function () { .push(function () {
return page_gadget.jio_allDocs({select_list: ['jid', 'read', 'offline']}); return gadget.getDeclaredGadget('form_list');
}) })
.push(function (result) { .push(function (form_gadget) {
var i, var column_list = [
contact, ['jid', 'Name'],
promise_list = []; ['notification', 'Notification'],
for (i = 0; i < result.data.total_rows; i += 1) { ['connected', 'Connected']
contact = result.data.rows[i].value; ];
contact_list.push({ return form_gadget.render({
jid: contact.jid, erp5_document: {"_embedded": {"_view": {
new_message: !contact.read, "listbox": {
status: !contact.offline "column_list": column_list,
}); "show_anchor": 0,
promise_list.push(gadget.getUrlFor({command: 'display', options: {page: 'dialog', jid: contact.jid}})); "default_params": {},
"editable": 1,
"editable_column_list": column_list,
"key": "field_listbox",
"lines": 1000,
"list_method": "portal_catalog",
"query": "urn:jio:allDocs",
"portal_type": [],
"search_column_list": column_list,
"sort_column_list": column_list,
"sort": [['notification', 'DESC'], ['connected', 'DESC'], ['jid', 'ASC']],
"title": "Contacts",
"type": "ListBox"
} }
return RSVP.all(promise_list); }},
}) "_links": {
.push(function (url_list) { "type": {
var i; // form_list display portal_type in header
for (i = 0; i < url_list.length; i += 1) { name: ""
contact_list[i].url = url_list[i]; }
}
},
form_definition: {
group_list: [[
"bottom",
[["listbox"]]
]]
} }
contact_list.sort(compareContact);
gadget.props.element.innerHTML =
table_template({
contact: contact_list
}); });
}); });
}); });
}(window, rJS, RSVP, Handlebars)); }(window, rJS));
\ No newline at end of file \ No newline at end of file
...@@ -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_contact.js</string> </value> <value> <string>gadget_erp5_page_jabberclient_contact.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.36448.18833.13141</string> </value> <value> <string>963.13593.12902.41028</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>1456907564.65</float> <float>1509722579.38</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -10,31 +10,20 @@ ...@@ -10,31 +10,20 @@
<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_dialog.js" type="text/javascript"></script>
<script src="gadget_jabberclient_page_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> </head>
<body> <body>
<div class="discussion-content"></div> <form class="dialog_form">
<div data-role="footer" data-position="fixed" data-tap-toggle="false"> <div data-gadget-url="gadget_erp5_form.html"
<form class="message-form"> data-gadget-scope="discussion_form"
<div class="ui-input-text ui-corner-all ui-body-inherit ui-shadow-inset ui-input-has-clear ui-input-has-multiline"> data-gadget-sandbox="public">
<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>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="input_form"
data-gadget-sandbox="public">
</div> </div>
<input class="dialogconfirm" data-theme="b" data-inline="true" type="submit" data-i18n="[value]Send" value="Send" data-icon="check" />
</form> </form>
</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_dialog.html</string> </value> <value> <string>gadget_erp5_page_jabberclient_dialog.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>950.63332.2255.41369</string> </value> <value> <string>963.13312.9778.47496</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>1462370312.21</float> <float>1509718172.58</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_dialog.js</string> </value> <value> <string>gadget_erp5_page_jabberclient_dialog.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>951.19073.8210.16640</string> </value> <value> <string>963.13465.59114.24746</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>1463643257.07</float> <float>1509719800.62</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -10,18 +10,16 @@ ...@@ -10,18 +10,16 @@
<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_password.js" type="text/javascript"></script>
<script src="gadget_jabberclient_page_password.js" type="text/javascript"></script>
</head> </head>
<body> <body>
<pre></pre> <pre></pre>
<form class="dialog_form"> <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" <div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="erp5_form" data-gadget-scope="erp5_form"
data-gadget-sandbox="public"> data-gadget-sandbox="public">
</div> </div>
<input class="dialogconfirm" data-theme="b" data-inline="true" type="submit" data-i18n="[value]Change" value="Change" data-icon="check" />
</form> </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_password.html</string> </value> <value> <string>gadget_erp5_page_jabberclient_password.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.26853.9657.64102</string> </value> <value> <string>963.13535.17463.63488</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>1456843254.57</float> <float>1509719016.16</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
/*global window, rJS, RSVP, loopEventListener*/ /*global window, rJS, RSVP*/
/*jslint nomen: true, indent: 2, maxerr: 3 */ /*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, loopEventListener) { (function (window, rJS, RSVP) {
"use strict"; "use strict";
function validatePassword(password1, password2) { function validatePassword(password1, password2) {
...@@ -8,21 +8,6 @@ ...@@ -8,21 +8,6 @@
} }
rJS(window) 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 // Acquired methods
...@@ -30,6 +15,7 @@ ...@@ -30,6 +15,7 @@
.declareAcquiredMethod("updateHeader", "updateHeader") .declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting") .declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", "notifySubmitted") .declareAcquiredMethod("notifySubmitted", "notifySubmitted")
.declareAcquiredMethod("notifyChange", "notifyChange")
.declareAcquiredMethod("jio_put", "jio_put") .declareAcquiredMethod("jio_put", "jio_put")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs") .declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("redirect", "redirect") .declareAcquiredMethod("redirect", "redirect")
...@@ -44,7 +30,7 @@ ...@@ -44,7 +30,7 @@
var page_gadget = this; var page_gadget = this;
return page_gadget.updateHeader({ return page_gadget.updateHeader({
page_title: 'Reset Password', page_title: 'Reset Password',
submit_action: true page_icon: 'power-off'
}) })
.push(function () { .push(function () {
// Ensure user is connected... // Ensure user is connected...
...@@ -100,10 +86,9 @@ ...@@ -100,10 +86,9 @@
}); });
}) })
.declareService(function () { .onEvent('submit', function () {
var form_gadget = this; var form_gadget = this;
function formSubmit() {
return form_gadget.notifySubmitting() return form_gadget.notifySubmitting()
.push(function () { .push(function () {
return form_gadget.getDeclaredGadget("erp5_form"); return form_gadget.getDeclaredGadget("erp5_form");
...@@ -116,32 +101,30 @@ ...@@ -116,32 +101,30 @@
return form_gadget.jio_put( return form_gadget.jio_put(
'PASSWORD', 'PASSWORD',
content_dict content_dict
); )
}
// XXX Uses field validation instead...
throw new Error('Password does not match.');
})
.push(function () { .push(function () {
return RSVP.all([ return RSVP.all([
form_gadget.notifySubmitted(), form_gadget.notifySubmitted(),
form_gadget.redirect({command: 'display', options: {page: 'contact'}}) form_gadget.notifyChange({
'message': "Password changed",
'status': 'success'
})
]); ]);
}) })
.push(undefined, function (error) {
return form_gadget.notifySubmitted()
.push(function () { .push(function () {
throw error; return form_gadget.redirect({command: 'display',
}); options: {page: 'jabberclient_contact'}});
}); });
} }
// XXX Uses field validation instead...
// Listen to form submit return RSVP.all([
return loopEventListener( form_gadget.notifySubmitted(),
form_gadget.props.element.querySelector('form'), form_gadget.notifyChange({
'submit', 'message': "Password does not match.",
false, 'status': 'error'
formSubmit })
); ]);
});
}); });
}(window, rJS, RSVP, loopEventListener)); }(window, rJS, RSVP));
\ No newline at end of file \ No newline at end of file
...@@ -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_password.js</string> </value> <value> <string>gadget_erp5_page_jabberclient_password.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.26900.6119.6246</string> </value> <value> <string>963.13541.25372.11042</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>1456843245.07</float> <float>1509719421.2</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -10,18 +10,16 @@ ...@@ -10,18 +10,16 @@
<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_new_contact.js" type="text/javascript"></script>
<script src="gadget_jabberclient_page_subscribe.js" type="text/javascript"></script>
</head> </head>
<body> <body>
<pre></pre> <pre></pre>
<form class="dialog_form"> <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" <div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="erp5_form" data-gadget-scope="erp5_form"
data-gadget-sandbox="public"> data-gadget-sandbox="public">
</div> </div>
<input class="dialogconfirm" data-theme="b" data-inline="true" type="submit" data-i18n="[value]Add" value="Add" data-icon="check" />
</form> </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_subscribe.html</string> </value> <value> <string>gadget_erp5_page_jabberclient_new_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.26823.54523.58094</string> </value> <value> <string>963.13508.24026.19831</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>1456843200.45</float> <float>1509717763.65</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
/*global window, rJS, RSVP, loopEventListener*/ /*global window, rJS, RSVP*/
/*jslint nomen: true, indent: 2, maxerr: 3 */ /*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, loopEventListener) { (function (window, rJS, RSVP) {
"use strict"; "use strict";
rJS(window) 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 // Acquired methods
...@@ -26,6 +11,7 @@ ...@@ -26,6 +11,7 @@
.declareAcquiredMethod("updateHeader", "updateHeader") .declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting") .declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", "notifySubmitted") .declareAcquiredMethod("notifySubmitted", "notifySubmitted")
.declareAcquiredMethod("notifyChange", "notifyChange")
.declareAcquiredMethod("jio_put", "jio_put") .declareAcquiredMethod("jio_put", "jio_put")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs") .declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("redirect", "redirect") .declareAcquiredMethod("redirect", "redirect")
...@@ -34,13 +20,13 @@ ...@@ -34,13 +20,13 @@
// declared methods // declared methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
.declareMethod('triggerSubmit', function () { .declareMethod('triggerSubmit', function () {
this.props.element.querySelector('button').click(); this.element.querySelector('button').click();
}) })
.declareMethod("render", function () { .declareMethod("render", function () {
var page_gadget = this; var page_gadget = this;
return page_gadget.updateHeader({ return page_gadget.updateHeader({
page_title: 'New Contact', page_title: 'New Contact',
submit_action: true page_icon: 'gear'
}) })
.push(function () { .push(function () {
// Ensure user is connected... // Ensure user is connected...
...@@ -74,10 +60,9 @@ ...@@ -74,10 +60,9 @@
}); });
}) })
.declareService(function () { .onEvent('submit', function () {
var form_gadget = this; var form_gadget = this;
function formSubmit() {
return form_gadget.notifySubmitting() return form_gadget.notifySubmitting()
.push(function () { .push(function () {
return form_gadget.getDeclaredGadget("erp5_form"); return form_gadget.getDeclaredGadget("erp5_form");
...@@ -94,24 +79,16 @@ ...@@ -94,24 +79,16 @@
.push(function () { .push(function () {
return RSVP.all([ return RSVP.all([
form_gadget.notifySubmitted(), form_gadget.notifySubmitted(),
form_gadget.redirect({command: 'display', options: {page: 'contact'}}) form_gadget.notifyChange({
'message': "Contact added",
'status': 'success'
})
]); ]);
}) })
.push(undefined, function (error) {
return form_gadget.notifySubmitted()
.push(function () { .push(function () {
throw error; return form_gadget.redirect({command: 'display',
}); options: {page: 'jabberclient_contact'}});
}); });
}
// Listen to form submit
return loopEventListener(
form_gadget.props.element.querySelector('form'),
'submit',
false,
formSubmit
);
}); });
}(window, rJS, RSVP, loopEventListener)); }(window, rJS, RSVP));
\ No newline at end of file \ No newline at end of file
...@@ -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_subscribe.js</string> </value> <value> <string>gadget_erp5_page_jabberclient_new_contact.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.26838.22974.62054</string> </value> <value> <string>963.13526.23121.58146</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>1456843207.84</float> <float>1509718633.02</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -3,43 +3,70 @@ ...@@ -3,43 +3,70 @@
<head> <head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" /> <meta name="viewport" content="width=device-width, user-scalable=no" />
<title>ERP5 Panel</title> <title>Jabber Panel</title>
<!--
data-i18n=Editable
-->
<!-- 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="handlebars.js" type="text/javascript"></script> <script src="handlebars.js" type="text/javascript"></script>
<script src="gadget_global.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"> <script id="panel-template-header" type="text/x-handlebars-template">
<div data-role="header" class="ui-bar-inherit"> <div data-role="header" class="ui-bar-inherit">
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-left"> <div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-left">
<div class="ui-controlgroup-controls"> <div class="ui-controlgroup-controls">
<form action="#" method="post"> <button data-i18n="Close" class="ui-btn ui-btn-icon-notext ui-icon-delete">Close</button>
<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>
</div> </div>
</div> </div>
<!--div class="panel_img">
<img class="ui-title" alt="ERP5" src="gadget_erp5_panel.png?format=png"/>
</div-->
</div> </div>
</script> </script>
<script id="panel-template-body" type="text/x-handlebars-template"> <script id="panel-template-body" type="text/x-handlebars-template">
<div class="ui-content"> <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> <!--form class="dialog_form">
<li><a href="{{subscribe_href}}" class="ui-btn ui-btn-icon-left ui-icon-gear" data-i18n="New Contact">New Contact</a></li> <button type="submit" class="ui-btn ui-btn-b ui-btn-inline
<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> ui-icon-action ui-btn-icon-right ui-screen-hidden">Submit</button>
</ul> <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> </div>
</script> </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="{{new_contact_href}}" class="ui-btn ui-btn-icon-left ui-icon-gear" data-i18n="New Contact" accesskey="m">New Contact</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 --> <!-- custom script -->
<script src="gadget_jabberclient_panel.js" type="text/javascript"></script> <script src="gadget_jabberclient_panel.js" type="text/javascript"></script>
...@@ -47,6 +74,5 @@ ...@@ -47,6 +74,5 @@
<body> <body>
<div class="jqm-navmenu-panel"></div> <div class="jqm-navmenu-panel"></div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -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.35375.42111.29422</string> </value> <value> <string>963.13496.32563.39014</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>1456843184.4</float> <float>1509724597.78</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -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.26657.64277.54118</string> </value> <value> <string>963.13497.47750.35106</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>1456843167.64</float> <float>1509724562.9</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>Router Gadget</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>
</head>
<body>
</body>
</html>
...@@ -249,6 +249,16 @@ ...@@ -249,6 +249,16 @@
<value> <string>string</string> </value> <value> <string>string</string> </value>
</item> </item>
</dictionary> </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>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -283,7 +293,7 @@ ...@@ -283,7 +293,7 @@
<value> <value>
<tuple> <tuple>
<string>caching_policy/must-revalidate</string> <string>caching_policy/must-revalidate</string>
<string>aggregate/web_page_module/rjs_gadget_erp5_html</string> <string>aggregate/web_page_module/rjs_gadget_erp5_launcher_html</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -293,11 +303,17 @@ ...@@ -293,11 +303,17 @@
</item> </item>
<item> <item>
<key> <string>configuration_content_security_policy</string> </key> <key> <string>configuration_content_security_policy</string> </key>
<value> <string>default-src \'none\'; img-src \'self\' 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_frontpage_gadget_url</string> </key>
<value> <string>jabberclient_contact</string> </value>
</item> </item>
<item> <item>
<key> <string>configuration_header_gadget_url</string> </key> <key> <string>configuration_header_gadget_url</string> </key>
<value> <string>gadget_officejs_header.html</string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>configuration_jio_gadget_url</string> </key> <key> <string>configuration_jio_gadget_url</string> </key>
...@@ -305,7 +321,9 @@ ...@@ -305,7 +321,9 @@
</item> </item>
<item> <item>
<key> <string>configuration_manifest_url</string> </key> <key> <string>configuration_manifest_url</string> </key>
<value> <string>gadget_jabberclient.appcache</string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>configuration_panel_gadget_url</string> </key> <key> <string>configuration_panel_gadget_url</string> </key>
...@@ -313,7 +331,9 @@ ...@@ -313,7 +331,9 @@
</item> </item>
<item> <item>
<key> <string>configuration_router_gadget_url</string> </key> <key> <string>configuration_router_gadget_url</string> </key>
<value> <string>gadget_jabberclient_router.html</string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>configuration_translation_gadget_url</string> </key> <key> <string>configuration_translation_gadget_url</string> </key>
...@@ -540,7 +560,7 @@ ...@@ -540,7 +560,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>
...@@ -554,7 +574,7 @@ ...@@ -554,7 +574,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.17525.46862.41420</string> </value> <value> <string>963.11902.18137.7850</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -572,7 +592,7 @@ ...@@ -572,7 +592,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1509358218.96</float> <float>1509715169.81</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment