fix article type icon

This commit is contained in:
Felix Niklas 2015-10-20 12:52:47 +02:00
parent 76637f55a2
commit ca3c0431df
3 changed files with 7 additions and 4 deletions

View file

@ -330,11 +330,10 @@ class App.TicketZoomArticleNew extends App.Controller
@el.find('.js-articleTypes').addClass('is-hidden')
setArticleType: (type) ->
typeIcon = @$('.js-selectedType')
@type = type
@$('[name=type]').val(type)
@articleNewEdit.attr('data-type', type)
typeIcon.find('use').attr 'xlink:href', "#icon-#{@type}"
@$('.js-selectableTypes').addClass('hide').filter("[data-type='#{ type }']").removeClass('hide')
# show/hide attributes
for articleType in @articleTypes

View file

@ -7,7 +7,11 @@
<div class="js-avatar"></div>
<div class="editControls-item is-hidden pop-select">
<div class="editControls-iconHolder centered js-selectedArticleType">
<%- @Icon(@article.type, 'editControls-icon js-selectedType') %>
<% for articleType in @articleTypes: %>
<div class="editControls-icon js-selectableTypes<%- ' hide' if articleType.icon != @article.icon %>" data-type="<%- articleType.name %>">
<%- @Icon(articleType.icon) %>
</div>
<% end %>
</div>
<div class="pop-selector is-hidden js-articleTypes">
<% for articleType in @articleTypes: %>

View file

@ -3985,7 +3985,7 @@ footer {
justify-content: center;
}
.editControls-icon {
.editControls-icon .icon {
width: 16px;
height: 16px;
fill: hsl(210,2%,78%);