Merge branch 'develop'
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "habitrpg",
|
||||
"description": "A habit tracker app which treats your goals like a Role Playing Game.",
|
||||
"version": "0.0.0-150",
|
||||
"version": "0.0.0-151",
|
||||
"main": "./server.js",
|
||||
"dependencies": {
|
||||
"derby": "git://github.com/Unroll-Me/derby#master",
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 7.3 KiB |
@@ -1,4 +1,4 @@
|
||||
.Pet_Egg_Wolf, .Pet_Egg_TigerCub, .Pet_Egg_PolarBear, .Pet_Egg_PandaCub, .Pet_Egg_LionCub, .Pet_Egg_Fox, .Pet_Egg_FlyingPig, .Pet_Egg_Dragon, .Pet_Egg_Cactus, .Pet_Egg_BearCub, .Pet_HatchingPotion_Base, .Pet_HatchingPotion_White, .Pet_HatchingPotion_Desert, .Pet_HatchingPotion_Red, .Pet_HatchingPotion_Shade, .Pet_HatchingPotion_Skeleton, .Pet_HatchingPotion_Zombie, .Pet_HatchingPotion_CottonCandyPink, .Pet_HatchingPotion_CottonCandyBlue, .Pet_HatchingPotion_Golden {background: url("/img/sprites/Egg_Sprite_Sheet.png") no-repeat}
|
||||
.Pet_Egg_Wolf, .Pet_Egg_TigerCub, .Pet_Egg_PolarBear, .Pet_Egg_PandaCub, .Pet_Egg_LionCub, .Pet_Egg_Fox, .Pet_Egg_FlyingPig, .Pet_Egg_Dragon, .Pet_Egg_Cactus, .Pet_Egg_BearCub, .Pet_HatchingPotion_Base, .Pet_HatchingPotion_White, .Pet_HatchingPotion_Desert, .Pet_HatchingPotion_Red, .Pet_HatchingPotion_Shade, .Pet_HatchingPotion_Skeleton, .Pet_HatchingPotion_Zombie, .Pet_HatchingPotion_CottonCandyPink, .Pet_HatchingPotion_CottonCandyBlue, .Pet_HatchingPotion_Golden, .Pet_Currency_Gem, .Pet_Currency_Gem2x, .Pet_Currency_Gem1x {background: url("/img/sprites/Egg_Sprite_Sheet.png") no-repeat}
|
||||
.Pet_Egg_Wolf {background-position: 0px 0px; width: 48px; height: 51px}
|
||||
.Pet_Egg_TigerCub {background-position: 0px -51px; width: 48px; height: 51px}
|
||||
.Pet_Egg_PolarBear {background-position: 0px -102px; width: 48px; height: 51px}
|
||||
@@ -19,4 +19,8 @@
|
||||
.Pet_HatchingPotion_Zombie {background-position: -48px -306px; width: 48px; height: 51px}
|
||||
.Pet_HatchingPotion_CottonCandyPink {background-position: -48px -357px; width: 48px; height: 51px}
|
||||
.Pet_HatchingPotion_CottonCandyBlue {background-position: -48px -408px; width: 48px; height: 51px}
|
||||
.Pet_HatchingPotion_Golden {background-position: -48px -459px; width: 48px; height: 54px} /* This sprite was a bit taller than everything else, will affect the math of anything inserted below it */
|
||||
.Pet_HatchingPotion_Golden {background-position: -48px -459px; width: 48px; height: 54px} /* This sprite was a bit taller than everything else, will affect the math of anything inserted below it */
|
||||
|
||||
.Pet_Currency_Gem {background-position: 0px -510px; width: 51px; height: 45px} /* Not an egg or potion so has a different size */
|
||||
.Pet_Currency_Gem2x {background-position: -55px -513px; width: 34px; height: 30px}
|
||||
.Pet_Currency_Gem1x {background-position: -63px -542px; width: 19px; height: 17px}
|
||||
|
||||
+26
-18
@@ -9,9 +9,9 @@ restoreRefs = module.exports.restoreRefs = (model) ->
|
||||
model.refList "_#{type}List", "_user.tasks", "_user.#{type}Ids"
|
||||
|
||||
###
|
||||
Loads JavaScript files from (1) public/js/* and (2) external sources
|
||||
Loads JavaScript files from public/js/*
|
||||
If a library is available in a CDN, we put it in <Scripts:> (index.html) for better caching. If not, we use
|
||||
this function to utilize require() to concatinate for faster page load, and $.getScript for asyncronous external script loading
|
||||
this function to utilize require() to concatinate for faster page load
|
||||
###
|
||||
loadJavaScripts = (model) ->
|
||||
|
||||
@@ -24,19 +24,6 @@ loadJavaScripts = (model) ->
|
||||
|
||||
require '../../public/vendor/bootstrap-tour/bootstrap-tour'
|
||||
|
||||
# JS files not needed right away (google charts) or entirely optional (analytics)
|
||||
# Each file getsload asyncronously via $.getScript, so it doesn't bog page-load
|
||||
unless model.get('_view.mobileDevice')
|
||||
|
||||
$.getScript("//s7.addthis.com/js/250/addthis_widget.js#pubid=lefnire");
|
||||
|
||||
# Google Charts
|
||||
$.getScript "//www.google.com/jsapi", ->
|
||||
# Specifying callback in options param is vital! Otherwise you get blank screen, see http://stackoverflow.com/a/12200566/362790
|
||||
google.load "visualization", "1", {packages:["corechart"], callback: ->}
|
||||
|
||||
# Note, Google Analyatics giving beef if in this file. Moved back to index.html. It's ok, it's async - really the
|
||||
# syncronous requires up top are what benefit the most from this file.
|
||||
|
||||
###
|
||||
Setup jQuery UI Sortable
|
||||
@@ -189,6 +176,26 @@ module.exports.resetDom = (model) ->
|
||||
DERBY.app.dom.clear()
|
||||
DERBY.app.view.render(model, DERBY.app.view._lastRender.ns, DERBY.app.view._lastRender.context);
|
||||
|
||||
###
|
||||
Load external scripts that need re-calculation on page re-write
|
||||
###
|
||||
loadExternalScripts = (model) ->
|
||||
$.getScript('//checkout.stripe.com/v2/checkout.js')
|
||||
|
||||
# JS files not needed right away (google charts) or entirely optional (analytics)
|
||||
# Each file getsload asyncronously via $.getScript, so it doesn't bog page-load
|
||||
unless model.get('_view.mobileDevice')
|
||||
|
||||
$.getScript("//s7.addthis.com/js/250/addthis_widget.js#pubid=lefnire")
|
||||
|
||||
# Google Charts
|
||||
$.getScript "//www.google.com/jsapi", ->
|
||||
# Specifying callback in options param is vital! Otherwise you get blank screen, see http://stackoverflow.com/a/12200566/362790
|
||||
google.load "visualization", "1", {packages:["corechart"], callback: ->}
|
||||
|
||||
# Note, Google Analyatics giving beef if in this file. Moved back to index.html. It's ok, it's async - really the
|
||||
# syncronous requires up top are what benefit the most from this file.
|
||||
|
||||
module.exports.app = (appExports, model, app) ->
|
||||
loadJavaScripts(model)
|
||||
setupGrowlNotifications(model) unless model.get('_view.mobileDevice')
|
||||
@@ -199,8 +206,9 @@ module.exports.app = (appExports, model, app) ->
|
||||
setupTooltips(model)
|
||||
setupTour(model)
|
||||
initStickyHeader(model) unless model.get('_view.mobileDevice')
|
||||
loadExternalScripts(model)
|
||||
$('.datepicker').datepicker({autoclose:true, todayBtn:true})
|
||||
.on 'changeDate', (ev) ->
|
||||
#for some reason selecting a date doesn't fire a change event on the field, meaning our changes aren't saved
|
||||
#FIXME also, it saves as a day behind??
|
||||
model.at(ev.target).set 'date', moment(ev.date).add('d',1).format('MM/DD/YYYY')
|
||||
#for some reason selecting a date doesn't fire a change event on the field, meaning our changes aren't saved
|
||||
#FIXME also, it saves as a day behind??
|
||||
model.at(ev.target).set 'date', moment(ev.date).add('d',1).format('MM/DD/YYYY')
|
||||
@@ -61,8 +61,6 @@
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-growl/1.0.0/jquery.bootstrap-growl.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.0.0/js/bootstrap-datepicker.min.js"></script>
|
||||
|
||||
<script src="https://checkout.stripe.com/v2/checkout.js"></script>
|
||||
|
||||
{{#if equal(_view.nodeEnv,"production")}}
|
||||
<!-- Google Analytics -->
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<!-- Habits Column -->
|
||||
<div class="module">
|
||||
<div class="task-column habits">
|
||||
<h2 class="task-column_title">{{t("Habits")}}</h2>
|
||||
<h2 class="task-column_title">Habits</h2>
|
||||
<app:tasks:newTask type="habit" inputValue="{_newHabit}" placeHolder="New Habit" />
|
||||
<ul class="habits">
|
||||
{#each _habitList as :task}<app:tasks:task />{/}
|
||||
@@ -37,7 +37,7 @@
|
||||
<!-- Dailys Column -->
|
||||
<div class="module">
|
||||
<div class="task-column dailys">
|
||||
<h2 class="task-column_title">{{t("Daily")}}</h2>
|
||||
<h2 class="task-column_title">Dailies</h2>
|
||||
<app:tasks:newTask type="daily" inputValue="{_newDaily}" placeHolder="New Daily" />
|
||||
<ul class='dailys'>
|
||||
{#each _dailyList as :task}<app:tasks:task />{/}
|
||||
@@ -58,7 +58,7 @@
|
||||
<a class="option-action" href="/v1/users/{{_user.id}}/calendar.ics?apiToken={{_user.apiToken}}" rel=tooltip title="iCal"><i class=icon-calendar></i></a>
|
||||
<!-- <a href="https://www.google.com/calendar/render?cid={{encodeiCalLink(_user.id, _user.apiToken)}}" rel=tooltip title="Google Calendar"><i class=icon-calendar></i></a> -->
|
||||
</span>
|
||||
<h2 class="task-column_title">{{t("Todos")}}</h2>
|
||||
<h2 class="task-column_title">Todos</h2>
|
||||
<div id="todos-chart" style="display:none;"></div>
|
||||
|
||||
<!-- create new todo -->
|
||||
|
||||
Reference in New Issue
Block a user