Commit d9ebc903 authored by Romain Courteaud's avatar Romain Courteaud

romain_dev: forum

romain_dev: forum use html viewer

romain_dev: forum improve post rendering

romain_dev: thread reader use page language inqtead of local

romain_dev: forum set expected link on the listbox cells

romain_dev: thread fixup

romain_dev: thread use line separator instead of background color

romain_dev: thread paginate

romain_dev: forum link to last page

romain_dev: thread simplify conf from erp5form

romain_dev: forum attachment

romain_dev: thread force white background
parent a06865cb
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
<!-- 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>
<!--link rel="stylesheet" href="gadget_erp5_page_nx_project_quality.css"-->
<!-- custom script --> <!-- custom script -->
<script src="jiodev.js" type="text/javascript"></script> <script src="jiodev.js" type="text/javascript"></script>
......
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>989.1604.35674.62737</string> </value> <value> <string>989.21729.29819.50124</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -256,7 +256,7 @@ ...@@ -256,7 +256,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1609424915.53</float> <float>1610632417.11</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
/*global window, rJS, RSVP, domsugar, SimpleQuery, ComplexQuery, Query, /*global window, rJS, RSVP, domsugar, SimpleQuery, ComplexQuery, Query,
console */ console */
/*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80, continue:true */ /*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80, continue:true */
(function (window, rJS, RSVP, domsugar, SimpleQuery, ComplexQuery, Query) { (function (window, rJS, domsugar, SimpleQuery, ComplexQuery, Query) {
"use strict"; "use strict";
// XXX history_previous: prevent getting to erp5 ui by checking the // XXX history_previous: prevent getting to erp5 ui by checking the
// historing or forcing the page value // historing or forcing the page value
// XXX create topic by followup (allDocs group by follow up) // XXX create topic by followup (allDocs group by follow up)
var DISPLAY_READER = 'display_reader', var DISPLAY_READER = 'display_reader',
MAIN_SCOPE = 'child_scope'; DISPLAY_THREAD = 'display_thread',
// DISPLAY_POST = 'display_post',
MAIN_SCOPE = 'child_scope',
DISPLAYED_POST_COUNT = 15,
THREAD_READER_FIELD_KEY = 'field_listbox';
function loadChildGadget(gadget, gadget_url, must_declare, callback) { function loadChildGadget(gadget, gadget_url, must_declare, callback) {
var queue, var queue,
...@@ -43,7 +47,7 @@ ...@@ -43,7 +47,7 @@
column_list = [ column_list = [
['title', 'Title'], ['title', 'Title'],
['DiscussionThread_getDiscussionPostCount', 'Responses'], ['DiscussionThread_getDiscussionPostCount', 'Responses'],
['modification_date', 'Modification Date'] ['modification_date', 'Date']
]; ];
field_dict.listbox = { field_dict.listbox = {
...@@ -117,7 +121,7 @@ ...@@ -117,7 +121,7 @@
} }
function renderDiscussionThread(gadget, must_declare, jio_key) { function renderDiscussionThread(gadget, must_declare, jio_key) {
return loadChildGadget(gadget, "gadget_erp5_pt_form_view.html", return loadChildGadget(gadget, "gadget_erp5_pt_form_view_editable.html",
must_declare, function (form_gadget) { must_declare, function (form_gadget) {
var thread_info_dict; var thread_info_dict;
...@@ -137,120 +141,28 @@ ...@@ -137,120 +141,28 @@
// XXX implement pseudo getResultValue // XXX implement pseudo getResultValue
thread_info_dict = result_list.data.rows[0].value; thread_info_dict = result_list.data.rows[0].value;
var group_list = [], var group_list = [],
field_dict = {}, field_dict = {};
column_list = [
['asStrippedHTML', 'Content'],
['modification_date', 'Modification Date']
];
field_dict.listbox = { field_dict.nutnut = {
"column_list": column_list,
"show_anchor": 0,
"default_params": {},
"editable": 1, "editable": 1,
"editable_column_list": [], "key": THREAD_READER_FIELD_KEY,
"key": "field_listbox",
"lines": 15,
"list_method": "portal_catalog",
"query": "urn:jio:allDocs?query=" + Query.objectToSearchText(
new ComplexQuery({
operator: "AND",
query_list: [
new SimpleQuery({
key: "portal_type",
operator: "=",
type: "simple",
value: "Discussion Post"
}),
new SimpleQuery({
key: "parent_uid",
operator: "=",
type: "simple",
// XXX Check usual states
value: thread_info_dict.uid
})
],
type: "complex"
})
),
"portal_type": ["Discussion Post"],
"search_column_list": [],
"sort_column_list": [],
"sort": [['modification_date', 'ASC']],
"title": "Discussion Posts", "title": "Discussion Posts",
"type": "ListBox" "type": "GadgetField",
}; "url": "gadget_thread_reader.html",
group_list.push([ "sandbox": "",
"bottom", "renderjs_extra": JSON.stringify({
[["listbox"]] query_dict: {
], [ portal_type: 'Discussion Post',
"hidden", ["listbox_modification_date"] parent_uid: thread_info_dict.uid
]);
return form_gadget.render({
erp5_document: {
"_embedded": {
"_view": field_dict
},
"_links": {
"type": {
// form_list display portal_type in header
name: ""
}
}
}, },
form_definition: { sort: [['modification_date', 'ASC'], ['uid', 'ASC']],
group_list: group_list lines: DISPLAYED_POST_COUNT
} }),
}); "hidden": 0
})
.push(function () {
return gadget.getUrlFor({command: 'history_previous'});
})
.push(function (url) {
return gadget.updateHeader({
page_title: 'Thread: ' + thread_info_dict.title,
page_icon: 'comment',
front_url: url
});
});
});
}
function renderDiscussionPost(gadget, must_declare, jio_key) {
return loadChildGadget(gadget, "gadget_erp5_pt_form_view.html",
must_declare,
function (form_gadget) {
var thread_info_dict;
return gadget.jio_allDocs({
select_list: ['asStrippedHTML', 'title'],
query: Query.objectToSearchText(
new SimpleQuery({
key: "relative_url",
operator: "=",
type: "simple",
value: jio_key
})
),
limit: [0, 1]
})
.push(function (result_list) {
// XXX implement pseudo getResultValue
thread_info_dict = result_list.data.rows[0].value;
var group_list = [],
field_dict = {};
field_dict.content = {
"editable": 0,
"key": "content",
"default": thread_info_dict.asStrippedHTML,
"type": "EditorField"
}; };
group_list.push([ group_list.push([
"bottom", "bottom",
[["content"]] [["nutnut"]]
]); ]);
return form_gadget.render({ return form_gadget.render({
...@@ -275,7 +187,7 @@ ...@@ -275,7 +187,7 @@
}) })
.push(function (url) { .push(function (url) {
return gadget.updateHeader({ return gadget.updateHeader({
page_title: 'Post: ' + thread_info_dict.title, page_title: 'Thread: ' + thread_info_dict.title,
page_icon: 'comment', page_icon: 'comment',
front_url: url front_url: url
}); });
...@@ -284,6 +196,7 @@ ...@@ -284,6 +196,7 @@
} }
/*
function createMultipleSimpleOrQuery(key, value_list) { function createMultipleSimpleOrQuery(key, value_list) {
var i, var i,
query_list = []; query_list = [];
...@@ -301,6 +214,7 @@ ...@@ -301,6 +214,7 @@
type: "complex" type: "complex"
}); });
} }
*/
rJS(window) rJS(window)
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -317,147 +231,6 @@ ...@@ -317,147 +231,6 @@
return; return;
}) })
.declareMethod('render2', function renderHeader() {
var gadget = this;
return gadget.jio_allDocs({
select_list: ['uid', 'follow_up_title', 'title',
'modification_date', 'countFolder'],
sort_on: [['modification_date', 'DESC']],
query: Query.objectToSearchText(
new ComplexQuery({
operator: "AND",
query_list: [
new SimpleQuery({
key: "portal_type",
operator: "=",
type: "simple",
value: "Discussion Thread"
}),
new SimpleQuery({
key: "validation_state",
operator: "=",
type: "simple",
// XXX Check usual states
value: "shared"
})
],
type: "complex"
})
),
limit: 15
})
.push(function (result) {
var uid_list = [];
if (result.data.total_rows.length === 0) {
uid_list.push(-1);
} else {
uid_list = result.data.rows.map(function (x) {
return x.value.uid;
});
}
// Search amount of documentation web pages related to those products
return gadget.jio_allDocs({
select_list: ['parent_uid', 'count(*)'],
query: Query.objectToSearchText(
new ComplexQuery({
operator: "AND",
query_list: [
new SimpleQuery({
key: "portal_type",
operator: "=",
type: "simple",
value: "Discussion Post"
}),
new ComplexQuery({
operator: "OR",
type: "complex",
query_list: uid_list.map(function (parent_uid) {
return new SimpleQuery({
key: "parent_uid",
operator: "=",
type: "simple",
value: parent_uid
});
})
})
],
type: "complex"
})
),
group_by: ['parent_uid'],
limit: 10000
})
.push(function () {
return result;
});
})
.push(function (result) {
console.log(result);
var element_list = [],
i;
console.log(result);
for (i = 0; i < result.data.total_rows; i += 1) {
element_list.push(
domsugar('br'),
domsugar('div', [
domsugar('p', {text: result.data.rows[i].value.title}),
domsugar('p', {text: result.data.rows[i].value.modification_date}),
domsugar('p', {text: result.data.rows[i].value.follow_up_title}),
domsugar('p', {text: result.data.rows[i].value.countFolder}),
])
);
}
// XXX group by discussion post by parent_uid
console.log(element_list);
return domsugar(gadget.element, element_list);
});
var gadget = this,
product_uid_dict = {},
meta_product_uid_list = [],
product_list = [];
// First, get the list of products
return searchAllProject(gadget, product_uid_dict,
meta_product_uid_list, product_list)
.push(function () {
return RSVP.hash({
status_dom: buildSoftwareStatusDom(gadget, product_list,
product_uid_dict),
documentation_dom: buildDocumentationDom(gadget,
meta_product_uid_list)
});
})
.push(function (result_dict) {
domsugar(gadget.element, [
domsugar('img', {src: 'NXD-Official.Logo.svg?format=',
alt: 'Nexedi Logo'}),
domsugar('section', {class: 'ui-content-header-plain'}, [
domsugar('h3', [
domsugar('span', {class: 'ui-icon ui-icon-exchange',
text: ' '}),
'Documentation'
])
]),
result_dict.documentation_dom,
domsugar('section', {class: 'ui-content-header-plain'}, [
domsugar('h3', [
domsugar('span', {class: 'ui-icon ui-icon-exchange',
text: ' '}),
'Software Status'
])
]),
result_dict.status_dom
]);
return gadget.updateHeader({
page_title: 'Nexedi Project Quality',
page_icon: 'puzzle-piece'
});
});
})
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Go // Go
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
...@@ -465,26 +238,61 @@ ...@@ -465,26 +238,61 @@
return; return;
}) })
.allowPublicAcquisition("jio_allDocs", function (param_list) { .allowPublicAcquisition("jio_allDocs", function (param_list, scope) {
// XXX Convert iso date to a DateTime field // XXX Convert iso date to a DateTime field
// XXX Paginate message to last message on modification date column // XXX Paginate message to last message on modification date column
if (this.state.display_step !== DISPLAY_READER) {
throw new rJS.AcquisitionError();
}
var gadget = this, var gadget = this,
options = param_list[0]; options = param_list[0];
console.log(scope, param_list);
return gadget.jio_allDocs(options) return gadget.jio_allDocs(options)
.push(function (result) { .push(function (result) {
var i, date, len = result.data.total_rows; var i, date,
len = result.data.total_rows,
key,
url_value,
last_url_value,
count;
for (i = 0; i < len; i += 1) { for (i = 0; i < len; i += 1) {
if (result.data.rows[i].value.hasOwnProperty("modification_date")) { url_value = {
date = new Date(result.data.rows[i].value.modification_date);
result.data.rows[i].value.modification_date = {
url_value: {
command: 'index', command: 'index',
options: { options: {
jio_key: result.data.rows[i].id, jio_key: result.data.rows[i].id,
page: gadget.state.page page: gadget.state.page
} }
}, };
field_gadget_param: { last_url_value = {
command: 'index',
options: {
jio_key: result.data.rows[i].id,
page: gadget.state.page
}
};
count = result.data.rows[i].value
.DiscussionThread_getDiscussionPostCount;
last_url_value.options[THREAD_READER_FIELD_KEY + '_begin_from'] =
count - (count % DISPLAYED_POST_COUNT);
for (key in result.data.rows[i].value) {
if (result.data.rows[i].value.hasOwnProperty(key)) {
result.data.rows[i].value[key] = {
url_value: url_value,
default: result.data.rows[i].value[key]
};
}
}
if (result.data.rows[i].value.hasOwnProperty("modification_date")) {
date = new Date(
result.data.rows[i].value.modification_date.default
);
result.data.rows[i].value.modification_date.url_value =
last_url_value;
result.data.rows[i].value.modification_date
.field_gadget_param = {
allow_empty_time: 0, allow_empty_time: 0,
ampm_time_style: 0, ampm_time_style: 0,
css_class: "date_field", css_class: "date_field",
...@@ -499,9 +307,28 @@ ...@@ -499,9 +307,28 @@
timezone_style: 0, timezone_style: 0,
title: "Modification Date", title: "Modification Date",
type: "DateTimeField" type: "DateTimeField"
};
} }
if (result.data.rows[i].value.hasOwnProperty(
"DiscussionThread_getDiscussionPostCount"
)) {
result.data.rows[i].value
.DiscussionThread_getDiscussionPostCount
.field_gadget_param = {
description: "Count",
editable: 0,
hidden: 0,
"default": result.data.rows[i].value
.DiscussionThread_getDiscussionPostCount
.default,
key: "count",
required: 0,
title: "Responses",
type: "IntegerField"
}; };
} }
/*
if (result.data.rows[i].value.hasOwnProperty("asStrippedHTML")) { if (result.data.rows[i].value.hasOwnProperty("asStrippedHTML")) {
result.data.rows[i].value.asStrippedHTML = { result.data.rows[i].value.asStrippedHTML = {
url_value: { url_value: {
...@@ -523,22 +350,33 @@ ...@@ -523,22 +350,33 @@
} }
}; };
} }
*/
} }
return result; return result;
}); });
}) })
.setState({
display_step: DISPLAY_READER
})
.declareMethod('render', function (options) { .declareMethod('render', function (options) {
console.log(options); console.log(options);
var display_step,
jio_key = options.jio_key;
if (jio_key === undefined) {
display_step = DISPLAY_READER;
} else if ((jio_key.match(/\//g) || []).length === 1) {
// XXX HACK
display_step = DISPLAY_THREAD;
}
return this.changeState({ return this.changeState({
first_render: true, // first_render: true,
page: options.page, page: options.page,
jio_key: options.jio_key, jio_key: jio_key,
options: options display_step: display_step,
options: options,
// Force display in any case
render_timestamp: new Date().getTime()
/* /*
display_step: DISPLAY_TREE, display_step: DISPLAY_TREE,
// Only build the bt5 during the first query // Only build the bt5 during the first query
...@@ -565,51 +403,29 @@ ...@@ -565,51 +403,29 @@
console.log('changestate', modification_dict); console.log('changestate', modification_dict);
var gadget = this; var gadget = this;
// Always refresh the reader
if (gadget.state.display_step === DISPLAY_READER) { if (gadget.state.display_step === DISPLAY_READER) {
if (gadget.state.jio_key === undefined) {
return renderDiscussionThreadList( return renderDiscussionThreadList(
gadget, gadget,
modification_dict.hasOwnProperty('display_step') || modification_dict.first_render modification_dict.hasOwnProperty('display_step')
); );
} }
// XXX HACK if (gadget.state.display_step === DISPLAY_THREAD) {
if ((gadget.state.jio_key.match(/\//g) || []).length === 1) {
return renderDiscussionThread( return renderDiscussionThread(
gadget, gadget,
modification_dict.hasOwnProperty('display_step') || modification_dict.first_render, modification_dict.hasOwnProperty('display_step'),
gadget.state.jio_key gadget.state.jio_key
); );
} }
/*
return renderDiscussionPost( return renderDiscussionPost(
gadget, gadget,
modification_dict.hasOwnProperty('display_step') || modification_dict.first_render, modification_dict.hasOwnProperty('display_step') ||
modification_dict.first_render,
gadget.state.jio_key gadget.state.jio_key
); );
} }
/*
if (gadget.state.display_step === DISPLAY_TREE) {
console.log(modification_dict);
if (modification_dict.hasOwnProperty('display_step')) {
return renderTreeView(gadget,
modification_dict.hasOwnProperty('extract'));
}
if (modification_dict.hasOwnProperty('expand_tree')) {
return expandTreeView(gadget);
}
}
if (modification_dict.display_step === DISPLAY_DIFF) {
return renderDiffView(gadget);
}
if (modification_dict.display_step === DISPLAY_CHANGELOG) {
return renderChangelogView(gadget);
}
*/ */
if (modification_dict.hasOwnProperty('display_step')) {
throw new Error('Unhandled display step: ' + gadget.state.display_step); throw new Error('Unhandled display step: ' + gadget.state.display_step);
}
}); });
}(window, rJS, RSVP, domsugar, SimpleQuery, ComplexQuery, Query)); }(window, rJS, domsugar, SimpleQuery, ComplexQuery, Query));
\ No newline at end of file \ No newline at end of file
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>989.8969.7970.21555</string> </value> <value> <string>989.28731.10123.62685</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1609866799.64</float> <float>1611052523.08</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
div[data-gadget-url$="gadget_thread_reader.html"] {
max-width: 50em;
}
div[data-gadget-url$="gadget_thread_reader.html"] > ol {
background-color: #FFFFFF;
}
div[data-gadget-url$="gadget_thread_reader.html"] > ol > li {
padding-bottom: 12pt;
/*
&:nth-child(even) {
background-color: rgba(230, 230, 230, 0.65);
}
*/
}
div[data-gadget-url$="gadget_thread_reader.html"] > ol > li > div.post_content {
display: inline-block;
}
div[data-gadget-url$="gadget_thread_reader.html"] > ol > li > div.post_content > time {
color: hsl(0, 0%, 42%);
}
div[data-gadget-url$="gadget_thread_reader.html"] > ol > li > div.post_content > div {
margin-top: 6pt;
}
div[data-gadget-url$="gadget_thread_reader.html"] > ol > li > div.post_avatar {
display: inline-block;
margin-right: 6pt;
width: 3em;
height: 3em;
line-height: 3em;
text-align: center;
border-radius: 50%;
background: #0E81C2;
color: #FFFFFF;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
vertical-align: top;
text-transform: uppercase;
}
div[data-gadget-url$="gadget_thread_reader.html"] > ol > li + li {
border-top: solid 1px #0E81C2;
padding-top: 6pt;
}
div[data-gadget-url$="gadget_thread_reader.html"] > nav {
display: flex;
padding-top: 6pt;
border-top: 2px solid rgba(0, 0, 0, 0.14902);
}
div[data-gadget-url$="gadget_thread_reader.html"] > nav span {
opacity: 0.3;
flex: 2;
text-align: right;
float: right;
}
div[data-gadget-url$="gadget_thread_reader.html"] > nav a {
padding: 6pt;
border: 1px solid rgba(0, 0, 0, 0.14);
border-radius: 0.325em;
background-color: #FFFFFF;
margin-right: 6pt;
}
div[data-gadget-url$="gadget_thread_reader.html"] > nav a::before {
margin-right: 6pt;
}
div[data-gadget-url$="gadget_thread_reader.html"] > nav a:hover,
div[data-gadget-url$="gadget_thread_reader.html"] > nav a:active {
background-color: #e0e0e0;
}
div[data-gadget-url$="gadget_thread_reader.html"] > nav a:last-of-type {
margin-right: 0;
}
div[data-gadget-url$="gadget_thread_reader.html"] > nav a:hover,
div[data-gadget-url$="gadget_thread_reader.html"] > nav a:active {
background-color: #e0e0e0;
}
@media not screen and (min-width: 45em) {
div[data-gadget-url$="gadget_thread_reader.html"] > nav a {
overflow: hidden;
text-indent: -9999px;
white-space: nowrap;
}
}
@media not screen and (min-width: 45em) {
div[data-gadget-url$="gadget_thread_reader.html"] > nav a::before {
float: left;
text-indent: 6pt;
}
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Style" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_thread_reader.css</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>romain_thread_reader_css</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Style</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget Thread Reader CSS</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<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>1610631146.53</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>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<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>989.27539.21046.4334</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>1611234608.51</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>empty</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1610631110.94</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<!DOCTYPE html>
<html>
<head>
<!--
data-i18n=No records
data-i18n=Records
data-i18n=Reset
data-i18n=Previous
data-i18n=Next
-->
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Thread Reader</title>
<!-- renderjs -->
<link rel="stylesheet" href="gadget_thread_reader.css">
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="domsugar.js" type="text/javascript"></script>
<!--script src="jiodev.js" type="text/javascript"></script-->
<script src="gadget_global.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_thread_reader.js" type="text/javascript"></script>
</head>
<body>
<ol></ol>
<nav></nav>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Page" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_thread_reader.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>romain_thread_reader_html</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Page</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget Thread Reader</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<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>1610447706.13</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>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<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>989.21729.64568.40328</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>1610708710.59</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1610447478.48</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*jslint indent: 2, maxerr: 3, nomen: true */
/*global window, rJS, RSVP, console, domsugar, Intl, Query, SimpleQuery,
ComplexQuery*/
(function (window, rJS, RSVP, console, domsugar, Intl, Query, SimpleQuery,
ComplexQuery) {
"use strict";
function createMultipleSimpleOrQuery(key, value_list) {
var i,
query_list = [];
if (!Array.isArray(value_list)) {
value_list = [value_list];
}
for (i = 0; i < value_list.length; i += 1) {
query_list.push(new SimpleQuery({
key: key,
operator: "=",
type: "simple",
value: value_list[i]
}));
}
if (value_list.len === 1) {
return query_list[0];
}
return new ComplexQuery({
operator: "OR",
query_list: query_list,
type: "complex"
});
}
function getRelativeTimeString(language, current_date, date) {
var diff,
abs,
second = 1000,
minute = second * 60,
hour = minute * 60,
day = hour * 24,
week = day * 7,
time_format = new Intl.RelativeTimeFormat(language);
diff = date.getFullYear() - current_date.getFullYear();
if (diff !== 0) {
return time_format.format(diff, 'year');
}
diff = date - current_date;
abs = Math.abs(diff);
// "year", "quarter", "month", "week", "day", "hour", "minute", "second"
console.log(current_date, date, abs, week, day);
if (abs > (week * 2)) {
return time_format.format(Math.floor(diff / week), 'week');
}
if (abs > (day * 2)) {
return time_format.format(Math.floor(diff / day), 'day');
}
if (abs > (hour * 2)) {
return time_format.format(Math.floor(diff / hour), 'hour');
}
return time_format.format(Math.floor(diff / minute), 'minute');
}
function setPaginationElement(gadget, count, url_list) {
var disabled_suffix = ' ui-disabled',
span_dict,
first_dict = {
class: "ui-btn ui-icon-angle-double-left ui-btn-icon-left responsive ui-first-child",
text: "First"
},
previous_dict = {
class: "ui-btn ui-icon-angle-left ui-btn-icon-left responsive",
text: "Previous"
},
next_dict = {
class: "ui-btn ui-icon-angle-right ui-btn-icon-right responsive ui-last-child",
text: "Next"
};
if (url_list.length === 0) {
span_dict = {
class: "ui-icon-spinner ui-btn-icon-left"
};
} else {
span_dict = {
text: 'Page ' + Math.floor((gadget.state.begin_from + count) / gadget.state.lines)
};
}
console.warn(gadget.state);
if (gadget.state.begin_from === 0) {
first_dict.class += disabled_suffix;
previous_dict.class += disabled_suffix;
} else {
first_dict.href = url_list[0];
previous_dict.href = url_list[1];
}
if (gadget.state.lines < count) {
next_dict.href = url_list[2];
} else {
next_dict.class += disabled_suffix;
}
// Set the pagination elements
domsugar(gadget.element.querySelector(':scope > nav'), [
domsugar('a', first_dict),
domsugar('a', previous_dict),
domsugar('a', next_dict),
domsugar('span', span_dict)
]);
}
rJS(window)
//////////////////////////////////////////////
// acquired method
//////////////////////////////////////////////
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("getUrlForList", "getUrlForList")
.declareAcquiredMethod("getUrlParameter", "getUrlParameter")
.declareAcquiredMethod("getTranslationList", "getTranslationList")
.declareAcquiredMethod('getSelectedLanguage', 'getSelectedLanguage')
//////////////////////////////////////////////
// initialize the gadget content
//////////////////////////////////////////////
.declareMethod('render', function render(options) {
console.log(options);
var gadget = this;
// Cancel previous line rendering to not conflict with the asynchronous render for now
gadget.fetchLineContent(true);
return new RSVP.Queue(RSVP.hash({
language: gadget.getSelectedLanguage(),
begin_from: gadget.getUrlParameter(options.key + '_begin_from')
}))
.push(function (result_dict) {
return gadget.changeState({
key: options.key,
language: result_dict.language,
query_string: Query.objectToSearchText(
new ComplexQuery({
operator: "AND",
type: "complex",
query_list: Object.entries(options.query_dict)
.map(function (tuple) {
return createMultipleSimpleOrQuery(tuple[0], tuple[1]);
})
})
),
begin_from: parseInt(result_dict.begin_from || '0', 10) || 0,
lines: options.lines || 1,
// Force line calculation in any case
render_timestamp: new Date().getTime(),
first_render: true,
allDocs_result: undefined
});
});
})
.onStateChange(function onStateChange(modification_dict) {
var gadget = this,
allDocs_result,
first_param,
prev_param,
next_param,
pagination_key;
console.log(gadget.state, modification_dict);
if (!gadget.state.query_string) {
throw new Error('No "query_dict" defined for ' + gadget.state.key);
}
if (modification_dict.hasOwnProperty('first_render')) {
setPaginationElement(gadget, 0, []);
}
if (modification_dict.hasOwnProperty('render_timestamp')) {
domsugar(gadget.element.querySelector(':scope > nav > span'), {
class: "ui-icon-spinner ui-btn-icon-left",
text: ''
});
return gadget.fetchLineContent(false);
}
if (modification_dict.hasOwnProperty('allDocs_result')) {
allDocs_result = JSON.parse(gadget.state.allDocs_result);
pagination_key = gadget.state.key + '_begin_from';
first_param = {};
first_param[pagination_key] = undefined;
prev_param = {};
prev_param[pagination_key] = Math.max(0, gadget.state.begin_from - gadget.state.lines) || undefined;
next_param = {};
next_param[pagination_key] = gadget.state.begin_from + gadget.state.lines;
return new RSVP.Queue(RSVP.hash({
viewer_list: RSVP.all(allDocs_result.data.rows.map(function (entry, i) {
if (i === gadget.state.lines) {
return;
}
return gadget.declareGadget('gadget_html_viewer.html')
.push(function (viewer) {
return viewer.render({value: entry.value.asStrippedHTML})
.push(function () {
return viewer;
});
});
})),
url_list: gadget.getUrlForList([
{command: 'change', options: first_param},
{command: 'change', options: prev_param},
{command: 'change', options: next_param}
])
}))
.push(function (result_dict) {
console.log(result_dict);
var now = new Date();
domsugar(gadget.element.querySelector(':scope > ol'),
allDocs_result.data.rows.map(function (entry, i) {
if (i === gadget.state.lines) {
// Drop the last lines, in case we reached the +1 post value
// from allDocs, used to activate the pagination
return '';
}
var source_title = entry.value.source_title || '',
attachment_list = entry.value
.DiscussionPost_getAttachmentList,
attachment_element_list = [],
j,
word_list = source_title.split(' '),
source_short_title;
if (word_list.length === 1) {
source_short_title = (word_list[0][0] || '?') + (word_list[0][1] || '');
} else {
source_short_title = word_list[0][0] + word_list[1][0];
}
for (j = 0; j < attachment_list.length; j += 1) {
attachment_element_list.push(
domsugar('li', [
domsugar('a', {
text: attachment_list[j].title,
href: attachment_list[j].url,
download: attachment_list[j].title
})
])
);
}
return domsugar('li', [
domsugar('div', {
class: 'post_avatar',
text: source_short_title
}),
domsugar('div', {
class: 'post_content'
}, [
domsugar('strong', {text: source_title}),
" ",
domsugar('time', {
datetime: entry.value.modification_date,
title: entry.value.modification_date,
text: getRelativeTimeString(
gadget.state.language,
now,
new Date(entry.value.modification_date)
)
}),
domsugar('br'),
result_dict.viewer_list[i].element,
domsugar('br'),
domsugar('ul', attachment_element_list)
// domsugar('hr')
])
]);
}));
setPaginationElement(gadget, allDocs_result.data.total_rows,
result_dict.url_list);
});
}
})
.onLoop(function () {
// update relative time
var now = new Date(),
gadget = this;
this.element.querySelectorAll("div.post_content > time").forEach(
function (element) {
element.textContent = getRelativeTimeString(
gadget.state.language,
now,
new Date(element.getAttribute('datetime'))
);
}
);
// Loop every minute
}, 1000 * 60)
//////////////////////////////////////////////
// render the listbox in an asynchronous way
//////////////////////////////////////////////
.declareJob('fetchLineContent', function fetchLineContent(only_cancel) {
if (only_cancel) {
return;
}
var gadget = this,
limit_options = [];
if (gadget.state.lines === 0) {
limit_options = undefined;
} else {
limit_options = [gadget.state.begin_from, gadget.state.lines + 1];
}
return gadget.jio_allDocs({
query: gadget.state.query_string,
limit: limit_options,
select_list: ['asStrippedHTML', 'modification_date',
'source_title', 'DiscussionPost_getAttachmentList'],
sort_on: [['modification_date', 'ASC'], ['uid', 'ASC']]
})
.push(function (result) {
return gadget.changeState({
allDocs_result: JSON.stringify(result)
});
});
})
.declareMethod("getContent", function getContent() {
return {};
})
.declareMethod("checkValidity", function checkValidity() {
return true;
});
}(window, rJS, RSVP, console, domsugar, Intl, Query, SimpleQuery,
ComplexQuery));
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_thread_reader.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>romain_thread_reader_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget Thread Reader JS</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<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>1610449183.73</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>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<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>989.29059.23816.29696</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>1611075470.2</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1610447546.97</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
@colorheaderbackground: #085078;
@colorsubheaderbackground: #0E81C2;
@foreground-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.20);
@colorlabel: hsl(0, 0%, 42%);
@margin-size: 6pt;
@double-margin-size: 12pt;
@border-size: 1px;
@border-type: solid;
@border-transparency: .3;
@border-color: rgba(0, 0, 0, @border-transparency);
@border: @border-size @border-type @border-color;
@border-radius: @radius;
@radius: .325em;
@white: #FFFFFF;
@colorbackground: @white;
@colorblocklinkbackground: #e0e0e0;
@smartphone: ~"not screen and (min-width: 45em)";
@tablet: ~"only screen and (min-width: 45em) and (max-width: 85em)";
@desktop: ~"not screen and (max-width: 85em)";
@listboxbordercolor: rgba(0, 0, 0, 0.14902);
.button() {
padding: @margin-size;
border: 1px solid rgba(0, 0, 0, 0.14);
border-radius: @border-radius;
background-color: @colorbackground;
&::before{
margin-right: @margin-size;
}
&:hover, &:active {
background-color: @colorblocklinkbackground;
}
}
.hide_text(@width: 3em) {
// https://css-tricks.com/forums/topic/hide-text-but-not-the-before-pseudo-class/
& when (@width > 0) {
width: @width;
}
overflow: hidden;
text-indent: -9999px;
white-space: nowrap;
}
@avatar_size: 3em;
div[data-gadget-url$="gadget_thread_reader.html"] {
// Limit the width to make reading more pleasant on large screen
max-width: 50em;
& > ol {
background-color: @colorbackground;
& > li {
padding-bottom: @double-margin-size;
/*
&:nth-child(even) {
background-color: rgba(230, 230, 230, 0.65);
}
*/
& > div.post_content {
display: inline-block;
& > time {
color: @colorlabel;
}
& > div {
// Separate post info (user and time) from content
margin-top: @margin-size;
}
}
& > div.post_avatar {
display: inline-block;
margin-right: @margin-size;
width: @avatar_size;
height: @avatar_size;
line-height: @avatar_size;
text-align: center;
border-radius: 50%;
background: @colorsubheaderbackground;
color: @white;
text-shadow: @foreground-text-shadow;
vertical-align: top;
text-transform: uppercase;
}
& + li {
// Separate posts
border-top: solid 1px @colorsubheaderbackground;
padding-top: @margin-size;
}
}
}
& > nav {
// XXX Copied from listbox
display: flex;
padding-top: @margin-size;
border-top: 2px solid @listboxbordercolor;
span {
opacity: .3;
flex: 2;
text-align: right;
float: right;
}
a {
.button();
margin-right: @margin-size;
&:last-of-type {
margin-right: 0;
}
&:hover, &:active {
background-color: @colorblocklinkbackground;
}
@media @smartphone {
.hide_text(@width: initial);
}
&::before {
@media @smartphone {
float: left;
text-indent: @margin-size;
}
}
}
}
}
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>gadget_thread_reader.less</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/plain</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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