summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/www/js/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/index.js')
-rw-r--r--StoneIsland/platforms/ios/www/js/index.js34
1 files changed, 20 insertions, 14 deletions
diff --git a/StoneIsland/platforms/ios/www/js/index.js b/StoneIsland/platforms/ios/www/js/index.js
index 31e78c92..332e780d 100644
--- a/StoneIsland/platforms/ios/www/js/index.js
+++ b/StoneIsland/platforms/ios/www/js/index.js
@@ -1,7 +1,26 @@
var app = (function(){
var app = {}
- app.init = function(){
+ app.init = function(){
+ app.bind()
+ app.build()
+
+ sdk.init({ production: true })
+
+ 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 +40,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 +47,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()