bug fixes

This commit is contained in:
Tyler Renelle 2013-01-20 18:06:34 -05:00
parent cd30ab299f
commit 607740aa23
2 changed files with 4 additions and 5 deletions

View file

@ -81,9 +81,9 @@ get '/', (page, model, next) ->
ready (model) ->
browser.loadJavaScripts(model)
browser.setupSortable()
browser.setupTooltips()
browser.setupTour()
browser.setupSortable(model)
browser.setupTooltips(model)
browser.setupTour(model)
# Setup model in scoring functions
scoring.setModel(model)

View file

@ -134,7 +134,6 @@ score = (taskId, direction, times, update) ->
delta = 0
calculateDelta = (adjustvalue=true) ->
# If multiple days have passed, multiply times days missed
# TODO integrate this multiplier into the formula, so don't have to loop
_.times times, (n) ->
# Each iteration calculate the delta (nextDelta), which is then accumulated in delta
# (aka, the total delta). This weirdness won't be necessary when calculating mathematically
@ -172,7 +171,7 @@ score = (taskId, direction, times, update) ->
addPoints()
else if delta < 0 and !update? # update==cron
addPoints() # trick to "undo" points when they mistakenly checked a checkbox
else
else if type == 'daily' #dont' subtract cron points for todos
subtractPoints()
when 'reward'