fix #310
parent
8cb9d370d7
commit
6da9ecbe6e
|
@ -396,3 +396,16 @@ AnimationFrame = () ->
|
|||
return {add: add}
|
||||
|
||||
module.factory("animationFrame", AnimationFrame)
|
||||
|
||||
#############################################################################
|
||||
## Open/close comment
|
||||
#############################################################################
|
||||
|
||||
ToggleCommentDirective = () ->
|
||||
link = ($scope, $el, $attrs) ->
|
||||
$el.find("textarea").on "focus", () ->
|
||||
$el.addClass("active")
|
||||
|
||||
return {link:link}
|
||||
|
||||
module.directive("tgToggleComment", ToggleCommentDirective)
|
||||
|
|
|
@ -29,7 +29,21 @@ block content
|
|||
- var permissionSuffix = "us"
|
||||
include views/modules/attachments
|
||||
|
||||
textarea(ng-model="us.comment", placeholder="Write here a new commet")
|
||||
section.us-activity
|
||||
ul.us-activity-tabs
|
||||
li
|
||||
a.active(href="#")
|
||||
span.icon.icon-bulk
|
||||
span.tab-title Comments
|
||||
|
||||
li
|
||||
a(href="#")
|
||||
span.icon.icon-issues
|
||||
span.tab-title Activity
|
||||
|
||||
- var commentModel = "us"
|
||||
include views/modules/comments
|
||||
include views/modules/activity
|
||||
|
||||
sidebar.menu-secondary.sidebar
|
||||
section.us-status(tg-us-status-detail, ng-model="us", editable="true")
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//- NOTE: You must to define 'var commentModel' with the object model
|
||||
|
||||
section.us-comments
|
||||
div.add-comment(tg-check-permission, permission="modify_"+commentModel)
|
||||
div.add-comment(tg-check-permission, tg-toggle-comment, permission="modify_"+commentModel)
|
||||
textarea(placeholder="Write here a new commet", ng-model="commentModel.comment")
|
||||
a.button.button-green(href="", title="Comment") Comment
|
||||
div.comment-list
|
||||
|
|
|
@ -2,16 +2,26 @@
|
|||
@include clearfix;
|
||||
textarea {
|
||||
float: left;
|
||||
height: 41px;
|
||||
margin-bottom: .5rem;
|
||||
&.active {
|
||||
@include transition(height .3s ease-in);
|
||||
height: 6rem;
|
||||
}
|
||||
min-height: inherit;
|
||||
}
|
||||
a {
|
||||
color: $white;
|
||||
float: right;
|
||||
}
|
||||
.button-green {
|
||||
display: none;
|
||||
}
|
||||
&.active {
|
||||
.button-green {
|
||||
display: block;
|
||||
}
|
||||
textarea {
|
||||
@include transition(height .3s ease-in);
|
||||
height: 6rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.comment-single {
|
||||
|
|
Loading…
Reference in New Issue