Commit 058efb0f authored by Roque's avatar Roque

erp5_web_renderjs_ui: more parametrization on thread reader gadget

parent 18f6658e
...@@ -150,6 +150,7 @@ ...@@ -150,6 +150,7 @@
lines: options.lines || 1, lines: options.lines || 1,
date_column: options.date_column || 'modification_date', date_column: options.date_column || 'modification_date',
source_column: options.source_column || 'source_title', source_column: options.source_column || 'source_title',
attachment_column: options.attachment_column || 'Event_getAttachmentList',
// Force line calculation in any case // Force line calculation in any case
render_timestamp: new Date().getTime(), render_timestamp: new Date().getTime(),
first_render: true, first_render: true,
...@@ -221,8 +222,7 @@ ...@@ -221,8 +222,7 @@
return ''; return '';
} }
var source_title = entry.value[gadget.state.source_column] || '', var source_title = entry.value[gadget.state.source_column] || '',
attachment_list = entry.value attachment_list = entry.value[gadget.state.attachment_column] || [],
.Event_getAttachmentList || [],
attachment_element_list = [], attachment_element_list = [],
j, j,
word_list = source_title.split(' '), word_list = source_title.split(' '),
...@@ -314,13 +314,12 @@ ...@@ -314,13 +314,12 @@
} else { } else {
limit_options = [gadget.state.begin_from, gadget.state.lines + 1]; limit_options = [gadget.state.begin_from, gadget.state.lines + 1];
} }
return gadget.jio_allDocs({ return gadget.jio_allDocs({
query: gadget.state.query_string, query: gadget.state.query_string,
limit: limit_options, limit: limit_options,
select_list: ['asStrippedHTML', gadget.state.date_column, select_list: ['asStrippedHTML', gadget.state.date_column,
gadget.state.source_column, gadget.state.source_column,
'Event_getAttachmentList'], gadget.state.attachment_column],
sort_on: [[gadget.state.date_column, 'ASC'], ['uid', 'ASC']] sort_on: [[gadget.state.date_column, 'ASC'], ['uid', 'ASC']]
}) })
.push(function (result) { .push(function (result) {
......
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1017.21412.29767.13277</string> </value> <value> <string>1022.14914.811.18278</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>1718640624.19</float> <float>1737652069.56</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