added back to comments; avatar.
This commit is contained in:
parent
b26e214001
commit
42993de739
4 changed files with 55 additions and 53 deletions
|
|
@ -3,14 +3,11 @@
|
|||
-# the COPYRIGHT file.
|
||||
|
||||
= form_tag( comments_path, :id => "new_comment_on_#{post_id}", :class => 'new_comment', :remote => true) do
|
||||
= owner_image_tag
|
||||
%p
|
||||
= label_tag "comment_text_on_#{post_id}", t('.comment')
|
||||
= text_area_tag :text, nil, :rows => 2, :class => "comment_box",:id => "comment_text_on_#{post_id}"
|
||||
= hidden_field_tag :post_id, post_id, :id => "post_id_on_#{post_id}"
|
||||
= submit_tag t('.comment'), :id => "comment_submit_#{post_id}", :class => "comment_submit button", :disable_with => t('.commenting')
|
||||
|
||||
.submit_instructions.hidden
|
||||
= t('.press')
|
||||
%b= t('.enter')
|
||||
= t('.to_comment')
|
||||
.submit_button
|
||||
= submit_tag t('.comment'), :id => "comment_submit_#{post_id}", :class => "comment_submit button", :disable_with => t('.commenting')
|
||||
|
||||
|
|
|
|||
|
|
@ -266,9 +266,6 @@ en:
|
|||
new_comment:
|
||||
comment: "Comment"
|
||||
commenting: "Commenting..."
|
||||
press: "press"
|
||||
enter: "enter"
|
||||
to_comment: "to comment"
|
||||
photos:
|
||||
show:
|
||||
delete_photo: "Delete Photo"
|
||||
|
|
|
|||
|
|
@ -16,22 +16,12 @@ var Stream = {
|
|||
Stream.focusNewComment($(this), e);
|
||||
});
|
||||
|
||||
// comment submit action
|
||||
$stream.delegate("textarea.comment_box", "keydown", function(e){
|
||||
if (e.keyCode === 13) {
|
||||
if(!e.shiftKey) {
|
||||
$(this).blur();
|
||||
$(this).closest("form").submit();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$stream.delegate("textarea.comment_box", "focus", function(evt) {
|
||||
var commentBox = $(this);
|
||||
commentBox
|
||||
.attr('rows',2)
|
||||
.addClass('force_open')
|
||||
.closest("li").find(".submit_instructions").removeClass('hidden');
|
||||
.parent().parent()
|
||||
.addClass('open');
|
||||
});
|
||||
|
||||
$stream.delegate("textarea.comment_box", "blur", function(evt) {
|
||||
|
|
@ -39,9 +29,9 @@ var Stream = {
|
|||
if (!commentBox.val()) {
|
||||
commentBox
|
||||
.attr('rows',1)
|
||||
.removeClass('force_open')
|
||||
.css('height','1.4em')
|
||||
.closest("li").find(".submit_instructions").addClass('hidden');
|
||||
.parent().parent()
|
||||
.removeClass('open');
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -521,31 +521,20 @@ header
|
|||
:right 1em
|
||||
|
||||
.stream.show
|
||||
ul.comments
|
||||
:display block
|
||||
:margin
|
||||
:top 0
|
||||
> li
|
||||
:border none
|
||||
:padding 0
|
||||
:word-wrap break-word
|
||||
&:hover
|
||||
> li
|
||||
:background none
|
||||
:border none
|
||||
|
||||
ul.comments
|
||||
textarea
|
||||
:width 425px
|
||||
:max-width 97%
|
||||
|
||||
.stream ul.comments
|
||||
.avatar
|
||||
:width 30px
|
||||
:height 30px
|
||||
|
||||
input.comment_submit
|
||||
:display none
|
||||
.submit_button
|
||||
:text
|
||||
:align right
|
||||
|
||||
ul.comments,
|
||||
ul.show_comments
|
||||
|
|
@ -559,13 +548,10 @@ ul.show_comments
|
|||
:width 100%
|
||||
:height 1.4em
|
||||
|
||||
.force_open
|
||||
:min-height 2.4em
|
||||
|
||||
li
|
||||
:list
|
||||
:style none
|
||||
:padding 0.5em
|
||||
:padding 0.4em
|
||||
:border
|
||||
:bottom 1px solid #ddd
|
||||
:top 1px solid #fff
|
||||
|
|
@ -587,7 +573,7 @@ ul.show_comments
|
|||
:top 0px
|
||||
:bottom -2px
|
||||
:padding
|
||||
:left 38px
|
||||
:left 37px
|
||||
:right 20px
|
||||
.from
|
||||
a
|
||||
|
|
@ -599,23 +585,54 @@ ul.show_comments
|
|||
form
|
||||
:margin
|
||||
:top -5px
|
||||
:bottom 0.2em
|
||||
:bottom -4px
|
||||
:font
|
||||
:size 1em
|
||||
|
||||
.submit_button
|
||||
:display none
|
||||
input
|
||||
:margin
|
||||
:right 0
|
||||
|
||||
textarea
|
||||
:font
|
||||
:size 1em
|
||||
:width 478px
|
||||
:margin
|
||||
:bottom -3px
|
||||
:width 482px
|
||||
|
||||
.submit_instructions
|
||||
:text-align center
|
||||
:font
|
||||
:size smaller
|
||||
:color #999
|
||||
:margin
|
||||
:bottom -0.8em
|
||||
:top -0.7em
|
||||
:padding 0
|
||||
.avatar
|
||||
:display none
|
||||
|
||||
form.open
|
||||
.submit_button
|
||||
:display block
|
||||
:margin
|
||||
:bottom 2px
|
||||
:right 2px
|
||||
|
||||
textarea
|
||||
:min-height 2.4em
|
||||
:width 445px
|
||||
|
||||
p
|
||||
:position relative
|
||||
:left 36px
|
||||
|
||||
.avatar
|
||||
:position absolute
|
||||
:display inline
|
||||
|
||||
.stream.show
|
||||
ul.comments
|
||||
li
|
||||
:padding
|
||||
:right 135px
|
||||
|
||||
textarea
|
||||
:margin
|
||||
:bottom 2px
|
||||
|
||||
.profile_photo
|
||||
img
|
||||
|
|
@ -625,6 +642,7 @@ ul.show_comments
|
|||
:-webkit-box-shadow 0 2px 2px #333
|
||||
:-moz-box-shadow 0 2px 2px #333
|
||||
:box-shadow 0 2px 2px #333
|
||||
|
||||
#profile
|
||||
h3
|
||||
:margin
|
||||
|
|
|
|||
Loading…
Reference in a new issue