Add cron to debugging buttons

This commit is contained in:
Tyler Renelle 2012-07-11 15:58:17 -04:00
parent 03b5361be9
commit 8417e8fd62
3 changed files with 6 additions and 5 deletions

View file

@ -509,7 +509,7 @@ ready(function(model) {
value: expTally
});
};
poormanscron = function() {
exports.poormanscron = poormanscron = function() {
var DAY, daysPassed, lastCron, today;
model.setNull('_user.lastCron', new Date());
lastCron = new Date(new Date(model.get('_user.lastCron')).toDateString());

View file

@ -384,7 +384,7 @@ ready (model) ->
#TODO: remove when cron implemented
poormanscron = ->
exports.poormanscron = poormanscron = ->
model.setNull('_user.lastCron', new Date())
lastCron = new Date(new Date(model.get('_user.lastCron')).toDateString()) # calculate as midnight
today = new Date(new Date().toDateString()) # calculate as midnight

View file

@ -65,9 +65,10 @@
<div class="container-fluid">
{#if _debug}
<div class="alert">
<i class="icon-warning-sign"></i> <b>Debug Buttons</b>
&nbsp;<a x-bind=click:endOfDayTally class="btn">Run Cron</a>
&nbsp;<a x-bind=click:loadDebugDefaults class="btn">Debuggin Defaults</a>
<i class="icon-warning-sign"></i> <b>Debugging Options</b>
&nbsp;<a x-bind=click:poormanscron class="btn">Cron</a>
&nbsp;<a x-bind=click:endOfDayTally class="btn">Tally</a>
&nbsp;<a x-bind=click:loadDebugDefaults class="btn">Tyler Defaults</a>
</div>
{/}