From 5d978aecfb257842f9921cb8b746334d8a847193 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 17 Mar 2016 12:03:32 -0400 Subject: build --- StoneIsland/platforms/android/assets/www/js/sdk/auth.js | 9 ++++++++- StoneIsland/platforms/ios/www/js/index.js | 9 ++++++--- StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js | 8 +++++--- StoneIsland/platforms/ios/www/js/lib/cart/CartConfirm.js | 3 +++ StoneIsland/platforms/ios/www/js/lib/cart/CartThanks.js | 2 ++ StoneIsland/www/js/index.js | 9 ++++++--- StoneIsland/www/js/lib/blogs/BlogView.js | 8 +++++--- StoneIsland/www/js/lib/cart/CartThanks.js | 2 ++ 8 files changed, 37 insertions(+), 13 deletions(-) diff --git a/StoneIsland/platforms/android/assets/www/js/sdk/auth.js b/StoneIsland/platforms/android/assets/www/js/sdk/auth.js index 87ce60ea..6008ec31 100755 --- a/StoneIsland/platforms/android/assets/www/js/sdk/auth.js +++ b/StoneIsland/platforms/android/assets/www/js/sdk/auth.js @@ -30,7 +30,14 @@ var auth = sdk.auth = (function(){ sdk.account.checkin({ success: function(data){ fn && fn( auth.logged_in() ) - } + }, + error: function(){ + auth.clear_user(function(){ + auth.clear_cart(function(){ + fn && fn( auth.logged_in() ) + }) + }) + }, }) auth.get_cart() } diff --git a/StoneIsland/platforms/ios/www/js/index.js b/StoneIsland/platforms/ios/www/js/index.js index 63059c26..6bea75d0 100755 --- a/StoneIsland/platforms/ios/www/js/index.js +++ b/StoneIsland/platforms/ios/www/js/index.js @@ -73,7 +73,7 @@ var app = (function(){ cordova.plugins.Keyboard.disableScroll(true) geo.fetch() var image = new Image - image.src = "/img/compass-logo.png" + image.src = "./img/compass-logo.png" } app.view = null @@ -86,7 +86,11 @@ var app = (function(){ // } if (navigator.onLine) { - app.account.connect( app.router.launch.bind(app.router) ) + app.account.connect() + app.blog.fetch(function(){ + app.router.initial_route = "/intro" + app.router.launch() + }) } else { console.log(">> LAUNCHED WHILE OFFLINE") @@ -97,7 +101,6 @@ var app = (function(){ push.init() } - app.did_finish_launching = app.finished_launching = function(){ console.log(">> FINISHED LAUNCHING") if (window.cordova) { diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js index 64a65b09..06e051cb 100755 --- a/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js +++ b/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js @@ -4,15 +4,17 @@ var BlogView = View.extend({ loaded: false, initialize: function(){ this.loader = new Loader () - this.fetch() }, - fetch: function(){ + fetch: function(fn){ $.ajax({ method: "GET", // url: sdk.env == 'test' ? '/db.json' : "http://stone.sup.land/db.json", url: "http://stone.sup.land/db.json", - success: this.success.bind(this), + success: function(data){ + this.success(data) + fn && fn() + }.bind(this), cache: true, }) }, diff --git a/StoneIsland/platforms/ios/www/js/lib/cart/CartConfirm.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartConfirm.js index e1bfb114..a82509af 100755 --- a/StoneIsland/platforms/ios/www/js/lib/cart/CartConfirm.js +++ b/StoneIsland/platforms/ios/www/js/lib/cart/CartConfirm.js @@ -128,9 +128,12 @@ var CartConfirm = FormView.extend({ }, save: function(){ + app.curtain.show("loading") promise(sdk.cart.finalize, {}).then(function(){ + app.curtain.hide("loading") app.router.go('cart/thanks') }.bind(this)).error(function(data){ + app.curtain.hide("loading") // {"Header":{"StatusCode":403,"Description":"403 Forbidden"},"Error":{"Description":"GenericApiError:CartAlreadyClosed"}} // {"Header":{"StatusCode":409,"Description":"304 NotModified"},"Error":{"Description":"FinalizationError:\\"Item has been removed from cart because it is no longer available.\\"\\n235"}}' // {"Header":{"StatusCode":409,"Description":"304 NotModified"},"Error":{"Description":"FinalizationError:\"The cart cannot be empty.\"\n233"}} diff --git a/StoneIsland/platforms/ios/www/js/lib/cart/CartThanks.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartThanks.js index 798fbbb3..03a45d4d 100755 --- a/StoneIsland/platforms/ios/www/js/lib/cart/CartThanks.js +++ b/StoneIsland/platforms/ios/www/js/lib/cart/CartThanks.js @@ -17,6 +17,8 @@ var CartThanks = View.extend({ app.footer.hide() app.orders.loaded = false + + sdk.auth.clear_cart() }, ok: function(){ diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js index 63059c26..6bea75d0 100755 --- a/StoneIsland/www/js/index.js +++ b/StoneIsland/www/js/index.js @@ -73,7 +73,7 @@ var app = (function(){ cordova.plugins.Keyboard.disableScroll(true) geo.fetch() var image = new Image - image.src = "/img/compass-logo.png" + image.src = "./img/compass-logo.png" } app.view = null @@ -86,7 +86,11 @@ var app = (function(){ // } if (navigator.onLine) { - app.account.connect( app.router.launch.bind(app.router) ) + app.account.connect() + app.blog.fetch(function(){ + app.router.initial_route = "/intro" + app.router.launch() + }) } else { console.log(">> LAUNCHED WHILE OFFLINE") @@ -97,7 +101,6 @@ var app = (function(){ push.init() } - app.did_finish_launching = app.finished_launching = function(){ console.log(">> FINISHED LAUNCHING") if (window.cordova) { diff --git a/StoneIsland/www/js/lib/blogs/BlogView.js b/StoneIsland/www/js/lib/blogs/BlogView.js index 64a65b09..06e051cb 100755 --- a/StoneIsland/www/js/lib/blogs/BlogView.js +++ b/StoneIsland/www/js/lib/blogs/BlogView.js @@ -4,15 +4,17 @@ var BlogView = View.extend({ loaded: false, initialize: function(){ this.loader = new Loader () - this.fetch() }, - fetch: function(){ + fetch: function(fn){ $.ajax({ method: "GET", // url: sdk.env == 'test' ? '/db.json' : "http://stone.sup.land/db.json", url: "http://stone.sup.land/db.json", - success: this.success.bind(this), + success: function(data){ + this.success(data) + fn && fn() + }.bind(this), cache: true, }) }, diff --git a/StoneIsland/www/js/lib/cart/CartThanks.js b/StoneIsland/www/js/lib/cart/CartThanks.js index 798fbbb3..03a45d4d 100755 --- a/StoneIsland/www/js/lib/cart/CartThanks.js +++ b/StoneIsland/www/js/lib/cart/CartThanks.js @@ -17,6 +17,8 @@ var CartThanks = View.extend({ app.footer.hide() app.orders.loaded = false + + sdk.auth.clear_cart() }, ok: function(){ -- cgit v1.2.3-70-g09d2 From e62c59571d94fff600dcb4c0958c6df09086e230 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 17 Mar 2016 12:14:35 -0400 Subject: bump version --- StoneIsland/config.xml | 2 +- .../xcschemes/CordovaLib.xcscheme | 80 ++++++++++++++++++ .../xcschemes/xcschememanagement.plist | 22 +++++ .../UserInterfaceState.xcuserstate | Bin 0 -> 8132 bytes .../xcschemes/Stone Island.xcscheme | 91 +++++++++++++++++++++ .../xcschemes/xcschememanagement.plist | 22 +++++ .../ios/Stone Island/Stone Island-Info.plist | 4 +- StoneIsland/platforms/ios/Stone Island/config.xml | 2 +- 8 files changed, 219 insertions(+), 4 deletions(-) create mode 100644 StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/CordovaLib.xcscheme create mode 100644 StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 StoneIsland/platforms/ios/Stone Island.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/Stone Island.xcscheme create mode 100644 StoneIsland/platforms/ios/Stone Island.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/xcschememanagement.plist diff --git a/StoneIsland/config.xml b/StoneIsland/config.xml index 6a9ded95..ce66a281 100755 --- a/StoneIsland/config.xml +++ b/StoneIsland/config.xml @@ -1,5 +1,5 @@ - + Stone Island Stone Island diff --git a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/CordovaLib.xcscheme b/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/CordovaLib.xcscheme new file mode 100644 index 00000000..195df7f5 --- /dev/null +++ b/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/CordovaLib.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/xcschememanagement.plist b/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 00000000..283503be --- /dev/null +++ b/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + CordovaLib.xcscheme + + orderHint + 1 + + + SuppressBuildableAutocreation + + D2AAC07D0554694100DB518D + + primary + + + + + diff --git a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 00000000..a7cf8cee Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/StoneIsland/platforms/ios/Stone Island.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/Stone Island.xcscheme b/StoneIsland/platforms/ios/Stone Island.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/Stone Island.xcscheme new file mode 100644 index 00000000..98d3e24f --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/Stone Island.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/StoneIsland/platforms/ios/Stone Island.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/xcschememanagement.plist b/StoneIsland/platforms/ios/Stone Island.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 00000000..b41bffe9 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + Stone Island.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 1D6058900D05DD3D006BFB54 + + primary + + + + + diff --git a/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist b/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist index 96abd27c..45ee8ff5 100755 --- a/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist +++ b/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist @@ -57,7 +57,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.5.5 + 0.5.6 CFBundleSignature ???? CFBundleURLTypes @@ -70,7 +70,7 @@ CFBundleVersion - 0.5.5 + 0.5.6 LSApplicationQueriesSchemes youtube diff --git a/StoneIsland/platforms/ios/Stone Island/config.xml b/StoneIsland/platforms/ios/Stone Island/config.xml index aae77f74..3f2ba682 100755 --- a/StoneIsland/platforms/ios/Stone Island/config.xml +++ b/StoneIsland/platforms/ios/Stone Island/config.xml @@ -1,5 +1,5 @@ - + -- cgit v1.2.3-70-g09d2 From a3b4833243672f75e747db8f2a94695ff87cf83b Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 17 Mar 2016 16:57:35 -0400 Subject: build --- .../UserInterfaceState.xcuserstate | Bin 8132 -> 11016 bytes .../ios/Stone Island/Stone Island-Info.plist | 419 ++++++++++----------- 2 files changed, 209 insertions(+), 210 deletions(-) diff --git a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate index a7cf8cee..0499c07f 100644 Binary files a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate and b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist b/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist index 45ee8ff5..94a706f5 100755 --- a/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist +++ b/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist @@ -1,213 +1,212 @@ - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - icon.png - CFBundleIcons - - CFBundlePrimaryIcon - - CFBundleIconFiles - - icon-40 - icon-small - icon-60 - icon.png - icon@2x - icon-72 - icon-72@2x - - UIPrerenderedIcon - - - - CFBundleIcons~ipad - - CFBundlePrimaryIcon - - CFBundleIconFiles - - icon-small - icon-40 - icon-50 - icon-76 - icon-60 - icon - icon@2x - icon-72 - icon-72@2x - - UIPrerenderedIcon - - - - CFBundleIdentifier - us.okfoc.stoneisland - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 0.5.6 - CFBundleSignature - ???? - CFBundleURLTypes - - - CFBundleURLSchemes - - stoneisland - - - - CFBundleVersion - 0.5.6 - LSApplicationQueriesSchemes - - youtube - - LSRequiresIPhoneOS - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - - NSLocationWhenInUseUsageDescription - - NSMainNibFile~ipad - - UIBackgroundModes - - remote-notification - - UIInterfaceOrientation - - UIInterfaceOrientationPortrait - - UILaunchImages - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default - UILaunchImageOrientation - Portrait - UILaunchImageSize - {320, 480} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default - UILaunchImageOrientation - Landscape - UILaunchImageSize - {320, 480} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default-568h - UILaunchImageOrientation - Portrait - UILaunchImageSize - {320, 568} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default-568h - UILaunchImageOrientation - Landscape - UILaunchImageSize - {320, 568} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default-667h - UILaunchImageOrientation - Portrait - UILaunchImageSize - {375, 667} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default-667h - UILaunchImageOrientation - Landscape - UILaunchImageSize - {375, 667} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default-736h - UILaunchImageOrientation - Portrait - UILaunchImageSize - {414, 736} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default-Landscape-736h - UILaunchImageOrientation - Landscape - UILaunchImageSize - {414, 736} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default-Portrait - UILaunchImageOrientation - Portrait - UILaunchImageSize - {768, 1024} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default-Landscape - UILaunchImageOrientation - Landscape - UILaunchImageSize - {768, 1024} - - - UIRequiresFullScreen - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - - - \ No newline at end of file + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + icon.png + CFBundleIcons + + CFBundlePrimaryIcon + + CFBundleIconFiles + + icon-40 + icon-small + icon-60 + icon.png + icon@2x + icon-72 + icon-72@2x + + UIPrerenderedIcon + + + + CFBundleIcons~ipad + + CFBundlePrimaryIcon + + CFBundleIconFiles + + icon-small + icon-40 + icon-50 + icon-76 + icon-60 + icon + icon@2x + icon-72 + icon-72@2x + + UIPrerenderedIcon + + + + CFBundleIdentifier + us.okfoc.stoneisland + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 0.5.6 + CFBundleSignature + ???? + CFBundleURLTypes + + + CFBundleURLSchemes + + stoneisland + + + + CFBundleVersion + 0.5.6 + LSApplicationQueriesSchemes + + youtube + + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + NSLocationWhenInUseUsageDescription + + NSMainNibFile~ipad + + UIBackgroundModes + + remote-notification + + UIInterfaceOrientation + + UIInterfaceOrientationPortrait + + UILaunchImages + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-736h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {414, 736} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-Landscape-736h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {414, 736} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-Portrait + UILaunchImageOrientation + Portrait + UILaunchImageSize + {768, 1024} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-Landscape + UILaunchImageOrientation + Landscape + UILaunchImageSize + {768, 1024} + + + UIRequiresFullScreen + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + + + -- cgit v1.2.3-70-g09d2