summaryrefslogtreecommitdiffstats
path: root/js/app
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-04-12 01:11:34 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-04-12 01:11:34 +0200
commitb90fe335d2e92a6e085074bbd3e57dd68e9f5dde (patch)
treecb1793c1582f8b2c35bb20ad780eb2148050a410 /js/app
parent0637bebd546b736f63e7c942c59b186242b54c84 (diff)
visually show unreadcount using opacity, fix #57
Diffstat (limited to 'js/app')
-rw-r--r--js/app/controllers/feedcontroller.coffee13
1 files changed, 13 insertions, 0 deletions
diff --git a/js/app/controllers/feedcontroller.coffee b/js/app/controllers/feedcontroller.coffee
index 8f9f4e7b6..15f784a69 100644
--- a/js/app/controllers/feedcontroller.coffee
+++ b/js/app/controllers/feedcontroller.coffee
@@ -102,6 +102,19 @@ angular.module('News').factory '_FeedController',
@_$scope.addNewFolder = true
+ @_$scope.getOpacity = (number) =>
+ number = parseInt(number, 10)
+
+ # the higher the number, the lower the opacity
+ opacity = (number / 180)
+
+ if opacity < 0.3
+ opacity = 0.3
+ if opacity > 1
+ opacity = 1
+ return opacity
+
+
@_$scope.$on 'moveFeedToFolder', (scope, data) =>
@_feedBl.move(data.feedId, data.folderId)