diff --git a/src/app/browser.coffee b/src/app/browser.coffee index 98235bea3c..50b652158a 100644 --- a/src/app/browser.coffee +++ b/src/app/browser.coffee @@ -1,5 +1,5 @@ content = require('./content') - +_ = require 'underscore' module.exports.resetDom = (model) -> window.DERBY.app.dom.clear() @@ -60,7 +60,7 @@ module.exports.setupSortable = (model) -> # Also, note that refList index arguments can either be an index # or the item's id property model.at("_#{type}List").pass(ignore: domId).move {id}, to - setupSortable(type) for type in ['habit', 'daily', 'todo', 'reward'] + _.each ['habit', 'daily', 'todo', 'reward'], (type) -> setupSortable(type) module.exports.setupTooltips = (model) -> $('[rel=tooltip]').tooltip() diff --git a/src/app/index.coffee b/src/app/index.coffee index 9833b17ad5..fb4a4ebdca 100644 --- a/src/app/index.coffee +++ b/src/app/index.coffee @@ -273,7 +273,7 @@ ready (model) -> batch.set 'tasks', {} _.each taskTypes, (type) -> batch.set "idLists.#{type}", [] batch.set 'balance', 2 if user.get('balance') < 2 #only if they haven't manually bought tokens - revive(batch, true) + revive(batch) batch.commit() browser.resetDom(model) diff --git a/src/app/scoring.coffee b/src/app/scoring.coffee index 2ef8b1611d..c392c811bf 100644 --- a/src/app/scoring.coffee +++ b/src/app/scoring.coffee @@ -245,7 +245,7 @@ cron = () -> batch.setStats() batch.set('history', obj.history) batch.commit() - require('./browser').reset(model) + browser.resetDom(model) setTimeout (-> user.set 'stats.hp', hpAfter), 1000 # animate hp loss