summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/android/assets/www/js/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/platforms/android/assets/www/js/index.js')
-rwxr-xr-xStoneIsland/platforms/android/assets/www/js/index.js86
1 files changed, 86 insertions, 0 deletions
diff --git a/StoneIsland/platforms/android/assets/www/js/index.js b/StoneIsland/platforms/android/assets/www/js/index.js
new file mode 100755
index 00000000..0b3531dd
--- /dev/null
+++ b/StoneIsland/platforms/android/assets/www/js/index.js
@@ -0,0 +1,86 @@
+var app = (function(){
+ var app = {}
+
+ app.init = function(){
+
+ sdk.init({ env: "production" })
+
+ app.bind()
+ app.build()
+
+ app.iscroll_options = {
+ mouseWheel: true,
+ scrollbars: 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 ()
+ app.story = new StoryView ()
+ app.cart = new CartView ()
+
+ app.intro = new IntroView ()
+ app.header = new HeaderView ()
+ app.footer = new FooterView ()
+ app.curtain = new CurtainView ()
+ app.nav = new NavView ()
+
+ app.account = new AccountView ()
+ app.login = new LoginView ()
+ app.logout = new LogoutView ()
+ app.signup = new SignupView ()
+ app.profile = new ProfileView ()
+ app.payment = new PaymentView ()
+ app.shipping = new ShippingView ()
+ app.settings = new SettingsView ()
+ app.orders = new OrdersView ()
+
+ app.terms = new PageView ({ page: "terms" })
+ app.privacy = new PageView ({ page: "privacy" })
+ app.returns = new PageView ({ page: "returns" })
+ app.care = new PageView ({ page: "care" })
+
+ app.collection = new CollectionView ()
+ app.product = new ProductView ()
+ app.closed = new ClosedStoreView ()
+ app.search = new SearchView ()
+
+ app.selector = new Selector ()
+ }
+
+ app.ready = function(){
+ if (window.cordova) {
+ cordova.plugins.Keyboard.disableScroll(true)
+ geo.fetch()
+ }
+
+ app.view = null
+ app.router = new SiteRouter ()
+// if (sdk.env == "test") {
+// app.router.launch()
+// }
+// else {
+ app.account.connect( app.router.launch.bind(app.router) )
+// }
+
+ $("body").removeClass("loading")
+ }
+
+ return app
+})()
+
+app.init()