summaryrefslogtreecommitdiff
path: root/templates/project/widgets/number/number.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'templates/project/widgets/number/number.coffee')
-rw-r--r--templates/project/widgets/number/number.coffee8
1 files changed, 2 insertions, 6 deletions
diff --git a/templates/project/widgets/number/number.coffee b/templates/project/widgets/number/number.coffee
index 78e7523..46cd6c2 100644
--- a/templates/project/widgets/number/number.coffee
+++ b/templates/project/widgets/number/number.coffee
@@ -8,17 +8,13 @@ class Dashing.Number extends Dashing.Widget
if last != 0
diff = Math.abs(Math.round((current - last) / last * 100))
"#{diff}%"
+ else
+ ""
@accessor 'arrow', ->
if @get('last')
if parseInt(@get('current')) > parseInt(@get('last')) then 'icon-arrow-up' else 'icon-arrow-down'
- @accessor 'statusStyle', ->
- "status-#{@get('status')}"
-
- @accessor 'needsAttention', ->
- @get('status') == 'warning' || @get('status') == 'danger'
-
onData: (data) ->
if data.status
$(@get('node')).addClass("status-#{data.status}") \ No newline at end of file