about summary refs log tree commit diff stats
path: root/app/assets
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/images/comment_add.pngbin0 -> 530 bytes
-rw-r--r--app/assets/images/cross.pngbin0 -> 655 bytes
-rw-r--r--app/assets/javascripts/application.js1
-rw-r--r--app/assets/javascripts/main/comments.coffee14
-rw-r--r--app/assets/stylesheets/main/entries.scss20
5 files changed, 35 insertions, 0 deletions
diff --git a/app/assets/images/comment_add.png b/app/assets/images/comment_add.png new file mode 100644 index 0000000..75e78de --- /dev/null +++ b/app/assets/images/comment_add.png
Binary files differ
diff --git a/app/assets/images/cross.png b/app/assets/images/cross.png new file mode 100644 index 0000000..1514d51 --- /dev/null +++ b/app/assets/images/cross.png
Binary files differ
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index cd58a9c..d8f72b4 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js
@@ -17,3 +17,4 @@
17//= require jquery-ui 17//= require jquery-ui
18//= require js-routes 18//= require js-routes
19//= require_tree ./admin 19//= require_tree ./admin
20//= require_tree ./main
diff --git a/app/assets/javascripts/main/comments.coffee b/app/assets/javascripts/main/comments.coffee new file mode 100644 index 0000000..d33e200 --- /dev/null +++ b/app/assets/javascripts/main/comments.coffee
@@ -0,0 +1,14 @@
1comments_ready = ->
2 $(".comment-reply-to").click ->
3 $("#comment_reply_to_id").val($(this).data("commentId"))
4 $("#comment-reply-msg .comment-reply-author").text($(this).data("commentAuthor"))
5 $("#comment-reply-msg").show()
6 return false
7
8 $(".comment-reply-cancel").click ->
9 $("#comment_reply_to_id").val("")
10 $("#comment-reply-msg").hide()
11 return false
12
13$(document).ready(comments_ready)
14$(document).on('turbolinks:load', comments_ready)
diff --git a/app/assets/stylesheets/main/entries.scss b/app/assets/stylesheets/main/entries.scss index 8d5796f..dd6b248 100644 --- a/app/assets/stylesheets/main/entries.scss +++ b/app/assets/stylesheets/main/entries.scss
@@ -251,9 +251,29 @@
251 float: right; 251 float: right;
252 margin-top: 1em; 252 margin-top: 1em;
253 } 253 }
254
255 .comment-reply-to {
256 float: right;
257 margin-right: 0.5em;
258
259 img {
260 display: block;
261 }
262 }
254} 263}
255 264
256#comment-form { 265#comment-form {
266 #comment-reply-msg {
267 display: none;
268 margin-top: 1em;
269 margin-bottom: 0;
270 margin-left: 0;
271
272 .comment-reply-author {
273 font-weight: bold;
274 }
275 }
276
257 fieldset { 277 fieldset {
258 border: 0; 278 border: 0;
259 279