diff options
Diffstat (limited to 'StoneIsland/platforms/ios')
22 files changed, 1016 insertions, 38 deletions
diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Info.plist b/StoneIsland/platforms/ios/Stone Island.xcarchive/Info.plist index b466f8eb..1f0dfaa9 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Info.plist +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Info.plist @@ -18,7 +18,7 @@ <key>ArchiveVersion</key> <integer>2</integer> <key>CreationDate</key> - <date>2017-09-23T20:05:16Z</date> + <date>2017-09-25T17:04:37Z</date> <key>Name</key> <string>Stone Island</string> <key>SchemeName</key> diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Assets.car b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Assets.car Binary files differindex 466ad309..11472fb5 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Assets.car +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Assets.car diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib Binary files differindex fb2e5e41..a0e39fd0 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib Binary files differindex f50ef020..11a8a0d0 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/MainViewController.nib b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/MainViewController.nib Binary files differindex 611d7a09..b615db36 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/MainViewController.nib +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/MainViewController.nib diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Stone Island b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Stone Island Binary files differindex 7c3f5534..6fb3015b 100755 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Stone Island +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Stone Island diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/_CodeSignature/CodeResources b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/_CodeSignature/CodeResources index 09bfb7a2..bc4e090b 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/_CodeSignature/CodeResources +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/_CodeSignature/CodeResources @@ -86,11 +86,11 @@ </data> <key>Assets.car</key> <data> - HOROMFNIhR3lgrUWAA5A5SScBRQ= + AdU9YWwWWn0LL+gfqyfsiNQzx2E= </data> <key>CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib</key> <data> - D+EJEHXkJmaaWB/w08GWaja8q3s= + XMok8vDfArEptCvkn+RMLVR7/jY= </data> <key>CDVLaunchScreen.storyboardc/Info.plist</key> <data> @@ -98,7 +98,7 @@ </data> <key>CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib</key> <data> - bFSMoRveX2aBqeUdkf0uy4PuTfA= + GveA29qcysevL9K+WnrL9F0q1Xg= </data> <key>CDVNotification.bundle/beep.wav</key> <data> @@ -166,7 +166,7 @@ </data> <key>MainViewController.nib</key> <data> - PeG6ti4cP+KBD7UrAy+UNr7c2ag= + IxKIz0YfQPNN+CNVoYnjomRkX9M= </data> <key>PkgInfo</key> <data> @@ -178,7 +178,7 @@ </data> <key>config.xml</key> <data> - 7YMtI91Z2wAAPOG+6xRBFdqcjxs= + 4Kd5MyqaGCYxA8ZPfFVxOuSGEOI= </data> <key>embedded.mobileprovision</key> <data> @@ -198,7 +198,7 @@ </data> <key>www/cordova_plugins.js</key> <data> - GDPKC9IXQ7d+cXYCJDwfVM0bsK0= + NV8qo242MHKzuAtDp77aqJksvZo= </data> <key>www/css/account.css</key> <data> @@ -270,7 +270,7 @@ </data> <key>www/css/nav.css</key> <data> - 4hSh6NJLuzHKgsQdhOHFsDdrYzw= + bb7+YzPvUafZeDDeLssmEeR+m5Y= </data> <key>www/css/products.css</key> <data> @@ -716,6 +716,10 @@ <data> n2E0W8B/grOxM2ORx/haAYOWIcA= </data> + <key>www/plugins/cordova-plugin-statusbar/www/statusbar.js</key> + <data> + hDT++3ZaOTp3t16AAFAibxtovj0= + </data> <key>www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js</key> <data> p2ovf3IcCK49/GvqK+j7UmFu1zI= @@ -955,22 +959,22 @@ <dict> <key>hash</key> <data> - HOROMFNIhR3lgrUWAA5A5SScBRQ= + AdU9YWwWWn0LL+gfqyfsiNQzx2E= </data> <key>hash2</key> <data> - xyP1FpxqSk4ytWlKVyQBU2O2xdOHeepCzcY0cVsnV1o= + C0OHLeKT9LD6EwBwIVXEggPz/1HkxQgjlek0ovlHSCE= </data> </dict> <key>CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib</key> <dict> <key>hash</key> <data> - D+EJEHXkJmaaWB/w08GWaja8q3s= + XMok8vDfArEptCvkn+RMLVR7/jY= </data> <key>hash2</key> <data> - RUdDZjLMYIChaInxaVTuyuXJjWaAFqR8xz4ZvQ3nhCE= + h65aEdQkRZQfBfcDGeLs5IbMsabOIbaJhUUSkUzA7KQ= </data> </dict> <key>CDVLaunchScreen.storyboardc/Info.plist</key> @@ -988,11 +992,11 @@ <dict> <key>hash</key> <data> - bFSMoRveX2aBqeUdkf0uy4PuTfA= + GveA29qcysevL9K+WnrL9F0q1Xg= </data> <key>hash2</key> <data> - ay2HWexwhjN0zP60fqyWS7DTwYkAdh89o2eDaw700/c= + nHTJvX2N7mYbW0cvu6MqCoYpfTfUnAYLEUOT9GusDPQ= </data> </dict> <key>CDVNotification.bundle/beep.wav</key> @@ -1164,11 +1168,11 @@ <dict> <key>hash</key> <data> - PeG6ti4cP+KBD7UrAy+UNr7c2ag= + IxKIz0YfQPNN+CNVoYnjomRkX9M= </data> <key>hash2</key> <data> - 6XyM1ywOCW44jmLU3QOx9rKkYEIaAIdVlIjhJNdu9ZQ= + 9RKL7UWJyeLf50AjlnJsz3PLrbW7BxElXWroJXPfh2o= </data> </dict> <key>archived-expanded-entitlements.xcent</key> @@ -1186,11 +1190,11 @@ <dict> <key>hash</key> <data> - 7YMtI91Z2wAAPOG+6xRBFdqcjxs= + 4Kd5MyqaGCYxA8ZPfFVxOuSGEOI= </data> <key>hash2</key> <data> - qsB4PNWHbi11YpRd12vksSqE6cd9wUUB+Li5yTqS3iE= + p+pxXEAIbVFNAwFwn63PKQGWbgrIXdl0Pup8XBimc2c= </data> </dict> <key>embedded.mobileprovision</key> @@ -1241,11 +1245,11 @@ <dict> <key>hash</key> <data> - GDPKC9IXQ7d+cXYCJDwfVM0bsK0= + NV8qo242MHKzuAtDp77aqJksvZo= </data> <key>hash2</key> <data> - 7ZSaz29vr68YvDEfSkWNBWEcnjjw7rHfJ5Ym/Jx1r3o= + 74a5FyW/xzc7bbQ9F0EVKBim3tOCb2beVzfdRRg/hfk= </data> </dict> <key>www/css/account.css</key> @@ -1439,11 +1443,11 @@ <dict> <key>hash</key> <data> - 4hSh6NJLuzHKgsQdhOHFsDdrYzw= + bb7+YzPvUafZeDDeLssmEeR+m5Y= </data> <key>hash2</key> <data> - tsgmNkmV0VZ32vL2LL7P+orl/qg4HkH8u2R9gxz3ZhQ= + aCppewKGWTTfbOS3m6hhUMPCcrQDjf8FAGmWauRasjg= </data> </dict> <key>www/css/products.css</key> @@ -2667,6 +2671,17 @@ YSn19P0zRIG9MxdesT37iqYB1WqXVOFIXyjmnTn6foU= </data> </dict> + <key>www/plugins/cordova-plugin-statusbar/www/statusbar.js</key> + <dict> + <key>hash</key> + <data> + hDT++3ZaOTp3t16AAFAibxtovj0= + </data> + <key>hash2</key> + <data> + JVFddhH/G0jM/7U0DOdpW1CvUNswIGcQB9WylyRtCBM= + </data> + </dict> <key>www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js</key> <dict> <key>hash</key> diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/config.xml b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/config.xml index a224bc56..409c6a57 100755 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/config.xml +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/config.xml @@ -50,6 +50,10 @@ <feature name="UniversalAnalytics"> <param name="ios-package" value="UniversalAnalyticsPlugin" /> </feature> + <feature name="StatusBar"> + <param name="ios-package" value="CDVStatusBar" /> + <param name="onload" value="true" /> + </feature> <name>Stone Island</name> <description> Stone Island @@ -80,12 +84,12 @@ <preference name="PageLength" value="0" /> <preference name="PaginationBreakingMode" value="page" /> <preference name="PaginationMode" value="unpaginated" /> + <preference name="StatusBarOverlaysWebView" value="false" /> + <preference name="StatusBarStyle" value="default" /> <preference name="TopActivityIndicator" value="white" /> <preference name="HideKeyboardFormAccessoryBar" value="false" /> <preference name="orientation" value="portrait" /> - <preference name="StatusBarOverlaysWebView" value="false" /> - <preference name="StatusBarBackgroundColor" value="#000000" /> - <preference name="StatusBarStyle" value="lightcontent" /> + <preference name="StatusBarBackgroundColor" value="#ffffff" /> <preference name="SplashMaintainAspectRatio" value="true" /> <preference name="ShowSplashScreenSpinner" value="false" /> <preference name="AutoHideSplashScreen" value="false" /> diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/cordova_plugins.js b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/cordova_plugins.js index 878291ea..e80f5bbb 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/cordova_plugins.js +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/cordova_plugins.js @@ -139,6 +139,14 @@ module.exports = [ "analytics", "ga" ] + }, + { + "id": "cordova-plugin-statusbar.statusbar", + "file": "plugins/cordova-plugin-statusbar/www/statusbar.js", + "pluginId": "cordova-plugin-statusbar", + "clobbers": [ + "window.StatusBar" + ] } ]; module.exports.metadata = @@ -157,7 +165,8 @@ module.exports.metadata = "cordova-plugin-x-socialsharing": "5.1.3", "ionic-plugin-keyboard": "2.2.1", "phonegap-plugin-push": "1.9.2", - "cordova-plugin-google-analytics": "1.8.3" + "cordova-plugin-google-analytics": "1.8.3", + "cordova-plugin-statusbar": "2.2.3" }; // BOTTOM OF METADATA });
\ No newline at end of file diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/css/nav.css b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/css/nav.css index 9445f5cb..aee8e21c 100755 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/css/nav.css +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/css/nav.css @@ -17,8 +17,8 @@ -webkit-transform: translateZ(0) translateX(0px); -webkit-transition: -webkit-transform 0.1s; } -.ios #nav, -.ios #content { +.oldios #nav, +.oldios #content { top: 20px; height: -webkit-calc(100% - 20px); } diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/plugins/cordova-plugin-statusbar/www/statusbar.js b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/plugins/cordova-plugin-statusbar/www/statusbar.js new file mode 100644 index 00000000..708186f9 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/plugins/cordova-plugin-statusbar/www/statusbar.js @@ -0,0 +1,116 @@ +cordova.define("cordova-plugin-statusbar.statusbar", function(require, exports, module) { +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +/* global cordova */ + +var exec = require('cordova/exec'); + +var namedColors = { + "black": "#000000", + "darkGray": "#A9A9A9", + "lightGray": "#D3D3D3", + "white": "#FFFFFF", + "gray": "#808080", + "red": "#FF0000", + "green": "#00FF00", + "blue": "#0000FF", + "cyan": "#00FFFF", + "yellow": "#FFFF00", + "magenta": "#FF00FF", + "orange": "#FFA500", + "purple": "#800080", + "brown": "#A52A2A" +}; + +var StatusBar = { + + isVisible: true, + + overlaysWebView: function (doOverlay) { + exec(null, null, "StatusBar", "overlaysWebView", [doOverlay]); + }, + + styleDefault: function () { + // dark text ( to be used on a light background ) + exec(null, null, "StatusBar", "styleDefault", []); + }, + + styleLightContent: function () { + // light text ( to be used on a dark background ) + exec(null, null, "StatusBar", "styleLightContent", []); + }, + + styleBlackTranslucent: function () { + // #88000000 ? Apple says to use lightContent instead + exec(null, null, "StatusBar", "styleBlackTranslucent", []); + }, + + styleBlackOpaque: function () { + // #FF000000 ? Apple says to use lightContent instead + exec(null, null, "StatusBar", "styleBlackOpaque", []); + }, + + backgroundColorByName: function (colorname) { + return StatusBar.backgroundColorByHexString(namedColors[colorname]); + }, + + backgroundColorByHexString: function (hexString) { + if (hexString.charAt(0) !== "#") { + hexString = "#" + hexString; + } + + if (hexString.length === 4) { + var split = hexString.split(""); + hexString = "#" + split[1] + split[1] + split[2] + split[2] + split[3] + split[3]; + } + + exec(null, null, "StatusBar", "backgroundColorByHexString", [hexString]); + }, + + hide: function () { + exec(null, null, "StatusBar", "hide", []); + StatusBar.isVisible = false; + }, + + show: function () { + exec(null, null, "StatusBar", "show", []); + StatusBar.isVisible = true; + } + +}; + +// prime it. setTimeout so that proxy gets time to init +window.setTimeout(function () { + exec(function (res) { + if (typeof res == 'object') { + if (res.type == 'tap') { + cordova.fireWindowEvent('statusTap'); + } + } else { + StatusBar.isVisible = res; + } + }, null, "StatusBar", "_ready", []); +}, 0); + +module.exports = StatusBar; + +}); diff --git a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.pbxproj b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.pbxproj index d5055b28..9124f869 100755 --- a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.pbxproj +++ b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.pbxproj @@ -5,7 +5,6 @@ }; objectVersion = 46; objects = { - /* Begin PBXBuildFile section */ 0207DA581B56EA530066E2B4 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0207DA571B56EA530066E2B4 /* Images.xcassets */; }; 0245BD3C98FD4F04A11BBCAA /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A4D6FDE815144E3BC47859B /* libsqlite3.dylib */; }; @@ -46,6 +45,7 @@ EF28FE2B49A344FBA3F7306F /* CDVInAppBrowser.m in Sources */ = {isa = PBXBuildFile; fileRef = 729B6141DF9D4C1BB64A7097 /* CDVInAppBrowser.m */; }; F4862C5594894163A3C3AB06 /* CDVConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E7CCBA15DC14F20830BD1B3 /* CDVConnection.m */; }; F990B4C12C3746EAA8C30F8D /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 6465D215A1B148A387730F27 /* libz.tbd */; }; + 9DF0159ECE654EF1921606B9 /* CDVStatusBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CDFA08638E64E9F9CDB1109 /* CDVStatusBar.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -143,6 +143,8 @@ F840E1F0165FE0F500CFE078 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = "Stone Island/config.xml"; sourceTree = "<group>"; }; FCCC22BF4385472E88382D56 /* MessageUI.framework */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; }; FFB5E8C21AD14D10A7088119 /* UniversalAnalyticsPlugin.m */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.objc; name = UniversalAnalyticsPlugin.m; path = "cordova-plugin-google-analytics/UniversalAnalyticsPlugin.m"; sourceTree = "<group>"; }; + 4CDFA08638E64E9F9CDB1109 /* CDVStatusBar.m */ = {isa = PBXFileReference; name = "CDVStatusBar.m"; path = "cordova-plugin-statusbar/CDVStatusBar.m"; sourceTree = "<group>"; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; explicitFileType = undefined; includeInIndex = 0; }; + 80A8B3832B6347E09B3FB7EF /* CDVStatusBar.h */ = {isa = PBXFileReference; name = "CDVStatusBar.h"; path = "cordova-plugin-statusbar/CDVStatusBar.h"; sourceTree = "<group>"; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; explicitFileType = undefined; includeInIndex = 0; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -320,6 +322,8 @@ CAAD7EE259C942989156C616 /* GAIEcommerceProduct.h */, 8A49AF7CDE3040039CE14E5A /* GAIEcommerceProductAction.h */, E2AFABA192234A0E9C198427 /* GAIEcommercePromotion.h */, + 4CDFA08638E64E9F9CDB1109 /* CDVStatusBar.m */, + 80A8B3832B6347E09B3FB7EF /* CDVStatusBar.h */, ); name = Plugins; path = "Stone Island/Plugins"; @@ -372,7 +376,7 @@ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0900; + LastUpgradeCheck = 900; TargetAttributes = { 1D6058900D05DD3D006BFB54 = { DevelopmentTeam = C6JQTPGJ97; @@ -513,6 +517,7 @@ 35DC9CF8FDC24E6DA829674B /* AppDelegate+notification.m in Sources */, 76C30D264E504728A7F0FD0C /* PushPlugin.m in Sources */, EE465A3641884122A7088AC5 /* UniversalAnalyticsPlugin.m in Sources */, + 9DF0159ECE654EF1921606B9 /* CDVStatusBar.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate b/StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate Binary files differindex c32d51dc..cf672db4 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate +++ b/StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-statusbar/CDVStatusBar.h b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-statusbar/CDVStatusBar.h new file mode 100644 index 00000000..0be08cc3 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-statusbar/CDVStatusBar.h @@ -0,0 +1,50 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import <Cordova/CDVPlugin.h> +#import <Cordova/CDVInvokedUrlCommand.h> + +@interface CDVStatusBar : CDVPlugin { + @protected + BOOL _statusBarOverlaysWebView; + UIView* _statusBarBackgroundView; + BOOL _uiviewControllerBasedStatusBarAppearance; + UIColor* _statusBarBackgroundColor; + NSString* _eventsCallbackId; +} + +@property (atomic, assign) BOOL statusBarOverlaysWebView; +@property (atomic, assign) BOOL statusBarVisible; + +- (void) overlaysWebView:(CDVInvokedUrlCommand*)command; + +- (void) styleDefault:(CDVInvokedUrlCommand*)command; +- (void) styleLightContent:(CDVInvokedUrlCommand*)command; +- (void) styleBlackTranslucent:(CDVInvokedUrlCommand*)command; +- (void) styleBlackOpaque:(CDVInvokedUrlCommand*)command; + +- (void) backgroundColorByName:(CDVInvokedUrlCommand*)command; +- (void) backgroundColorByHexString:(CDVInvokedUrlCommand*)command; + +- (void) hide:(CDVInvokedUrlCommand*)command; +- (void) show:(CDVInvokedUrlCommand*)command; + +- (void) _ready:(CDVInvokedUrlCommand*)command; + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-statusbar/CDVStatusBar.m b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-statusbar/CDVStatusBar.m new file mode 100644 index 00000000..58fbc296 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-statusbar/CDVStatusBar.m @@ -0,0 +1,501 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +/* + NOTE: plugman/cordova cli should have already installed this, + but you need the value UIViewControllerBasedStatusBarAppearance + in your Info.plist as well to set the styles in iOS 7 + */ + +#import "CDVStatusBar.h" +#import <objc/runtime.h> +#import <Cordova/CDVViewController.h> + +static const void *kHideStatusBar = &kHideStatusBar; +static const void *kStatusBarStyle = &kStatusBarStyle; + +@interface CDVViewController (StatusBar) + +@property (nonatomic, retain) id sb_hideStatusBar; +@property (nonatomic, retain) id sb_statusBarStyle; + +@end + +@implementation CDVViewController (StatusBar) + +@dynamic sb_hideStatusBar; +@dynamic sb_statusBarStyle; + +- (id)sb_hideStatusBar { + return objc_getAssociatedObject(self, kHideStatusBar); +} + +- (void)setSb_hideStatusBar:(id)newHideStatusBar { + objc_setAssociatedObject(self, kHideStatusBar, newHideStatusBar, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +- (id)sb_statusBarStyle { + return objc_getAssociatedObject(self, kStatusBarStyle); +} + +- (void)setSb_statusBarStyle:(id)newStatusBarStyle { + objc_setAssociatedObject(self, kStatusBarStyle, newStatusBarStyle, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +- (BOOL) prefersStatusBarHidden { + return [self.sb_hideStatusBar boolValue]; +} + +- (UIStatusBarStyle)preferredStatusBarStyle +{ + return (UIStatusBarStyle)[self.sb_statusBarStyle intValue]; +} + +@end + + +@interface CDVStatusBar () <UIScrollViewDelegate> +- (void)fireTappedEvent; +- (void)updateIsVisible:(BOOL)visible; +@end + +@implementation CDVStatusBar + +- (id)settingForKey:(NSString*)key +{ + return [self.commandDelegate.settings objectForKey:[key lowercaseString]]; +} + +- (void)observeValueForKeyPath:(NSString*)keyPath ofObject:(id)object change:(NSDictionary*)change context:(void*)context +{ + if ([keyPath isEqual:@"statusBarHidden"]) { + NSNumber* newValue = [change objectForKey:NSKeyValueChangeNewKey]; + [self updateIsVisible:![newValue boolValue]]; + } +} + +-(void)cordovaViewWillAppear:(NSNotification*)notification +{ + [self resizeWebView]; +} + +-(void)statusBarDidChangeFrame:(NSNotification*)notification +{ + //add a small delay for iOS 7 ( 0.1 seconds ) + __weak CDVStatusBar* weakSelf = self; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ + [weakSelf resizeWebView]; + }); +} + +- (void)pluginInitialize +{ + BOOL isiOS7 = (IsAtLeastiOSVersion(@"7.0")); + + // init + NSNumber* uiviewControllerBasedStatusBarAppearance = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIViewControllerBasedStatusBarAppearance"]; + _uiviewControllerBasedStatusBarAppearance = (uiviewControllerBasedStatusBarAppearance == nil || [uiviewControllerBasedStatusBarAppearance boolValue]) && isiOS7; + + // observe the statusBarHidden property + [[UIApplication sharedApplication] addObserver:self forKeyPath:@"statusBarHidden" options:NSKeyValueObservingOptionNew context:NULL]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(statusBarDidChangeFrame:) name: UIApplicationDidChangeStatusBarFrameNotification object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(cordovaViewWillAppear:) name: @"CDVViewWillAppearNotification" object:nil]; + + _statusBarOverlaysWebView = YES; // default + + [self initializeStatusBarBackgroundView]; + + self.viewController.view.autoresizesSubviews = YES; + + NSString* setting; + + setting = @"StatusBarBackgroundColor"; + if ([self settingForKey:setting]) { + [self _backgroundColorByHexString:[self settingForKey:setting]]; + } + + setting = @"StatusBarStyle"; + if ([self settingForKey:setting]) { + [self setStatusBarStyle:[self settingForKey:setting]]; + } + + // blank scroll view to intercept status bar taps + self.webView.scrollView.scrollsToTop = NO; + UIScrollView *fakeScrollView = [[UIScrollView alloc] initWithFrame:UIScreen.mainScreen.bounds]; + fakeScrollView.delegate = self; + fakeScrollView.scrollsToTop = YES; + [self.viewController.view addSubview:fakeScrollView]; // Add scrollview to the view heirarchy so that it will begin accepting status bar taps + [self.viewController.view sendSubviewToBack:fakeScrollView]; // Send it to the very back of the view heirarchy + fakeScrollView.contentSize = CGSizeMake(UIScreen.mainScreen.bounds.size.width, UIScreen.mainScreen.bounds.size.height * 2.0f); // Make the scroll view longer than the screen itself + fakeScrollView.contentOffset = CGPointMake(0.0f, UIScreen.mainScreen.bounds.size.height); // Scroll down so a tap will take scroll view back to the top + + _statusBarVisible = ![UIApplication sharedApplication].isStatusBarHidden; +} + +- (void)onReset { + _eventsCallbackId = nil; +} + +- (void)fireTappedEvent { + if (_eventsCallbackId == nil) { + return; + } + NSDictionary* payload = @{@"type": @"tap"}; + CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:payload]; + [result setKeepCallbackAsBool:YES]; + [self.commandDelegate sendPluginResult:result callbackId:_eventsCallbackId]; +} + +- (void)updateIsVisible:(BOOL)visible { + if (_eventsCallbackId == nil) { + return; + } + CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:visible]; + [result setKeepCallbackAsBool:YES]; + [self.commandDelegate sendPluginResult:result callbackId:_eventsCallbackId]; +} + +- (void) _ready:(CDVInvokedUrlCommand*)command +{ + _eventsCallbackId = command.callbackId; + [self updateIsVisible:![UIApplication sharedApplication].statusBarHidden]; + NSString* setting = @"StatusBarOverlaysWebView"; + if ([self settingForKey:setting]) { + self.statusBarOverlaysWebView = [(NSNumber*)[self settingForKey:setting] boolValue]; + if (self.statusBarOverlaysWebView) { + [self resizeWebView]; + } + } +} + +- (void) initializeStatusBarBackgroundView +{ + CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame; + + if ([[UIApplication sharedApplication]statusBarOrientation] == UIInterfaceOrientationPortraitUpsideDown && + statusBarFrame.size.height + statusBarFrame.origin.y == [self.viewController.view.window bounds].size.height) { + + // When started in upside-down orientation on iOS 7, status bar will be bound to lower edge of the + // screen (statusBarFrame.origin.y will be somewhere around screen height). In this case we need to + // correct frame's coordinates + statusBarFrame.origin.y = 0; + } + + statusBarFrame = [self invertFrameIfNeeded:statusBarFrame]; + + _statusBarBackgroundView = [[UIView alloc] initWithFrame:statusBarFrame]; + _statusBarBackgroundView.backgroundColor = _statusBarBackgroundColor; + _statusBarBackgroundView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin); + _statusBarBackgroundView.autoresizesSubviews = YES; +} + +- (CGRect) invertFrameIfNeeded:(CGRect)rect { + // landscape is where (width > height). On iOS < 8, we need to invert since frames are + // always in Portrait context. Do not run this on ios 8 or above to avoid breaking ipad pro multitask layout + if (!IsAtLeastiOSVersion(@"8.0") && UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])) { + CGFloat temp = rect.size.width; + rect.size.width = rect.size.height; + rect.size.height = temp; + rect.origin = CGPointZero; + } + + return rect; +} + +- (void) setStatusBarOverlaysWebView:(BOOL)statusBarOverlaysWebView +{ + // we only care about the latest iOS version or a change in setting + if (!IsAtLeastiOSVersion(@"7.0") || statusBarOverlaysWebView == _statusBarOverlaysWebView) { + return; + } + + _statusBarOverlaysWebView = statusBarOverlaysWebView; + + [self resizeWebView]; + + if (statusBarOverlaysWebView) { + + [_statusBarBackgroundView removeFromSuperview]; + + } else { + + [self initializeStatusBarBackgroundView]; + [self.webView.superview addSubview:_statusBarBackgroundView]; + + } + +} + +- (BOOL) statusBarOverlaysWebView +{ + return _statusBarOverlaysWebView; +} + +- (void) overlaysWebView:(CDVInvokedUrlCommand*)command +{ + id value = [command argumentAtIndex:0]; + if (!([value isKindOfClass:[NSNumber class]])) { + value = [NSNumber numberWithBool:YES]; + } + + self.statusBarOverlaysWebView = [value boolValue]; +} + +- (void) refreshStatusBarAppearance +{ + SEL sel = NSSelectorFromString(@"setNeedsStatusBarAppearanceUpdate"); + if ([self.viewController respondsToSelector:sel]) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-performSelector-leaks" + [self.viewController performSelector:sel withObject:nil]; +#pragma clang diagnostic pop + } +} + +- (void) setStyleForStatusBar:(UIStatusBarStyle)style +{ + if (_uiviewControllerBasedStatusBarAppearance) { + CDVViewController* vc = (CDVViewController*)self.viewController; + vc.sb_statusBarStyle = [NSNumber numberWithInt:style]; + [self refreshStatusBarAppearance]; + + } else { + [[UIApplication sharedApplication] setStatusBarStyle:style]; + } +} + +- (void) setStatusBarStyle:(NSString*)statusBarStyle +{ + // default, lightContent, blackTranslucent, blackOpaque + NSString* lcStatusBarStyle = [statusBarStyle lowercaseString]; + + if ([lcStatusBarStyle isEqualToString:@"default"]) { + [self styleDefault:nil]; + } else if ([lcStatusBarStyle isEqualToString:@"lightcontent"]) { + [self styleLightContent:nil]; + } else if ([lcStatusBarStyle isEqualToString:@"blacktranslucent"]) { + [self styleBlackTranslucent:nil]; + } else if ([lcStatusBarStyle isEqualToString:@"blackopaque"]) { + [self styleBlackOpaque:nil]; + } +} + +- (void) styleDefault:(CDVInvokedUrlCommand*)command +{ + [self setStyleForStatusBar:UIStatusBarStyleDefault]; +} + +- (void) styleLightContent:(CDVInvokedUrlCommand*)command +{ + [self setStyleForStatusBar:UIStatusBarStyleLightContent]; +} + +- (void) styleBlackTranslucent:(CDVInvokedUrlCommand*)command +{ + #if __IPHONE_OS_VERSION_MAX_ALLOWED < 70000 + # define TRANSLUCENT_STYLE UIStatusBarStyleBlackTranslucent + #else + # define TRANSLUCENT_STYLE UIStatusBarStyleLightContent + #endif + [self setStyleForStatusBar:TRANSLUCENT_STYLE]; +} + +- (void) styleBlackOpaque:(CDVInvokedUrlCommand*)command +{ + #if __IPHONE_OS_VERSION_MAX_ALLOWED < 70000 + # define OPAQUE_STYLE UIStatusBarStyleBlackOpaque + #else + # define OPAQUE_STYLE UIStatusBarStyleLightContent + #endif + [self setStyleForStatusBar:OPAQUE_STYLE]; +} + +- (void) backgroundColorByName:(CDVInvokedUrlCommand*)command +{ + id value = [command argumentAtIndex:0]; + if (!([value isKindOfClass:[NSString class]])) { + value = @"black"; + } + + SEL selector = NSSelectorFromString([value stringByAppendingString:@"Color"]); + if ([UIColor respondsToSelector:selector]) { + _statusBarBackgroundView.backgroundColor = [UIColor performSelector:selector]; + } +} + +- (void) _backgroundColorByHexString:(NSString*)hexString +{ + unsigned int rgbValue = 0; + NSScanner* scanner = [NSScanner scannerWithString:hexString]; + [scanner setScanLocation:1]; + [scanner scanHexInt:&rgbValue]; + + _statusBarBackgroundColor = [UIColor colorWithRed:((rgbValue & 0xFF0000) >> 16)/255.0 green:((rgbValue & 0xFF00) >> 8)/255.0 blue:(rgbValue & 0xFF)/255.0 alpha:1.0]; + _statusBarBackgroundView.backgroundColor = _statusBarBackgroundColor; +} + +- (void) backgroundColorByHexString:(CDVInvokedUrlCommand*)command +{ + NSString* value = [command argumentAtIndex:0]; + if (!([value isKindOfClass:[NSString class]])) { + value = @"#000000"; + } + + if (![value hasPrefix:@"#"] || [value length] < 7) { + return; + } + + [self _backgroundColorByHexString:value]; +} + +- (void) hideStatusBar +{ + if (_uiviewControllerBasedStatusBarAppearance) { + CDVViewController* vc = (CDVViewController*)self.viewController; + vc.sb_hideStatusBar = [NSNumber numberWithBool:YES]; + [self refreshStatusBarAppearance]; + + } else { + UIApplication* app = [UIApplication sharedApplication]; + [app setStatusBarHidden:YES]; + } +} + +- (void) hide:(CDVInvokedUrlCommand*)command +{ + _statusBarVisible = NO; + UIApplication* app = [UIApplication sharedApplication]; + + if (!app.isStatusBarHidden) + { + + [self hideStatusBar]; + + if (IsAtLeastiOSVersion(@"7.0")) { + [_statusBarBackgroundView removeFromSuperview]; + } + + [self resizeWebView]; + + _statusBarBackgroundView.hidden = YES; + } +} + +- (void) showStatusBar +{ + if (_uiviewControllerBasedStatusBarAppearance) { + CDVViewController* vc = (CDVViewController*)self.viewController; + vc.sb_hideStatusBar = [NSNumber numberWithBool:NO]; + [self refreshStatusBarAppearance]; + + } else { + UIApplication* app = [UIApplication sharedApplication]; + [app setStatusBarHidden:NO]; + } +} + +- (void) show:(CDVInvokedUrlCommand*)command +{ + _statusBarVisible = YES; + UIApplication* app = [UIApplication sharedApplication]; + + if (app.isStatusBarHidden) + { + BOOL isIOS7 = (IsAtLeastiOSVersion(@"7.0")); + + [self showStatusBar]; + [self resizeWebView]; + + if (isIOS7) { + + if (!self.statusBarOverlaysWebView) { + + // there is a possibility that when the statusbar was hidden, it was in a different orientation + // from the current one. Therefore we need to expand the statusBarBackgroundView as well to the + // statusBar's current size + CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame; + statusBarFrame = [self invertFrameIfNeeded:statusBarFrame]; + CGRect sbBgFrame = _statusBarBackgroundView.frame; + sbBgFrame.size = statusBarFrame.size; + _statusBarBackgroundView.frame = sbBgFrame; + [self.webView.superview addSubview:_statusBarBackgroundView]; + + } + + } + + _statusBarBackgroundView.hidden = NO; + } +} + +-(void)resizeWebView +{ + BOOL isIOS7 = (IsAtLeastiOSVersion(@"7.0")); + + if (isIOS7) { + CGRect bounds = [self.viewController.view.window bounds]; + if (CGRectEqualToRect(bounds, CGRectZero)) { + bounds = [[UIScreen mainScreen] bounds]; + } + bounds = [self invertFrameIfNeeded:bounds]; + + self.viewController.view.frame = bounds; + + self.webView.frame = bounds; + + CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame; + statusBarFrame = [self invertFrameIfNeeded:statusBarFrame]; + CGRect frame = self.webView.frame; + CGFloat height = statusBarFrame.size.height; + + if (!self.statusBarOverlaysWebView) { + if (_statusBarVisible) { + // CB-10158 If a full screen video is playing the status bar height will be 0, set it to 20 if _statusBarVisible + frame.origin.y = height > 0 ? height: 20; + } + } else { + // Even if overlay is used, we want to handle in-call/recording/hotspot larger status bar + frame.origin.y = height >= 20 ? height - 20 : 0; + } + frame.size.height -= frame.origin.y; + self.webView.frame = frame; + } else { + CGRect bounds = [[UIScreen mainScreen] applicationFrame]; + self.viewController.view.frame = bounds; + } +} + +- (void) dealloc +{ + [[UIApplication sharedApplication] removeObserver:self forKeyPath:@"statusBarHidden"]; + [[NSNotificationCenter defaultCenter]removeObserver:self name:UIApplicationDidChangeStatusBarOrientationNotification object:nil]; +} + + +#pragma mark - UIScrollViewDelegate + +- (BOOL)scrollViewShouldScrollToTop:(UIScrollView *)scrollView +{ + [self fireTappedEvent]; + return NO; +} + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/config.xml b/StoneIsland/platforms/ios/Stone Island/config.xml index a224bc56..409c6a57 100755 --- a/StoneIsland/platforms/ios/Stone Island/config.xml +++ b/StoneIsland/platforms/ios/Stone Island/config.xml @@ -50,6 +50,10 @@ <feature name="UniversalAnalytics"> <param name="ios-package" value="UniversalAnalyticsPlugin" /> </feature> + <feature name="StatusBar"> + <param name="ios-package" value="CDVStatusBar" /> + <param name="onload" value="true" /> + </feature> <name>Stone Island</name> <description> Stone Island @@ -80,12 +84,12 @@ <preference name="PageLength" value="0" /> <preference name="PaginationBreakingMode" value="page" /> <preference name="PaginationMode" value="unpaginated" /> + <preference name="StatusBarOverlaysWebView" value="false" /> + <preference name="StatusBarStyle" value="default" /> <preference name="TopActivityIndicator" value="white" /> <preference name="HideKeyboardFormAccessoryBar" value="false" /> <preference name="orientation" value="portrait" /> - <preference name="StatusBarOverlaysWebView" value="false" /> - <preference name="StatusBarBackgroundColor" value="#000000" /> - <preference name="StatusBarStyle" value="lightcontent" /> + <preference name="StatusBarBackgroundColor" value="#ffffff" /> <preference name="SplashMaintainAspectRatio" value="true" /> <preference name="ShowSplashScreenSpinner" value="false" /> <preference name="AutoHideSplashScreen" value="false" /> diff --git a/StoneIsland/platforms/ios/ios.json b/StoneIsland/platforms/ios/ios.json index 800f8e02..741c049c 100644 --- a/StoneIsland/platforms/ios/ios.json +++ b/StoneIsland/platforms/ios/ios.json @@ -51,6 +51,18 @@ { "xml": "<feature name=\"UniversalAnalytics\"><param name=\"ios-package\" value=\"UniversalAnalyticsPlugin\" /></feature>", "count": 1 + }, + { + "xml": "<feature name=\"StatusBar\"><param name=\"ios-package\" value=\"CDVStatusBar\" /><param name=\"onload\" value=\"true\" /></feature>", + "count": 1 + }, + { + "xml": "<preference name=\"StatusBarOverlaysWebView\" value=\"true\" />", + "count": 1 + }, + { + "xml": "<preference name=\"StatusBarStyle\" value=\"lightcontent\" />", + "count": 1 } ] } @@ -155,6 +167,9 @@ }, "cordova-plugin-google-analytics": { "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "cordova-plugin-statusbar": { + "PACKAGE_NAME": "us.okfoc.stoneisland" } }, "dependent_plugins": {}, @@ -298,6 +313,14 @@ "analytics", "ga" ] + }, + { + "id": "cordova-plugin-statusbar.statusbar", + "file": "plugins/cordova-plugin-statusbar/www/statusbar.js", + "pluginId": "cordova-plugin-statusbar", + "clobbers": [ + "window.StatusBar" + ] } ], "plugin_metadata": { @@ -314,6 +337,7 @@ "cordova-plugin-x-socialsharing": "5.1.3", "ionic-plugin-keyboard": "2.2.1", "phonegap-plugin-push": "1.9.2", - "cordova-plugin-google-analytics": "1.8.3" + "cordova-plugin-google-analytics": "1.8.3", + "cordova-plugin-statusbar": "2.2.3" } }
\ No newline at end of file diff --git a/StoneIsland/platforms/ios/platform_www/cordova_plugins.js b/StoneIsland/platforms/ios/platform_www/cordova_plugins.js index 878291ea..e80f5bbb 100644 --- a/StoneIsland/platforms/ios/platform_www/cordova_plugins.js +++ b/StoneIsland/platforms/ios/platform_www/cordova_plugins.js @@ -139,6 +139,14 @@ module.exports = [ "analytics", "ga" ] + }, + { + "id": "cordova-plugin-statusbar.statusbar", + "file": "plugins/cordova-plugin-statusbar/www/statusbar.js", + "pluginId": "cordova-plugin-statusbar", + "clobbers": [ + "window.StatusBar" + ] } ]; module.exports.metadata = @@ -157,7 +165,8 @@ module.exports.metadata = "cordova-plugin-x-socialsharing": "5.1.3", "ionic-plugin-keyboard": "2.2.1", "phonegap-plugin-push": "1.9.2", - "cordova-plugin-google-analytics": "1.8.3" + "cordova-plugin-google-analytics": "1.8.3", + "cordova-plugin-statusbar": "2.2.3" }; // BOTTOM OF METADATA });
\ No newline at end of file diff --git a/StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-statusbar/www/statusbar.js b/StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-statusbar/www/statusbar.js new file mode 100644 index 00000000..708186f9 --- /dev/null +++ b/StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-statusbar/www/statusbar.js @@ -0,0 +1,116 @@ +cordova.define("cordova-plugin-statusbar.statusbar", function(require, exports, module) { +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +/* global cordova */ + +var exec = require('cordova/exec'); + +var namedColors = { + "black": "#000000", + "darkGray": "#A9A9A9", + "lightGray": "#D3D3D3", + "white": "#FFFFFF", + "gray": "#808080", + "red": "#FF0000", + "green": "#00FF00", + "blue": "#0000FF", + "cyan": "#00FFFF", + "yellow": "#FFFF00", + "magenta": "#FF00FF", + "orange": "#FFA500", + "purple": "#800080", + "brown": "#A52A2A" +}; + +var StatusBar = { + + isVisible: true, + + overlaysWebView: function (doOverlay) { + exec(null, null, "StatusBar", "overlaysWebView", [doOverlay]); + }, + + styleDefault: function () { + // dark text ( to be used on a light background ) + exec(null, null, "StatusBar", "styleDefault", []); + }, + + styleLightContent: function () { + // light text ( to be used on a dark background ) + exec(null, null, "StatusBar", "styleLightContent", []); + }, + + styleBlackTranslucent: function () { + // #88000000 ? Apple says to use lightContent instead + exec(null, null, "StatusBar", "styleBlackTranslucent", []); + }, + + styleBlackOpaque: function () { + // #FF000000 ? Apple says to use lightContent instead + exec(null, null, "StatusBar", "styleBlackOpaque", []); + }, + + backgroundColorByName: function (colorname) { + return StatusBar.backgroundColorByHexString(namedColors[colorname]); + }, + + backgroundColorByHexString: function (hexString) { + if (hexString.charAt(0) !== "#") { + hexString = "#" + hexString; + } + + if (hexString.length === 4) { + var split = hexString.split(""); + hexString = "#" + split[1] + split[1] + split[2] + split[2] + split[3] + split[3]; + } + + exec(null, null, "StatusBar", "backgroundColorByHexString", [hexString]); + }, + + hide: function () { + exec(null, null, "StatusBar", "hide", []); + StatusBar.isVisible = false; + }, + + show: function () { + exec(null, null, "StatusBar", "show", []); + StatusBar.isVisible = true; + } + +}; + +// prime it. setTimeout so that proxy gets time to init +window.setTimeout(function () { + exec(function (res) { + if (typeof res == 'object') { + if (res.type == 'tap') { + cordova.fireWindowEvent('statusTap'); + } + } else { + StatusBar.isVisible = res; + } + }, null, "StatusBar", "_ready", []); +}, 0); + +module.exports = StatusBar; + +}); diff --git a/StoneIsland/platforms/ios/www/cordova_plugins.js b/StoneIsland/platforms/ios/www/cordova_plugins.js index 878291ea..e80f5bbb 100644 --- a/StoneIsland/platforms/ios/www/cordova_plugins.js +++ b/StoneIsland/platforms/ios/www/cordova_plugins.js @@ -139,6 +139,14 @@ module.exports = [ "analytics", "ga" ] + }, + { + "id": "cordova-plugin-statusbar.statusbar", + "file": "plugins/cordova-plugin-statusbar/www/statusbar.js", + "pluginId": "cordova-plugin-statusbar", + "clobbers": [ + "window.StatusBar" + ] } ]; module.exports.metadata = @@ -157,7 +165,8 @@ module.exports.metadata = "cordova-plugin-x-socialsharing": "5.1.3", "ionic-plugin-keyboard": "2.2.1", "phonegap-plugin-push": "1.9.2", - "cordova-plugin-google-analytics": "1.8.3" + "cordova-plugin-google-analytics": "1.8.3", + "cordova-plugin-statusbar": "2.2.3" }; // BOTTOM OF METADATA });
\ No newline at end of file diff --git a/StoneIsland/platforms/ios/www/css/nav.css b/StoneIsland/platforms/ios/www/css/nav.css index 9445f5cb..aee8e21c 100755 --- a/StoneIsland/platforms/ios/www/css/nav.css +++ b/StoneIsland/platforms/ios/www/css/nav.css @@ -17,8 +17,8 @@ -webkit-transform: translateZ(0) translateX(0px); -webkit-transition: -webkit-transform 0.1s; } -.ios #nav, -.ios #content { +.oldios #nav, +.oldios #content { top: 20px; height: -webkit-calc(100% - 20px); } diff --git a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-statusbar/www/statusbar.js b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-statusbar/www/statusbar.js new file mode 100644 index 00000000..708186f9 --- /dev/null +++ b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-statusbar/www/statusbar.js @@ -0,0 +1,116 @@ +cordova.define("cordova-plugin-statusbar.statusbar", function(require, exports, module) { +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +/* global cordova */ + +var exec = require('cordova/exec'); + +var namedColors = { + "black": "#000000", + "darkGray": "#A9A9A9", + "lightGray": "#D3D3D3", + "white": "#FFFFFF", + "gray": "#808080", + "red": "#FF0000", + "green": "#00FF00", + "blue": "#0000FF", + "cyan": "#00FFFF", + "yellow": "#FFFF00", + "magenta": "#FF00FF", + "orange": "#FFA500", + "purple": "#800080", + "brown": "#A52A2A" +}; + +var StatusBar = { + + isVisible: true, + + overlaysWebView: function (doOverlay) { + exec(null, null, "StatusBar", "overlaysWebView", [doOverlay]); + }, + + styleDefault: function () { + // dark text ( to be used on a light background ) + exec(null, null, "StatusBar", "styleDefault", []); + }, + + styleLightContent: function () { + // light text ( to be used on a dark background ) + exec(null, null, "StatusBar", "styleLightContent", []); + }, + + styleBlackTranslucent: function () { + // #88000000 ? Apple says to use lightContent instead + exec(null, null, "StatusBar", "styleBlackTranslucent", []); + }, + + styleBlackOpaque: function () { + // #FF000000 ? Apple says to use lightContent instead + exec(null, null, "StatusBar", "styleBlackOpaque", []); + }, + + backgroundColorByName: function (colorname) { + return StatusBar.backgroundColorByHexString(namedColors[colorname]); + }, + + backgroundColorByHexString: function (hexString) { + if (hexString.charAt(0) !== "#") { + hexString = "#" + hexString; + } + + if (hexString.length === 4) { + var split = hexString.split(""); + hexString = "#" + split[1] + split[1] + split[2] + split[2] + split[3] + split[3]; + } + + exec(null, null, "StatusBar", "backgroundColorByHexString", [hexString]); + }, + + hide: function () { + exec(null, null, "StatusBar", "hide", []); + StatusBar.isVisible = false; + }, + + show: function () { + exec(null, null, "StatusBar", "show", []); + StatusBar.isVisible = true; + } + +}; + +// prime it. setTimeout so that proxy gets time to init +window.setTimeout(function () { + exec(function (res) { + if (typeof res == 'object') { + if (res.type == 'tap') { + cordova.fireWindowEvent('statusTap'); + } + } else { + StatusBar.isVisible = res; + } + }, null, "StatusBar", "_ready", []); +}, 0); + +module.exports = StatusBar; + +}); |
