Us detail name and tag line edition
parent
dcbe0f6744
commit
bb0b9fb86e
|
@ -396,7 +396,7 @@ module.directive("tgBlockButton", ["$rootScope", "$tgLoading", BlockButtonDirect
|
||||||
|
|
||||||
DeleteButtonDirective = ($repo, $confirm, $navurls, $location) ->
|
DeleteButtonDirective = ($repo, $confirm, $navurls, $location) ->
|
||||||
template = _.template("""
|
template = _.template("""
|
||||||
<a href="" class="button button-red">Delete</a>
|
<a href="" class="button button-red">Delete</a>
|
||||||
""")
|
""")
|
||||||
|
|
||||||
link = ($scope, $el, $attrs, $model) ->
|
link = ($scope, $el, $attrs, $model) ->
|
||||||
|
@ -439,17 +439,15 @@ module.directive("tgDeleteButton", ["$tgRepo", "$tgConfirm", "$tgNavUrls", "$tgL
|
||||||
|
|
||||||
EditableSubjectDirective = ($rootscope, $repo, $confirm, $loading) ->
|
EditableSubjectDirective = ($rootscope, $repo, $confirm, $loading) ->
|
||||||
viewTemplate = _.template("""
|
viewTemplate = _.template("""
|
||||||
<%- item.subject %>
|
<%- item.subject %>
|
||||||
<% if (canEdit) { %>
|
<% if (canEdit) { %>
|
||||||
<a class="edit icon icon-edit" href="" title="Edit" />
|
<a class="edit icon icon-edit" href="" title="Edit" />
|
||||||
<% } %>
|
<% } %>
|
||||||
""")
|
""")
|
||||||
|
|
||||||
editTemplate = _.template("""
|
editTemplate = _.template("""
|
||||||
<input type="text" value="<%- item.subject %>" data-required="true" data-maxlength="500"/>
|
<input type="text" value="<%- item.subject %>" data-required="true" data-maxlength="500"/>
|
||||||
<div class="save-container">
|
|
||||||
<a class="save icon icon-floppy" href="" title="Save" />
|
<a class="save icon icon-floppy" href="" title="Save" />
|
||||||
</div>
|
|
||||||
""")
|
""")
|
||||||
|
|
||||||
link = ($scope, $el, $attrs, $model) ->
|
link = ($scope, $el, $attrs, $model) ->
|
||||||
|
@ -528,9 +526,7 @@ EditableDescriptionDirective = ($rootscope, $repo, $confirm, $compile, $loading)
|
||||||
<textarea placeholder="Write a description of your user story"
|
<textarea placeholder="Write a description of your user story"
|
||||||
ng-model="item.description"
|
ng-model="item.description"
|
||||||
tg-markitup="tg-markitup"><%- item.description %></textarea>
|
tg-markitup="tg-markitup"><%- item.description %></textarea>
|
||||||
<div class="save-container">
|
<a class="save icon icon-floppy" href="" title="Save" />
|
||||||
<a class="save icon icon-floppy" href="" title="Save" />
|
|
||||||
</div>
|
|
||||||
""")
|
""")
|
||||||
|
|
||||||
link = ($scope, $el, $attrs, $model) ->
|
link = ($scope, $el, $attrs, $model) ->
|
||||||
|
|
|
@ -95,19 +95,20 @@ TagLineDirective = ($rootscope, $log, $rs, $tgrepo, $confirm) ->
|
||||||
# Main directive template (rendered by angular)
|
# Main directive template (rendered by angular)
|
||||||
template = """
|
template = """
|
||||||
<div class="tags-container"></div>
|
<div class="tags-container"></div>
|
||||||
<input type="text" placeholder="Write tag..." class="tag-input" />
|
<a href="#" class="add-tag icon icon-plus" title="Add tag"></a>
|
||||||
|
<input type="text" placeholder="Write tag..." class="tag-input hidden" />
|
||||||
<a href="" title="Save" class="save icon icon-floppy"></a>
|
<a href="" title="Save" class="save icon icon-floppy"></a>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Tags template (rendered manually using lodash)
|
# Tags template (rendered manually using lodash)
|
||||||
templateTags = _.template("""
|
templateTags = _.template("""
|
||||||
<% _.each(tags, function(tag) { %>
|
<% _.each(tags, function(tag) { %>
|
||||||
<div class="tag" style="border-left: 5px solid <%- tag.color %>;">
|
<span class="tag" style="border-left: 5px solid <%- tag.color %>;">
|
||||||
<span class="tag-name"><%- tag.name %></span>
|
<span class="tag-name"><%- tag.name %></span>
|
||||||
<% if (editable) { %>
|
<% if (editable) { %>
|
||||||
<a href="" title="delete tag" class="icon icon-delete"></a>
|
<a href="" title="delete tag" class="icon icon-delete"></a>
|
||||||
<% } %>
|
<% } %>
|
||||||
</div>
|
</span>
|
||||||
<% }); %>""")
|
<% }); %>""")
|
||||||
|
|
||||||
renderTags = ($el, tags, editable, tagsColors) ->
|
renderTags = ($el, tags, editable, tagsColors) ->
|
||||||
|
@ -201,6 +202,12 @@ TagLineDirective = ($rootscope, $log, $rs, $tgrepo, $confirm) ->
|
||||||
|
|
||||||
$el.on "click", ".save", saveInputTag
|
$el.on "click", ".save", saveInputTag
|
||||||
|
|
||||||
|
$el.on "click", ".add-tag", (event) ->
|
||||||
|
event.preventDefault()
|
||||||
|
target = angular.element(event.currentTarget)
|
||||||
|
target.hide()
|
||||||
|
target.siblings('input').removeClass('hidden')
|
||||||
|
|
||||||
$el.on "click", ".icon-delete", (event) ->
|
$el.on "click", ".icon-delete", (event) ->
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
target = angular.element(event.currentTarget)
|
target = angular.element(event.currentTarget)
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
input {
|
input {
|
||||||
display: inline-block;
|
|
||||||
padding: .4rem;
|
padding: .4rem;
|
||||||
width: 14rem;
|
width: 14rem;
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,8 +86,10 @@
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
line-height: 2.2rem;
|
line-height: 2.2rem;
|
||||||
padding-right: 1rem;
|
padding-right: 1rem;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
.save {
|
.icon-edit,
|
||||||
|
.icon-floppy {
|
||||||
@extend %large;
|
@extend %large;
|
||||||
color: $gray-light;
|
color: $gray-light;
|
||||||
margin-left: .5rem;
|
margin-left: .5rem;
|
||||||
|
@ -153,6 +155,17 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tags-block {
|
||||||
|
.icon-plus {
|
||||||
|
@extend %large;
|
||||||
|
color: $gray-light;
|
||||||
|
vertical-align: top;
|
||||||
|
&:hover {
|
||||||
|
color: $fresh-taiga;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.us-content {
|
.us-content {
|
||||||
textarea {
|
textarea {
|
||||||
background: $white;
|
background: $white;
|
||||||
|
|
Loading…
Reference in New Issue