From ff2fedda48fc26792a7031c8a3392286253d2df8 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Tue, 21 May 2013 14:33:31 +0100 Subject: [PATCH] add ability to restore lost streaks, also add int() view helper function (pretty cool actually, https://groups.google.com/forum/?fromgroups#!topic/derbyjs/otFCLu2p7yY) --- src/app/helpers.coffee | 3 +++ views/app/tasks.html | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/app/helpers.coffee b/src/app/helpers.coffee index 16fa20b286..ccc2884bc6 100644 --- a/src/app/helpers.coffee +++ b/src/app/helpers.coffee @@ -70,6 +70,9 @@ viewHelpers = (view) -> view.fn "or", -> _.reduce arguments, (cumm, curr) -> cumm || curr view.fn "truarr", (num) -> num-1 view.fn 'count', (arr) -> arr?.length or 0 + view.fn 'int', + get: (num) -> num + set: (num) -> [parseInt(num)] view.fn "gems", (gp) -> return gp/0.25 diff --git a/views/app/tasks.html b/views/app/tasks.html index cf404e8445..0d3dd7e3c2 100644 --- a/views/app/tasks.html +++ b/views/app/tasks.html @@ -285,6 +285,9 @@ + + Restore Streak + {/}