rewrite icon template logic

This commit is contained in:
Lisa P 2015-10-23 12:17:26 +02:00
parent 68cee22a76
commit 64a580f299
3 changed files with 29 additions and 38 deletions

View File

@ -7,10 +7,6 @@ BroadcastTowerComponent = Ember.Component.extend
isOpen: false
timeoutId: ''
isEmpty: (->
@get('status') == ''
).property('status')
actions:
toggleBroadcasts:() ->
@toggleProperty('isOpen')

View File

@ -102,6 +102,9 @@
overflow: visible
.tower-path
fill: #AEAEAE
.radio-wave--right,
.radio-wave--left
display: none
&:hover,
&.is-open
.tower-path
@ -123,6 +126,12 @@
.tower-path
fill: #238C3E
&.announcement,
&.warning
.radio-wave--right,
.radio-wave--left
display: block
.radio-wave--right
.tower-path
transform-origin: left center

View File

@ -1,18 +1,5 @@
<span class="icon-broadcast {{status}} {{if isOpen 'is-open'}}" title="broadcasts" {{action 'toggleBroadcasts'}}>
{{#if isEmpty}}
<svg version="1.1" id="Layer_1" x="0px" y="0px"
viewBox="-1 0 16 25" xml:space="preserve">
<g>
<path class="tower-path" d="M0.989,18.732l0.92-2.247l3.926,0.663V20h0.868l-0.001-2.852l3.926-0.663l0.92,2.247h0.989L8.167,8.078
H7.183l0.004,0.011H5.351l0.004-0.011H4.37L0,18.732H0.989z M6.702,16.288l-0.003-3.877l2.461,0.492l1.131,2.759L6.702,16.288z
M2.246,15.662l1.131-2.759l2.459-0.492l-0.001,3.877L2.246,15.662z M8.794,12.015l-2.095-0.483L6.698,8.92h0.827L8.794,12.015z
M5.836,8.92v2.612l-2.093,0.482L5.012,8.92H5.836z"/>
<path class="tower-path" d="M6.246,6.437c1.082,0,1.962-0.88,1.962-1.964c0-1.085-0.88-1.964-1.962-1.964
c-1.087,0-1.966,0.879-1.966,1.964C4.28,5.557,5.159,6.437,6.246,6.437z"/>
</g>
</svg>
{{else}}
<svg version="1.1" id="Layer_1" x="0px" y="0px"
viewBox="-1 0 16 25" xml:space="preserve">
<g>
@ -36,6 +23,5 @@
c-1.087,0-1.966,0.879-1.966,1.964C4.28,5.557,5.159,6.437,6.246,6.437z"/>
</g>
</svg>
{{/if}}
</span>