diff --git a/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_list_html.html b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_list_html.html new file mode 100644 index 000000000..9edbd8968 --- /dev/null +++ b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_list_html.html @@ -0,0 +1,23 @@ + + + + + + + Site List + + + + + + + + + + +
+ + + diff --git a/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_list_html.xml b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_list_html.xml new file mode 100644 index 000000000..a28ba5832 --- /dev/null +++ b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_list_html.xml @@ -0,0 +1,324 @@ + + + + + + + + + + _Access_contents_information_Permission + + + Anonymous + Assignee + Assignor + Associate + Auditor + Manager + Owner + + + + + _Add_portal_content_Permission + + + Assignee + Assignor + Manager + + + + + _Change_local_roles_Permission + + + Assignor + Manager + + + + + _Modify_portal_content_Permission + + + Assignee + Assignor + Manager + + + + + _View_Permission + + + Anonymous + Assignee + Assignor + Associate + Auditor + Manager + Owner + + + + + content_md5 + + + + + + content_type + text/html + + + default_reference + gadget_erp5_page_slap_message_list.html + + + description + + + + + + id + gadget_erp5_page_slap_message_list_html + + + language + en + + + portal_type + Web Page + + + short_title + + + + + + title + Gadget SlapOS Message List + + + version + 003 + + + workflow_history + + AAAAAAAAAAI= + + + + + + + + + + + + + data + + + + document_publication_workflow + + AAAAAAAAAAM= + + + + edit_workflow + + AAAAAAAAAAQ= + + + + processing_status_workflow + + AAAAAAAAAAU= + + + + + + + + + + + + + + + + + + + action + publish_alive + + + actor + zope + + + comment + + + + error_message + + + + time + + + + + + + + + + + 1544779555.97 + UTC + + + + + + + validation_state + published_alive + + + + + + + + + + + + + + + + + action + edit + + + actor + zope + + + comment + + + + + + error_message + + + + serial + 972.19573.61161.46745 + + + state + current + + + time + + + + + + + + + + + 1545062058.89 + UTC + + + + + + + + + + + + + + + + + + + + + action + detect_converted_file + + + actor + zope + + + comment + + + + error_message + + + + external_processing_state + converted + + + serial + 0.0.0.0 + + + time + + + + + + + + + + + 1544698136.45 + UTC + + + + + + + + + + + diff --git a/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_list_js.js b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_list_js.js new file mode 100644 index 000000000..2b7953762 --- /dev/null +++ b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_list_js.js @@ -0,0 +1,153 @@ +/*global window, rJS, RSVP */ +/*jslint nomen: true, indent: 2, maxerr: 3*/ +(function (window, rJS, RSVP) { + "use strict"; + + rJS(window) + .declareAcquiredMethod("updateHeader", "updateHeader") + .declareAcquiredMethod("getSetting", "getSetting") + .declareAcquiredMethod("setSetting", "setSetting") + .declareAcquiredMethod("getUrlFor", "getUrlFor") + .declareAcquiredMethod("jio_allDocs", "jio_allDocs") + .declareAcquiredMethod("jio_get", "jio_get") + + + ///////////////////////////////////////////////////////////////// + // declared methods + ///////////////////////////////////////////////////////////////// + .allowPublicAcquisition("jio_allDocs", function (param_list) { + var gadget = this; + return gadget.jio_allDocs(param_list[0]) + .push(function (result) { + var i, j, tmp, value, len = result.data.total_rows; + for (i = 0; i < len; i += 1) { + if (result.data.rows[i].value.hasOwnProperty("modification_date")) { + result.data.rows[i].value.modification_date = { + css_class: "date_field", + date_only: 0, + description: "The Date", + editable: 0, + hidden: 0, + hidden_day_is_last_day: 0, + "default": result.data.rows[i].value.modification_date, + key: "modification_date", + required: 0, + timezone_style: 0, + title: "Message Date", + type: "DateTimeField" + }; + result.data.rows[i].value["listbox_uid:list"] = { + key: "listbox_uid:list", + value: 2713 + }; + } + if (result.data.rows[i].value.hasOwnProperty("text_content")) { + if (result.data.rows[i].value.text_content && + result.data.rows[i].value.text_content.length > 80) { + result.data.rows[i].value.text_content = + result.data.rows[i].value.text_content.slice(0, 80) + " ..."; + } + } + } + return result; + }); + }) + .declareMethod("triggerSubmit", function () { + var argument_list = arguments; + return this.getDeclaredGadget('form_list') + .push(function (gadget) { + return gadget.triggerSubmit.apply(gadget, argument_list); + }); + }) + .declareMethod("render", function (options) { + var gadget = this, + lines_limit; + + return new RSVP.Queue() + .push(function () { + return RSVP.all([ + gadget.getSetting("listbox_lines_limit", 20), + gadget.getSetting("me") + ]); + }) + .push(function (setting) { + lines_limit = setting[0]; + return RSVP.all([ + gadget.getDeclaredGadget('form_list'), + gadget.jio_get(setting[1]) + ]); + }) + .push(function (result) { + var column_list = [ + ['title', 'Title'], + ['modification_date', 'Date'], + ['source_title', "From"], + ['text_content', 'Message'] + //['follow_up', 'Ticket'] + ]; + return result[0].render({ + erp5_document: { + "_embedded": {"_view": { + "listbox": { + "column_list": column_list, + "show_anchor": 0, + "default_params": {}, + "editable": 0, + "editable_column_list": [], + "key": "slap_message_listbox", + "lines": lines_limit, + "list_method": "portal_catalog", + "query": "urn:jio:allDocs?query=portal_type%3A%20%28%20" + + "%22" + "Web Message" + "%22%2C%20%22" + "Mail Message" + + "%22%29%20AND%20%28" + "default_destination_reference" + + "%3A" + result[1].reference + "%29%20AND%20%28" + + "simulation_state" + "%3A%20%28%22" + "started" + + "%22%2C%22" + "stopped" + "%22%29%29%20AND%20%28" + + "follow_up_portal_type" + "%3A%20%28%22" + "Support Request" + + "%22%2C%22" + "Upgrade Decision" + "%22%2C%22" + + "Regularisation Request" + "%22%29%29%20AND%20%28" + + "follow_up_simulation_state" + "%3A%20%28%22" + + "validated" + "%22%2C%22" + "suspended" + "%22%2C%22" + + "confirmed" + "%22%2C%22" + "started" + "%22%2C%22" + + "stopped" + "%22%2C%22" + "%22%29%29", + "portal_type": [], + "search_column_list": column_list, + "sort_column_list": column_list, + "sort": [["modification_date", "Descending"]], + "title": "Messages", + "type": "ListBox" + } + }}, + "_links": { + "type": { + // form_list display portal_type in header + name: "" + } + } + }, + form_definition: { + group_list: [[ + "bottom", + [["listbox"]] + ]] + } + }); + }) + .push(function (result) { + return RSVP.all([ + gadget.getUrlFor({command: "change", options: {"page": "slap_rss_ticket"}}), + gadget.getUrlFor({command: "change", options: {"page": "slapos"}}), + gadget.getUrlFor({command: "change", options: {"page": "slap_rss_critical_ticket"}}) + ]); + }) + .push(function (result) { + return gadget.updateHeader({ + page_title: "Messages", + filter_action: true, + selection_url: result[1], + rss_url: result[0], + critical_url: result[2] + }); + }); + }); +}(window, rJS, RSVP)); \ No newline at end of file diff --git a/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_list_js.xml b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_list_js.xml new file mode 100644 index 000000000..18fb1b388 --- /dev/null +++ b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_list_js.xml @@ -0,0 +1,328 @@ + + + + + + + + + + _Access_contents_information_Permission + + + Anonymous + Assignee + Assignor + Associate + Auditor + Manager + Owner + + + + + _Add_portal_content_Permission + + + Assignee + Assignor + Manager + + + + + _Change_local_roles_Permission + + + Assignor + Manager + + + + + _Modify_portal_content_Permission + + + Assignee + Assignor + Manager + + + + + _View_Permission + + + Anonymous + Assignee + Assignor + Associate + Auditor + Manager + Owner + + + + + categories + + + contributor/person_module/20181108-673DC + + + + + content_md5 + + + + + + default_reference + gadget_erp5_page_slap_message_list.js + + + description + + + + + + id + gadget_erp5_page_slap_message_list_js + + + language + en + + + portal_type + Web Script + + + short_title + + + + + + title + Gadget SlapOS Message List + + + version + 002 + + + workflow_history + + AAAAAAAAAAI= + + + + + + + + + + + + + data + + + + document_publication_workflow + + AAAAAAAAAAM= + + + + edit_workflow + + AAAAAAAAAAQ= + + + + processing_status_workflow + + AAAAAAAAAAU= + + + + + + + + + + + + + + + + + + + action + publish_alive + + + actor + zope + + + comment + + + + error_message + + + + time + + + + + + + + + + + 1544779543.85 + UTC + + + + + + + validation_state + published_alive + + + + + + + + + + + + + + + + + action + edit + + + actor + zope + + + comment + + + + + + error_message + + + + serial + 972.24268.18396.32358 + + + state + current + + + time + + + + + + + + + + + 1545062015.24 + UTC + + + + + + + + + + + + + + + + + + + + + action + detect_converted_file + + + actor + zope + + + comment + + + + error_message + + + + external_processing_state + converted + + + serial + 0.0.0.0 + + + time + + + + + + + + + + + 1544698566.05 + UTC + + + + + + + + + + + diff --git a/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_view_html.html b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_view_html.html new file mode 100644 index 000000000..3a5a31ddf --- /dev/null +++ b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_view_html.html @@ -0,0 +1,24 @@ + + + + + + + Message View + + + + + + + + + + + + + + + diff --git a/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_view_html.xml b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_view_html.xml new file mode 100644 index 000000000..64d5118f2 --- /dev/null +++ b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_view_html.xml @@ -0,0 +1,324 @@ + + + + + + + + + + _Access_contents_information_Permission + + + Anonymous + Assignee + Assignor + Associate + Auditor + Manager + Owner + + + + + _Add_portal_content_Permission + + + Assignee + Assignor + Manager + + + + + _Change_local_roles_Permission + + + Assignor + Manager + + + + + _Modify_portal_content_Permission + + + Assignee + Assignor + Manager + + + + + _View_Permission + + + Anonymous + Assignee + Assignor + Associate + Auditor + Manager + Owner + + + + + content_md5 + + + + + + content_type + text/html + + + default_reference + gadget_erp5_page_slap_message_view.html + + + description + + + + + + id + gadget_erp5_page_slap_message_view_html + + + language + en + + + portal_type + Web Page + + + short_title + + + + + + title + Gadget SlapOS Message View + + + version + 003 + + + workflow_history + + AAAAAAAAAAI= + + + + + + + + + + + + + data + + + + document_publication_workflow + + AAAAAAAAAAM= + + + + edit_workflow + + AAAAAAAAAAQ= + + + + processing_status_workflow + + AAAAAAAAAAU= + + + + + + + + + + + + + + + + + + + action + publish_alive + + + actor + zope + + + comment + + + + error_message + + + + time + + + + + + + + + + + 1545041441.05 + UTC + + + + + + + validation_state + published_alive + + + + + + + + + + + + + + + + + action + edit + + + actor + zope + + + comment + + + + + + error_message + + + + serial + 972.23938.44856.4403 + + + state + current + + + time + + + + + + + + + + + 1545043801.7 + UTC + + + + + + + + + + + + + + + + + + + + + action + detect_converted_file + + + actor + zope + + + comment + + + + error_message + + + + external_processing_state + converted + + + serial + 0.0.0.0 + + + time + + + + + + + + + + + 1545041039.07 + UTC + + + + + + + + + + + diff --git a/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_view_js.js b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_view_js.js new file mode 100644 index 000000000..3e4583127 --- /dev/null +++ b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_view_js.js @@ -0,0 +1,23 @@ +/*global window, rJS */ +/*jslint nomen: true, indent: 2, maxerr: 3 */ +(function (window, rJS) { + "use strict"; + + rJS(window) + ///////////////////////////////////////////////////////////////// + // Acquired methods + ///////////////////////////////////////////////////////////////// + .declareAcquiredMethod("redirect", "redirect") + + ///////////////////////////////////////////////////////////////// + // declared methods + ///////////////////////////////////////////////////////////////// + + .declareMethod("render", function (options) { + // Open the ticket directly + return this.redirect({ + "command": "change", + "options": {"jio_key": options.doc.follow_up} + }); + }); +}(window, rJS)); \ No newline at end of file diff --git a/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_view_js.xml b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_view_js.xml new file mode 100644 index 000000000..d66e54573 --- /dev/null +++ b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/gadget_erp5_page_slap_message_view_js.xml @@ -0,0 +1,320 @@ + + + + + + + + + + _Access_contents_information_Permission + + + Anonymous + Assignee + Assignor + Associate + Auditor + Manager + Owner + + + + + _Add_portal_content_Permission + + + Assignee + Assignor + Manager + + + + + _Change_local_roles_Permission + + + Assignor + Manager + + + + + _Modify_portal_content_Permission + + + Assignee + Assignor + Manager + + + + + _View_Permission + + + Anonymous + Assignee + Assignor + Associate + Auditor + Manager + Owner + + + + + content_md5 + + + + + + default_reference + gadget_erp5_page_slap_message_view.js + + + description + + + + + + id + gadget_erp5_page_slap_message_view_js + + + language + en + + + portal_type + Web Script + + + short_title + + + + + + title + Gadget SlapOS Message View + + + version + 003 + + + workflow_history + + AAAAAAAAAAI= + + + + + + + + + + + + + data + + + + document_publication_workflow + + AAAAAAAAAAM= + + + + edit_workflow + + AAAAAAAAAAQ= + + + + processing_status_workflow + + AAAAAAAAAAU= + + + + + + + + + + + + + + + + + + + action + publish_alive + + + actor + zope + + + comment + + + + error_message + + + + time + + + + + + + + + + + 1545041425.75 + UTC + + + + + + + validation_state + published_alive + + + + + + + + + + + + + + + + + action + edit + + + actor + zope + + + comment + + + + + + error_message + + + + serial + 972.23976.40270.853 + + + state + current + + + time + + + + + + + + + + + 1545043775.38 + UTC + + + + + + + + + + + + + + + + + + + + + action + detect_converted_file + + + actor + zope + + + comment + + + + error_message + + + + external_processing_state + converted + + + serial + 0.0.0.0 + + + time + + + + + + + + + + + 1545039975.3 + UTC + + + + + + + + + + + diff --git a/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_controller_html.xml b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_controller_html.xml index bd46a49af..7471e2ba5 100644 --- a/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_controller_html.xml +++ b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_controller_html.xml @@ -234,7 +234,7 @@ serial - 962.57488.48170.50312 + 972.8019.52352.28876 state @@ -252,7 +252,7 @@ - 1508424107.98 + 1544099821.24 UTC diff --git a/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_controller_js.js b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_controller_js.js index 60943a824..6d036d296 100644 --- a/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_controller_js.js +++ b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_controller_js.js @@ -49,9 +49,14 @@ .push(function (result) { if (result.portal_type !== undefined) { - child_gadget_url = 'gadget_erp5_page_slap_' + - result.portal_type.replace(/ /g, '_').toLowerCase() + - '_view.html'; + if (["Web Message", "Mail Message"] + .indexOf(result.portal_type) !== -1) { + child_gadget_url = 'gadget_erp5_page_slap_message_view.html'; + } else { + child_gadget_url = 'gadget_erp5_page_slap_' + + result.portal_type.replace(/ /g, '_').toLowerCase() + + '_view.html'; + } } else { throw new Error('Can not display document: ' + options.jio_key); } diff --git a/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_controller_js.xml b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_controller_js.xml index 851ebe640..3d57d8f63 100644 --- a/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_controller_js.xml +++ b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_controller_js.xml @@ -230,7 +230,7 @@ serial - 964.64854.62654.27545 + 972.24145.27625.63436 state @@ -248,7 +248,7 @@ - 1516644220.55 + 1545062511.01 UTC diff --git a/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slapos_css.css b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slapos_css.css index 0fd15805e..a3b7848b1 100644 --- a/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slapos_css.css +++ b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slapos_css.css @@ -1,16 +1,17 @@ .box-gadget-left { width: 49%; float: left; + margin-bottom: 30px; } .box-gadget-right { width: 49%; float: right; } -.box-gadget-bottom { +.box-gadget-top { float: left; width: 100%; - padding-top: 17px; + margin-bottom: 20px; } .ui-btn-white-front, diff --git a/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slapos_css.xml b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slapos_css.xml index 6e72bc7fb..70e351ff1 100644 --- a/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slapos_css.xml +++ b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slapos_css.xml @@ -74,6 +74,12 @@ + + categories + + + + content_md5 @@ -245,7 +251,7 @@ serial - 966.40300.60783.54357 + 972.24386.22001.41932 state @@ -263,7 +269,7 @@ - 1522775894.53 + 1545068727.54 UTC diff --git a/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slapos_html.html b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slapos_html.html index a98f2a8b7..8950cf6d3 100644 --- a/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slapos_html.html +++ b/master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slapos_html.html @@ -20,7 +20,7 @@