Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Postal Owl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Postal Owl
Postal Owl
Commits
22c571d3
Commit
22c571d3
authored
4 years ago
by
Václav Končický
Browse files
Options
Downloads
Patches
Plain Diff
Topic: Reply link that adds the post as citation
parent
ac7afc99
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
js/owl.js
+6
-0
6 additions, 0 deletions
js/owl.js
templates/topic.html
+1
-0
1 addition, 0 deletions
templates/topic.html
with
7 additions
and
0 deletions
js/owl.js
+
6
−
0
View file @
22c571d3
...
@@ -23,6 +23,8 @@ md.use(mhl, {
...
@@ -23,6 +23,8 @@ md.use(mhl, {
hljs
:
hljs
,
hljs
:
hljs
,
});
});
const
cmt
=
document
.
getElementById
(
"
comment
"
);
exports
.
render_md
=
function
()
{
exports
.
render_md
=
function
()
{
console
.
log
(
'
Owl: Rendering Markdown
'
);
console
.
log
(
'
Owl: Rendering Markdown
'
);
...
@@ -34,6 +36,10 @@ exports.render_md = function () {
...
@@ -34,6 +36,10 @@ exports.render_md = function () {
var
src
=
b
.
innerText
;
var
src
=
b
.
innerText
;
var
result
=
md
.
render
(
src
);
var
result
=
md
.
render
(
src
);
b
.
innerHTML
=
result
;
b
.
innerHTML
=
result
;
var
reply
=
b
.
parentElement
.
getElementsByClassName
(
"
preply
"
)[
0
];
reply
.
onclick
=
function
()
{
cmt
.
value
=
n
.
replaceAll
(
/^/gm
,
"
>
"
);
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
templates/topic.html
+
1
−
0
View file @
22c571d3
...
@@ -54,6 +54,7 @@
...
@@ -54,6 +54,7 @@
{% if g.is_teacher or p.author_uid == g.uid %}
{% if g.is_teacher or p.author_uid == g.uid %}
—
<a
href=
'{{ url_for('
edit_post
',
cident=
g.course.ident,
pid=
p.pid)
}}'
>
edit
</a>
—
<a
href=
'{{ url_for('
edit_post
',
cident=
g.course.ident,
pid=
p.pid)
}}'
>
edit
</a>
{% endif %}
{% endif %}
—
<a
href=
"#comment"
class=
"preply"
>
reply
</a>
{% if p.comment != None %}
{% if p.comment != None %}
<div
class=
pbody
>
<div
class=
pbody
>
<pre>
{{ p.comment }}
</pre>
<pre>
{{ p.comment }}
</pre>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment