From 9c00e423f03a768668982061c65a6e95f77664d1 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 20 Jan 2016 01:51:14 +0100 Subject: spacing --- StoneIsland/config.xml | 2 + StoneIsland/platforms/android/AndroidManifest.xml | 2 +- .../platforms/android/assets/www/js/index.js | 2 +- .../android/assets/www/js/lib/blogs/ArchiveView.js | 1 + .../android/assets/www/js/lib/blogs/HubView.js | 11 +- .../platforms/android/assets/www/js/lib/etc/geo.js | 44 ++++- .../android/assets/www/js/lib/nav/IntroView.js | 7 +- StoneIsland/platforms/android/res/xml/config.xml | 3 +- StoneIsland/platforms/ios/Stone Island/config.xml | 2 + StoneIsland/platforms/ios/www/index.html | 2 +- StoneIsland/platforms/ios/www/js/index.js | 2 - StoneIsland/platforms/ios/www/js/lib/_router.js | 5 + StoneIsland/platforms/ios/www/js/lib/etc/geo.js | 4 +- .../cordova-plugin-splashscreen/CONTRIBUTING.md | 2 +- .../plugins/cordova-plugin-splashscreen/LICENSE | 0 .../plugins/cordova-plugin-splashscreen/NOTICE | 0 .../plugins/cordova-plugin-splashscreen/README.md | 43 +++-- .../cordova-plugin-splashscreen/RELEASENOTES.md | 204 +++++++++++---------- .../cordova-plugin-splashscreen/doc/de/README.md | 0 .../cordova-plugin-splashscreen/doc/de/index.md | 0 .../cordova-plugin-splashscreen/doc/es/README.md | 0 .../cordova-plugin-splashscreen/doc/es/index.md | 0 .../cordova-plugin-splashscreen/doc/fr/README.md | 0 .../cordova-plugin-splashscreen/doc/fr/index.md | 0 .../cordova-plugin-splashscreen/doc/it/README.md | 0 .../cordova-plugin-splashscreen/doc/it/index.md | 0 .../cordova-plugin-splashscreen/doc/ja/README.md | 0 .../cordova-plugin-splashscreen/doc/ja/index.md | 0 .../cordova-plugin-splashscreen/doc/ko/README.md | 0 .../cordova-plugin-splashscreen/doc/ko/index.md | 0 .../cordova-plugin-splashscreen/doc/pl/README.md | 0 .../cordova-plugin-splashscreen/doc/pl/index.md | 0 .../cordova-plugin-splashscreen/doc/ru/index.md | 0 .../cordova-plugin-splashscreen/doc/zh/README.md | 0 .../cordova-plugin-splashscreen/doc/zh/index.md | 0 .../cordova-plugin-splashscreen/package.json | 2 +- .../plugins/cordova-plugin-splashscreen/plugin.xml | 2 +- .../src/android/SplashScreen.java | 0 .../src/blackberry10/index.js | 0 .../src/browser/SplashScreenProxy.js | 0 .../src/ios/CDVSplashScreen.h | 0 .../src/ios/CDVSplashScreen.m | 180 +++++++++++------- .../src/ios/CDVViewController+SplashScreen.h | 0 .../src/ios/CDVViewController+SplashScreen.m | 0 .../src/tizen/SplashScreenProxy.js | 0 .../src/ubuntu/splashscreen.cpp | 0 .../src/ubuntu/splashscreen.h | 0 .../src/wp/ResolutionHelper.cs | 0 .../src/wp/SplashScreen.cs | 3 + .../contents.xcworkspacedata | 0 .../xcshareddata/CDVSplashScreenTest.xccheckout | 0 .../xcshareddata/xcschemes/CordovaLib.xcscheme | 0 .../tests/ios/CDVSplashScreenTest/.npmignore | 0 .../CDVSplashScreenLibTests/ImageNameTest.m | 0 .../ImageNameTestDelegates.h | 0 .../ImageNameTestDelegates.m | 0 .../CDVSplashScreenLibTests/Info.plist | 0 .../CDVSplashScreenTest.xcodeproj/project.pbxproj | 0 .../project.xcworkspace/contents.xcworkspacedata | 0 .../xcshareddata/CDVSplashScreenTest.xccheckout | 0 .../xcschemes/CDVSplashScreenLib.xcscheme | 0 .../xcschemes/CDVSplashScreenLibTests.xcscheme | 0 .../tests/ios/README.md | 0 .../tests/ios/doc/de/README.md | 0 .../tests/ios/doc/es/README.md | 0 .../tests/ios/doc/fr/README.md | 0 .../tests/ios/doc/it/README.md | 0 .../tests/ios/doc/ja/README.md | 0 .../tests/ios/doc/ko/README.md | 0 .../tests/ios/doc/pl/README.md | 0 .../tests/ios/doc/zh/README.md | 0 .../tests/ios/package.json | 0 .../cordova-plugin-splashscreen/tests/plugin.xml | 2 +- .../cordova-plugin-splashscreen/tests/tests.js | 0 .../www/splashscreen.js | 0 .../www/windows/SplashScreenProxy.js | 6 +- StoneIsland/www/index.html | 2 +- StoneIsland/www/js/index.js | 2 - StoneIsland/www/js/lib/_router.js | 5 + StoneIsland/www/js/lib/etc/geo.js | 4 +- 80 files changed, 338 insertions(+), 206 deletions(-) mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/CONTRIBUTING.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/LICENSE mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/NOTICE mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/RELEASENOTES.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/doc/de/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/doc/de/index.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/doc/es/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/doc/es/index.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/doc/fr/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/doc/fr/index.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/doc/it/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/doc/it/index.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/doc/ja/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/doc/ja/index.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/doc/ko/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/doc/ko/index.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/doc/pl/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/doc/pl/index.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/doc/ru/index.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/doc/zh/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/doc/zh/index.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/package.json mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/plugin.xml mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/src/android/SplashScreen.java mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/src/blackberry10/index.js mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/src/browser/SplashScreenProxy.js mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/src/ios/CDVSplashScreen.h mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/src/ios/CDVSplashScreen.m mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/src/ios/CDVViewController+SplashScreen.h mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/src/ios/CDVViewController+SplashScreen.m mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/src/tizen/SplashScreenProxy.js mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/src/ubuntu/splashscreen.cpp mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/src/ubuntu/splashscreen.h mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/src/wp/ResolutionHelper.cs mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/src/wp/SplashScreen.cs mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/contents.xcworkspacedata mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/xcschemes/CordovaLib.xcscheme mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/.npmignore mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.h mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.m mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/Info.plist mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.pbxproj mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLib.xcscheme mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLibTests.xcscheme mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/doc/de/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/doc/es/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/doc/fr/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/doc/it/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/doc/ja/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/doc/ko/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/doc/pl/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/doc/zh/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/ios/package.json mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/plugin.xml mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/tests/tests.js mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/www/splashscreen.js mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-splashscreen/www/windows/SplashScreenProxy.js diff --git a/StoneIsland/config.xml b/StoneIsland/config.xml index 0d747972..aa055a93 100755 --- a/StoneIsland/config.xml +++ b/StoneIsland/config.xml @@ -29,6 +29,8 @@ + + diff --git a/StoneIsland/platforms/android/AndroidManifest.xml b/StoneIsland/platforms/android/AndroidManifest.xml index ac905064..9dd17db8 100755 --- a/StoneIsland/platforms/android/AndroidManifest.xml +++ b/StoneIsland/platforms/android/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/StoneIsland/platforms/android/assets/www/js/index.js b/StoneIsland/platforms/android/assets/www/js/index.js index 050a729c..73af443a 100755 --- a/StoneIsland/platforms/android/assets/www/js/index.js +++ b/StoneIsland/platforms/android/assets/www/js/index.js @@ -3,7 +3,7 @@ var app = (function(){ app.init = function(){ - sdk.init({ env: "production" }) + sdk.init({ env: "test" }) app.bind() app.build() diff --git a/StoneIsland/platforms/android/assets/www/js/lib/blogs/ArchiveView.js b/StoneIsland/platforms/android/assets/www/js/lib/blogs/ArchiveView.js index 5a036930..e7211036 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/blogs/ArchiveView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/blogs/ArchiveView.js @@ -36,6 +36,7 @@ var ArchiveView = ScrollableView.extend({ var index = $(e.currentTarget).data("index") this.$subtitle.html( $(e.currentTarget).text() ) this.populateDecade(index) + this.deferScrollToTop() }, show: function(){ diff --git a/StoneIsland/platforms/android/assets/www/js/lib/blogs/HubView.js b/StoneIsland/platforms/android/assets/www/js/lib/blogs/HubView.js index dae7f98d..4ed05bb8 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/blogs/HubView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/blogs/HubView.js @@ -25,13 +25,22 @@ var HubView = ScrollableView.extend({ galleries: {}, populate: function(data){ - this.data = data + // sort posts by date, reversed + this.data = data.map(function(s){ + return [ +moment(s.date), s ] + }).sort(function(a,b){ + return a[0] > b[0] ? -1 : a[0] == b[0] ? 0 : 1 + }).map(function(pair){ + console.log(pair[1]) + return pair[1] + }) this.$loader.hide() this.$content.empty() this.galleries = {} // id date subtitle body link store image[uri caption] this.data.forEach(function(row){ // console.log(row) + console.log(moment(row.date)) var t = this.template.replace(/{{id}}/g, row.id) .replace(/{{date}}/, moment(row.date).format("MM.DD.YYYY")) .replace(/{{title}}/, row.title) diff --git a/StoneIsland/platforms/android/assets/www/js/lib/etc/geo.js b/StoneIsland/platforms/android/assets/www/js/lib/etc/geo.js index fac34c1e..88521bb1 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/etc/geo.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/etc/geo.js @@ -1,23 +1,49 @@ var geo = (function(){ var geo = {} + var polling = false, fetching = false, poll_timeout = null + geo.fetch = function(){ + fetching = true navigator.geolocation.getCurrentPosition(geo.success, geo.error, {timeout: 15000}) } geo.success = function(position){ - var lat_str = as_degrees( position.coords.latitude || 40.99167 ) - var lng_str = as_degrees( position.coords.longitude || -74.07944 ) + var lat_str = as_degrees( position.coords.latitude || 40.99167, "N", "S" ) + var lng_str = as_degrees( position.coords.longitude || -74.07944, "W", "E" ) $(".latlng").html( lat_str + " " + lng_str ) + geo.done() } geo.error = function(error){ - $(".latlng").html( "+40° 58' 90\" -74° 04' 46\"" ) + $(".latlng").html( "+40° 58' 90.9\" N 74° 04' 46.3\" W" ) + geo.done() + } + + geo.done = function(){ + fetching = false + if (polling) { + clearTimeout( poll_timeout ) + poll_timeout = setTimeout(geo.fetch, 15000) + } + } + + geo.start_polling = function(){ + polling = true + if (! fetching) { + geo.fetch() + } + } + + geo.stop_polling = function(){ + polling = false + clearTimeout(poll_timeout) } - function as_degrees (n) { + function as_degrees (n, pos, neg) { var s = "" - if (n >= 0) s += "+" + var sig = n >= 0 ? pos : neg + s += Math.floor(n) + "° " n = Math.abs(n) @@ -31,7 +57,13 @@ var geo = (function(){ n *= 60 nn = Math.floor(n) if (nn < 10) nn = "0" + nn - s += nn + '"' + s += nn + + n %= 1 + n *= 10 + nn = Math.floor(n) + s += "." + nn + '\" ' + sig + return s } diff --git a/StoneIsland/platforms/android/assets/www/js/lib/nav/IntroView.js b/StoneIsland/platforms/android/assets/www/js/lib/nav/IntroView.js index 5e5ea908..c075619a 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/nav/IntroView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/nav/IntroView.js @@ -21,14 +21,13 @@ var IntroView = View.extend({ window.addEventListener("deviceorientation", this.orient) app.footer.hide() this.orient({ alpha: 0 }) - // get location.. }, - + hide: function(){ window.removeEventListener("deviceorientation", this.orient) this.$alert.hide() }, - + deviceorientation: function(e){ var heading if ('webkitCompassHeading' in e) { @@ -61,5 +60,5 @@ var IntroView = View.extend({ e.stopPropagation() app.router.go("archive") }, - + }) diff --git a/StoneIsland/platforms/android/res/xml/config.xml b/StoneIsland/platforms/android/res/xml/config.xml index 7bcd705b..20661d26 100755 --- a/StoneIsland/platforms/android/res/xml/config.xml +++ b/StoneIsland/platforms/android/res/xml/config.xml @@ -1,5 +1,5 @@ - + @@ -65,4 +65,5 @@ + diff --git a/StoneIsland/platforms/ios/Stone Island/config.xml b/StoneIsland/platforms/ios/Stone Island/config.xml index c52b46e5..c9da823b 100755 --- a/StoneIsland/platforms/ios/Stone Island/config.xml +++ b/StoneIsland/platforms/ios/Stone Island/config.xml @@ -78,4 +78,6 @@ + + diff --git a/StoneIsland/platforms/ios/www/index.html b/StoneIsland/platforms/ios/www/index.html index b9dd0a91..2a588826 100755 --- a/StoneIsland/platforms/ios/www/index.html +++ b/StoneIsland/platforms/ios/www/index.html @@ -103,7 +103,7 @@
STORY
ARCHIVE
- +40° 58' 90" -74° 04' 46" + +40° 58' 90.9" N     74° 04' 46.3" W