Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
3a8966e1
Commit
3a8966e1
authored
Jan 19, 2021
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
romain_dev: forum attachment
parent
c8520763
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
4 deletions
+26
-4
bt5/romain_dev/PathTemplateItem/web_page_module/romain_thread_reader_js.js
...thTemplateItem/web_page_module/romain_thread_reader_js.js
+24
-2
bt5/romain_dev/PathTemplateItem/web_page_module/romain_thread_reader_js.xml
...hTemplateItem/web_page_module/romain_thread_reader_js.xml
+2
-2
No files found.
bt5/romain_dev/PathTemplateItem/web_page_module/romain_thread_reader_js.js
View file @
3a8966e1
...
...
@@ -218,16 +218,36 @@
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
'
,
...
...
@@ -248,7 +268,9 @@
)
}),
domsugar
(
'
br
'
),
result_dict
.
viewer_list
[
i
].
element
result_dict
.
viewer_list
[
i
].
element
,
domsugar
(
'
br
'
),
domsugar
(
'
ul
'
,
attachment_element_list
)
// domsugar('hr')
])
]);
...
...
@@ -296,7 +318,7 @@
query
:
gadget
.
state
.
query_string
,
limit
:
limit_options
,
select_list
:
[
'
asStrippedHTML
'
,
'
modification_date
'
,
'
source_title
'
],
'
source_title
'
,
'
DiscussionPost_getAttachmentList
'
],
sort_on
:
[[
'
modification_date
'
,
'
ASC
'
],
[
'
uid
'
,
'
ASC
'
]]
})
.
push
(
function
(
result
)
{
...
...
bt5/romain_dev/PathTemplateItem/web_page_module/romain_thread_reader_js.xml
View file @
3a8966e1
...
...
@@ -240,7 +240,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
989.2
8725.48684.3556
6
</string>
</value>
<value>
<string>
989.2
9059.23816.2969
6
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -258,7 +258,7 @@
</tuple>
<state>
<tuple>
<float>
16110
52202.34
</float>
<float>
16110
75470.2
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment