From 8bf5b7f2e3be707523d202066f0c14dcd172f46a Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 28 Sep 2015 19:22:55 -0400 Subject: build --- StoneIsland/www/js/index.js | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'StoneIsland/www/js') diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js index 31e78c92..82766082 100644 --- a/StoneIsland/www/js/index.js +++ b/StoneIsland/www/js/index.js @@ -1,7 +1,24 @@ var app = (function(){ var app = {} - app.init = function(){ + app.init = function(){ + app.bind() + app.build() + + if (window.cordova) { + document.addEventListener('deviceready', app.ready, false) + } + else { + app.ready() + } + } + + app.bind = function(){ + document.addEventListener('touchmove', function(e){ e.preventDefault() }) + FastClick.attach(document.body) + } + + app.build = function(){ app.blog = new BlogView () app.archive = new ArchiveView () app.hub = new HubView () @@ -21,17 +38,6 @@ var app = (function(){ app.collection = new CollectionView () app.selector = new Selector () - - app.bind() - } - - app.bind = function(){ - if (window.cordova) { - document.addEventListener('deviceready', app.ready, false) - } - else { - app.ready() - } } app.ready = function(){ @@ -39,8 +45,6 @@ var app = (function(){ // cordova.plugins.Keyboard.disableScroll(true) } - document.addEventListener('touchmove', function(e){ e.preventDefault() }) - app.view = null app.router = new SiteRouter () app.router.route() -- cgit v1.2.3-70-g09d2