diff options
52 files changed, 2288 insertions, 2149 deletions
diff --git a/StoneIsland/config.xml b/StoneIsland/config.xml index 1e67cfbe..6dad78db 100755 --- a/StoneIsland/config.xml +++ b/StoneIsland/config.xml @@ -86,6 +86,6 @@ <hook src="scripts/plist-hook.js" type="after_prepare" /> </platform> <plugin name="cordova-plugin-sim" spec="^1.3.3" /> - <engine name="android" spec="^6.2.3" /> + <engine name="android" spec="^8.0.0" /> <engine name="ios" spec="^4.5.2" /> </widget> diff --git a/StoneIsland/platforms/android/.gradle/3.3/taskArtifacts/fileHashes.bin b/StoneIsland/platforms/android/.gradle/3.3/taskArtifacts/fileHashes.bin Binary files differindex fcb3c332..cf1d6d8e 100644 --- a/StoneIsland/platforms/android/.gradle/3.3/taskArtifacts/fileHashes.bin +++ b/StoneIsland/platforms/android/.gradle/3.3/taskArtifacts/fileHashes.bin diff --git a/StoneIsland/platforms/android/.gradle/3.3/taskArtifacts/fileSnapshots.bin b/StoneIsland/platforms/android/.gradle/3.3/taskArtifacts/fileSnapshots.bin Binary files differindex 86c9363d..d81b4a62 100644 --- a/StoneIsland/platforms/android/.gradle/3.3/taskArtifacts/fileSnapshots.bin +++ b/StoneIsland/platforms/android/.gradle/3.3/taskArtifacts/fileSnapshots.bin diff --git a/StoneIsland/platforms/android/.gradle/3.3/taskArtifacts/taskArtifacts.bin b/StoneIsland/platforms/android/.gradle/3.3/taskArtifacts/taskArtifacts.bin Binary files differindex fe8f19b3..be4a82e5 100644 --- a/StoneIsland/platforms/android/.gradle/3.3/taskArtifacts/taskArtifacts.bin +++ b/StoneIsland/platforms/android/.gradle/3.3/taskArtifacts/taskArtifacts.bin diff --git a/StoneIsland/platforms/android/.gradle/3.3/taskArtifacts/taskArtifacts.lock b/StoneIsland/platforms/android/.gradle/3.3/taskArtifacts/taskArtifacts.lock Binary files differindex 63207987..ad0f98ee 100644 --- a/StoneIsland/platforms/android/.gradle/3.3/taskArtifacts/taskArtifacts.lock +++ b/StoneIsland/platforms/android/.gradle/3.3/taskArtifacts/taskArtifacts.lock diff --git a/StoneIsland/platforms/android/.gradle/3.3/tasks/_CordovaLib_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock b/StoneIsland/platforms/android/.gradle/3.3/tasks/_CordovaLib_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock Binary files differindex 3477b852..304f2a81 100644 --- a/StoneIsland/platforms/android/.gradle/3.3/tasks/_CordovaLib_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock +++ b/StoneIsland/platforms/android/.gradle/3.3/tasks/_CordovaLib_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock diff --git a/StoneIsland/platforms/android/.gradle/3.3/tasks/_CordovaLib_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock b/StoneIsland/platforms/android/.gradle/3.3/tasks/_CordovaLib_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock Binary files differindex 3dd6588c..66d8e793 100644 --- a/StoneIsland/platforms/android/.gradle/3.3/tasks/_CordovaLib_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock +++ b/StoneIsland/platforms/android/.gradle/3.3/tasks/_CordovaLib_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock diff --git a/StoneIsland/platforms/android/.gradle/3.3/tasks/_CordovaLib_compileReleaseJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock b/StoneIsland/platforms/android/.gradle/3.3/tasks/_CordovaLib_compileReleaseJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock Binary files differindex db73d461..642602fc 100644 --- a/StoneIsland/platforms/android/.gradle/3.3/tasks/_CordovaLib_compileReleaseJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock +++ b/StoneIsland/platforms/android/.gradle/3.3/tasks/_CordovaLib_compileReleaseJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock diff --git a/StoneIsland/platforms/android/.gradle/3.3/tasks/_CordovaLib_compileReleaseJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock b/StoneIsland/platforms/android/.gradle/3.3/tasks/_CordovaLib_compileReleaseJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock Binary files differindex 1f529f6e..831cb889 100644 --- a/StoneIsland/platforms/android/.gradle/3.3/tasks/_CordovaLib_compileReleaseJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock +++ b/StoneIsland/platforms/android/.gradle/3.3/tasks/_CordovaLib_compileReleaseJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock diff --git a/StoneIsland/platforms/android/.gradle/3.3/tasks/_compileReleaseJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin b/StoneIsland/platforms/android/.gradle/3.3/tasks/_compileReleaseJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin Binary files differindex 36561273..829a44a1 100644 --- a/StoneIsland/platforms/android/.gradle/3.3/tasks/_compileReleaseJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin +++ b/StoneIsland/platforms/android/.gradle/3.3/tasks/_compileReleaseJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin diff --git a/StoneIsland/platforms/android/.gradle/3.3/tasks/_compileReleaseJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock b/StoneIsland/platforms/android/.gradle/3.3/tasks/_compileReleaseJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock Binary files differindex 1daade5e..d45fbf63 100644 --- a/StoneIsland/platforms/android/.gradle/3.3/tasks/_compileReleaseJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock +++ b/StoneIsland/platforms/android/.gradle/3.3/tasks/_compileReleaseJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock diff --git a/StoneIsland/platforms/android/.gradle/3.3/tasks/_compileReleaseJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock b/StoneIsland/platforms/android/.gradle/3.3/tasks/_compileReleaseJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock Binary files differindex 4d371375..3a057f3e 100644 --- a/StoneIsland/platforms/android/.gradle/3.3/tasks/_compileReleaseJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock +++ b/StoneIsland/platforms/android/.gradle/3.3/tasks/_compileReleaseJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock diff --git a/StoneIsland/platforms/android/AndroidManifest.xml b/StoneIsland/platforms/android/AndroidManifest.xml index 74dd5c09..ae659c26 100755 --- a/StoneIsland/platforms/android/AndroidManifest.xml +++ b/StoneIsland/platforms/android/AndroidManifest.xml @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='utf-8'?> -<manifest android:hardwareAccelerated="true" android:versionCode="6121" android:versionName="1.2.1" package="us.okfoc.stoneisland" xmlns:android="http://schemas.android.com/apk/res/android"> +<manifest android:hardwareAccelerated="true" android:versionCode="6123" android:versionName="1.2.3" package="us.okfoc.stoneisland" xmlns:android="http://schemas.android.com/apk/res/android"> <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name" android:supportsRtl="true"> diff --git a/StoneIsland/platforms/android/android.json b/StoneIsland/platforms/android/android.json index 4fbbbbfb..63f4e5bc 100755 --- a/StoneIsland/platforms/android/android.json +++ b/StoneIsland/platforms/android/android.json @@ -1,436 +1,436 @@ { - "prepare_queue": { - "installed": [], - "uninstalled": [] - }, - "config_munge": { - "files": { - "res/xml/config.xml": { - "parents": { - "/*": [ - { - "xml": "<feature name=\"InAppBrowser\"><param name=\"android-package\" value=\"org.apache.cordova.inappbrowser.InAppBrowser\" /></feature>", - "count": 1 - }, - { - "xml": "<feature name=\"SocialSharing\"><param name=\"android-package\" value=\"nl.xservices.plugins.SocialSharing\" /></feature>", - "count": 1 - }, - { - "xml": "<feature name=\"LaunchMyApp\"><param name=\"android-package\" value=\"nl.xservices.plugins.LaunchMyApp\" /></feature>", - "count": 1 - }, - { - "xml": "<feature name=\"Whitelist\"><param name=\"android-package\" value=\"org.apache.cordova.whitelist.WhitelistPlugin\" /><param name=\"onload\" value=\"true\" /></feature>", - "count": 1 - }, - { - "xml": "<feature name=\"Device\"><param name=\"android-package\" value=\"org.apache.cordova.device.Device\" /></feature>", - "count": 1 - }, - { - "xml": "<feature name=\"NetworkStatus\"><param name=\"android-package\" value=\"org.apache.cordova.networkinformation.NetworkManager\" /></feature>", - "count": 1 - }, - { - "xml": "<feature name=\"Notification\"><param name=\"android-package\" value=\"org.apache.cordova.dialogs.Notification\" /></feature>", - "count": 1 - }, - { - "xml": "<feature name=\"Geolocation\"><param name=\"android-package\" value=\"org.apache.cordova.geolocation.Geolocation\" /></feature>", - "count": 1 - }, - { - "xml": "<feature name=\"Keyboard\"><param name=\"android-package\" value=\"io.ionic.keyboard.IonicKeyboard\" /><param name=\"onload\" value=\"true\" /></feature>", - "count": 1 - }, - { - "xml": "<feature name=\"StatusBar\"><param name=\"android-package\" value=\"org.apache.cordova.statusbar.StatusBar\" /><param name=\"onload\" value=\"true\" /></feature>", - "count": 1 - }, - { - "xml": "<feature name=\"SplashScreen\"><param name=\"android-package\" value=\"org.apache.cordova.splashscreen.SplashScreen\" /><param name=\"onload\" value=\"true\" /></feature>", - "count": 1 - }, - { - "xml": "<feature name=\"PushNotification\"><param name=\"android-package\" value=\"com.adobe.phonegap.push.PushPlugin\" /></feature>", - "count": 1 - }, - { - "xml": "<feature name=\"Sim\"><param name=\"android-package\" value=\"com.pbakondy.Sim\" /></feature>", - "count": 1 - } - ] - } + "prepare_queue": { + "installed": [], + "uninstalled": [] + }, + "config_munge": { + "files": { + "res/xml/config.xml": { + "parents": { + "/*": [ + { + "xml": "<feature name=\"InAppBrowser\"><param name=\"android-package\" value=\"org.apache.cordova.inappbrowser.InAppBrowser\" /></feature>", + "count": 1 + }, + { + "xml": "<feature name=\"SocialSharing\"><param name=\"android-package\" value=\"nl.xservices.plugins.SocialSharing\" /></feature>", + "count": 1 + }, + { + "xml": "<feature name=\"LaunchMyApp\"><param name=\"android-package\" value=\"nl.xservices.plugins.LaunchMyApp\" /></feature>", + "count": 1 + }, + { + "xml": "<feature name=\"Whitelist\"><param name=\"android-package\" value=\"org.apache.cordova.whitelist.WhitelistPlugin\" /><param name=\"onload\" value=\"true\" /></feature>", + "count": 1 + }, + { + "xml": "<feature name=\"Device\"><param name=\"android-package\" value=\"org.apache.cordova.device.Device\" /></feature>", + "count": 1 }, - "AndroidManifest.xml": { - "parents": { - "/manifest/application": [ - { - "xml": "<activity android:exported=\"true\" android:name=\"com.adobe.phonegap.push.PushHandlerActivity\" android:permission=\"${applicationId}.permission.PushHandlerActivity\" />", - "count": 1 - }, - { - "xml": "<receiver android:name=\"com.adobe.phonegap.push.BackgroundActionButtonHandler\" />", - "count": 1 - }, - { - "xml": "<receiver android:exported=\"true\" android:name=\"com.google.android.gms.gcm.GcmReceiver\" android:permission=\"com.google.android.c2dm.permission.SEND\"><intent-filter><action android:name=\"com.google.android.c2dm.intent.RECEIVE\" /><category android:name=\"${applicationId}\" /></intent-filter></receiver>", - "count": 1 - }, - { - "xml": "<service android:exported=\"false\" android:name=\"com.adobe.phonegap.push.GCMIntentService\"><intent-filter><action android:name=\"com.google.android.c2dm.intent.RECEIVE\" /></intent-filter></service>", - "count": 1 - }, - { - "xml": "<service android:exported=\"false\" android:name=\"com.adobe.phonegap.push.PushInstanceIDListenerService\"><intent-filter><action android:name=\"com.google.android.gms.iid.InstanceID\" /></intent-filter></service>", - "count": 1 - }, - { - "xml": "<service android:exported=\"false\" android:name=\"com.adobe.phonegap.push.RegistrationIntentService\" />", - "count": 1 - } - ], - "/manifest": [ - { - "xml": "<uses-permission android:name=\"android.permission.INTERNET\" />", - "count": 1 - }, - { - "xml": "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />", - "count": 1 - }, - { - "xml": "<uses-permission android:name=\"android.permission.WAKE_LOCK\" />", - "count": 1 - }, - { - "xml": "<uses-permission android:name=\"android.permission.VIBRATE\" />", - "count": 1 - }, - { - "xml": "<uses-permission android:name=\"com.google.android.c2dm.permission.RECEIVE\" />", - "count": 1 - }, - { - "xml": "<uses-permission android:name=\"${applicationId}.permission.C2D_MESSAGE\" />", - "count": 1 - }, - { - "xml": "<uses-permission android:name=\"${applicationId}.permission.PushHandlerActivity\" />", - "count": 1 - }, - { - "xml": "<permission android:name=\"${applicationId}.permission.C2D_MESSAGE\" android:protectionLevel=\"signature\" />", - "count": 1 - }, - { - "xml": "<permission android:name=\"${applicationId}.permission.PushHandlerActivity\" android:protectionLevel=\"signature\" />", - "count": 1 - } - ], - "/*/application/activity": [], - "/*": [ - { - "xml": "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />", - "count": 1 - }, - { - "xml": "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />", - "count": 1 - }, - { - "xml": "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" />", - "count": 1 - }, - { - "xml": "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" />", - "count": 1 - }, - { - "xml": "<uses-feature android:name=\"android.hardware.location.gps\" />", - "count": 1 - }, - { - "xml": "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\" />", - "count": 1 - } - ], - "/manifest/application/activity": [ - { - "xml": "<intent-filter><action android:name=\"android.intent.action.VIEW\" /><category android:name=\"android.intent.category.DEFAULT\" /><category android:name=\"android.intent.category.BROWSABLE\" /><data android:scheme=\"stoneisland\" /></intent-filter>", - "count": 1 - }, - { - "xml": "<intent-filter><action android:name=\"android.intent.action.VIEW\" /><category android:name=\"android.intent.category.DEFAULT\" /><category android:name=\"android.intent.category.BROWSABLE\" /><data android:host=\" \" android:pathPrefix=\"/\" android:scheme=\" \" /></intent-filter>", - "count": 1 - } - ] - } + { + "xml": "<feature name=\"NetworkStatus\"><param name=\"android-package\" value=\"org.apache.cordova.networkinformation.NetworkManager\" /></feature>", + "count": 1 }, - "res/values/parseplugin.xml": { - "parents": { - "/*": [] - } + { + "xml": "<feature name=\"Notification\"><param name=\"android-package\" value=\"org.apache.cordova.dialogs.Notification\" /></feature>", + "count": 1 }, - "res/values/strings.xml": { - "parents": { - "/resources": [ - { - "xml": "<string name=\"google_app_id\">85075801930</string>", - "count": 1 - } - ] - } + { + "xml": "<feature name=\"Geolocation\"><param name=\"android-package\" value=\"org.apache.cordova.geolocation.Geolocation\" /></feature>", + "count": 1 }, - "config.xml": { - "parents": { - "/*": [ - { - "xml": "<preference name=\"AppName\" value=\"Stone Island\" />", - "count": 1 - }, - { - "xml": "<feature name=\"Device\"><param name=\"android-package\" value=\"org.apache.cordova.device.Device\" /></feature>", - "count": 1 - }, - { - "xml": "<feature name=\"NetworkStatus\"><param name=\"android-package\" value=\"org.apache.cordova.networkinformation.NetworkManager\" /></feature>", - "count": 1 - }, - { - "xml": "<access origin=\"https://ssl.gstatic.com/accessibility/javascript/android/*\" />", - "count": 1 - }, - { - "xml": "<feature name=\"MobileAccessibility\"><param name=\"android-package\" value=\"com.phonegap.plugin.mobileaccessibility.MobileAccessibility\" /></feature>", - "count": 1 - } - ] - } + { + "xml": "<feature name=\"Keyboard\"><param name=\"android-package\" value=\"io.ionic.keyboard.IonicKeyboard\" /><param name=\"onload\" value=\"true\" /></feature>", + "count": 1 + }, + { + "xml": "<feature name=\"StatusBar\"><param name=\"android-package\" value=\"org.apache.cordova.statusbar.StatusBar\" /><param name=\"onload\" value=\"true\" /></feature>", + "count": 1 + }, + { + "xml": "<feature name=\"SplashScreen\"><param name=\"android-package\" value=\"org.apache.cordova.splashscreen.SplashScreen\" /><param name=\"onload\" value=\"true\" /></feature>", + "count": 1 + }, + { + "xml": "<feature name=\"PushNotification\"><param name=\"android-package\" value=\"com.adobe.phonegap.push.PushPlugin\" /></feature>", + "count": 1 + }, + { + "xml": "<feature name=\"Sim\"><param name=\"android-package\" value=\"com.pbakondy.Sim\" /></feature>", + "count": 1 } + ] } - }, - "installed_plugins": { - "cordova-plugin-inappbrowser": { - "PACKAGE_NAME": "us.okfoc.stoneisland" - }, - "cordova-plugin-x-socialsharing": { - "PACKAGE_NAME": "us.okfoc.stoneisland" - }, - "cordova-plugin-customurlscheme": { - "URL_SCHEME": "stoneisland", - "ANDROID_SCHEME": " ", - "ANDROID_HOST": " ", - "ANDROID_PATHPREFIX": "/", - "PACKAGE_NAME": "us.okfoc.stoneisland" - }, - "cordova-plugin-whitelist": { - "PACKAGE_NAME": "us.okfoc.stoneisland" - }, - "cordova-plugin-device": { - "PACKAGE_NAME": "us.okfoc.stoneisland" - }, - "cordova-plugin-network-information": { - "PACKAGE_NAME": "us.okfoc.stoneisland" - }, - "cordova-plugin-dialogs": { - "PACKAGE_NAME": "us.okfoc.stoneisland" - }, - "cordova-plugin-compat": { - "PACKAGE_NAME": "us.okfoc.stoneisland" - }, - "cordova-plugin-geolocation": { - "PACKAGE_NAME": "us.okfoc.stoneisland" - }, - "ionic-plugin-keyboard": { - "PACKAGE_NAME": "us.okfoc.stoneisland" - }, - "cordova-plugin-statusbar": { - "PACKAGE_NAME": "us.okfoc.stoneisland" - }, - "cordova-plugin-app-name": { - "APP_NAME": "Stone Island", - "PACKAGE_NAME": "us.okfoc.stoneisland" - }, - "cordova-plugin-splashscreen": { - "PACKAGE_NAME": "us.okfoc.stoneisland" - }, - "phonegap-plugin-push": { - "SENDER_ID": "85075801930", - "PACKAGE_NAME": "us.okfoc.stoneisland" - }, - "cordova-plugin-sim": { - "PACKAGE_NAME": "us.okfoc.stoneisland" - }, - "phonegap-plugin-mobile-accessibility": { - "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "AndroidManifest.xml": { + "parents": { + "/manifest/application": [ + { + "xml": "<activity android:exported=\"true\" android:name=\"com.adobe.phonegap.push.PushHandlerActivity\" android:permission=\"${applicationId}.permission.PushHandlerActivity\" />", + "count": 1 + }, + { + "xml": "<receiver android:name=\"com.adobe.phonegap.push.BackgroundActionButtonHandler\" />", + "count": 1 + }, + { + "xml": "<receiver android:exported=\"true\" android:name=\"com.google.android.gms.gcm.GcmReceiver\" android:permission=\"com.google.android.c2dm.permission.SEND\"><intent-filter><action android:name=\"com.google.android.c2dm.intent.RECEIVE\" /><category android:name=\"${applicationId}\" /></intent-filter></receiver>", + "count": 1 + }, + { + "xml": "<service android:exported=\"false\" android:name=\"com.adobe.phonegap.push.GCMIntentService\"><intent-filter><action android:name=\"com.google.android.c2dm.intent.RECEIVE\" /></intent-filter></service>", + "count": 1 + }, + { + "xml": "<service android:exported=\"false\" android:name=\"com.adobe.phonegap.push.PushInstanceIDListenerService\"><intent-filter><action android:name=\"com.google.android.gms.iid.InstanceID\" /></intent-filter></service>", + "count": 1 + }, + { + "xml": "<service android:exported=\"false\" android:name=\"com.adobe.phonegap.push.RegistrationIntentService\" />", + "count": 1 + } + ], + "/manifest": [ + { + "xml": "<uses-permission android:name=\"android.permission.INTERNET\" />", + "count": 1 + }, + { + "xml": "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />", + "count": 1 + }, + { + "xml": "<uses-permission android:name=\"android.permission.WAKE_LOCK\" />", + "count": 1 + }, + { + "xml": "<uses-permission android:name=\"android.permission.VIBRATE\" />", + "count": 1 + }, + { + "xml": "<uses-permission android:name=\"com.google.android.c2dm.permission.RECEIVE\" />", + "count": 1 + }, + { + "xml": "<uses-permission android:name=\"${applicationId}.permission.C2D_MESSAGE\" />", + "count": 1 + }, + { + "xml": "<uses-permission android:name=\"${applicationId}.permission.PushHandlerActivity\" />", + "count": 1 + }, + { + "xml": "<permission android:name=\"${applicationId}.permission.C2D_MESSAGE\" android:protectionLevel=\"signature\" />", + "count": 1 + }, + { + "xml": "<permission android:name=\"${applicationId}.permission.PushHandlerActivity\" android:protectionLevel=\"signature\" />", + "count": 1 + } + ], + "/*/application/activity": [], + "/*": [ + { + "xml": "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />", + "count": 1 + }, + { + "xml": "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />", + "count": 1 + }, + { + "xml": "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" />", + "count": 1 + }, + { + "xml": "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" />", + "count": 1 + }, + { + "xml": "<uses-feature android:name=\"android.hardware.location.gps\" />", + "count": 1 + }, + { + "xml": "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\" />", + "count": 1 + } + ], + "/manifest/application/activity": [ + { + "xml": "<intent-filter><action android:name=\"android.intent.action.VIEW\" /><category android:name=\"android.intent.category.DEFAULT\" /><category android:name=\"android.intent.category.BROWSABLE\" /><data android:scheme=\"stoneisland\" /></intent-filter>", + "count": 1 + }, + { + "xml": "<intent-filter><action android:name=\"android.intent.action.VIEW\" /><category android:name=\"android.intent.category.DEFAULT\" /><category android:name=\"android.intent.category.BROWSABLE\" /><data android:host=\" \" android:pathPrefix=\"/\" android:scheme=\" \" /></intent-filter>", + "count": 1 + } + ] } - }, - "dependent_plugins": {}, - "modules": [ - { - "file": "plugins/cordova-plugin-inappbrowser/www/inappbrowser.js", - "id": "cordova-plugin-inappbrowser.inappbrowser", - "pluginId": "cordova-plugin-inappbrowser", - "clobbers": [ - "cordova.InAppBrowser.open", - "window.open" - ] - }, - { - "file": "plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js", - "id": "cordova-plugin-x-socialsharing.SocialSharing", - "pluginId": "cordova-plugin-x-socialsharing", - "clobbers": [ - "window.plugins.socialsharing" - ] - }, - { - "file": "plugins/cordova-plugin-customurlscheme/www/android/LaunchMyApp.js", - "id": "cordova-plugin-customurlscheme.LaunchMyApp", - "pluginId": "cordova-plugin-customurlscheme", - "clobbers": [ - "window.plugins.launchmyapp" - ] - }, - { - "file": "plugins/cordova-plugin-device/www/device.js", - "id": "cordova-plugin-device.device", - "pluginId": "cordova-plugin-device", - "clobbers": [ - "device" - ] - }, - { - "file": "plugins/cordova-plugin-network-information/www/network.js", - "id": "cordova-plugin-network-information.network", - "pluginId": "cordova-plugin-network-information", - "clobbers": [ - "navigator.connection", - "navigator.network.connection" - ] - }, - { - "file": "plugins/cordova-plugin-network-information/www/Connection.js", - "id": "cordova-plugin-network-information.Connection", - "pluginId": "cordova-plugin-network-information", - "clobbers": [ - "Connection" - ] - }, - { - "file": "plugins/cordova-plugin-dialogs/www/notification.js", - "id": "cordova-plugin-dialogs.notification", - "pluginId": "cordova-plugin-dialogs", - "merges": [ - "navigator.notification" - ] - }, - { - "file": "plugins/cordova-plugin-dialogs/www/android/notification.js", - "id": "cordova-plugin-dialogs.notification_android", - "pluginId": "cordova-plugin-dialogs", - "merges": [ - "navigator.notification" - ] - }, - { - "file": "plugins/cordova-plugin-geolocation/www/android/geolocation.js", - "id": "cordova-plugin-geolocation.geolocation", - "pluginId": "cordova-plugin-geolocation", - "clobbers": [ - "navigator.geolocation" - ] - }, - { - "file": "plugins/cordova-plugin-geolocation/www/PositionError.js", - "id": "cordova-plugin-geolocation.PositionError", - "pluginId": "cordova-plugin-geolocation", - "runs": true - }, - { - "file": "plugins/ionic-plugin-keyboard/www/android/keyboard.js", - "id": "ionic-plugin-keyboard.keyboard", - "pluginId": "ionic-plugin-keyboard", - "clobbers": [ - "cordova.plugins.Keyboard" - ], - "runs": true - }, - { - "id": "cordova-plugin-statusbar.statusbar", - "file": "plugins/cordova-plugin-statusbar/www/statusbar.js", - "pluginId": "cordova-plugin-statusbar", - "clobbers": [ - "window.StatusBar" - ] - }, - { - "id": "cordova-plugin-splashscreen.SplashScreen", - "file": "plugins/cordova-plugin-splashscreen/www/splashscreen.js", - "pluginId": "cordova-plugin-splashscreen", - "clobbers": [ - "navigator.splashscreen" - ] - }, - { - "id": "phonegap-plugin-push.PushNotification", - "file": "plugins/phonegap-plugin-push/www/push.js", - "pluginId": "phonegap-plugin-push", - "clobbers": [ - "PushNotification" - ] - }, - { - "id": "cordova-plugin-sim.Sim", - "file": "plugins/cordova-plugin-sim/www/sim.js", - "pluginId": "cordova-plugin-sim", - "merges": [ - "window.plugins.sim" - ] - }, - { - "id": "cordova-plugin-sim.SimAndroid", - "file": "plugins/cordova-plugin-sim/www/android/sim.js", - "pluginId": "cordova-plugin-sim", - "merges": [ - "window.plugins.sim" - ] - }, - { - "id": "phonegap-plugin-mobile-accessibility.mobile-accessibility", - "file": "plugins/phonegap-plugin-mobile-accessibility/www/mobile-accessibility.js", - "pluginId": "phonegap-plugin-mobile-accessibility", - "clobbers": [ - "window.MobileAccessibility" - ] - }, - { - "id": "phonegap-plugin-mobile-accessibility.MobileAccessibilityNotifications", - "file": "plugins/phonegap-plugin-mobile-accessibility/www/MobileAccessibilityNotifications.js", - "pluginId": "phonegap-plugin-mobile-accessibility", - "clobbers": [ - "MobileAccessibilityNotifications" - ] + }, + "res/values/parseplugin.xml": { + "parents": { + "/*": [] + } + }, + "res/values/strings.xml": { + "parents": { + "/resources": [ + { + "xml": "<string name=\"google_app_id\">85075801930</string>", + "count": 1 + } + ] + } + }, + "config.xml": { + "parents": { + "/*": [ + { + "xml": "<preference name=\"AppName\" value=\"Stone Island\" />", + "count": 1 + }, + { + "xml": "<feature name=\"Device\"><param name=\"android-package\" value=\"org.apache.cordova.device.Device\" /></feature>", + "count": 1 + }, + { + "xml": "<feature name=\"NetworkStatus\"><param name=\"android-package\" value=\"org.apache.cordova.networkinformation.NetworkManager\" /></feature>", + "count": 1 + }, + { + "xml": "<access origin=\"https://ssl.gstatic.com/accessibility/javascript/android/*\" />", + "count": 1 + }, + { + "xml": "<feature name=\"MobileAccessibility\"><param name=\"android-package\" value=\"com.phonegap.plugin.mobileaccessibility.MobileAccessibility\" /></feature>", + "count": 1 + } + ] } - ], - "plugin_metadata": { - "cordova-plugin-inappbrowser": "1.5.0", - "cordova-plugin-x-socialsharing": "5.1.3", - "cordova-plugin-customurlscheme": "4.2.0", - "cordova-plugin-whitelist": "1.3.0", - "cordova-plugin-device": "1.1.3", - "cordova-plugin-network-information": "1.3.0", - "cordova-plugin-dialogs": "1.3.0", - "cordova-plugin-compat": "1.1.0", - "cordova-plugin-geolocation": "2.4.0", - "ionic-plugin-keyboard": "2.2.1", - "cordova-plugin-statusbar": "2.2.3", - "cordova-plugin-app-name": "1.0.4", - "cordova-plugin-splashscreen": "4.0.3", - "phonegap-plugin-push": "1.9.2", - "cordova-plugin-sim": "1.3.3", - "phonegap-plugin-mobile-accessibility": "1.0.5-dev" + } + } + }, + "installed_plugins": { + "cordova-plugin-inappbrowser": { + "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "cordova-plugin-x-socialsharing": { + "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "cordova-plugin-customurlscheme": { + "URL_SCHEME": "stoneisland", + "ANDROID_SCHEME": " ", + "ANDROID_HOST": " ", + "ANDROID_PATHPREFIX": "/", + "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "cordova-plugin-whitelist": { + "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "cordova-plugin-device": { + "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "cordova-plugin-network-information": { + "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "cordova-plugin-dialogs": { + "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "cordova-plugin-compat": { + "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "cordova-plugin-geolocation": { + "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "ionic-plugin-keyboard": { + "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "cordova-plugin-statusbar": { + "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "cordova-plugin-app-name": { + "APP_NAME": "Stone Island", + "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "cordova-plugin-splashscreen": { + "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "phonegap-plugin-push": { + "SENDER_ID": "85075801930", + "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "cordova-plugin-sim": { + "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "phonegap-plugin-mobile-accessibility": { + "PACKAGE_NAME": "us.okfoc.stoneisland" + } + }, + "dependent_plugins": {}, + "modules": [ + { + "file": "plugins/cordova-plugin-inappbrowser/www/inappbrowser.js", + "id": "cordova-plugin-inappbrowser.inappbrowser", + "pluginId": "cordova-plugin-inappbrowser", + "clobbers": [ + "cordova.InAppBrowser.open", + "window.open" + ] + }, + { + "file": "plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js", + "id": "cordova-plugin-x-socialsharing.SocialSharing", + "pluginId": "cordova-plugin-x-socialsharing", + "clobbers": [ + "window.plugins.socialsharing" + ] + }, + { + "file": "plugins/cordova-plugin-customurlscheme/www/android/LaunchMyApp.js", + "id": "cordova-plugin-customurlscheme.LaunchMyApp", + "pluginId": "cordova-plugin-customurlscheme", + "clobbers": [ + "window.plugins.launchmyapp" + ] + }, + { + "file": "plugins/cordova-plugin-device/www/device.js", + "id": "cordova-plugin-device.device", + "pluginId": "cordova-plugin-device", + "clobbers": [ + "device" + ] + }, + { + "file": "plugins/cordova-plugin-network-information/www/network.js", + "id": "cordova-plugin-network-information.network", + "pluginId": "cordova-plugin-network-information", + "clobbers": [ + "navigator.connection", + "navigator.network.connection" + ] + }, + { + "file": "plugins/cordova-plugin-network-information/www/Connection.js", + "id": "cordova-plugin-network-information.Connection", + "pluginId": "cordova-plugin-network-information", + "clobbers": [ + "Connection" + ] + }, + { + "file": "plugins/cordova-plugin-dialogs/www/notification.js", + "id": "cordova-plugin-dialogs.notification", + "pluginId": "cordova-plugin-dialogs", + "merges": [ + "navigator.notification" + ] + }, + { + "file": "plugins/cordova-plugin-dialogs/www/android/notification.js", + "id": "cordova-plugin-dialogs.notification_android", + "pluginId": "cordova-plugin-dialogs", + "merges": [ + "navigator.notification" + ] + }, + { + "file": "plugins/cordova-plugin-geolocation/www/android/geolocation.js", + "id": "cordova-plugin-geolocation.geolocation", + "pluginId": "cordova-plugin-geolocation", + "clobbers": [ + "navigator.geolocation" + ] + }, + { + "file": "plugins/cordova-plugin-geolocation/www/PositionError.js", + "id": "cordova-plugin-geolocation.PositionError", + "pluginId": "cordova-plugin-geolocation", + "runs": true + }, + { + "file": "plugins/ionic-plugin-keyboard/www/android/keyboard.js", + "id": "ionic-plugin-keyboard.keyboard", + "pluginId": "ionic-plugin-keyboard", + "clobbers": [ + "cordova.plugins.Keyboard" + ], + "runs": true + }, + { + "id": "cordova-plugin-statusbar.statusbar", + "file": "plugins/cordova-plugin-statusbar/www/statusbar.js", + "pluginId": "cordova-plugin-statusbar", + "clobbers": [ + "window.StatusBar" + ] + }, + { + "id": "cordova-plugin-splashscreen.SplashScreen", + "file": "plugins/cordova-plugin-splashscreen/www/splashscreen.js", + "pluginId": "cordova-plugin-splashscreen", + "clobbers": [ + "navigator.splashscreen" + ] + }, + { + "id": "phonegap-plugin-push.PushNotification", + "file": "plugins/phonegap-plugin-push/www/push.js", + "pluginId": "phonegap-plugin-push", + "clobbers": [ + "PushNotification" + ] + }, + { + "id": "cordova-plugin-sim.Sim", + "file": "plugins/cordova-plugin-sim/www/sim.js", + "pluginId": "cordova-plugin-sim", + "merges": [ + "window.plugins.sim" + ] + }, + { + "id": "cordova-plugin-sim.SimAndroid", + "file": "plugins/cordova-plugin-sim/www/android/sim.js", + "pluginId": "cordova-plugin-sim", + "merges": [ + "window.plugins.sim" + ] + }, + { + "id": "phonegap-plugin-mobile-accessibility.mobile-accessibility", + "file": "plugins/phonegap-plugin-mobile-accessibility/www/mobile-accessibility.js", + "pluginId": "phonegap-plugin-mobile-accessibility", + "clobbers": [ + "window.MobileAccessibility" + ] + }, + { + "id": "phonegap-plugin-mobile-accessibility.MobileAccessibilityNotifications", + "file": "plugins/phonegap-plugin-mobile-accessibility/www/MobileAccessibilityNotifications.js", + "pluginId": "phonegap-plugin-mobile-accessibility", + "clobbers": [ + "MobileAccessibilityNotifications" + ] } + ], + "plugin_metadata": { + "cordova-plugin-inappbrowser": "1.5.0", + "cordova-plugin-x-socialsharing": "5.1.3", + "cordova-plugin-customurlscheme": "4.2.0", + "cordova-plugin-whitelist": "1.3.0", + "cordova-plugin-device": "1.1.3", + "cordova-plugin-network-information": "1.3.0", + "cordova-plugin-dialogs": "1.3.0", + "cordova-plugin-compat": "1.1.0", + "cordova-plugin-geolocation": "2.4.0", + "ionic-plugin-keyboard": "2.2.1", + "cordova-plugin-statusbar": "2.2.3", + "cordova-plugin-app-name": "1.0.4", + "cordova-plugin-splashscreen": "4.0.3", + "phonegap-plugin-push": "1.9.2", + "cordova-plugin-sim": "1.3.3", + "phonegap-plugin-mobile-accessibility": "1.0.5-dev" + } }
\ No newline at end of file diff --git a/StoneIsland/platforms/android/assets/www/css/account.css b/StoneIsland/platforms/android/assets/www/css/account.css index be82a4c7..12adb2d9 100755 --- a/StoneIsland/platforms/android/assets/www/css/account.css +++ b/StoneIsland/platforms/android/assets/www/css/account.css @@ -77,7 +77,7 @@ position:relative; font-weight:bold; letter-spacing:0.2px; - font-size:11px; + font-size: 0.688rem; margin-bottom:10px; width:100%; box-sizing:border-box; @@ -122,7 +122,7 @@ text-align: center; margin: 0; padding: 20px 10px 8px 10px; - font-size: 16px; + font-size: 1rem; color: #000; letter-spacing: 1px; font-weight: bold; @@ -133,7 +133,7 @@ label { align-items: center; justify-content: center; text-align: center; - font-size: 16px; + font-size: 1rem; color: #000; letter-spacing:1px; text-transform:uppercase; @@ -141,7 +141,7 @@ label { } input[type=text], input[type=password], input[type=number], input[type=date], input[type=email] { font-family:pfd, sans-serif; - font-size:14px; + font-size: 0.875rem; outline:none!important; color:#000; letter-spacing:1px; @@ -198,7 +198,7 @@ input[type=text]:focus, input[type=password]:focus, input[type=number]:focus, in width: calc(100vw - 10px); box-sizing: border-box; padding:0px 18px 2px; - font-size:16px; + font-size: 1rem; } #settings .toggle-container { @@ -208,7 +208,7 @@ input[type=text]:focus, input[type=password]:focus, input[type=number]:focus, in width: calc(100vw - 10px); box-sizing: border-box; padding:10px 18px 2px; - font-size:16px; + font-size: 1rem; } .toggle-row { @@ -345,7 +345,7 @@ input.switch:checked + label:after { margin: 2px auto!important } .container-fill .container-message { - font-size:14px; + font-size: 0.875rem; letter-spacing:0.5px; text-align:center; display: flex; @@ -373,7 +373,7 @@ input.switch:checked + label:after { } .checkbox-container { - font-size:14px; + font-size: 0.875rem; width:calc(100vw - 10px); display:table; box-sizing:border-box; @@ -477,7 +477,7 @@ input.switch:checked + label:after { text-align: center; overflow: hidden; - font-size: 14px; + font-size: 0.875rem; outline: none !important; color: #000; letter-spacing: 1px; @@ -547,7 +547,7 @@ input.switch:checked + label:after { color: #696969; border: 1px solid; border-left: 0; - font-size: 14px; + font-size: 0.875rem; height: 48px; box-sizing: border-box; width: 50%; diff --git a/StoneIsland/platforms/android/assets/www/css/blogs.css b/StoneIsland/platforms/android/assets/www/css/blogs.css index 0834912e..f857db9e 100755 --- a/StoneIsland/platforms/android/assets/www/css/blogs.css +++ b/StoneIsland/platforms/android/assets/www/css/blogs.css @@ -10,6 +10,7 @@ flex-direction: row; justify-content: center; align-items: center; + flex-wrap: wrap; } #story .links li { display: flex; @@ -18,24 +19,25 @@ height: 48px; padding: 0 15px; list-style-type: none; - font-size: 16px; + font-size: 1rem; } -#story .links li:before { - content: ' | ', +.accessible #story .links { + flex-wrap: wrap; } -#story .links li:first-child:before { - content: '', +.accessible #story .links li { + border: 1px solid black; + margin: 5px; } #story .links li.active { font-weight: bold; text-decoration: underline; } #story .content > div { -display:none; + display:none; } #story .content div.active { -display:block; -animation: mfadein 0.6s; + display:block; + animation: mfadein 0.6s; } .hub #hub { display: block } @@ -65,7 +67,7 @@ animation: mfadein 0.6s; #hub .content .body, #story .content .body { letter-spacing:0.35px; - font-size:16px; + font-size: 1rem; width:calc(100vw - 40px); box-sizing:border-box; margin:10px auto 20px; @@ -93,7 +95,7 @@ animation: mfadein 0.6s; .content-header .title, .content-header .subtitle { display:block; font-weight:bold; - font-size:16px; + font-size: 1rem; text-transform:uppercase } @@ -111,7 +113,7 @@ animation: mfadein 0.6s; border:1px solid black; padding: 0 12px; height: 48px; - font-size: 16px; + font-size: 1rem; display: flex; justify-content: center; align-items: center; @@ -119,7 +121,7 @@ animation: mfadein 0.6s; } .content-header span.date, .content-header span.store { - font-size:16px; + font-size: 1rem; } /* NOTE: optional arrows */ @@ -138,7 +140,7 @@ animation: mfadein 0.6s; transform:translateY(-50%); transform-origin:top right; left:20px; - font-size:18px; + font-size: 1.125rem; padding:3px 3px 3px 1px; z-index:2; position:absolute; @@ -158,7 +160,7 @@ animation: mfadein 0.6s; transform:translateY(-50%); transform-origin:top right; right:20px; - font-size:18px; + font-size: 1.125rem; padding:3px 1px 3px 3px; z-index:2; position:absolute; @@ -194,7 +196,7 @@ animation: mfadein 0.6s; transform:scale(1,.5) translateY(-50%); transform-origin:bottom right; content:'\25BC'; - font-size:17px; + font-size: 1.063rem; padding:9px 11px; z-index:999; position:absolute; @@ -216,11 +218,11 @@ ul.links { } .archive h1 { - font-size:26px; + font-size: 1.625rem; border-bottom:0; - margin-top:8px; + margin-top: 8px; padding-bottom:0; - line-height:24px; + line-height: 1; } .archive .subtitle { @@ -231,20 +233,20 @@ ul.links { margin:0 0 12px; padding:0; font-weight:bold; - font-size:16px; + font-size: 1rem; } .archive h2 { - font-size: 25px; + font-size: 1.563rem; font-weight: normal; } .archive h2 b { - font-size: 28px; + font-size: 1.75rem; } .archive .body { - font-size: 14px; - line-height: 1.4em; + font-size: 0.875rem; + line-height: 1.4rem; font-weight: 100; } @@ -263,6 +265,13 @@ ul.links { transform: translateZ(0) translateX(-50%) translateY(-50%); } +.accessible #archive .row .image, +.accessible #archive .row .text { + position: relative; + top: auto; left: auto; + transform: translateZ(0); +} + #archive .menu .items { border-top: 1px solid transparent; } @@ -296,7 +305,7 @@ ul.links { background: white; padding:0; height: 48px; - font-size:16px; + font-size: 1rem; letter-spacing:0.7px } @@ -332,6 +341,17 @@ ul.links { #archive .row .text { width: 80%; } +.accessible #archive .row .image { + display: block; + height: 50vh; + opacity: 1 !important; +} +.accessible #archive .row .text { + display: block; + margin: 0 auto; + opacity: 1 !important; + width: 90%; +} .gallery-video-post { position:relative; diff --git a/StoneIsland/platforms/android/assets/www/css/cart.css b/StoneIsland/platforms/android/assets/www/css/cart.css index c5725349..36a446a7 100755 --- a/StoneIsland/platforms/android/assets/www/css/cart.css +++ b/StoneIsland/platforms/android/assets/www/css/cart.css @@ -13,7 +13,7 @@ } #cart .steps span { display: flex; - font-size: 16px; + font-size: 1rem; text-align: center; color: #666; width: 33%; @@ -99,7 +99,7 @@ min-height:50px; max-width: 50%; text-align: center; - font-size: 18px; + font-size: 1.125rem; } .summary-container { @@ -113,12 +113,11 @@ #cart h3 { padding-left: 5px; - font-size:16px; height: 48px; display: flex; justify-content: flex-start; align-items: center; - font-size: 16px; + font-size: 1rem; } .cart_item_row { @@ -197,19 +196,19 @@ transform:rotate(45deg) translateX(-50%) translateY(-50%) } .cart_item_price .price { - font-size:16px; + font-size: 1rem; font-weight:bold; display:block } .cart_item_info .sku { - font-size:16px; + font-size: 1rem; font-weight:bold; display:block; } .cart_item_info .title { - font-size:16px; + font-size: 1rem; font-weight:bold; display:block; line-height:1.4em; @@ -217,7 +216,7 @@ transform:rotate(45deg) translateX(-50%) translateY(-50%) } .cart_item_info .type { - font-size:16px; + font-size: 1rem; font-weight:bold; display:block; text-transform:capitalize; @@ -225,8 +224,8 @@ transform:rotate(45deg) translateX(-50%) translateY(-50%) .cart_item_info .meta { padding-top:5px; - letter-spacing:.75px; - font-size:14px; + letter-spacing: 0.047rem; + font-size:0.875rem; } .order_section .rows { @@ -238,7 +237,7 @@ transform:rotate(45deg) translateX(-50%) translateY(-50%) width:calc(100vw - 30px); margin:15px auto; text-decoration:underline; - font-size:11px; + font-size: 0.688rem; } .order_section_container { @@ -251,7 +250,7 @@ transform:rotate(45deg) translateX(-50%) translateY(-50%) margin:0 auto; display:table; color:#666; - font-size:16px; + font-size: 1rem; } .cart-summary-row { @@ -312,13 +311,13 @@ color:#000; .dropdown-wrapper .add_edit { padding:10px; letter-spacing:0.5px; - font-size:12px; + font-size: 0.75rem; color:#a9a9a9; box-sizing:border-box; } .dropdown-wrapper .dropdown { - font-size:16px; + font-size: 1rem; box-sizing:border-box; display: flex; justify-content: center; diff --git a/StoneIsland/platforms/android/assets/www/css/index.css b/StoneIsland/platforms/android/assets/www/css/index.css index fa3dae54..83b3353a 100755 --- a/StoneIsland/platforms/android/assets/www/css/index.css +++ b/StoneIsland/platforms/android/assets/www/css/index.css @@ -17,7 +17,7 @@ body { -webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */ background: #fff; font-family: pfd, sans-serif; - font-size: 14px; + font-size: 0.875rem; padding-top: constant(safe-area-inset-top); } a, a:visited { @@ -54,11 +54,47 @@ a, a:visited { to {-webkit-transform: rotate(360deg)} } -.scroll { +.iscroll .scroll { position: absolute; width: 100%; } - +.vscroll .scroll { + width: 100%; +/* height: calc(100vh - 2.5rem); + overflow: scroll; + -webkit-overflow-scrolling: touch; +*/ +} +.vscroll body, +html.vscroll { + overflow: auto; + -webkit-overflow-scrolling: touch; +} +.vscroll #header, +.vscroll #footer, +.vscroll #nav { + position: fixed; +} +.vscroll #story, +.vscroll #hub, +.vscroll #archive, +.vscroll .page, +.vscroll #collection, +.vscroll #product, +.vscroll #search, +.vscroll #closed, +.vscroll #login, +.vscroll #logout, +.vscroll #signup, +.vscroll #cart, +.vscroll #profile, +.vscroll #shipping, +.vscroll #payment, +.vscroll #settings, +.vscroll #content, +.vscroll #orders { + overflow: auto; +} .error_hilite { color: red !important; border-color: red !important; @@ -71,7 +107,7 @@ span.err { text-align: center; justify-content: center; align-items: center; - font-size: 14px; + font-size: 0.875rem; height: 48px; color: red !important; } diff --git a/StoneIsland/platforms/android/assets/www/css/nav.css b/StoneIsland/platforms/android/assets/www/css/nav.css index d69ff144..f555ce99 100755 --- a/StoneIsland/platforms/android/assets/www/css/nav.css +++ b/StoneIsland/platforms/android/assets/www/css/nav.css @@ -35,7 +35,7 @@ } #nav .menu span { display: block; - font-size: 16px; + font-size: 1rem; letter-spacing:1.25px; text-shadow:0px 0px 1px rgba(0,0,0,.2); color: #000; @@ -77,7 +77,7 @@ #nav .submenu span { display: block; - font-size: 16px; + font-size: 1rem; letter-spacing:1.25px; color: #666; padding: 4px 0 12px 20px @@ -95,7 +95,7 @@ width: 61px; border-left: 1px solid #ddd; color: #666; - font-size: 18px; + font-size: 1.125rem; padding: 5px 0; text-align: center; } @@ -144,7 +144,7 @@ padding-bottom:0px; display: flex; justify-content: center; align-items: center; - font-size: 17px; + font-size: 1.063rem; } #intro #compass { pointer-events: none; @@ -180,7 +180,7 @@ padding-bottom:0px; box-sizing: border-box; width: calc(100vw); text-align: center; - font-size: 14pt; + font-size: 0.875rem; font-weight: bold; line-height: 0; text-transform: uppercase; @@ -246,7 +246,7 @@ padding-bottom:0px; left: 50%; transform: translateY(-50%) translateX(-50%); color: #666; - font-size:12.35px; + font-size: 12.35px; } #header .cart::before { @@ -280,7 +280,7 @@ padding-bottom:0px; text-align: center; color: #000; float: left; - font-size: 16px; + font-size: 1rem; font-weight:bold; padding: 0; display: flex; @@ -355,14 +355,14 @@ padding-bottom:0px; #consent_modal { display: none; z-index: 2; - font-size: 16px; + font-size: 1rem; } #consent_modal a { color: black; } .modal button { font-family: pfd, sans-serif; - font-size: 14px; + font-size: 0.875rem; padding: 10px; box-sizing: border-box; margin: 0; @@ -386,11 +386,6 @@ padding-bottom:0px; #consent_error.visible { opacity: 1; } -.accessible #consent_modal br:nth-last-of-type(1), -.accessible #consent_modal br:nth-last-of-type(2) { - display: none; -} - /* SELECTOR */ #selector { @@ -417,7 +412,7 @@ padding-bottom:0px; text-align: center; padding: 12px 12px; box-sizing:border-box; - font-size: 14px; + font-size: 0.875rem; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; @@ -452,7 +447,7 @@ padding-bottom:0px; background: white; text-align: center; padding: 7px 12px; - font-size:14px!important; + font-size: 0.875rem!important; } .selector-outer-wrap .options div:nth-of-type(odd){ @@ -501,7 +496,7 @@ h1 { align-items: center; border-bottom: 1px solid #000; height: 48px; - font-size: 16px; + font-size: 1rem; color: #000; letter-spacing: 1px; font-weight: bold; diff --git a/StoneIsland/platforms/android/assets/www/css/products.css b/StoneIsland/platforms/android/assets/www/css/products.css index fbc22d28..63e9b020 100755 --- a/StoneIsland/platforms/android/assets/www/css/products.css +++ b/StoneIsland/platforms/android/assets/www/css/products.css @@ -103,7 +103,7 @@ } .product .product-header { - font-size:16px; + font-size: 1rem; margin:18px 0 0; max-width:60%; position:relative; @@ -118,7 +118,7 @@ margin-bottom: 18px; font-weight: bold; text-align: center; - font-size: 17px; + font-size: 1.063rem; } .product-group:first-child { margin-top: 0; @@ -153,7 +153,7 @@ .product .type { display:table-cell; - font-size:16px; + font-size: 1rem; } .product .size-color { @@ -165,7 +165,7 @@ box-sizing:border-box; padding: 0 12px; height: 48px; - font-size: 16px; + font-size: 1rem; display: flex; justify-content: center; align-items: center; @@ -176,7 +176,7 @@ .product .price { display:table-cell; - font-size:16px; + font-size: 1rem; text-align:right; vertical-align:bottom; } @@ -195,12 +195,12 @@ .style-share { letter-spacing:0.5px; - font-size:16px; + font-size: 1rem; } .size-color { position:relative; - font-size:16px; + font-size: 1rem; } .type-price, .style-share { @@ -226,7 +226,7 @@ .product .fit, .product .notAvailableInCanada { clear:both; - font-size:9px; + font-size: 0.563rem; letter-spacing:0.5px; text-decoration:underline; text-transform:uppercase; @@ -234,7 +234,7 @@ } .product .fitHeader { clear:both; - font-size:9px; + font-size: 0.563rem; letter-spacing:0.5px; text-decoration: none; text-transform:uppercase; @@ -248,7 +248,7 @@ #product .content .body { letter-spacing:0.35px; - font-size:16px; + font-size: 1rem; line-height: 1.4em; box-sizing:border-box; margin:0px auto 20px; diff --git a/StoneIsland/platforms/android/assets/www/css/vendor/flickity.css b/StoneIsland/platforms/android/assets/www/css/vendor/flickity.css index b8eca4e4..99a09e72 100755 --- a/StoneIsland/platforms/android/assets/www/css/vendor/flickity.css +++ b/StoneIsland/platforms/android/assets/www/css/vendor/flickity.css @@ -105,7 +105,7 @@ http://flickity.metafizzy.co /* color & size if no SVG - IE8 and Android 2.3 */ .flickity-prev-next-button.no-svg { color: #333; - font-size: 26px; + font-size: 1.625rem; } /* ---- page dots ---- */ diff --git a/StoneIsland/platforms/android/assets/www/index.html b/StoneIsland/platforms/android/assets/www/index.html index 664b2df0..eaae059a 100755 --- a/StoneIsland/platforms/android/assets/www/index.html +++ b/StoneIsland/platforms/android/assets/www/index.html @@ -44,16 +44,17 @@ <span role="menuitem" class="archive">ARCHIVE</span> </div> <div role="menu" aria-label="Account Menu" class="account_menu"> - <span role="menuitem" class="account_back menu-emphasis">< MY ACCOUNT</span> + <span role="menuitem" aria-label="Back to main menu" class="account_back menu-emphasis">< MY ACCOUNT</span> <span role="menuitem" class="profile">MY PROFILE</span> <span role="menuitem" class="payment">MY CARD</span> <span role="menuitem" class="shipping">ADDRESS BOOK</span> <span role="menuitem" class="orders">MY ORDERS</span> - <span role="menuitem" class="return_link">RETURNS</span> + <span role="menuitem" class="return_link_us">RETURNS (US)</span> + <span role="menuitem" class="return_link_ca">RETURNS (CANADA)</span> <span role="menuitem" class="settings">NOTIFICATIONS</span> </div> <div role="menu" aria-label="FAQ Menu" class="faq_menu"> - <span role="menuitem" class="faq_back menu-emphasis">< FAQ</span> + <span role="menuitem" aria-label="Back to main menu" class="faq_back menu-emphasis">< FAQ</span> <span role="menuitem" class="privacy">PRIVACY POLICY</span> <span role="menuitem" class="account_terms">MY ACCOUNT TERMS AND CONDITIONS OF USE</span> <span role="menuitem" class="terms">TERMS AND CONDITIONS</span> @@ -108,7 +109,7 @@ </div> <div id="header" role="menubar" aria-label="Menu bar"> - <span role="menu" aria-label="Show main menu" class="burger ion-android-menu"></span> + <span role="link" aria-label="Show main menu" class="burger ion-android-menu"></span> <span role="link" aria-label="Homepage. Stone Island logo" class="logo"></span> <span role="link" aria-label="View cart" class="cart_rapper"><span class="cart"><span role="display" class="cart_count">0</span></span></span> </div> @@ -137,20 +138,20 @@ <script type="text/html" class="template"> <div class="hub_item" data-id="{{id}}"> <div class="gallery gallery-{{id}}" role="carousel"></div> - <div role="button" class="gallery-left"></div> - <div role="button" class="gallery-right"></div> + <div role="button" aria-label='Scroll gallery to the left' class="gallery-left"></div> + <div role="button" aria-label='Scroll gallery to the right' class="gallery-right"></div> <div role="heading" class="content-header"> - <div role="button" class="content-share"> - SHARE + - </div> - <span role="heading" aria-details="{{cleantitle}}" class="title">{{title}}</span> - <span role="heading" aria-details="{{cleansubtitle}}"class="subtitle">{{subtitle}}</span> - <span class="date"> - {{date}} - <span class="store"> - | <b><u>STORE</u></b> + <div role="button" class="content-share"> + SHARE + + </div> + <span role="heading" aria-details="{{cleantitle}}" class="title">{{title}}</span> + <span role="heading" aria-details="{{cleansubtitle}}"class="subtitle">{{subtitle}}</span> + <span class="date"> + {{date}} + <span class="store"> + | <b><u>STORE</u></b> + </span> </span> - </span> </div> <div class="body">{{body}}</div> </div> @@ -353,7 +354,7 @@ </h4> <div role="link" class="website_link"> visit<br> - <b>www.stoneisland.com</b> + <b aria-label='w w w dot stone island dot com'>www.stoneisland.com</b> </div> </div> </div> @@ -1310,6 +1311,7 @@ <script src="js/lib/etc/sim.js"></script> <script src="js/lib/etc/backup_db.js"></script> <script src="js/lib/etc/accessibility.js"></script> +<script src="js/lib/etc/scroll.js"></script> <script src="js/lib/view/View.js"></script> <script src="js/lib/view/Router.js"></script> diff --git a/StoneIsland/platforms/android/assets/www/js/index.js b/StoneIsland/platforms/android/assets/www/js/index.js index ed82a820..b90f74b1 100755 --- a/StoneIsland/platforms/android/assets/www/js/index.js +++ b/StoneIsland/platforms/android/assets/www/js/index.js @@ -12,6 +12,10 @@ var app = (function(){ sdk.init({ env: "production" }) } + accessibility.init(app.prebuild) // check if we can do native scrolling before build + } + + app.prebuild = function(){ app.bind() app.build() @@ -105,6 +109,7 @@ var app = (function(){ // } // else { // } + push.init() if (navigator.onLine) { app.account.connect(window.deepLinkRoute || '/intro') @@ -119,8 +124,6 @@ var app = (function(){ app.router.go("intro") app.finished_launching() } - - push.init() } app.finished_launching = function(){ 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 b79b8421..f10f7744 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/blogs/ArchiveView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/blogs/ArchiveView.js @@ -26,6 +26,7 @@ var ArchiveView = ScrollableView.extend({ back: function(){ this.$el.addClass("menu") app.header.set_back(false) + this.scroller.scrollTo(0, 0) this.$subtitle.html( this.subtitle_html ) }, @@ -60,6 +61,7 @@ var ArchiveView = ScrollableView.extend({ var t = this.menu_template.replace(/{{title}}/, row.title) var $t = $(t) + $t.data("aria-label", stonewash(row.title.replace(/'/g, " '").trim())) $t.data("title", row.title) $t.data("index", index) this.$menu_items.append($t) diff --git a/StoneIsland/platforms/android/assets/www/js/lib/blogs/BlogView.js b/StoneIsland/platforms/android/assets/www/js/lib/blogs/BlogView.js index e58c975c..9190634c 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/blogs/BlogView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/blogs/BlogView.js @@ -54,7 +54,7 @@ var BlogView = View.extend({ app.closed.storeClosedMessageTwo = app.store.StoreClosedMessageTwo break } - console.log(data) + // console.log(data) if (app.closed.storeIsClosed && sdk.env !== 'test') { app.closed.populate(app.store.ClosedStoreImages) 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 b2baf4e7..a0ee9dd0 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/blogs/HubView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/blogs/HubView.js @@ -93,6 +93,7 @@ var HubView = ScrollableView.extend({ var url = gallery.selectedElement.style.backgroundImage.replace(/url\(\"?/,"").replace(/\"?\)/,"") app.fullscreenViewer.show(url, url) }) + $(".gallery-" + row.id).attr('aria-label', stonewash(row.title) + ". Image gallery, use the arrows to scroll.") } else { // single image @@ -103,7 +104,6 @@ var HubView = ScrollableView.extend({ el.className = "item" $(".gallery-" + row.id).append(el) $(".gallery-" + row.id).data("row", row) - // video, append play button if (row.link.match(/youtube|youtu.be|vimeo/)) { var play = document.createElement("div") @@ -111,7 +111,7 @@ var HubView = ScrollableView.extend({ $(".gallery-" + row.id).append(play) $(".gallery-" + row.id).addClass("gallery-video-post") $(".gallery-" + row.id).attr('role', 'link') - $(".gallery-" + row.id).attr('aria-label', stonewash(row.title) + ". Watch the video on Youtube") + $(".gallery-" + row.id).attr('aria-label', stonewash(row.title) + ". Tap to watch the video on Youtube") if (! row.image) { var url = row.link var ytid = (url.match(/v=([-_a-zA-Z0-9]{11})/i) || url.match(/youtu.be\/([-_a-zA-Z0-9]{11})/i) || url.match(/embed\/([-_a-zA-Z0-9]{11})/i))[1].split('&')[0]; @@ -121,6 +121,7 @@ var HubView = ScrollableView.extend({ $(el).click(function(){ app.fullscreenViewer.show(row.image[0].uri) }) + $(".gallery-" + row.id).attr('aria-label', stonewash(row.title) + ". Main image") } $t.find(".gallery-left").remove() $t.find(".gallery-right").remove() @@ -140,6 +141,7 @@ var HubView = ScrollableView.extend({ var id = $(e.currentTarget).closest(".hub_item").data('id') this.galleries[id].previous() }, + gallery_right: function(e){ var id = $(e.currentTarget).closest(".hub_item").data('id') this.galleries[id].next() @@ -170,6 +172,7 @@ var HubLoader = (function(){ HubLoader.load() } HubLoader.load = function(){ + if (!queue) return item = queue.shift() count++ if (! item || loading) return diff --git a/StoneIsland/platforms/android/assets/www/js/lib/blogs/PageView.js b/StoneIsland/platforms/android/assets/www/js/lib/blogs/PageView.js index fae4cff2..9a7b4962 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/blogs/PageView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/blogs/PageView.js @@ -26,7 +26,7 @@ var PageView = ScrollableView.extend({ href = href.substr(1, href.length-2) $(this).attr("href", href) } - console.log(href) + // console.log(href) $(this).attr("target", "_system") }) }, diff --git a/StoneIsland/platforms/android/assets/www/js/lib/blogs/StoryView.js b/StoneIsland/platforms/android/assets/www/js/lib/blogs/StoryView.js index ec2f4434..0b3b17d7 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/blogs/StoryView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/blogs/StoryView.js @@ -41,6 +41,7 @@ var StoryView = ScrollableView.extend({ var li = document.createElement("li") li.dataset.id = row.id li.innerHTML = row.title + li.setAttribute('role', "link") this.sections[row.id] = row this.$links.append(li) this.$content.append(t) diff --git a/StoneIsland/platforms/android/assets/www/js/lib/cart/CartShipping.js b/StoneIsland/platforms/android/assets/www/js/lib/cart/CartShipping.js index ef8f94b7..b5d6647b 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/cart/CartShipping.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/cart/CartShipping.js @@ -21,7 +21,7 @@ var CartShipping = FormView.extend({ this.$address_form = this.$(".address") this.$msg = this.$(".msg") this.address = new AddressView ({ parent: this }) - this.scroller = new IScroll('#cart_shipping', app.iscroll_options) + this.scroller = ScrollFactory('#cart_shipping', app.iscroll_options) this.address.disabled = true }, diff --git a/StoneIsland/platforms/android/assets/www/js/lib/cart/CartSummary.js b/StoneIsland/platforms/android/assets/www/js/lib/cart/CartSummary.js index bf150791..51aa35ef 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/cart/CartSummary.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/cart/CartSummary.js @@ -15,7 +15,7 @@ var CartSummary = ScrollableView.extend({ this.$loader = this.$(".loader") this.$cart_body = this.$(".cart_body") this.$cart_empty = this.$(".cart_empty") - this.scroller = new IScroll('#cart_summary', app.iscroll_options) + this.scroller = ScrollFactory('#cart_summary', app.iscroll_options) this.$rows = this.$(".rows") this.$subtotal = this.$(".subtotal") diff --git a/StoneIsland/platforms/android/assets/www/js/lib/etc/accessibility.js b/StoneIsland/platforms/android/assets/www/js/lib/etc/accessibility.js index 614c3796..8108e461 100644 --- a/StoneIsland/platforms/android/assets/www/js/lib/etc/accessibility.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/etc/accessibility.js @@ -1,9 +1,75 @@ -$(function(){ - $("h1").each(function(){ - this['aria-label'] = 'Section title is ' + this.innerText - }) -}) +var accessibility = (function() { + + var accessibility = {} + accessibility.voiceOver = false + + accessibility.DEBUG = false + + accessibility.init = function(ready) { + console.log('Accessibility init') + accessibility.bind() + if (accessibility.DEBUG) { + console.log('Accessibility debug mode') + app.accessible = true + accessibility.voiceOver = true + $('html').addClass('vscroll') + $('html').addClass('accessible') + return ready() + } + if ('MobileAccessibility' in window) { + accessibility.build(ready) + } else { + ready() + } + } + + accessibility.build = function(ready) { + MobileAccessibility.usePreferredTextZoom(true); + MobileAccessibility.getTextZoom(function getTextZoomCallback(textZoom) { + console.log('WebView text should be scaled to the preferred value ' + textZoom + '%') + if (textZoom > 100) { + app.accessible = true + $("html").addClass('accessible') + } + }); + MobileAccessibility.isVoiceOverRunning(function(state){ + console.log('Screen reader: ' + state) + accessibility.voiceOver = state + if (state) { + console.log(">>>>>> actual debug mode!") + app.accessible = true + $("html").addClass('accessible') + $('html').addClass('vscroll') + } else { + $('html').addClass('iscroll') + } + ready() + }) + } + + accessibility.bind = function() { + $("h1").each(function(){ + this['aria-label'] = 'Section title is ' + this.innerText + }) + if ('MobileAccessibilityNotifications' in window) { + window.addEventListener(MobileAccessibilityNotifications.SCREEN_READER_STATUS_CHANGED, + accessibility.onScreenReaderStatusChanged, false) + } + } + + accessibility.onScreenReaderStatusChanged = function(info) { + if (info && typeof info.isScreenReaderRunning !== "undefined") { + if (info.isScreenReaderRunning) { + console.log("Screen reader: ON"); + } else { + console.log("Screen reader: OFF"); + } + } + } + + return accessibility +})() function stonewash (s) { - return s.replace(/'0/g, '20').replace(/_/g, ' ') -}
\ No newline at end of file + return s.replace(/'9/g, '19').replace(/'0/g, '20').replace(/_/g, ' ').replace(/-/g, ' - ').replace(/^[013456789][0-9]+/, '') +} diff --git a/StoneIsland/platforms/android/assets/www/js/lib/etc/push.js b/StoneIsland/platforms/android/assets/www/js/lib/etc/push.js index 746172eb..74aaf7b5 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/etc/push.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/etc/push.js @@ -37,6 +37,10 @@ var push = (function(){ push.settings.hub = hub_status == "true" push.settings.store = store_status == "true" + if (push.settings.requested) { + return + } + // not sure why we're also signing up for notifications here?? if (! hub_status || hub_status == "true") { push.subscribe("hub") } @@ -46,7 +50,7 @@ var push = (function(){ } push.got_registration = function(data){ var registrationId = data.registrationId - var oldRegistrationId = localStorage.getItem("yoox.registrationId") + var oldRegistrationId = localStorage.getItem("yoox.registrationId") // console.log(registrationId, oldRegistrationId) if (registrationId !== oldRegistrationId || ! push.settings.requested) { diff --git a/StoneIsland/platforms/android/assets/www/js/lib/nav/CurtainView.js b/StoneIsland/platforms/android/assets/www/js/lib/nav/CurtainView.js index d444fd60..ddb6bc19 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/nav/CurtainView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/nav/CurtainView.js @@ -28,7 +28,7 @@ var CurtainView = View.extend({ }, click: function(){ - if (document.body.classList.contains("nav")) { + if (document.body.classList.contains("nav") && !app.accessible) { app.nav.hide() } if (app.selector.visible) { diff --git a/StoneIsland/platforms/android/assets/www/js/lib/nav/NavView.js b/StoneIsland/platforms/android/assets/www/js/lib/nav/NavView.js index 86c8ecaf..1655b7f8 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/nav/NavView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/nav/NavView.js @@ -23,7 +23,8 @@ var NavView = View.extend({ "click .shipping": "shipping", "click .settings": "settings", "click .orders": "orders", - "click .return_link": "return_link", + "click .return_link_us": "return_link_us", + "click .return_link_ca": "return_link_ca", "click .faq_back": "back", "click .privacy": "privacy", @@ -44,6 +45,10 @@ var NavView = View.extend({ show: function(klass){ $("body").addClass("nav") app.curtain.show("dark") + doneShowingNav = false + setTimeout(function(){ + doneShowingNav = true + }, 800) if (klass) { setTimeout(function(){ this.addClass(klass) @@ -52,6 +57,7 @@ var NavView = View.extend({ }, hide: function(){ + if (!doneShowingNav) return $("body").removeClass("nav") app.curtain.hide("dark") }, @@ -115,8 +121,11 @@ var NavView = View.extend({ this.hide() app.router.go("account/settings") }, - return_link: function(){ - window.open("http://www.stoneisland.com/yTos/Plugins/AreaLocalizer/Redirectarea?area=ProductExchange&controllerName=SearchOrder&actionName=Index", '_system') + return_link_us: function(){ + window.open("https://www.stoneisland.com/us/ProductExchange/SearchOrder/Index?utm_source=AppMobile&utm_medium=referral&utm_campaign=ReturnForm", '_system') + }, + return_link_ca: function(){ + window.open("https://www.stoneisland.com/ca/ProductExchange/SearchOrder/Index?utm_source=AppMobile&utm_medium=referral&utm_campaign=ReturnForm", '_system') }, @@ -141,7 +150,7 @@ var NavView = View.extend({ }, care: function(e){ e.preventDefault() - window.open("http://www.stoneisland.com/system/web/custom/hp/email.jsp", '_system') + window.open("https://www.stoneisland.com/customercare?utm_source=AppMobile&utm_medium=referral&utm_campaign=CustomerCare", '_system') }, diff --git a/StoneIsland/platforms/android/assets/www/js/lib/products/CollectionView.js b/StoneIsland/platforms/android/assets/www/js/lib/products/CollectionView.js index b7af235a..d3343652 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/products/CollectionView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/products/CollectionView.js @@ -22,7 +22,7 @@ var CollectionView = ScrollableView.extend({ this.$title = this.$("h1") this.$content = this.$(".content") this.$loader = this.$(".loader") - this.scroller = new IScroll('#collection', app.iscroll_options) + this.scroller = ScrollFactory('#collection', app.iscroll_options) this.departmentFilterView = new DepartmentFilter ({ parent: this }) this.sizeFilterView = new SizeFilter ({ parent: this }) }, diff --git a/StoneIsland/platforms/android/assets/www/js/lib/products/ProductView.js b/StoneIsland/platforms/android/assets/www/js/lib/products/ProductView.js index c47dfddd..62a6de18 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/products/ProductView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/products/ProductView.js @@ -15,7 +15,7 @@ var ProductView = ScrollableView.extend({ initialize: function(){ this.gallery = new GalleryView () - this.scroller = new IScroll('#product', app.iscroll_options) + this.scroller = ScrollFactory('#product', app.iscroll_options) this.$productHeader = this.$(".product-header") this.$title = this.$(".title") diff --git a/StoneIsland/platforms/android/assets/www/js/vendor/iscroll-5.1.3.js b/StoneIsland/platforms/android/assets/www/js/vendor/iscroll-5.1.3.js index be5e46e8..8bd2b8da 100755 --- a/StoneIsland/platforms/android/assets/www/js/vendor/iscroll-5.1.3.js +++ b/StoneIsland/platforms/android/assets/www/js/vendor/iscroll-5.1.3.js @@ -1,2011 +1,2011 @@ /*! iScroll v5.1.3 ~ (c) 2008-2014 Matteo Spinelli ~ http://cubiq.org/license */ (function (window, document, Math) { -var rAF = window.requestAnimationFrame || - window.webkitRequestAnimationFrame || - window.mozRequestAnimationFrame || - window.oRequestAnimationFrame || - window.msRequestAnimationFrame || - function (callback) { window.setTimeout(callback, 1000 / 60); }; +var rAF = window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame || + function (callback) { window.setTimeout(callback, 1000 / 60); }; var utils = (function () { - var me = {}; + var me = {}; - var _elementStyle = document.createElement('div').style; - var _vendor = (function () { - var vendors = ['t', 'webkitT', 'MozT', 'msT', 'OT'], - transform, - i = 0, - l = vendors.length; + var _elementStyle = document.createElement('div').style; + var _vendor = (function () { + var vendors = ['t', 'webkitT', 'MozT', 'msT', 'OT'], + transform, + i = 0, + l = vendors.length; - for ( ; i < l; i++ ) { - transform = vendors[i] + 'ransform'; - if ( transform in _elementStyle ) return vendors[i].substr(0, vendors[i].length-1); - } + for ( ; i < l; i++ ) { + transform = vendors[i] + 'ransform'; + if ( transform in _elementStyle ) return vendors[i].substr(0, vendors[i].length-1); + } - return false; - })(); + return false; + })(); - function _prefixStyle (style) { - if ( _vendor === false ) return false; - if ( _vendor === '' ) return style; - return _vendor + style.charAt(0).toUpperCase() + style.substr(1); - } + function _prefixStyle (style) { + if ( _vendor === false ) return false; + if ( _vendor === '' ) return style; + return _vendor + style.charAt(0).toUpperCase() + style.substr(1); + } - me.getTime = Date.now || function getTime () { return new Date().getTime(); }; + me.getTime = Date.now || function getTime () { return new Date().getTime(); }; - me.extend = function (target, obj) { - for ( var i in obj ) { - target[i] = obj[i]; - } - }; + me.extend = function (target, obj) { + for ( var i in obj ) { + target[i] = obj[i]; + } + }; - me.addEvent = function (el, type, fn, capture) { - el.addEventListener(type, fn, !!capture); - }; + me.addEvent = function (el, type, fn, capture) { + el.addEventListener(type, fn, !!capture); + }; - me.removeEvent = function (el, type, fn, capture) { - el.removeEventListener(type, fn, !!capture); - }; + me.removeEvent = function (el, type, fn, capture) { + el.removeEventListener(type, fn, !!capture); + }; - me.prefixPointerEvent = function (pointerEvent) { - return window.MSPointerEvent ? - 'MSPointer' + pointerEvent.charAt(9).toUpperCase() + pointerEvent.substr(10): - pointerEvent; - }; + me.prefixPointerEvent = function (pointerEvent) { + return window.MSPointerEvent ? + 'MSPointer' + pointerEvent.charAt(9).toUpperCase() + pointerEvent.substr(10): + pointerEvent; + }; - me.momentum = function (current, start, time, lowerMargin, wrapperSize, deceleration) { - var distance = current - start, - speed = Math.abs(distance) / time, - destination, - duration; + me.momentum = function (current, start, time, lowerMargin, wrapperSize, deceleration) { + var distance = current - start, + speed = Math.abs(distance) / time, + destination, + duration; - deceleration = deceleration === undefined ? 0.0006 : deceleration; + deceleration = deceleration === undefined ? 0.0006 : deceleration; - destination = current + ( speed * speed ) / ( 2 * deceleration ) * ( distance < 0 ? -1 : 1 ); - duration = speed / deceleration; + destination = current + ( speed * speed ) / ( 2 * deceleration ) * ( distance < 0 ? -1 : 1 ); + duration = speed / deceleration; - if ( destination < lowerMargin ) { - destination = wrapperSize ? lowerMargin - ( wrapperSize / 2.5 * ( speed / 8 ) ) : lowerMargin; - distance = Math.abs(destination - current); - duration = distance / speed; - } else if ( destination > 0 ) { - destination = wrapperSize ? wrapperSize / 2.5 * ( speed / 8 ) : 0; - distance = Math.abs(current) + destination; - duration = distance / speed; - } + if ( destination < lowerMargin ) { + destination = wrapperSize ? lowerMargin - ( wrapperSize / 2.5 * ( speed / 8 ) ) : lowerMargin; + distance = Math.abs(destination - current); + duration = distance / speed; + } else if ( destination > 0 ) { + destination = wrapperSize ? wrapperSize / 2.5 * ( speed / 8 ) : 0; + distance = Math.abs(current) + destination; + duration = distance / speed; + } - return { - destination: Math.round(destination), - duration: duration - }; - }; + return { + destination: Math.round(destination), + duration: duration + }; + }; - var _transform = _prefixStyle('transform'); + var _transform = _prefixStyle('transform'); - me.extend(me, { - hasTransform: _transform !== false, - hasPerspective: _prefixStyle('perspective') in _elementStyle, - hasTouch: 'ontouchstart' in window, - hasPointer: window.PointerEvent || window.MSPointerEvent, // IE10 is prefixed - hasTransition: _prefixStyle('transition') in _elementStyle - }); + me.extend(me, { + hasTransform: _transform !== false, + hasPerspective: _prefixStyle('perspective') in _elementStyle, + hasTouch: 'ontouchstart' in window, + hasPointer: window.PointerEvent || window.MSPointerEvent, // IE10 is prefixed + hasTransition: _prefixStyle('transition') in _elementStyle + }); - // This should find all Android browsers lower than build 535.19 (both stock browser and webview) - me.isBadAndroid = /Android /.test(window.navigator.appVersion) && !(/Chrome\/\d/.test(window.navigator.appVersion)); + // This should find all Android browsers lower than build 535.19 (both stock browser and webview) + me.isBadAndroid = /Android /.test(window.navigator.appVersion) && !(/Chrome\/\d/.test(window.navigator.appVersion)); - me.extend(me.style = {}, { - transform: _transform, - transitionTimingFunction: _prefixStyle('transitionTimingFunction'), - transitionDuration: _prefixStyle('transitionDuration'), - transitionDelay: _prefixStyle('transitionDelay'), - transformOrigin: _prefixStyle('transformOrigin') - }); + me.extend(me.style = {}, { + transform: _transform, + transitionTimingFunction: _prefixStyle('transitionTimingFunction'), + transitionDuration: _prefixStyle('transitionDuration'), + transitionDelay: _prefixStyle('transitionDelay'), + transformOrigin: _prefixStyle('transformOrigin') + }); - me.hasClass = function (e, c) { - var re = new RegExp("(^|\\s)" + c + "(\\s|$)"); - return re.test(e.className); - }; + me.hasClass = function (e, c) { + var re = new RegExp("(^|\\s)" + c + "(\\s|$)"); + return re.test(e.className); + }; - me.addClass = function (e, c) { - if ( me.hasClass(e, c) ) { - return; - } + me.addClass = function (e, c) { + if ( me.hasClass(e, c) ) { + return; + } - var newclass = e.className.split(' '); - newclass.push(c); - e.className = newclass.join(' '); - }; + var newclass = e.className.split(' '); + newclass.push(c); + e.className = newclass.join(' '); + }; - me.removeClass = function (e, c) { - if ( !me.hasClass(e, c) ) { - return; - } + me.removeClass = function (e, c) { + if ( !me.hasClass(e, c) ) { + return; + } - var re = new RegExp("(^|\\s)" + c + "(\\s|$)", 'g'); - e.className = e.className.replace(re, ' '); - }; + var re = new RegExp("(^|\\s)" + c + "(\\s|$)", 'g'); + e.className = e.className.replace(re, ' '); + }; - me.offset = function (el) { - var left = -el.offsetLeft, - top = -el.offsetTop; + me.offset = function (el) { + var left = -el.offsetLeft, + top = -el.offsetTop; - // jshint -W084 - while (el = el.offsetParent) { - left -= el.offsetLeft; - top -= el.offsetTop; - } - // jshint +W084 + // jshint -W084 + while (el = el.offsetParent) { + left -= el.offsetLeft; + top -= el.offsetTop; + } + // jshint +W084 - return { - left: left, - top: top - }; - }; + return { + left: left, + top: top + }; + }; - me.preventDefaultException = function (el, exceptions) { - for ( var i in exceptions ) { - if ( exceptions[i].test(el[i]) ) { - return true; - } - } + me.preventDefaultException = function (el, exceptions) { + for ( var i in exceptions ) { + if ( exceptions[i].test(el[i]) ) { + return true; + } + } - return false; - }; + return false; + }; - me.extend(me.eventType = {}, { - touchstart: 1, - touchmove: 1, - touchend: 1, + me.extend(me.eventType = {}, { + touchstart: 1, + touchmove: 1, + touchend: 1, - mousedown: 2, - mousemove: 2, - mouseup: 2, + mousedown: 2, + mousemove: 2, + mouseup: 2, - pointerdown: 3, - pointermove: 3, - pointerup: 3, + pointerdown: 3, + pointermove: 3, + pointerup: 3, - MSPointerDown: 3, - MSPointerMove: 3, - MSPointerUp: 3 - }); + MSPointerDown: 3, + MSPointerMove: 3, + MSPointerUp: 3 + }); - me.extend(me.ease = {}, { - quadratic: { - style: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)', - fn: function (k) { - return k * ( 2 - k ); - } - }, - circular: { - style: 'cubic-bezier(0.1, 0.57, 0.1, 1)', // Not properly "circular" but this looks better, it should be (0.075, 0.82, 0.165, 1) - fn: function (k) { - return Math.sqrt( 1 - ( --k * k ) ); - } - }, - back: { - style: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)', - fn: function (k) { - var b = 4; - return ( k = k - 1 ) * k * ( ( b + 1 ) * k + b ) + 1; - } - }, - bounce: { - style: '', - fn: function (k) { - if ( ( k /= 1 ) < ( 1 / 2.75 ) ) { - return 7.5625 * k * k; - } else if ( k < ( 2 / 2.75 ) ) { - return 7.5625 * ( k -= ( 1.5 / 2.75 ) ) * k + 0.75; - } else if ( k < ( 2.5 / 2.75 ) ) { - return 7.5625 * ( k -= ( 2.25 / 2.75 ) ) * k + 0.9375; - } else { - return 7.5625 * ( k -= ( 2.625 / 2.75 ) ) * k + 0.984375; - } - } - }, - elastic: { - style: '', - fn: function (k) { - var f = 0.22, - e = 0.4; + me.extend(me.ease = {}, { + quadratic: { + style: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)', + fn: function (k) { + return k * ( 2 - k ); + } + }, + circular: { + style: 'cubic-bezier(0.1, 0.57, 0.1, 1)', // Not properly "circular" but this looks better, it should be (0.075, 0.82, 0.165, 1) + fn: function (k) { + return Math.sqrt( 1 - ( --k * k ) ); + } + }, + back: { + style: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)', + fn: function (k) { + var b = 4; + return ( k = k - 1 ) * k * ( ( b + 1 ) * k + b ) + 1; + } + }, + bounce: { + style: '', + fn: function (k) { + if ( ( k /= 1 ) < ( 1 / 2.75 ) ) { + return 7.5625 * k * k; + } else if ( k < ( 2 / 2.75 ) ) { + return 7.5625 * ( k -= ( 1.5 / 2.75 ) ) * k + 0.75; + } else if ( k < ( 2.5 / 2.75 ) ) { + return 7.5625 * ( k -= ( 2.25 / 2.75 ) ) * k + 0.9375; + } else { + return 7.5625 * ( k -= ( 2.625 / 2.75 ) ) * k + 0.984375; + } + } + }, + elastic: { + style: '', + fn: function (k) { + var f = 0.22, + e = 0.4; - if ( k === 0 ) { return 0; } - if ( k == 1 ) { return 1; } + if ( k === 0 ) { return 0; } + if ( k == 1 ) { return 1; } - return ( e * Math.pow( 2, - 10 * k ) * Math.sin( ( k - f / 4 ) * ( 2 * Math.PI ) / f ) + 1 ); - } - } - }); + return ( e * Math.pow( 2, - 10 * k ) * Math.sin( ( k - f / 4 ) * ( 2 * Math.PI ) / f ) + 1 ); + } + } + }); - me.tap = function (e, eventName) { - var ev = document.createEvent('Event'); - ev.initEvent(eventName, true, true); - ev.pageX = e.pageX; - ev.pageY = e.pageY; - e.target.dispatchEvent(ev); - }; + me.tap = function (e, eventName) { + var ev = document.createEvent('Event'); + ev.initEvent(eventName, true, true); + ev.pageX = e.pageX; + ev.pageY = e.pageY; + e.target.dispatchEvent(ev); + }; - me.click = function (e) { - var target = e.target, - ev; + me.click = function (e) { + var target = e.target, + ev; - if ( !(/(SELECT|INPUT|TEXTAREA)/i).test(target.tagName) ) { - ev = document.createEvent('MouseEvents'); - ev.initMouseEvent('click', true, true, e.view, 1, - target.screenX, target.screenY, target.clientX, target.clientY, - e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, - 0, null); + if ( !(/(SELECT|INPUT|TEXTAREA)/i).test(target.tagName) ) { + ev = document.createEvent('MouseEvents'); + ev.initMouseEvent('click', true, true, e.view, 1, + target.screenX, target.screenY, target.clientX, target.clientY, + e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, + 0, null); - ev._constructed = true; - target.dispatchEvent(ev); - } - }; + ev._constructed = true; + target.dispatchEvent(ev); + } + }; - return me; + return me; })(); function IScroll (el, options) { - this.wrapper = typeof el == 'string' ? document.querySelector(el) : el; - this.scroller = this.wrapper.children[0]; - this.scrollerStyle = this.scroller.style; // cache style for better performance + this.wrapper = typeof el == 'string' ? document.querySelector(el) : el; + this.scroller = this.wrapper.children[0]; + this.scrollerStyle = this.scroller.style; // cache style for better performance - this.options = { + this.options = { - resizeScrollbars: true, + resizeScrollbars: true, - mouseWheelSpeed: 20, + mouseWheelSpeed: 20, - snapThreshold: 0.334, + snapThreshold: 0.334, // INSERT POINT: OPTIONS - startX: 0, - startY: 0, - scrollY: true, - directionLockThreshold: 5, - momentum: true, + startX: 0, + startY: 0, + scrollY: true, + directionLockThreshold: 5, + momentum: true, - bounce: true, - bounceTime: 600, - bounceEasing: '', + bounce: true, + bounceTime: 600, + bounceEasing: '', - preventDefault: true, - preventDefaultException: { tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT)$/ }, + preventDefault: true, + preventDefaultException: { tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT)$/ }, - HWCompositing: true, - useTransition: true, - useTransform: true - }; + HWCompositing: true, + useTransition: true, + useTransform: true + }; - for ( var i in options ) { - this.options[i] = options[i]; - } + for ( var i in options ) { + this.options[i] = options[i]; + } - // Normalize options - this.translateZ = this.options.HWCompositing && utils.hasPerspective ? ' translateZ(0)' : ''; + // Normalize options + this.translateZ = this.options.HWCompositing && utils.hasPerspective ? ' translateZ(0)' : ''; - this.options.useTransition = utils.hasTransition && this.options.useTransition; - this.options.useTransform = utils.hasTransform && this.options.useTransform; + this.options.useTransition = utils.hasTransition && this.options.useTransition; + this.options.useTransform = utils.hasTransform && this.options.useTransform; - this.options.eventPassthrough = this.options.eventPassthrough === true ? 'vertical' : this.options.eventPassthrough; - this.options.preventDefault = !this.options.eventPassthrough && this.options.preventDefault; + this.options.eventPassthrough = this.options.eventPassthrough === true ? 'vertical' : this.options.eventPassthrough; + this.options.preventDefault = !this.options.eventPassthrough && this.options.preventDefault; - // If you want eventPassthrough I have to lock one of the axes - this.options.scrollY = this.options.eventPassthrough == 'vertical' ? false : this.options.scrollY; - this.options.scrollX = this.options.eventPassthrough == 'horizontal' ? false : this.options.scrollX; + // If you want eventPassthrough I have to lock one of the axes + this.options.scrollY = this.options.eventPassthrough == 'vertical' ? false : this.options.scrollY; + this.options.scrollX = this.options.eventPassthrough == 'horizontal' ? false : this.options.scrollX; - // With eventPassthrough we also need lockDirection mechanism - this.options.freeScroll = this.options.freeScroll && !this.options.eventPassthrough; - this.options.directionLockThreshold = this.options.eventPassthrough ? 0 : this.options.directionLockThreshold; + // With eventPassthrough we also need lockDirection mechanism + this.options.freeScroll = this.options.freeScroll && !this.options.eventPassthrough; + this.options.directionLockThreshold = this.options.eventPassthrough ? 0 : this.options.directionLockThreshold; - this.options.bounceEasing = typeof this.options.bounceEasing == 'string' ? utils.ease[this.options.bounceEasing] || utils.ease.circular : this.options.bounceEasing; + this.options.bounceEasing = typeof this.options.bounceEasing == 'string' ? utils.ease[this.options.bounceEasing] || utils.ease.circular : this.options.bounceEasing; - this.options.resizePolling = this.options.resizePolling === undefined ? 60 : this.options.resizePolling; + this.options.resizePolling = this.options.resizePolling === undefined ? 60 : this.options.resizePolling; - if ( this.options.tap === true ) { - this.options.tap = 'tap'; - } + if ( this.options.tap === true ) { + this.options.tap = 'tap'; + } - if ( this.options.shrinkScrollbars == 'scale' ) { - this.options.useTransition = false; - } + if ( this.options.shrinkScrollbars == 'scale' ) { + this.options.useTransition = false; + } - this.options.invertWheelDirection = this.options.invertWheelDirection ? -1 : 1; + this.options.invertWheelDirection = this.options.invertWheelDirection ? -1 : 1; // INSERT POINT: NORMALIZATION - // Some defaults - this.x = 0; - this.y = 0; - this.directionX = 0; - this.directionY = 0; - this._events = {}; + // Some defaults + this.x = 0; + this.y = 0; + this.directionX = 0; + this.directionY = 0; + this._events = {}; // INSERT POINT: DEFAULTS - this._init(); - this.refresh(); + this._init(); + this.refresh(); - this.scrollTo(this.options.startX, this.options.startY); - this.enable(); + this.scrollTo(this.options.startX, this.options.startY); + this.enable(); } IScroll.prototype = { - version: '5.1.3', + version: '5.1.3', - _init: function () { - this._initEvents(); + _init: function () { + this._initEvents(); - if ( this.options.scrollbars || this.options.indicators ) { - this._initIndicators(); - } + if ( this.options.scrollbars || this.options.indicators ) { + this._initIndicators(); + } - if ( this.options.mouseWheel ) { - this._initWheel(); - } + if ( this.options.mouseWheel ) { + this._initWheel(); + } - if ( this.options.snap ) { - this._initSnap(); - } + if ( this.options.snap ) { + this._initSnap(); + } - if ( this.options.keyBindings ) { - this._initKeys(); - } + if ( this.options.keyBindings ) { + this._initKeys(); + } // INSERT POINT: _init - }, + }, - destroy: function () { - this._initEvents(true); + destroy: function () { + this._initEvents(true); - this._execEvent('destroy'); - }, + this._execEvent('destroy'); + }, - _transitionEnd: function (e) { - if ( e.target != this.scroller || !this.isInTransition ) { - return; - } + _transitionEnd: function (e) { + if ( e.target != this.scroller || !this.isInTransition ) { + return; + } - this._transitionTime(); - if ( !this.resetPosition(this.options.bounceTime) ) { - this.isInTransition = false; - this._execEvent('scrollEnd'); - } - }, + this._transitionTime(); + if ( !this.resetPosition(this.options.bounceTime) ) { + this.isInTransition = false; + this._execEvent('scrollEnd'); + } + }, - _start: function (e) { - // React to left mouse button only - if ( utils.eventType[e.type] != 1 ) { - if ( e.button !== 0 ) { - return; - } - } + _start: function (e) { + // React to left mouse button only + if ( utils.eventType[e.type] != 1 ) { + if ( e.button !== 0 ) { + return; + } + } - if ( !this.enabled || (this.initiated && utils.eventType[e.type] !== this.initiated) ) { - return; - } + if ( !this.enabled || (this.initiated && utils.eventType[e.type] !== this.initiated) ) { + return; + } - if ( this.options.preventDefault && !utils.isBadAndroid && !utils.preventDefaultException(e.target, this.options.preventDefaultException) ) { - e.preventDefault(); - } + if ( this.options.preventDefault && !utils.isBadAndroid && !utils.preventDefaultException(e.target, this.options.preventDefaultException) ) { + e.preventDefault(); + } - var point = e.touches ? e.touches[0] : e, - pos; + var point = e.touches ? e.touches[0] : e, + pos; - this.initiated = utils.eventType[e.type]; - this.moved = false; - this.distX = 0; - this.distY = 0; - this.directionX = 0; - this.directionY = 0; - this.directionLocked = 0; + this.initiated = utils.eventType[e.type]; + this.moved = false; + this.distX = 0; + this.distY = 0; + this.directionX = 0; + this.directionY = 0; + this.directionLocked = 0; - this._transitionTime(); + this._transitionTime(); - this.startTime = utils.getTime(); + this.startTime = utils.getTime(); - if ( this.options.useTransition && this.isInTransition ) { - this.isInTransition = false; - pos = this.getComputedPosition(); - this._translate(Math.round(pos.x), Math.round(pos.y)); - this._execEvent('scrollEnd'); - } else if ( !this.options.useTransition && this.isAnimating ) { - this.isAnimating = false; - this._execEvent('scrollEnd'); - } + if ( this.options.useTransition && this.isInTransition ) { + this.isInTransition = false; + pos = this.getComputedPosition(); + this._translate(Math.round(pos.x), Math.round(pos.y)); + this._execEvent('scrollEnd'); + } else if ( !this.options.useTransition && this.isAnimating ) { + this.isAnimating = false; + this._execEvent('scrollEnd'); + } - this.startX = this.x; - this.startY = this.y; - this.absStartX = this.x; - this.absStartY = this.y; - this.pointX = point.pageX; - this.pointY = point.pageY; + this.startX = this.x; + this.startY = this.y; + this.absStartX = this.x; + this.absStartY = this.y; + this.pointX = point.pageX; + this.pointY = point.pageY; - this._execEvent('beforeScrollStart'); - }, + this._execEvent('beforeScrollStart'); + }, - _move: function (e) { - if ( !this.enabled || utils.eventType[e.type] !== this.initiated ) { - return; - } + _move: function (e) { + if ( !this.enabled || utils.eventType[e.type] !== this.initiated ) { + return; + } - if ( this.options.preventDefault ) { // increases performance on Android? TODO: check! - e.preventDefault(); - } + if ( this.options.preventDefault ) { // increases performance on Android? TODO: check! + e.preventDefault(); + } - var point = e.touches ? e.touches[0] : e, - deltaX = point.pageX - this.pointX, - deltaY = point.pageY - this.pointY, - timestamp = utils.getTime(), - newX, newY, - absDistX, absDistY; + var point = e.touches ? e.touches[0] : e, + deltaX = point.pageX - this.pointX, + deltaY = point.pageY - this.pointY, + timestamp = utils.getTime(), + newX, newY, + absDistX, absDistY; - this.pointX = point.pageX; - this.pointY = point.pageY; + this.pointX = point.pageX; + this.pointY = point.pageY; - this.distX += deltaX; - this.distY += deltaY; - absDistX = Math.abs(this.distX); - absDistY = Math.abs(this.distY); + this.distX += deltaX; + this.distY += deltaY; + absDistX = Math.abs(this.distX); + absDistY = Math.abs(this.distY); - // We need to move at least 10 pixels for the scrolling to initiate - if ( timestamp - this.endTime > 300 && (absDistX < 10 && absDistY < 10) ) { - return; - } + // We need to move at least 10 pixels for the scrolling to initiate + if ( timestamp - this.endTime > 300 && (absDistX < 10 && absDistY < 10) ) { + return; + } - // If you are scrolling in one direction lock the other - if ( !this.directionLocked && !this.options.freeScroll ) { - if ( absDistX > absDistY + this.options.directionLockThreshold ) { - this.directionLocked = 'h'; // lock horizontally - } else if ( absDistY >= absDistX + this.options.directionLockThreshold ) { - this.directionLocked = 'v'; // lock vertically - } else { - this.directionLocked = 'n'; // no lock - } - } + // If you are scrolling in one direction lock the other + if ( !this.directionLocked && !this.options.freeScroll ) { + if ( absDistX > absDistY + this.options.directionLockThreshold ) { + this.directionLocked = 'h'; // lock horizontally + } else if ( absDistY >= absDistX + this.options.directionLockThreshold ) { + this.directionLocked = 'v'; // lock vertically + } else { + this.directionLocked = 'n'; // no lock + } + } - if ( this.directionLocked == 'h' ) { - if ( this.options.eventPassthrough == 'vertical' ) { - e.preventDefault(); - } else if ( this.options.eventPassthrough == 'horizontal' ) { - this.initiated = false; - return; - } + if ( this.directionLocked == 'h' ) { + if ( this.options.eventPassthrough == 'vertical' ) { + e.preventDefault(); + } else if ( this.options.eventPassthrough == 'horizontal' ) { + this.initiated = false; + return; + } - deltaY = 0; - } else if ( this.directionLocked == 'v' ) { - if ( this.options.eventPassthrough == 'horizontal' ) { - e.preventDefault(); - } else if ( this.options.eventPassthrough == 'vertical' ) { - this.initiated = false; - return; - } + deltaY = 0; + } else if ( this.directionLocked == 'v' ) { + if ( this.options.eventPassthrough == 'horizontal' ) { + e.preventDefault(); + } else if ( this.options.eventPassthrough == 'vertical' ) { + this.initiated = false; + return; + } - deltaX = 0; - } + deltaX = 0; + } - deltaX = this.hasHorizontalScroll ? deltaX : 0; - deltaY = this.hasVerticalScroll ? deltaY : 0; + deltaX = this.hasHorizontalScroll ? deltaX : 0; + deltaY = this.hasVerticalScroll ? deltaY : 0; - newX = this.x + deltaX; - newY = this.y + deltaY; + newX = this.x + deltaX; + newY = this.y + deltaY; - // Slow down if outside of the boundaries - if ( newX > 0 || newX < this.maxScrollX ) { - newX = this.options.bounce ? this.x + deltaX / 3 : newX > 0 ? 0 : this.maxScrollX; - } - if ( newY > 0 || newY < this.maxScrollY ) { - newY = this.options.bounce ? this.y + deltaY / 3 : newY > 0 ? 0 : this.maxScrollY; - } + // Slow down if outside of the boundaries + if ( newX > 0 || newX < this.maxScrollX ) { + newX = this.options.bounce ? this.x + deltaX / 3 : newX > 0 ? 0 : this.maxScrollX; + } + if ( newY > 0 || newY < this.maxScrollY ) { + newY = this.options.bounce ? this.y + deltaY / 3 : newY > 0 ? 0 : this.maxScrollY; + } - this.directionX = deltaX > 0 ? -1 : deltaX < 0 ? 1 : 0; - this.directionY = deltaY > 0 ? -1 : deltaY < 0 ? 1 : 0; + this.directionX = deltaX > 0 ? -1 : deltaX < 0 ? 1 : 0; + this.directionY = deltaY > 0 ? -1 : deltaY < 0 ? 1 : 0; - if ( !this.moved ) { - this._execEvent('scrollStart'); - } + if ( !this.moved ) { + this._execEvent('scrollStart'); + } - this.moved = true; + this.moved = true; - this._translate(newX, newY); + this._translate(newX, newY); /* REPLACE START: _move */ - if ( timestamp - this.startTime > 300 ) { - this.startTime = timestamp; - this.startX = this.x; - this.startY = this.y; - } + if ( timestamp - this.startTime > 300 ) { + this.startTime = timestamp; + this.startX = this.x; + this.startY = this.y; + } /* REPLACE END: _move */ - }, + }, - _end: function (e) { - if ( !this.enabled || utils.eventType[e.type] !== this.initiated ) { - return; - } + _end: function (e) { + if ( !this.enabled || utils.eventType[e.type] !== this.initiated ) { + return; + } - if ( this.options.preventDefault && !utils.preventDefaultException(e.target, this.options.preventDefaultException) ) { - e.preventDefault(); - } + if ( this.options.preventDefault && !utils.preventDefaultException(e.target, this.options.preventDefaultException) ) { + e.preventDefault(); + } - var point = e.changedTouches ? e.changedTouches[0] : e, - momentumX, - momentumY, - duration = utils.getTime() - this.startTime, - newX = Math.round(this.x), - newY = Math.round(this.y), - distanceX = Math.abs(newX - this.startX), - distanceY = Math.abs(newY - this.startY), - time = 0, - easing = ''; + var point = e.changedTouches ? e.changedTouches[0] : e, + momentumX, + momentumY, + duration = utils.getTime() - this.startTime, + newX = Math.round(this.x), + newY = Math.round(this.y), + distanceX = Math.abs(newX - this.startX), + distanceY = Math.abs(newY - this.startY), + time = 0, + easing = ''; - this.isInTransition = 0; - this.initiated = 0; - this.endTime = utils.getTime(); + this.isInTransition = 0; + this.initiated = 0; + this.endTime = utils.getTime(); - // reset if we are outside of the boundaries - if ( this.resetPosition(this.options.bounceTime) ) { - return; - } + // reset if we are outside of the boundaries + if ( this.resetPosition(this.options.bounceTime) ) { + return; + } - this.scrollTo(newX, newY); // ensures that the last position is rounded + this.scrollTo(newX, newY); // ensures that the last position is rounded - // we scrolled less than 10 pixels - if ( !this.moved ) { - if ( this.options.tap ) { - utils.tap(e, this.options.tap); - } + // we scrolled less than 10 pixels + if ( !this.moved ) { + if ( this.options.tap ) { + utils.tap(e, this.options.tap); + } - if ( this.options.click ) { - utils.click(e); - } + if ( this.options.click ) { + utils.click(e); + } - this._execEvent('scrollCancel'); - return; - } + this._execEvent('scrollCancel'); + return; + } - if ( this._events.flick && duration < 200 && distanceX < 100 && distanceY < 100 ) { - this._execEvent('flick'); - return; - } + if ( this._events.flick && duration < 200 && distanceX < 100 && distanceY < 100 ) { + this._execEvent('flick'); + return; + } - // start momentum animation if needed - if ( this.options.momentum && duration < 300 ) { - momentumX = this.hasHorizontalScroll ? utils.momentum(this.x, this.startX, duration, this.maxScrollX, this.options.bounce ? this.wrapperWidth : 0, this.options.deceleration) : { destination: newX, duration: 0 }; - momentumY = this.hasVerticalScroll ? utils.momentum(this.y, this.startY, duration, this.maxScrollY, this.options.bounce ? this.wrapperHeight : 0, this.options.deceleration) : { destination: newY, duration: 0 }; - newX = momentumX.destination; - newY = momentumY.destination; - time = Math.max(momentumX.duration, momentumY.duration); - this.isInTransition = 1; - } + // start momentum animation if needed + if ( this.options.momentum && duration < 300 ) { + momentumX = this.hasHorizontalScroll ? utils.momentum(this.x, this.startX, duration, this.maxScrollX, this.options.bounce ? this.wrapperWidth : 0, this.options.deceleration) : { destination: newX, duration: 0 }; + momentumY = this.hasVerticalScroll ? utils.momentum(this.y, this.startY, duration, this.maxScrollY, this.options.bounce ? this.wrapperHeight : 0, this.options.deceleration) : { destination: newY, duration: 0 }; + newX = momentumX.destination; + newY = momentumY.destination; + time = Math.max(momentumX.duration, momentumY.duration); + this.isInTransition = 1; + } - if ( this.options.snap ) { - var snap = this._nearestSnap(newX, newY); - this.currentPage = snap; - time = this.options.snapSpeed || Math.max( - Math.max( - Math.min(Math.abs(newX - snap.x), 1000), - Math.min(Math.abs(newY - snap.y), 1000) - ), 300); - newX = snap.x; - newY = snap.y; + if ( this.options.snap ) { + var snap = this._nearestSnap(newX, newY); + this.currentPage = snap; + time = this.options.snapSpeed || Math.max( + Math.max( + Math.min(Math.abs(newX - snap.x), 1000), + Math.min(Math.abs(newY - snap.y), 1000) + ), 300); + newX = snap.x; + newY = snap.y; - this.directionX = 0; - this.directionY = 0; - easing = this.options.bounceEasing; - } + this.directionX = 0; + this.directionY = 0; + easing = this.options.bounceEasing; + } // INSERT POINT: _end - if ( newX != this.x || newY != this.y ) { - // change easing function when scroller goes out of the boundaries - if ( newX > 0 || newX < this.maxScrollX || newY > 0 || newY < this.maxScrollY ) { - easing = utils.ease.quadratic; - } + if ( newX != this.x || newY != this.y ) { + // change easing function when scroller goes out of the boundaries + if ( newX > 0 || newX < this.maxScrollX || newY > 0 || newY < this.maxScrollY ) { + easing = utils.ease.quadratic; + } - this.scrollTo(newX, newY, time, easing); - return; - } + this.scrollTo(newX, newY, time, easing); + return; + } - this._execEvent('scrollEnd'); - }, + this._execEvent('scrollEnd'); + }, - _resize: function () { - var that = this; + _resize: function () { + var that = this; - clearTimeout(this.resizeTimeout); + clearTimeout(this.resizeTimeout); - this.resizeTimeout = setTimeout(function () { - that.refresh(); - }, this.options.resizePolling); - }, + this.resizeTimeout = setTimeout(function () { + that.refresh(); + }, this.options.resizePolling); + }, - resetPosition: function (time) { - var x = this.x, - y = this.y; + resetPosition: function (time) { + var x = this.x, + y = this.y; - time = time || 0; + time = time || 0; - if ( !this.hasHorizontalScroll || this.x > 0 ) { - x = 0; - } else if ( this.x < this.maxScrollX ) { - x = this.maxScrollX; - } + if ( !this.hasHorizontalScroll || this.x > 0 ) { + x = 0; + } else if ( this.x < this.maxScrollX ) { + x = this.maxScrollX; + } - if ( !this.hasVerticalScroll || this.y > 0 ) { - y = 0; - } else if ( this.y < this.maxScrollY ) { - y = this.maxScrollY; - } + if ( !this.hasVerticalScroll || this.y > 0 ) { + y = 0; + } else if ( this.y < this.maxScrollY ) { + y = this.maxScrollY; + } - if ( x == this.x && y == this.y ) { - return false; - } + if ( x == this.x && y == this.y ) { + return false; + } - this.scrollTo(x, y, time, this.options.bounceEasing); + this.scrollTo(x, y, time, this.options.bounceEasing); - return true; - }, + return true; + }, - disable: function () { - this.enabled = false; - }, + disable: function () { + this.enabled = false; + }, - enable: function () { - this.enabled = true; - }, + enable: function () { + this.enabled = true; + }, - refresh: function () { - var rf = this.wrapper.offsetHeight; // Force reflow + refresh: function () { + var rf = this.wrapper.offsetHeight; // Force reflow - this.wrapperWidth = this.wrapper.clientWidth; - this.wrapperHeight = this.wrapper.clientHeight; + this.wrapperWidth = this.wrapper.clientWidth; + this.wrapperHeight = this.wrapper.clientHeight; /* REPLACE START: refresh */ - this.scrollerWidth = this.scroller.offsetWidth; - this.scrollerHeight = this.scroller.offsetHeight; + this.scrollerWidth = this.scroller.offsetWidth; + this.scrollerHeight = this.scroller.offsetHeight; - this.maxScrollX = this.wrapperWidth - this.scrollerWidth; - this.maxScrollY = this.wrapperHeight - this.scrollerHeight; + this.maxScrollX = this.wrapperWidth - this.scrollerWidth; + this.maxScrollY = this.wrapperHeight - this.scrollerHeight; /* REPLACE END: refresh */ - this.hasHorizontalScroll = this.options.scrollX && this.maxScrollX < 0; - this.hasVerticalScroll = this.options.scrollY && this.maxScrollY < 0; + this.hasHorizontalScroll = this.options.scrollX && this.maxScrollX < 0; + this.hasVerticalScroll = this.options.scrollY && this.maxScrollY < 0; - if ( !this.hasHorizontalScroll ) { - this.maxScrollX = 0; - this.scrollerWidth = this.wrapperWidth; - } + if ( !this.hasHorizontalScroll ) { + this.maxScrollX = 0; + this.scrollerWidth = this.wrapperWidth; + } - if ( !this.hasVerticalScroll ) { - this.maxScrollY = 0; - this.scrollerHeight = this.wrapperHeight; - } + if ( !this.hasVerticalScroll ) { + this.maxScrollY = 0; + this.scrollerHeight = this.wrapperHeight; + } - this.endTime = 0; - this.directionX = 0; - this.directionY = 0; + this.endTime = 0; + this.directionX = 0; + this.directionY = 0; - this.wrapperOffset = utils.offset(this.wrapper); + this.wrapperOffset = utils.offset(this.wrapper); - this._execEvent('refresh'); + this._execEvent('refresh'); - this.resetPosition(); + this.resetPosition(); // INSERT POINT: _refresh - }, + }, - on: function (type, fn) { - if ( !this._events[type] ) { - this._events[type] = []; - } + on: function (type, fn) { + if ( !this._events[type] ) { + this._events[type] = []; + } - this._events[type].push(fn); - }, + this._events[type].push(fn); + }, - off: function (type, fn) { - if ( !this._events[type] ) { - return; - } + off: function (type, fn) { + if ( !this._events[type] ) { + return; + } - var index = this._events[type].indexOf(fn); + var index = this._events[type].indexOf(fn); - if ( index > -1 ) { - this._events[type].splice(index, 1); - } - }, + if ( index > -1 ) { + this._events[type].splice(index, 1); + } + }, - _execEvent: function (type) { - if ( !this._events[type] ) { - return; - } + _execEvent: function (type) { + if ( !this._events[type] ) { + return; + } - var i = 0, - l = this._events[type].length; + var i = 0, + l = this._events[type].length; - if ( !l ) { - return; - } + if ( !l ) { + return; + } - for ( ; i < l; i++ ) { - this._events[type][i].apply(this, [].slice.call(arguments, 1)); - } - }, + for ( ; i < l; i++ ) { + this._events[type][i].apply(this, [].slice.call(arguments, 1)); + } + }, - scrollBy: function (x, y, time, easing) { - x = this.x + x; - y = this.y + y; - time = time || 0; + scrollBy: function (x, y, time, easing) { + x = this.x + x; + y = this.y + y; + time = time || 0; - this.scrollTo(x, y, time, easing); - }, + this.scrollTo(x, y, time, easing); + }, - scrollTo: function (x, y, time, easing) { - easing = easing || utils.ease.circular; + scrollTo: function (x, y, time, easing) { + easing = easing || utils.ease.circular; - this.isInTransition = this.options.useTransition && time > 0; + this.isInTransition = this.options.useTransition && time > 0; - if ( !time || (this.options.useTransition && easing.style) ) { - this._transitionTimingFunction(easing.style); - this._transitionTime(time); - this._translate(x, y); - } else { - this._animate(x, y, time, easing.fn); - } - }, + if ( !time || (this.options.useTransition && easing.style) ) { + this._transitionTimingFunction(easing.style); + this._transitionTime(time); + this._translate(x, y); + } else { + this._animate(x, y, time, easing.fn); + } + }, - scrollToElement: function (el, time, offsetX, offsetY, easing) { - el = el.nodeType ? el : this.scroller.querySelector(el); + scrollToElement: function (el, time, offsetX, offsetY, easing) { + el = el.nodeType ? el : this.scroller.querySelector(el); - if ( !el ) { - return; - } + if ( !el ) { + return; + } - var pos = utils.offset(el); + var pos = utils.offset(el); - pos.left -= this.wrapperOffset.left; - pos.top -= this.wrapperOffset.top; + pos.left -= this.wrapperOffset.left; + pos.top -= this.wrapperOffset.top; - // if offsetX/Y are true we center the element to the screen - if ( offsetX === true ) { - offsetX = Math.round(el.offsetWidth / 2 - this.wrapper.offsetWidth / 2); - } - if ( offsetY === true ) { - offsetY = Math.round(el.offsetHeight / 2 - this.wrapper.offsetHeight / 2); - } + // if offsetX/Y are true we center the element to the screen + if ( offsetX === true ) { + offsetX = Math.round(el.offsetWidth / 2 - this.wrapper.offsetWidth / 2); + } + if ( offsetY === true ) { + offsetY = Math.round(el.offsetHeight / 2 - this.wrapper.offsetHeight / 2); + } - pos.left -= offsetX || 0; - pos.top -= offsetY || 0; + pos.left -= offsetX || 0; + pos.top -= offsetY || 0; - pos.left = pos.left > 0 ? 0 : pos.left < this.maxScrollX ? this.maxScrollX : pos.left; - pos.top = pos.top > 0 ? 0 : pos.top < this.maxScrollY ? this.maxScrollY : pos.top; + pos.left = pos.left > 0 ? 0 : pos.left < this.maxScrollX ? this.maxScrollX : pos.left; + pos.top = pos.top > 0 ? 0 : pos.top < this.maxScrollY ? this.maxScrollY : pos.top; - time = time === undefined || time === null || time === 'auto' ? Math.max(Math.abs(this.x-pos.left), Math.abs(this.y-pos.top)) : time; + time = time === undefined || time === null || time === 'auto' ? Math.max(Math.abs(this.x-pos.left), Math.abs(this.y-pos.top)) : time; - this.scrollTo(pos.left, pos.top, time, easing); - }, + this.scrollTo(pos.left, pos.top, time, easing); + }, - _transitionTime: function (time) { - time = time || 0; + _transitionTime: function (time) { + time = time || 0; - this.scrollerStyle[utils.style.transitionDuration] = time + 'ms'; + this.scrollerStyle[utils.style.transitionDuration] = time + 'ms'; - if ( !time && utils.isBadAndroid ) { - this.scrollerStyle[utils.style.transitionDuration] = '0.001s'; - } + if ( !time && utils.isBadAndroid ) { + this.scrollerStyle[utils.style.transitionDuration] = '0.001s'; + } - if ( this.indicators ) { - for ( var i = this.indicators.length; i--; ) { - this.indicators[i].transitionTime(time); - } - } + if ( this.indicators ) { + for ( var i = this.indicators.length; i--; ) { + this.indicators[i].transitionTime(time); + } + } // INSERT POINT: _transitionTime - }, + }, - _transitionTimingFunction: function (easing) { - this.scrollerStyle[utils.style.transitionTimingFunction] = easing; + _transitionTimingFunction: function (easing) { + this.scrollerStyle[utils.style.transitionTimingFunction] = easing; - if ( this.indicators ) { - for ( var i = this.indicators.length; i--; ) { - this.indicators[i].transitionTimingFunction(easing); - } - } + if ( this.indicators ) { + for ( var i = this.indicators.length; i--; ) { + this.indicators[i].transitionTimingFunction(easing); + } + } // INSERT POINT: _transitionTimingFunction - }, + }, - _translate: function (x, y) { - if ( this.options.useTransform ) { + _translate: function (x, y) { + if ( this.options.useTransform ) { /* REPLACE START: _translate */ - this.scrollerStyle[utils.style.transform] = 'translate(' + x + 'px,' + y + 'px)' + this.translateZ; + this.scrollerStyle[utils.style.transform] = 'translate(' + x + 'px,' + y + 'px)' + this.translateZ; /* REPLACE END: _translate */ - } else { - x = Math.round(x); - y = Math.round(y); - this.scrollerStyle.left = x + 'px'; - this.scrollerStyle.top = y + 'px'; - } + } else { + x = Math.round(x); + y = Math.round(y); + this.scrollerStyle.left = x + 'px'; + this.scrollerStyle.top = y + 'px'; + } - this.x = x; - this.y = y; + this.x = x; + this.y = y; - if ( this.indicators ) { - for ( var i = this.indicators.length; i--; ) { - this.indicators[i].updatePosition(); - } - } + if ( this.indicators ) { + for ( var i = this.indicators.length; i--; ) { + this.indicators[i].updatePosition(); + } + } // INSERT POINT: _translate - }, + }, - _initEvents: function (remove) { - var eventType = remove ? utils.removeEvent : utils.addEvent, - target = this.options.bindToWrapper ? this.wrapper : window; + _initEvents: function (remove) { + var eventType = remove ? utils.removeEvent : utils.addEvent, + target = this.options.bindToWrapper ? this.wrapper : window; - eventType(window, 'orientationchange', this); - eventType(window, 'resize', this); + eventType(window, 'orientationchange', this); + eventType(window, 'resize', this); - if ( this.options.click ) { - eventType(this.wrapper, 'click', this, true); - } + if ( this.options.click ) { + eventType(this.wrapper, 'click', this, true); + } - if ( !this.options.disableMouse ) { - eventType(this.wrapper, 'mousedown', this); - eventType(target, 'mousemove', this); - eventType(target, 'mousecancel', this); - eventType(target, 'mouseup', this); - } + if ( !this.options.disableMouse ) { + eventType(this.wrapper, 'mousedown', this); + eventType(target, 'mousemove', this); + eventType(target, 'mousecancel', this); + eventType(target, 'mouseup', this); + } - if ( utils.hasPointer && !this.options.disablePointer ) { - eventType(this.wrapper, utils.prefixPointerEvent('pointerdown'), this); - eventType(target, utils.prefixPointerEvent('pointermove'), this); - eventType(target, utils.prefixPointerEvent('pointercancel'), this); - eventType(target, utils.prefixPointerEvent('pointerup'), this); - } + if ( utils.hasPointer && !this.options.disablePointer ) { + eventType(this.wrapper, utils.prefixPointerEvent('pointerdown'), this); + eventType(target, utils.prefixPointerEvent('pointermove'), this); + eventType(target, utils.prefixPointerEvent('pointercancel'), this); + eventType(target, utils.prefixPointerEvent('pointerup'), this); + } - if ( utils.hasTouch && !this.options.disableTouch ) { - eventType(this.wrapper, 'touchstart', this); - eventType(target, 'touchmove', this); - eventType(target, 'touchcancel', this); - eventType(target, 'touchend', this); - } + if ( utils.hasTouch && !this.options.disableTouch ) { + eventType(this.wrapper, 'touchstart', this); + eventType(target, 'touchmove', this); + eventType(target, 'touchcancel', this); + eventType(target, 'touchend', this); + } - eventType(this.scroller, 'transitionend', this); - eventType(this.scroller, 'webkitTransitionEnd', this); - eventType(this.scroller, 'oTransitionEnd', this); - eventType(this.scroller, 'MSTransitionEnd', this); - }, + eventType(this.scroller, 'transitionend', this); + eventType(this.scroller, 'webkitTransitionEnd', this); + eventType(this.scroller, 'oTransitionEnd', this); + eventType(this.scroller, 'MSTransitionEnd', this); + }, - getComputedPosition: function () { - var matrix = window.getComputedStyle(this.scroller, null), - x, y; + getComputedPosition: function () { + var matrix = window.getComputedStyle(this.scroller, null), + x, y; - if ( this.options.useTransform ) { - matrix = matrix[utils.style.transform].split(')')[0].split(', '); - x = +(matrix[12] || matrix[4]); - y = +(matrix[13] || matrix[5]); - } else { - x = +matrix.left.replace(/[^-\d.]/g, ''); - y = +matrix.top.replace(/[^-\d.]/g, ''); - } + if ( this.options.useTransform ) { + matrix = matrix[utils.style.transform].split(')')[0].split(', '); + x = +(matrix[12] || matrix[4]); + y = +(matrix[13] || matrix[5]); + } else { + x = +matrix.left.replace(/[^-\d.]/g, ''); + y = +matrix.top.replace(/[^-\d.]/g, ''); + } - return { x: x, y: y }; - }, + return { x: x, y: y }; + }, - _initIndicators: function () { - var interactive = this.options.interactiveScrollbars, - customStyle = typeof this.options.scrollbars != 'string', - indicators = [], - indicator; + _initIndicators: function () { + var interactive = this.options.interactiveScrollbars, + customStyle = typeof this.options.scrollbars != 'string', + indicators = [], + indicator; - var that = this; + var that = this; - this.indicators = []; + this.indicators = []; - if ( this.options.scrollbars ) { - // Vertical scrollbar - if ( this.options.scrollY ) { - indicator = { - el: createDefaultScrollbar('v', interactive, this.options.scrollbars), - interactive: interactive, - defaultScrollbars: true, - customStyle: customStyle, - resize: this.options.resizeScrollbars, - shrink: this.options.shrinkScrollbars, - fade: this.options.fadeScrollbars, - listenX: false - }; + if ( this.options.scrollbars ) { + // Vertical scrollbar + if ( this.options.scrollY ) { + indicator = { + el: createDefaultScrollbar('v', interactive, this.options.scrollbars), + interactive: interactive, + defaultScrollbars: true, + customStyle: customStyle, + resize: this.options.resizeScrollbars, + shrink: this.options.shrinkScrollbars, + fade: this.options.fadeScrollbars, + listenX: false + }; - this.wrapper.appendChild(indicator.el); - indicators.push(indicator); - } + this.wrapper.appendChild(indicator.el); + indicators.push(indicator); + } - // Horizontal scrollbar - if ( this.options.scrollX ) { - indicator = { - el: createDefaultScrollbar('h', interactive, this.options.scrollbars), - interactive: interactive, - defaultScrollbars: true, - customStyle: customStyle, - resize: this.options.resizeScrollbars, - shrink: this.options.shrinkScrollbars, - fade: this.options.fadeScrollbars, - listenY: false - }; + // Horizontal scrollbar + if ( this.options.scrollX ) { + indicator = { + el: createDefaultScrollbar('h', interactive, this.options.scrollbars), + interactive: interactive, + defaultScrollbars: true, + customStyle: customStyle, + resize: this.options.resizeScrollbars, + shrink: this.options.shrinkScrollbars, + fade: this.options.fadeScrollbars, + listenY: false + }; - this.wrapper.appendChild(indicator.el); - indicators.push(indicator); - } - } + this.wrapper.appendChild(indicator.el); + indicators.push(indicator); + } + } - if ( this.options.indicators ) { - // TODO: check concat compatibility - indicators = indicators.concat(this.options.indicators); - } + if ( this.options.indicators ) { + // TODO: check concat compatibility + indicators = indicators.concat(this.options.indicators); + } - for ( var i = indicators.length; i--; ) { - this.indicators.push( new Indicator(this, indicators[i]) ); - } + for ( var i = indicators.length; i--; ) { + this.indicators.push( new Indicator(this, indicators[i]) ); + } - // TODO: check if we can use array.map (wide compatibility and performance issues) - function _indicatorsMap (fn) { - for ( var i = that.indicators.length; i--; ) { - fn.call(that.indicators[i]); - } - } + // TODO: check if we can use array.map (wide compatibility and performance issues) + function _indicatorsMap (fn) { + for ( var i = that.indicators.length; i--; ) { + fn.call(that.indicators[i]); + } + } - if ( this.options.fadeScrollbars ) { - this.on('scrollEnd', function () { - _indicatorsMap(function () { - this.fade(); - }); - }); + if ( this.options.fadeScrollbars ) { + this.on('scrollEnd', function () { + _indicatorsMap(function () { + this.fade(); + }); + }); - this.on('scrollCancel', function () { - _indicatorsMap(function () { - this.fade(); - }); - }); + this.on('scrollCancel', function () { + _indicatorsMap(function () { + this.fade(); + }); + }); - this.on('scrollStart', function () { - _indicatorsMap(function () { - this.fade(1); - }); - }); + this.on('scrollStart', function () { + _indicatorsMap(function () { + this.fade(1); + }); + }); - this.on('beforeScrollStart', function () { - _indicatorsMap(function () { - this.fade(1, true); - }); - }); - } + this.on('beforeScrollStart', function () { + _indicatorsMap(function () { + this.fade(1, true); + }); + }); + } - this.on('refresh', function () { - _indicatorsMap(function () { - this.refresh(); - }); - }); + this.on('refresh', function () { + _indicatorsMap(function () { + this.refresh(); + }); + }); - this.on('destroy', function () { - _indicatorsMap(function () { - this.destroy(); - }); + this.on('destroy', function () { + _indicatorsMap(function () { + this.destroy(); + }); - delete this.indicators; - }); - }, + delete this.indicators; + }); + }, - _initWheel: function () { - utils.addEvent(this.wrapper, 'wheel', this); - utils.addEvent(this.wrapper, 'mousewheel', this); - utils.addEvent(this.wrapper, 'DOMMouseScroll', this); + _initWheel: function () { + utils.addEvent(this.wrapper, 'wheel', this); + utils.addEvent(this.wrapper, 'mousewheel', this); + utils.addEvent(this.wrapper, 'DOMMouseScroll', this); - this.on('destroy', function () { - utils.removeEvent(this.wrapper, 'wheel', this); - utils.removeEvent(this.wrapper, 'mousewheel', this); - utils.removeEvent(this.wrapper, 'DOMMouseScroll', this); - }); - }, + this.on('destroy', function () { + utils.removeEvent(this.wrapper, 'wheel', this); + utils.removeEvent(this.wrapper, 'mousewheel', this); + utils.removeEvent(this.wrapper, 'DOMMouseScroll', this); + }); + }, - _wheel: function (e) { - if ( !this.enabled ) { - return; - } + _wheel: function (e) { + if ( !this.enabled ) { + return; + } - e.preventDefault(); - e.stopPropagation(); + e.preventDefault(); + e.stopPropagation(); - var wheelDeltaX, wheelDeltaY, - newX, newY, - that = this; + var wheelDeltaX, wheelDeltaY, + newX, newY, + that = this; - if ( this.wheelTimeout === undefined ) { - that._execEvent('scrollStart'); - } + if ( this.wheelTimeout === undefined ) { + that._execEvent('scrollStart'); + } - // Execute the scrollEnd event after 400ms the wheel stopped scrolling - clearTimeout(this.wheelTimeout); - this.wheelTimeout = setTimeout(function () { - that._execEvent('scrollEnd'); - that.wheelTimeout = undefined; - }, 400); + // Execute the scrollEnd event after 400ms the wheel stopped scrolling + clearTimeout(this.wheelTimeout); + this.wheelTimeout = setTimeout(function () { + that._execEvent('scrollEnd'); + that.wheelTimeout = undefined; + }, 400); - if ( 'deltaX' in e ) { - if (e.deltaMode === 1) { - wheelDeltaX = -e.deltaX * this.options.mouseWheelSpeed; - wheelDeltaY = -e.deltaY * this.options.mouseWheelSpeed; - } else { - wheelDeltaX = -e.deltaX; - wheelDeltaY = -e.deltaY; - } - } else if ( 'wheelDeltaX' in e ) { - wheelDeltaX = e.wheelDeltaX / 120 * this.options.mouseWheelSpeed; - wheelDeltaY = e.wheelDeltaY / 120 * this.options.mouseWheelSpeed; - } else if ( 'wheelDelta' in e ) { - wheelDeltaX = wheelDeltaY = e.wheelDelta / 120 * this.options.mouseWheelSpeed; - } else if ( 'detail' in e ) { - wheelDeltaX = wheelDeltaY = -e.detail / 3 * this.options.mouseWheelSpeed; - } else { - return; - } + if ( 'deltaX' in e ) { + if (e.deltaMode === 1) { + wheelDeltaX = -e.deltaX * this.options.mouseWheelSpeed; + wheelDeltaY = -e.deltaY * this.options.mouseWheelSpeed; + } else { + wheelDeltaX = -e.deltaX; + wheelDeltaY = -e.deltaY; + } + } else if ( 'wheelDeltaX' in e ) { + wheelDeltaX = e.wheelDeltaX / 120 * this.options.mouseWheelSpeed; + wheelDeltaY = e.wheelDeltaY / 120 * this.options.mouseWheelSpeed; + } else if ( 'wheelDelta' in e ) { + wheelDeltaX = wheelDeltaY = e.wheelDelta / 120 * this.options.mouseWheelSpeed; + } else if ( 'detail' in e ) { + wheelDeltaX = wheelDeltaY = -e.detail / 3 * this.options.mouseWheelSpeed; + } else { + return; + } - wheelDeltaX *= this.options.invertWheelDirection; - wheelDeltaY *= this.options.invertWheelDirection; + wheelDeltaX *= this.options.invertWheelDirection; + wheelDeltaY *= this.options.invertWheelDirection; - if ( !this.hasVerticalScroll ) { - wheelDeltaX = wheelDeltaY; - wheelDeltaY = 0; - } + if ( !this.hasVerticalScroll ) { + wheelDeltaX = wheelDeltaY; + wheelDeltaY = 0; + } - if ( this.options.snap ) { - newX = this.currentPage.pageX; - newY = this.currentPage.pageY; + if ( this.options.snap ) { + newX = this.currentPage.pageX; + newY = this.currentPage.pageY; - if ( wheelDeltaX > 0 ) { - newX--; - } else if ( wheelDeltaX < 0 ) { - newX++; - } + if ( wheelDeltaX > 0 ) { + newX--; + } else if ( wheelDeltaX < 0 ) { + newX++; + } - if ( wheelDeltaY > 0 ) { - newY--; - } else if ( wheelDeltaY < 0 ) { - newY++; - } + if ( wheelDeltaY > 0 ) { + newY--; + } else if ( wheelDeltaY < 0 ) { + newY++; + } - this.goToPage(newX, newY); + this.goToPage(newX, newY); - return; - } + return; + } - newX = this.x + Math.round(this.hasHorizontalScroll ? wheelDeltaX : 0); - newY = this.y + Math.round(this.hasVerticalScroll ? wheelDeltaY : 0); + newX = this.x + Math.round(this.hasHorizontalScroll ? wheelDeltaX : 0); + newY = this.y + Math.round(this.hasVerticalScroll ? wheelDeltaY : 0); - if ( newX > 0 ) { - newX = 0; - } else if ( newX < this.maxScrollX ) { - newX = this.maxScrollX; - } + if ( newX > 0 ) { + newX = 0; + } else if ( newX < this.maxScrollX ) { + newX = this.maxScrollX; + } - if ( newY > 0 ) { - newY = 0; - } else if ( newY < this.maxScrollY ) { - newY = this.maxScrollY; - } + if ( newY > 0 ) { + newY = 0; + } else if ( newY < this.maxScrollY ) { + newY = this.maxScrollY; + } - this.scrollTo(newX, newY, 0); + this.scrollTo(newX, newY, 0); // INSERT POINT: _wheel - }, + }, - _initSnap: function () { - this.currentPage = {}; + _initSnap: function () { + this.currentPage = {}; - if ( typeof this.options.snap == 'string' ) { - this.options.snap = this.scroller.querySelectorAll(this.options.snap); - } + if ( typeof this.options.snap == 'string' ) { + this.options.snap = this.scroller.querySelectorAll(this.options.snap); + } - this.on('refresh', function () { - var i = 0, l, - m = 0, n, - cx, cy, - x = 0, y, - stepX = this.options.snapStepX || this.wrapperWidth, - stepY = this.options.snapStepY || this.wrapperHeight, - el; + this.on('refresh', function () { + var i = 0, l, + m = 0, n, + cx, cy, + x = 0, y, + stepX = this.options.snapStepX || this.wrapperWidth, + stepY = this.options.snapStepY || this.wrapperHeight, + el; - this.pages = []; + this.pages = []; - if ( !this.wrapperWidth || !this.wrapperHeight || !this.scrollerWidth || !this.scrollerHeight ) { - return; - } + if ( !this.wrapperWidth || !this.wrapperHeight || !this.scrollerWidth || !this.scrollerHeight ) { + return; + } - if ( this.options.snap === true ) { - cx = Math.round( stepX / 2 ); - cy = Math.round( stepY / 2 ); + if ( this.options.snap === true ) { + cx = Math.round( stepX / 2 ); + cy = Math.round( stepY / 2 ); - while ( x > -this.scrollerWidth ) { - this.pages[i] = []; - l = 0; - y = 0; + while ( x > -this.scrollerWidth ) { + this.pages[i] = []; + l = 0; + y = 0; - while ( y > -this.scrollerHeight ) { - this.pages[i][l] = { - x: Math.max(x, this.maxScrollX), - y: Math.max(y, this.maxScrollY), - width: stepX, - height: stepY, - cx: x - cx, - cy: y - cy - }; + while ( y > -this.scrollerHeight ) { + this.pages[i][l] = { + x: Math.max(x, this.maxScrollX), + y: Math.max(y, this.maxScrollY), + width: stepX, + height: stepY, + cx: x - cx, + cy: y - cy + }; - y -= stepY; - l++; - } + y -= stepY; + l++; + } - x -= stepX; - i++; - } - } else { - el = this.options.snap; - l = el.length; - n = -1; + x -= stepX; + i++; + } + } else { + el = this.options.snap; + l = el.length; + n = -1; - for ( ; i < l; i++ ) { - if ( i === 0 || el[i].offsetLeft <= el[i-1].offsetLeft ) { - m = 0; - n++; - } + for ( ; i < l; i++ ) { + if ( i === 0 || el[i].offsetLeft <= el[i-1].offsetLeft ) { + m = 0; + n++; + } - if ( !this.pages[m] ) { - this.pages[m] = []; - } + if ( !this.pages[m] ) { + this.pages[m] = []; + } - x = Math.max(-el[i].offsetLeft, this.maxScrollX); - y = Math.max(-el[i].offsetTop, this.maxScrollY); - cx = x - Math.round(el[i].offsetWidth / 2); - cy = y - Math.round(el[i].offsetHeight / 2); + x = Math.max(-el[i].offsetLeft, this.maxScrollX); + y = Math.max(-el[i].offsetTop, this.maxScrollY); + cx = x - Math.round(el[i].offsetWidth / 2); + cy = y - Math.round(el[i].offsetHeight / 2); - this.pages[m][n] = { - x: x, - y: y, - width: el[i].offsetWidth, - height: el[i].offsetHeight, - cx: cx, - cy: cy - }; + this.pages[m][n] = { + x: x, + y: y, + width: el[i].offsetWidth, + height: el[i].offsetHeight, + cx: cx, + cy: cy + }; - if ( x > this.maxScrollX ) { - m++; - } - } - } + if ( x > this.maxScrollX ) { + m++; + } + } + } - this.goToPage(this.currentPage.pageX || 0, this.currentPage.pageY || 0, 0); + this.goToPage(this.currentPage.pageX || 0, this.currentPage.pageY || 0, 0); - // Update snap threshold if needed - if ( this.options.snapThreshold % 1 === 0 ) { - this.snapThresholdX = this.options.snapThreshold; - this.snapThresholdY = this.options.snapThreshold; - } else { - this.snapThresholdX = Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width * this.options.snapThreshold); - this.snapThresholdY = Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height * this.options.snapThreshold); - } - }); + // Update snap threshold if needed + if ( this.options.snapThreshold % 1 === 0 ) { + this.snapThresholdX = this.options.snapThreshold; + this.snapThresholdY = this.options.snapThreshold; + } else { + this.snapThresholdX = Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width * this.options.snapThreshold); + this.snapThresholdY = Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height * this.options.snapThreshold); + } + }); - this.on('flick', function () { - var time = this.options.snapSpeed || Math.max( - Math.max( - Math.min(Math.abs(this.x - this.startX), 1000), - Math.min(Math.abs(this.y - this.startY), 1000) - ), 300); + this.on('flick', function () { + var time = this.options.snapSpeed || Math.max( + Math.max( + Math.min(Math.abs(this.x - this.startX), 1000), + Math.min(Math.abs(this.y - this.startY), 1000) + ), 300); - this.goToPage( - this.currentPage.pageX + this.directionX, - this.currentPage.pageY + this.directionY, - time - ); - }); - }, + this.goToPage( + this.currentPage.pageX + this.directionX, + this.currentPage.pageY + this.directionY, + time + ); + }); + }, - _nearestSnap: function (x, y) { - if ( !this.pages.length ) { - return { x: 0, y: 0, pageX: 0, pageY: 0 }; - } + _nearestSnap: function (x, y) { + if ( !this.pages.length ) { + return { x: 0, y: 0, pageX: 0, pageY: 0 }; + } - var i = 0, - l = this.pages.length, - m = 0; + var i = 0, + l = this.pages.length, + m = 0; - // Check if we exceeded the snap threshold - if ( Math.abs(x - this.absStartX) < this.snapThresholdX && - Math.abs(y - this.absStartY) < this.snapThresholdY ) { - return this.currentPage; - } + // Check if we exceeded the snap threshold + if ( Math.abs(x - this.absStartX) < this.snapThresholdX && + Math.abs(y - this.absStartY) < this.snapThresholdY ) { + return this.currentPage; + } - if ( x > 0 ) { - x = 0; - } else if ( x < this.maxScrollX ) { - x = this.maxScrollX; - } + if ( x > 0 ) { + x = 0; + } else if ( x < this.maxScrollX ) { + x = this.maxScrollX; + } - if ( y > 0 ) { - y = 0; - } else if ( y < this.maxScrollY ) { - y = this.maxScrollY; - } + if ( y > 0 ) { + y = 0; + } else if ( y < this.maxScrollY ) { + y = this.maxScrollY; + } - for ( ; i < l; i++ ) { - if ( x >= this.pages[i][0].cx ) { - x = this.pages[i][0].x; - break; - } - } + for ( ; i < l; i++ ) { + if ( x >= this.pages[i][0].cx ) { + x = this.pages[i][0].x; + break; + } + } - l = this.pages[i].length; + l = this.pages[i].length; - for ( ; m < l; m++ ) { - if ( y >= this.pages[0][m].cy ) { - y = this.pages[0][m].y; - break; - } - } + for ( ; m < l; m++ ) { + if ( y >= this.pages[0][m].cy ) { + y = this.pages[0][m].y; + break; + } + } - if ( i == this.currentPage.pageX ) { - i += this.directionX; + if ( i == this.currentPage.pageX ) { + i += this.directionX; - if ( i < 0 ) { - i = 0; - } else if ( i >= this.pages.length ) { - i = this.pages.length - 1; - } + if ( i < 0 ) { + i = 0; + } else if ( i >= this.pages.length ) { + i = this.pages.length - 1; + } - x = this.pages[i][0].x; - } + x = this.pages[i][0].x; + } - if ( m == this.currentPage.pageY ) { - m += this.directionY; + if ( m == this.currentPage.pageY ) { + m += this.directionY; - if ( m < 0 ) { - m = 0; - } else if ( m >= this.pages[0].length ) { - m = this.pages[0].length - 1; - } + if ( m < 0 ) { + m = 0; + } else if ( m >= this.pages[0].length ) { + m = this.pages[0].length - 1; + } - y = this.pages[0][m].y; - } + y = this.pages[0][m].y; + } - return { - x: x, - y: y, - pageX: i, - pageY: m - }; - }, + return { + x: x, + y: y, + pageX: i, + pageY: m + }; + }, - goToPage: function (x, y, time, easing) { - easing = easing || this.options.bounceEasing; + goToPage: function (x, y, time, easing) { + easing = easing || this.options.bounceEasing; - if ( x >= this.pages.length ) { - x = this.pages.length - 1; - } else if ( x < 0 ) { - x = 0; - } + if ( x >= this.pages.length ) { + x = this.pages.length - 1; + } else if ( x < 0 ) { + x = 0; + } - if ( y >= this.pages[x].length ) { - y = this.pages[x].length - 1; - } else if ( y < 0 ) { - y = 0; - } + if ( y >= this.pages[x].length ) { + y = this.pages[x].length - 1; + } else if ( y < 0 ) { + y = 0; + } - var posX = this.pages[x][y].x, - posY = this.pages[x][y].y; + var posX = this.pages[x][y].x, + posY = this.pages[x][y].y; - time = time === undefined ? this.options.snapSpeed || Math.max( - Math.max( - Math.min(Math.abs(posX - this.x), 1000), - Math.min(Math.abs(posY - this.y), 1000) - ), 300) : time; + time = time === undefined ? this.options.snapSpeed || Math.max( + Math.max( + Math.min(Math.abs(posX - this.x), 1000), + Math.min(Math.abs(posY - this.y), 1000) + ), 300) : time; - this.currentPage = { - x: posX, - y: posY, - pageX: x, - pageY: y - }; + this.currentPage = { + x: posX, + y: posY, + pageX: x, + pageY: y + }; - this.scrollTo(posX, posY, time, easing); - }, + this.scrollTo(posX, posY, time, easing); + }, - next: function (time, easing) { - var x = this.currentPage.pageX, - y = this.currentPage.pageY; + next: function (time, easing) { + var x = this.currentPage.pageX, + y = this.currentPage.pageY; - x++; + x++; - if ( x >= this.pages.length && this.hasVerticalScroll ) { - x = 0; - y++; - } + if ( x >= this.pages.length && this.hasVerticalScroll ) { + x = 0; + y++; + } - this.goToPage(x, y, time, easing); - }, + this.goToPage(x, y, time, easing); + }, - prev: function (time, easing) { - var x = this.currentPage.pageX, - y = this.currentPage.pageY; + prev: function (time, easing) { + var x = this.currentPage.pageX, + y = this.currentPage.pageY; - x--; + x--; - if ( x < 0 && this.hasVerticalScroll ) { - x = 0; - y--; - } + if ( x < 0 && this.hasVerticalScroll ) { + x = 0; + y--; + } - this.goToPage(x, y, time, easing); - }, + this.goToPage(x, y, time, easing); + }, - _initKeys: function (e) { - // default key bindings - var keys = { - pageUp: 33, - pageDown: 34, - end: 35, - home: 36, - left: 37, - up: 38, - right: 39, - down: 40 - }; - var i; + _initKeys: function (e) { + // default key bindings + var keys = { + pageUp: 33, + pageDown: 34, + end: 35, + home: 36, + left: 37, + up: 38, + right: 39, + down: 40 + }; + var i; - // if you give me characters I give you keycode - if ( typeof this.options.keyBindings == 'object' ) { - for ( i in this.options.keyBindings ) { - if ( typeof this.options.keyBindings[i] == 'string' ) { - this.options.keyBindings[i] = this.options.keyBindings[i].toUpperCase().charCodeAt(0); - } - } - } else { - this.options.keyBindings = {}; - } + // if you give me characters I give you keycode + if ( typeof this.options.keyBindings == 'object' ) { + for ( i in this.options.keyBindings ) { + if ( typeof this.options.keyBindings[i] == 'string' ) { + this.options.keyBindings[i] = this.options.keyBindings[i].toUpperCase().charCodeAt(0); + } + } + } else { + this.options.keyBindings = {}; + } - for ( i in keys ) { - this.options.keyBindings[i] = this.options.keyBindings[i] || keys[i]; - } + for ( i in keys ) { + this.options.keyBindings[i] = this.options.keyBindings[i] || keys[i]; + } - utils.addEvent(window, 'keydown', this); + utils.addEvent(window, 'keydown', this); - this.on('destroy', function () { - utils.removeEvent(window, 'keydown', this); - }); - }, + this.on('destroy', function () { + utils.removeEvent(window, 'keydown', this); + }); + }, - _key: function (e) { - if ( !this.enabled ) { - return; - } + _key: function (e) { + if ( !this.enabled ) { + return; + } - var snap = this.options.snap, // we are using this alot, better to cache it - newX = snap ? this.currentPage.pageX : this.x, - newY = snap ? this.currentPage.pageY : this.y, - now = utils.getTime(), - prevTime = this.keyTime || 0, - acceleration = 0.250, - pos; + var snap = this.options.snap, // we are using this alot, better to cache it + newX = snap ? this.currentPage.pageX : this.x, + newY = snap ? this.currentPage.pageY : this.y, + now = utils.getTime(), + prevTime = this.keyTime || 0, + acceleration = 0.250, + pos; - if ( this.options.useTransition && this.isInTransition ) { - pos = this.getComputedPosition(); + if ( this.options.useTransition && this.isInTransition ) { + pos = this.getComputedPosition(); - this._translate(Math.round(pos.x), Math.round(pos.y)); - this.isInTransition = false; - } + this._translate(Math.round(pos.x), Math.round(pos.y)); + this.isInTransition = false; + } - this.keyAcceleration = now - prevTime < 200 ? Math.min(this.keyAcceleration + acceleration, 50) : 0; + this.keyAcceleration = now - prevTime < 200 ? Math.min(this.keyAcceleration + acceleration, 50) : 0; - switch ( e.keyCode ) { - case this.options.keyBindings.pageUp: - if ( this.hasHorizontalScroll && !this.hasVerticalScroll ) { - newX += snap ? 1 : this.wrapperWidth; - } else { - newY += snap ? 1 : this.wrapperHeight; - } - break; - case this.options.keyBindings.pageDown: - if ( this.hasHorizontalScroll && !this.hasVerticalScroll ) { - newX -= snap ? 1 : this.wrapperWidth; - } else { - newY -= snap ? 1 : this.wrapperHeight; - } - break; - case this.options.keyBindings.end: - newX = snap ? this.pages.length-1 : this.maxScrollX; - newY = snap ? this.pages[0].length-1 : this.maxScrollY; - break; - case this.options.keyBindings.home: - newX = 0; - newY = 0; - break; - case this.options.keyBindings.left: - newX += snap ? -1 : 5 + this.keyAcceleration>>0; - break; - case this.options.keyBindings.up: - newY += snap ? 1 : 5 + this.keyAcceleration>>0; - break; - case this.options.keyBindings.right: - newX -= snap ? -1 : 5 + this.keyAcceleration>>0; - break; - case this.options.keyBindings.down: - newY -= snap ? 1 : 5 + this.keyAcceleration>>0; - break; - default: - return; - } + switch ( e.keyCode ) { + case this.options.keyBindings.pageUp: + if ( this.hasHorizontalScroll && !this.hasVerticalScroll ) { + newX += snap ? 1 : this.wrapperWidth; + } else { + newY += snap ? 1 : this.wrapperHeight; + } + break; + case this.options.keyBindings.pageDown: + if ( this.hasHorizontalScroll && !this.hasVerticalScroll ) { + newX -= snap ? 1 : this.wrapperWidth; + } else { + newY -= snap ? 1 : this.wrapperHeight; + } + break; + case this.options.keyBindings.end: + newX = snap ? this.pages.length-1 : this.maxScrollX; + newY = snap ? this.pages[0].length-1 : this.maxScrollY; + break; + case this.options.keyBindings.home: + newX = 0; + newY = 0; + break; + case this.options.keyBindings.left: + newX += snap ? -1 : 5 + this.keyAcceleration>>0; + break; + case this.options.keyBindings.up: + newY += snap ? 1 : 5 + this.keyAcceleration>>0; + break; + case this.options.keyBindings.right: + newX -= snap ? -1 : 5 + this.keyAcceleration>>0; + break; + case this.options.keyBindings.down: + newY -= snap ? 1 : 5 + this.keyAcceleration>>0; + break; + default: + return; + } - if ( snap ) { - this.goToPage(newX, newY); - return; - } + if ( snap ) { + this.goToPage(newX, newY); + return; + } - if ( newX > 0 ) { - newX = 0; - this.keyAcceleration = 0; - } else if ( newX < this.maxScrollX ) { - newX = this.maxScrollX; - this.keyAcceleration = 0; - } + if ( newX > 0 ) { + newX = 0; + this.keyAcceleration = 0; + } else if ( newX < this.maxScrollX ) { + newX = this.maxScrollX; + this.keyAcceleration = 0; + } - if ( newY > 0 ) { - newY = 0; - this.keyAcceleration = 0; - } else if ( newY < this.maxScrollY ) { - newY = this.maxScrollY; - this.keyAcceleration = 0; - } + if ( newY > 0 ) { + newY = 0; + this.keyAcceleration = 0; + } else if ( newY < this.maxScrollY ) { + newY = this.maxScrollY; + this.keyAcceleration = 0; + } - this.scrollTo(newX, newY, 0); + this.scrollTo(newX, newY, 0); - this.keyTime = now; - }, + this.keyTime = now; + }, - _animate: function (destX, destY, duration, easingFn) { - var that = this, - startX = this.x, - startY = this.y, - startTime = utils.getTime(), - destTime = startTime + duration; + _animate: function (destX, destY, duration, easingFn) { + var that = this, + startX = this.x, + startY = this.y, + startTime = utils.getTime(), + destTime = startTime + duration; - function step () { - var now = utils.getTime(), - newX, newY, - easing; + function step () { + var now = utils.getTime(), + newX, newY, + easing; - if ( now >= destTime ) { - that.isAnimating = false; - that._translate(destX, destY); + if ( now >= destTime ) { + that.isAnimating = false; + that._translate(destX, destY); - if ( !that.resetPosition(that.options.bounceTime) ) { - that._execEvent('scrollEnd'); - } + if ( !that.resetPosition(that.options.bounceTime) ) { + that._execEvent('scrollEnd'); + } - return; - } + return; + } - now = ( now - startTime ) / duration; - easing = easingFn(now); - newX = ( destX - startX ) * easing + startX; - newY = ( destY - startY ) * easing + startY; - that._translate(newX, newY); + now = ( now - startTime ) / duration; + easing = easingFn(now); + newX = ( destX - startX ) * easing + startX; + newY = ( destY - startY ) * easing + startY; + that._translate(newX, newY); - if ( that.isAnimating ) { - rAF(step); - } - } + if ( that.isAnimating ) { + rAF(step); + } + } - this.isAnimating = true; - step(); - }, - handleEvent: function (e) { - switch ( e.type ) { - case 'touchstart': - case 'pointerdown': - case 'MSPointerDown': - case 'mousedown': - this._start(e); - break; - case 'touchmove': - case 'pointermove': - case 'MSPointerMove': - case 'mousemove': - this._move(e); - break; - case 'touchend': - case 'pointerup': - case 'MSPointerUp': - case 'mouseup': - case 'touchcancel': - case 'pointercancel': - case 'MSPointerCancel': - case 'mousecancel': - this._end(e); - break; - case 'orientationchange': - case 'resize': - this._resize(); - break; - case 'transitionend': - case 'webkitTransitionEnd': - case 'oTransitionEnd': - case 'MSTransitionEnd': - this._transitionEnd(e); - break; - case 'wheel': - case 'DOMMouseScroll': - case 'mousewheel': - this._wheel(e); - break; - case 'keydown': - this._key(e); - break; - case 'click': - if ( !e._constructed ) { - e.preventDefault(); - e.stopPropagation(); - } - break; - } - } + this.isAnimating = true; + step(); + }, + handleEvent: function (e) { + switch ( e.type ) { + case 'touchstart': + case 'pointerdown': + case 'MSPointerDown': + case 'mousedown': + this._start(e); + break; + case 'touchmove': + case 'pointermove': + case 'MSPointerMove': + case 'mousemove': + this._move(e); + break; + case 'touchend': + case 'pointerup': + case 'MSPointerUp': + case 'mouseup': + case 'touchcancel': + case 'pointercancel': + case 'MSPointerCancel': + case 'mousecancel': + this._end(e); + break; + case 'orientationchange': + case 'resize': + this._resize(); + break; + case 'transitionend': + case 'webkitTransitionEnd': + case 'oTransitionEnd': + case 'MSTransitionEnd': + this._transitionEnd(e); + break; + case 'wheel': + case 'DOMMouseScroll': + case 'mousewheel': + this._wheel(e); + break; + case 'keydown': + this._key(e); + break; + case 'click': + if ( !e._constructed ) { + e.preventDefault(); + e.stopPropagation(); + } + break; + } + } }; function createDefaultScrollbar (direction, interactive, type) { - var scrollbar = document.createElement('div'), - indicator = document.createElement('div'); + var scrollbar = document.createElement('div'), + indicator = document.createElement('div'); - if ( type === true ) { - scrollbar.style.cssText = 'position:absolute;z-index:9999'; - indicator.style.cssText = '-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px'; - } + if ( type === true ) { + scrollbar.style.cssText = 'position:absolute;z-index:9999'; + indicator.style.cssText = '-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px'; + } - indicator.className = 'iScrollIndicator'; + indicator.className = 'iScrollIndicator'; - if ( direction == 'h' ) { - if ( type === true ) { - scrollbar.style.cssText += ';height:7px;left:2px;right:2px;bottom:0'; - indicator.style.height = '100%'; - } - scrollbar.className = 'iScrollHorizontalScrollbar'; - } else { - if ( type === true ) { - scrollbar.style.cssText += ';width:7px;bottom:2px;top:2px;right:1px'; - indicator.style.width = '100%'; - } - scrollbar.className = 'iScrollVerticalScrollbar'; - } + if ( direction == 'h' ) { + if ( type === true ) { + scrollbar.style.cssText += ';height:7px;left:2px;right:2px;bottom:0'; + indicator.style.height = '100%'; + } + scrollbar.className = 'iScrollHorizontalScrollbar'; + } else { + if ( type === true ) { + scrollbar.style.cssText += ';width:7px;bottom:2px;top:2px;right:1px'; + indicator.style.width = '100%'; + } + scrollbar.className = 'iScrollVerticalScrollbar'; + } - scrollbar.style.cssText += ';overflow:hidden'; + scrollbar.style.cssText += ';overflow:hidden'; - if ( !interactive ) { - scrollbar.style.pointerEvents = 'none'; - } + if ( !interactive ) { + scrollbar.style.pointerEvents = 'none'; + } - scrollbar.appendChild(indicator); + scrollbar.appendChild(indicator); - return scrollbar; + return scrollbar; } function Indicator (scroller, options) { - this.wrapper = typeof options.el == 'string' ? document.querySelector(options.el) : options.el; - this.wrapperStyle = this.wrapper.style; - this.indicator = this.wrapper.children[0]; - this.indicatorStyle = this.indicator.style; - this.scroller = scroller; + this.wrapper = typeof options.el == 'string' ? document.querySelector(options.el) : options.el; + this.wrapperStyle = this.wrapper.style; + this.indicator = this.wrapper.children[0]; + this.indicatorStyle = this.indicator.style; + this.scroller = scroller; - this.options = { - listenX: true, - listenY: true, - interactive: false, - resize: true, - defaultScrollbars: false, - shrink: false, - fade: false, - speedRatioX: 0, - speedRatioY: 0 - }; + this.options = { + listenX: true, + listenY: true, + interactive: false, + resize: true, + defaultScrollbars: false, + shrink: false, + fade: false, + speedRatioX: 0, + speedRatioY: 0 + }; - for ( var i in options ) { - this.options[i] = options[i]; - } + for ( var i in options ) { + this.options[i] = options[i]; + } - this.sizeRatioX = 1; - this.sizeRatioY = 1; - this.maxPosX = 0; - this.maxPosY = 0; + this.sizeRatioX = 1; + this.sizeRatioY = 1; + this.maxPosX = 0; + this.maxPosY = 0; - if ( this.options.interactive ) { - if ( !this.options.disableTouch ) { - utils.addEvent(this.indicator, 'touchstart', this); - utils.addEvent(window, 'touchend', this); - } - if ( !this.options.disablePointer ) { - utils.addEvent(this.indicator, utils.prefixPointerEvent('pointerdown'), this); - utils.addEvent(window, utils.prefixPointerEvent('pointerup'), this); - } - if ( !this.options.disableMouse ) { - utils.addEvent(this.indicator, 'mousedown', this); - utils.addEvent(window, 'mouseup', this); - } - } + if ( this.options.interactive ) { + if ( !this.options.disableTouch ) { + utils.addEvent(this.indicator, 'touchstart', this); + utils.addEvent(window, 'touchend', this); + } + if ( !this.options.disablePointer ) { + utils.addEvent(this.indicator, utils.prefixPointerEvent('pointerdown'), this); + utils.addEvent(window, utils.prefixPointerEvent('pointerup'), this); + } + if ( !this.options.disableMouse ) { + utils.addEvent(this.indicator, 'mousedown', this); + utils.addEvent(window, 'mouseup', this); + } + } - if ( this.options.fade ) { - this.wrapperStyle[utils.style.transform] = this.scroller.translateZ; - this.wrapperStyle[utils.style.transitionDuration] = utils.isBadAndroid ? '0.001s' : '0ms'; - this.wrapperStyle.opacity = '0'; - } + if ( this.options.fade ) { + this.wrapperStyle[utils.style.transform] = this.scroller.translateZ; + this.wrapperStyle[utils.style.transitionDuration] = utils.isBadAndroid ? '0.001s' : '0ms'; + this.wrapperStyle.opacity = '0'; + } } Indicator.prototype = { - handleEvent: function (e) { - switch ( e.type ) { - case 'touchstart': - case 'pointerdown': - case 'MSPointerDown': - case 'mousedown': - this._start(e); - break; - case 'touchmove': - case 'pointermove': - case 'MSPointerMove': - case 'mousemove': - this._move(e); - break; - case 'touchend': - case 'pointerup': - case 'MSPointerUp': - case 'mouseup': - case 'touchcancel': - case 'pointercancel': - case 'MSPointerCancel': - case 'mousecancel': - this._end(e); - break; - } - }, + handleEvent: function (e) { + switch ( e.type ) { + case 'touchstart': + case 'pointerdown': + case 'MSPointerDown': + case 'mousedown': + this._start(e); + break; + case 'touchmove': + case 'pointermove': + case 'MSPointerMove': + case 'mousemove': + this._move(e); + break; + case 'touchend': + case 'pointerup': + case 'MSPointerUp': + case 'mouseup': + case 'touchcancel': + case 'pointercancel': + case 'MSPointerCancel': + case 'mousecancel': + this._end(e); + break; + } + }, - destroy: function () { - if ( this.options.interactive ) { - utils.removeEvent(this.indicator, 'touchstart', this); - utils.removeEvent(this.indicator, utils.prefixPointerEvent('pointerdown'), this); - utils.removeEvent(this.indicator, 'mousedown', this); + destroy: function () { + if ( this.options.interactive ) { + utils.removeEvent(this.indicator, 'touchstart', this); + utils.removeEvent(this.indicator, utils.prefixPointerEvent('pointerdown'), this); + utils.removeEvent(this.indicator, 'mousedown', this); - utils.removeEvent(window, 'touchmove', this); - utils.removeEvent(window, utils.prefixPointerEvent('pointermove'), this); - utils.removeEvent(window, 'mousemove', this); + utils.removeEvent(window, 'touchmove', this); + utils.removeEvent(window, utils.prefixPointerEvent('pointermove'), this); + utils.removeEvent(window, 'mousemove', this); - utils.removeEvent(window, 'touchend', this); - utils.removeEvent(window, utils.prefixPointerEvent('pointerup'), this); - utils.removeEvent(window, 'mouseup', this); - } + utils.removeEvent(window, 'touchend', this); + utils.removeEvent(window, utils.prefixPointerEvent('pointerup'), this); + utils.removeEvent(window, 'mouseup', this); + } - if ( this.options.defaultScrollbars ) { - this.wrapper.parentNode.removeChild(this.wrapper); - } - }, + if ( this.options.defaultScrollbars ) { + this.wrapper.parentNode.removeChild(this.wrapper); + } + }, - _start: function (e) { - var point = e.touches ? e.touches[0] : e; + _start: function (e) { + var point = e.touches ? e.touches[0] : e; - e.preventDefault(); - e.stopPropagation(); + e.preventDefault(); + e.stopPropagation(); - this.transitionTime(); + this.transitionTime(); - this.initiated = true; - this.moved = false; - this.lastPointX = point.pageX; - this.lastPointY = point.pageY; + this.initiated = true; + this.moved = false; + this.lastPointX = point.pageX; + this.lastPointY = point.pageY; - this.startTime = utils.getTime(); + this.startTime = utils.getTime(); - if ( !this.options.disableTouch ) { - utils.addEvent(window, 'touchmove', this); - } - if ( !this.options.disablePointer ) { - utils.addEvent(window, utils.prefixPointerEvent('pointermove'), this); - } - if ( !this.options.disableMouse ) { - utils.addEvent(window, 'mousemove', this); - } + if ( !this.options.disableTouch ) { + utils.addEvent(window, 'touchmove', this); + } + if ( !this.options.disablePointer ) { + utils.addEvent(window, utils.prefixPointerEvent('pointermove'), this); + } + if ( !this.options.disableMouse ) { + utils.addEvent(window, 'mousemove', this); + } - this.scroller._execEvent('beforeScrollStart'); - }, + this.scroller._execEvent('beforeScrollStart'); + }, - _move: function (e) { - var point = e.touches ? e.touches[0] : e, - deltaX, deltaY, - newX, newY, - timestamp = utils.getTime(); + _move: function (e) { + var point = e.touches ? e.touches[0] : e, + deltaX, deltaY, + newX, newY, + timestamp = utils.getTime(); - if ( !this.moved ) { - this.scroller._execEvent('scrollStart'); - } + if ( !this.moved ) { + this.scroller._execEvent('scrollStart'); + } - this.moved = true; + this.moved = true; - deltaX = point.pageX - this.lastPointX; - this.lastPointX = point.pageX; + deltaX = point.pageX - this.lastPointX; + this.lastPointX = point.pageX; - deltaY = point.pageY - this.lastPointY; - this.lastPointY = point.pageY; + deltaY = point.pageY - this.lastPointY; + this.lastPointY = point.pageY; - newX = this.x + deltaX; - newY = this.y + deltaY; + newX = this.x + deltaX; + newY = this.y + deltaY; - this._pos(newX, newY); + this._pos(newX, newY); // INSERT POINT: indicator._move - e.preventDefault(); - e.stopPropagation(); - }, + e.preventDefault(); + e.stopPropagation(); + }, - _end: function (e) { - if ( !this.initiated ) { - return; - } + _end: function (e) { + if ( !this.initiated ) { + return; + } - this.initiated = false; + this.initiated = false; - e.preventDefault(); - e.stopPropagation(); + e.preventDefault(); + e.stopPropagation(); - utils.removeEvent(window, 'touchmove', this); - utils.removeEvent(window, utils.prefixPointerEvent('pointermove'), this); - utils.removeEvent(window, 'mousemove', this); + utils.removeEvent(window, 'touchmove', this); + utils.removeEvent(window, utils.prefixPointerEvent('pointermove'), this); + utils.removeEvent(window, 'mousemove', this); - if ( this.scroller.options.snap ) { - var snap = this.scroller._nearestSnap(this.scroller.x, this.scroller.y); + if ( this.scroller.options.snap ) { + var snap = this.scroller._nearestSnap(this.scroller.x, this.scroller.y); - var time = this.options.snapSpeed || Math.max( - Math.max( - Math.min(Math.abs(this.scroller.x - snap.x), 1000), - Math.min(Math.abs(this.scroller.y - snap.y), 1000) - ), 300); + var time = this.options.snapSpeed || Math.max( + Math.max( + Math.min(Math.abs(this.scroller.x - snap.x), 1000), + Math.min(Math.abs(this.scroller.y - snap.y), 1000) + ), 300); - if ( this.scroller.x != snap.x || this.scroller.y != snap.y ) { - this.scroller.directionX = 0; - this.scroller.directionY = 0; - this.scroller.currentPage = snap; - this.scroller.scrollTo(snap.x, snap.y, time, this.scroller.options.bounceEasing); - } - } + if ( this.scroller.x != snap.x || this.scroller.y != snap.y ) { + this.scroller.directionX = 0; + this.scroller.directionY = 0; + this.scroller.currentPage = snap; + this.scroller.scrollTo(snap.x, snap.y, time, this.scroller.options.bounceEasing); + } + } - if ( this.moved ) { - this.scroller._execEvent('scrollEnd'); - } - }, + if ( this.moved ) { + this.scroller._execEvent('scrollEnd'); + } + }, - transitionTime: function (time) { - time = time || 0; - this.indicatorStyle[utils.style.transitionDuration] = time + 'ms'; + transitionTime: function (time) { + time = time || 0; + this.indicatorStyle[utils.style.transitionDuration] = time + 'ms'; - if ( !time && utils.isBadAndroid ) { - this.indicatorStyle[utils.style.transitionDuration] = '0.001s'; - } - }, + if ( !time && utils.isBadAndroid ) { + this.indicatorStyle[utils.style.transitionDuration] = '0.001s'; + } + }, - transitionTimingFunction: function (easing) { - this.indicatorStyle[utils.style.transitionTimingFunction] = easing; - }, + transitionTimingFunction: function (easing) { + this.indicatorStyle[utils.style.transitionTimingFunction] = easing; + }, - refresh: function () { - this.transitionTime(); + refresh: function () { + this.transitionTime(); - if ( this.options.listenX && !this.options.listenY ) { - this.indicatorStyle.display = this.scroller.hasHorizontalScroll ? 'block' : 'none'; - } else if ( this.options.listenY && !this.options.listenX ) { - this.indicatorStyle.display = this.scroller.hasVerticalScroll ? 'block' : 'none'; - } else { - this.indicatorStyle.display = this.scroller.hasHorizontalScroll || this.scroller.hasVerticalScroll ? 'block' : 'none'; - } + if ( this.options.listenX && !this.options.listenY ) { + this.indicatorStyle.display = this.scroller.hasHorizontalScroll ? 'block' : 'none'; + } else if ( this.options.listenY && !this.options.listenX ) { + this.indicatorStyle.display = this.scroller.hasVerticalScroll ? 'block' : 'none'; + } else { + this.indicatorStyle.display = this.scroller.hasHorizontalScroll || this.scroller.hasVerticalScroll ? 'block' : 'none'; + } - if ( this.scroller.hasHorizontalScroll && this.scroller.hasVerticalScroll ) { - utils.addClass(this.wrapper, 'iScrollBothScrollbars'); - utils.removeClass(this.wrapper, 'iScrollLoneScrollbar'); + if ( this.scroller.hasHorizontalScroll && this.scroller.hasVerticalScroll ) { + utils.addClass(this.wrapper, 'iScrollBothScrollbars'); + utils.removeClass(this.wrapper, 'iScrollLoneScrollbar'); - if ( this.options.defaultScrollbars && this.options.customStyle ) { - if ( this.options.listenX ) { - this.wrapper.style.right = '8px'; - } else { - this.wrapper.style.bottom = '8px'; - } - } - } else { - utils.removeClass(this.wrapper, 'iScrollBothScrollbars'); - utils.addClass(this.wrapper, 'iScrollLoneScrollbar'); + if ( this.options.defaultScrollbars && this.options.customStyle ) { + if ( this.options.listenX ) { + this.wrapper.style.right = '8px'; + } else { + this.wrapper.style.bottom = '8px'; + } + } + } else { + utils.removeClass(this.wrapper, 'iScrollBothScrollbars'); + utils.addClass(this.wrapper, 'iScrollLoneScrollbar'); - if ( this.options.defaultScrollbars && this.options.customStyle ) { - if ( this.options.listenX ) { - this.wrapper.style.right = '2px'; - } else { - this.wrapper.style.bottom = '2px'; - } - } - } + if ( this.options.defaultScrollbars && this.options.customStyle ) { + if ( this.options.listenX ) { + this.wrapper.style.right = '2px'; + } else { + this.wrapper.style.bottom = '2px'; + } + } + } - var r = this.wrapper.offsetHeight; // force refresh + var r = this.wrapper.offsetHeight; // force refresh - if ( this.options.listenX ) { - this.wrapperWidth = this.wrapper.clientWidth; - if ( this.options.resize ) { - this.indicatorWidth = Math.max(Math.round(this.wrapperWidth * this.wrapperWidth / (this.scroller.scrollerWidth || this.wrapperWidth || 1)), 8); - this.indicatorStyle.width = this.indicatorWidth + 'px'; - } else { - this.indicatorWidth = this.indicator.clientWidth; - } + if ( this.options.listenX ) { + this.wrapperWidth = this.wrapper.clientWidth; + if ( this.options.resize ) { + this.indicatorWidth = Math.max(Math.round(this.wrapperWidth * this.wrapperWidth / (this.scroller.scrollerWidth || this.wrapperWidth || 1)), 8); + this.indicatorStyle.width = this.indicatorWidth + 'px'; + } else { + this.indicatorWidth = this.indicator.clientWidth; + } - this.maxPosX = this.wrapperWidth - this.indicatorWidth; + this.maxPosX = this.wrapperWidth - this.indicatorWidth; - if ( this.options.shrink == 'clip' ) { - this.minBoundaryX = -this.indicatorWidth + 8; - this.maxBoundaryX = this.wrapperWidth - 8; - } else { - this.minBoundaryX = 0; - this.maxBoundaryX = this.maxPosX; - } + if ( this.options.shrink == 'clip' ) { + this.minBoundaryX = -this.indicatorWidth + 8; + this.maxBoundaryX = this.wrapperWidth - 8; + } else { + this.minBoundaryX = 0; + this.maxBoundaryX = this.maxPosX; + } - this.sizeRatioX = this.options.speedRatioX || (this.scroller.maxScrollX && (this.maxPosX / this.scroller.maxScrollX)); - } + this.sizeRatioX = this.options.speedRatioX || (this.scroller.maxScrollX && (this.maxPosX / this.scroller.maxScrollX)); + } - if ( this.options.listenY ) { - this.wrapperHeight = this.wrapper.clientHeight; - if ( this.options.resize ) { - this.indicatorHeight = Math.max(Math.round(this.wrapperHeight * this.wrapperHeight / (this.scroller.scrollerHeight || this.wrapperHeight || 1)), 8); - this.indicatorStyle.height = this.indicatorHeight + 'px'; - } else { - this.indicatorHeight = this.indicator.clientHeight; - } + if ( this.options.listenY ) { + this.wrapperHeight = this.wrapper.clientHeight; + if ( this.options.resize ) { + this.indicatorHeight = Math.max(Math.round(this.wrapperHeight * this.wrapperHeight / (this.scroller.scrollerHeight || this.wrapperHeight || 1)), 8); + this.indicatorStyle.height = this.indicatorHeight + 'px'; + } else { + this.indicatorHeight = this.indicator.clientHeight; + } - this.maxPosY = this.wrapperHeight - this.indicatorHeight; + this.maxPosY = this.wrapperHeight - this.indicatorHeight; - if ( this.options.shrink == 'clip' ) { - this.minBoundaryY = -this.indicatorHeight + 8; - this.maxBoundaryY = this.wrapperHeight - 8; - } else { - this.minBoundaryY = 0; - this.maxBoundaryY = this.maxPosY; - } + if ( this.options.shrink == 'clip' ) { + this.minBoundaryY = -this.indicatorHeight + 8; + this.maxBoundaryY = this.wrapperHeight - 8; + } else { + this.minBoundaryY = 0; + this.maxBoundaryY = this.maxPosY; + } - this.maxPosY = this.wrapperHeight - this.indicatorHeight; - this.sizeRatioY = this.options.speedRatioY || (this.scroller.maxScrollY && (this.maxPosY / this.scroller.maxScrollY)); - } + this.maxPosY = this.wrapperHeight - this.indicatorHeight; + this.sizeRatioY = this.options.speedRatioY || (this.scroller.maxScrollY && (this.maxPosY / this.scroller.maxScrollY)); + } - this.updatePosition(); - }, + this.updatePosition(); + }, - updatePosition: function () { - var x = this.options.listenX && Math.round(this.sizeRatioX * this.scroller.x) || 0, - y = this.options.listenY && Math.round(this.sizeRatioY * this.scroller.y) || 0; + updatePosition: function () { + var x = this.options.listenX && Math.round(this.sizeRatioX * this.scroller.x) || 0, + y = this.options.listenY && Math.round(this.sizeRatioY * this.scroller.y) || 0; - if ( !this.options.ignoreBoundaries ) { - if ( x < this.minBoundaryX ) { - if ( this.options.shrink == 'scale' ) { - this.width = Math.max(this.indicatorWidth + x, 8); - this.indicatorStyle.width = this.width + 'px'; - } - x = this.minBoundaryX; - } else if ( x > this.maxBoundaryX ) { - if ( this.options.shrink == 'scale' ) { - this.width = Math.max(this.indicatorWidth - (x - this.maxPosX), 8); - this.indicatorStyle.width = this.width + 'px'; - x = this.maxPosX + this.indicatorWidth - this.width; - } else { - x = this.maxBoundaryX; - } - } else if ( this.options.shrink == 'scale' && this.width != this.indicatorWidth ) { - this.width = this.indicatorWidth; - this.indicatorStyle.width = this.width + 'px'; - } + if ( !this.options.ignoreBoundaries ) { + if ( x < this.minBoundaryX ) { + if ( this.options.shrink == 'scale' ) { + this.width = Math.max(this.indicatorWidth + x, 8); + this.indicatorStyle.width = this.width + 'px'; + } + x = this.minBoundaryX; + } else if ( x > this.maxBoundaryX ) { + if ( this.options.shrink == 'scale' ) { + this.width = Math.max(this.indicatorWidth - (x - this.maxPosX), 8); + this.indicatorStyle.width = this.width + 'px'; + x = this.maxPosX + this.indicatorWidth - this.width; + } else { + x = this.maxBoundaryX; + } + } else if ( this.options.shrink == 'scale' && this.width != this.indicatorWidth ) { + this.width = this.indicatorWidth; + this.indicatorStyle.width = this.width + 'px'; + } - if ( y < this.minBoundaryY ) { - if ( this.options.shrink == 'scale' ) { - this.height = Math.max(this.indicatorHeight + y * 3, 8); - this.indicatorStyle.height = this.height + 'px'; - } - y = this.minBoundaryY; - } else if ( y > this.maxBoundaryY ) { - if ( this.options.shrink == 'scale' ) { - this.height = Math.max(this.indicatorHeight - (y - this.maxPosY) * 3, 8); - this.indicatorStyle.height = this.height + 'px'; - y = this.maxPosY + this.indicatorHeight - this.height; - } else { - y = this.maxBoundaryY; - } - } else if ( this.options.shrink == 'scale' && this.height != this.indicatorHeight ) { - this.height = this.indicatorHeight; - this.indicatorStyle.height = this.height + 'px'; - } - } + if ( y < this.minBoundaryY ) { + if ( this.options.shrink == 'scale' ) { + this.height = Math.max(this.indicatorHeight + y * 3, 8); + this.indicatorStyle.height = this.height + 'px'; + } + y = this.minBoundaryY; + } else if ( y > this.maxBoundaryY ) { + if ( this.options.shrink == 'scale' ) { + this.height = Math.max(this.indicatorHeight - (y - this.maxPosY) * 3, 8); + this.indicatorStyle.height = this.height + 'px'; + y = this.maxPosY + this.indicatorHeight - this.height; + } else { + y = this.maxBoundaryY; + } + } else if ( this.options.shrink == 'scale' && this.height != this.indicatorHeight ) { + this.height = this.indicatorHeight; + this.indicatorStyle.height = this.height + 'px'; + } + } - this.x = x; - this.y = y; + this.x = x; + this.y = y; - if ( this.scroller.options.useTransform ) { - this.indicatorStyle[utils.style.transform] = 'translate(' + x + 'px,' + y + 'px)' + this.scroller.translateZ; - } else { - this.indicatorStyle.left = x + 'px'; - this.indicatorStyle.top = y + 'px'; - } - }, + if ( this.scroller.options.useTransform ) { + this.indicatorStyle[utils.style.transform] = 'translate(' + x + 'px,' + y + 'px)' + this.scroller.translateZ; + } else { + this.indicatorStyle.left = x + 'px'; + this.indicatorStyle.top = y + 'px'; + } + }, - _pos: function (x, y) { - if ( x < 0 ) { - x = 0; - } else if ( x > this.maxPosX ) { - x = this.maxPosX; - } + _pos: function (x, y) { + if ( x < 0 ) { + x = 0; + } else if ( x > this.maxPosX ) { + x = this.maxPosX; + } - if ( y < 0 ) { - y = 0; - } else if ( y > this.maxPosY ) { - y = this.maxPosY; - } + if ( y < 0 ) { + y = 0; + } else if ( y > this.maxPosY ) { + y = this.maxPosY; + } - x = this.options.listenX ? Math.round(x / this.sizeRatioX) : this.scroller.x; - y = this.options.listenY ? Math.round(y / this.sizeRatioY) : this.scroller.y; + x = this.options.listenX ? Math.round(x / this.sizeRatioX) : this.scroller.x; + y = this.options.listenY ? Math.round(y / this.sizeRatioY) : this.scroller.y; - this.scroller.scrollTo(x, y); - }, + this.scroller.scrollTo(x, y); + }, - fade: function (val, hold) { - if ( hold && !this.visible ) { - return; - } + fade: function (val, hold) { + if ( hold && !this.visible ) { + return; + } - clearTimeout(this.fadeTimeout); - this.fadeTimeout = null; + clearTimeout(this.fadeTimeout); + this.fadeTimeout = null; - var time = val ? 250 : 500, - delay = val ? 0 : 300; + var time = val ? 250 : 500, + delay = val ? 0 : 300; - val = val ? '1' : '0'; + val = val ? '1' : '0'; - this.wrapperStyle[utils.style.transitionDuration] = time + 'ms'; + this.wrapperStyle[utils.style.transitionDuration] = time + 'ms'; - this.fadeTimeout = setTimeout((function (val) { - this.wrapperStyle.opacity = val; - this.visible = +val; - }).bind(this, val), delay); - } + this.fadeTimeout = setTimeout((function (val) { + this.wrapperStyle.opacity = val; + this.visible = +val; + }).bind(this, val), delay); + } }; IScroll.utils = utils; if ( typeof module != 'undefined' && module.exports ) { - module.exports = IScroll; + module.exports = IScroll; } else { - window.IScroll = IScroll; + window.IScroll = IScroll; } })(window, document, Math);
\ No newline at end of file diff --git a/StoneIsland/platforms/android/res/xml/config.xml b/StoneIsland/platforms/android/res/xml/config.xml index 940d11f9..1b471bd4 100644 --- a/StoneIsland/platforms/android/res/xml/config.xml +++ b/StoneIsland/platforms/android/res/xml/config.xml @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='utf-8'?> -<widget android-versionCode="6121" id="us.okfoc.stoneisland" version="1.2.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> +<widget android-versionCode="6123" id="us.okfoc.stoneisland" version="1.2.3" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <feature name="InAppBrowser"> <param name="android-package" value="org.apache.cordova.inappbrowser.InAppBrowser" /> </feature> @@ -43,11 +43,15 @@ <feature name="Sim"> <param name="android-package" value="com.pbakondy.Sim" /> </feature> + <access origin="https://ssl.gstatic.com/accessibility/javascript/android/*" /> + <feature name="MobileAccessibility"> + <param name="android-package" value="com.phonegap.plugin.mobileaccessibility.MobileAccessibility" /> + </feature> <name>Stone Island</name> <description> Stone Island </description> - <author email="julescarbon@gmail.com" href="http://asdf.us/"> + <author email="julescarbon@gmail.com" href="https://asdf.us/"> Jules LaPlace </author> <content src="index.html" /> @@ -78,8 +82,4 @@ <preference name="AndroidLaunchMode" value="singleTop" /> <preference name="android-minSdkVersion" value="28" /> <preference name="android-targetSdkVersion" value="28" /> - <access origin="https://ssl.gstatic.com/accessibility/javascript/android/*" /> - <feature name="MobileAccessibility"> - <param name="android-package" value="com.phonegap.plugin.mobileaccessibility.MobileAccessibility" /> - </feature> </widget> diff --git a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist b/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist index 3038bdb4..4f3362e8 100644 --- a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist @@ -22,7 +22,7 @@ <key>CordovaLib.xcscheme_^#shared#^_</key> <dict> <key>orderHint</key> - <integer>2</integer> + <integer>3</integer> </dict> </dict> </dict> diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Info.plist b/StoneIsland/platforms/ios/Stone Island.xcarchive/Info.plist index b19d3641..3c1a15d7 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Info.plist +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Info.plist @@ -20,7 +20,7 @@ <key>ArchiveVersion</key> <integer>2</integer> <key>CreationDate</key> - <date>2019-09-03T17:33:16Z</date> + <date>2019-09-03T17:36:10Z</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 07bc488d..c5eab167 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 41cca558..44bd0efb 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 c36812b7..2d671b31 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 5c37b8e2..6a932178 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 08f5a02a..f6b65fba 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 88bb9463..5b30e4e4 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 @@ -94,11 +94,11 @@ </data> <key>Assets.car</key> <data> - vgp675Opkcv74m4fWxYhphN3y5A= + VH1h9C+NzgBCZrqAmWhSs/dbGmc= </data> <key>CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib</key> <data> - x8juYGu5OzPHM4XQqpIZLsYhC/g= + tmw9rPRh0FHxDYK8d+XNTVAW8lE= </data> <key>CDVLaunchScreen.storyboardc/Info.plist</key> <data> @@ -106,7 +106,7 @@ </data> <key>CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib</key> <data> - O0pmlxSln55abE5yMemmP/JU1xY= + GjQfqLxJ+zEF5K8ZynCdnGblEbo= </data> <key>CDVNotification.bundle/beep.wav</key> <data> @@ -118,7 +118,7 @@ </data> <key>MainViewController.nib</key> <data> - NeXQnCWOEnff+bDgsBLraSSUz8k= + YSGSdofDJzUxj+jdvDecPcpDO78= </data> <key>PkgInfo</key> <data> @@ -450,7 +450,7 @@ </data> <key>www/js/lib/etc/accessibility.js</key> <data> - Wn6gqnvwEGX5KeP0hzMOqB+cgvM= + yTRyqtg1FGVi7NAS5ofPpYeCMJY= </data> <key>www/js/lib/etc/backup_db.js</key> <data> @@ -965,22 +965,22 @@ <dict> <key>hash</key> <data> - vgp675Opkcv74m4fWxYhphN3y5A= + VH1h9C+NzgBCZrqAmWhSs/dbGmc= </data> <key>hash2</key> <data> - Je+WaV1chYpOQAx9OVNG3Jgax5T2JG2sQDSga+q1S54= + syXWjwlVt8IaDz5J253dVsKDU5HNG1WcrNk5N19teV0= </data> </dict> <key>CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib</key> <dict> <key>hash</key> <data> - x8juYGu5OzPHM4XQqpIZLsYhC/g= + tmw9rPRh0FHxDYK8d+XNTVAW8lE= </data> <key>hash2</key> <data> - wFEPrr1zjUCLK2i7lOo+nYUOH7MToWtS1egJmD7KjbM= + pXxOQQe+v2mY83410YsYODdWMR+Yg374OWv3U1WHVZ0= </data> </dict> <key>CDVLaunchScreen.storyboardc/Info.plist</key> @@ -998,11 +998,11 @@ <dict> <key>hash</key> <data> - O0pmlxSln55abE5yMemmP/JU1xY= + GjQfqLxJ+zEF5K8ZynCdnGblEbo= </data> <key>hash2</key> <data> - LZwVAMTlKNReX9NRnZS+5kABJHqOtT1SAArmllUxEss= + MDgen06oOcviHQVZDZNatF0/FamLu5exeNdKdCrUKiI= </data> </dict> <key>CDVNotification.bundle/beep.wav</key> @@ -1020,11 +1020,11 @@ <dict> <key>hash</key> <data> - NeXQnCWOEnff+bDgsBLraSSUz8k= + YSGSdofDJzUxj+jdvDecPcpDO78= </data> <key>hash2</key> <data> - vpVFJnw4x40jz0BvQcyEuBVEM6llpnjR2YALHCsSfTA= + QNR2oSKBv86+uT/QGNHXOLY6O9Mywi/jh3ep5+L6GXY= </data> </dict> <key>config.xml</key> @@ -1922,11 +1922,11 @@ <dict> <key>hash</key> <data> - Wn6gqnvwEGX5KeP0hzMOqB+cgvM= + yTRyqtg1FGVi7NAS5ofPpYeCMJY= </data> <key>hash2</key> <data> - bNK1tgbI7jbhesCFH9yHAESSMqwbjjM4dFnlrW2uZ3E= + EpWdVbZkiGtY+imrqtGRtv2WZeL0CRTx2C4/WFF9NzQ= </data> </dict> <key>www/js/lib/etc/backup_db.js</key> diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/js/lib/etc/accessibility.js b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/js/lib/etc/accessibility.js index 3cbda2a0..8108e461 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/js/lib/etc/accessibility.js +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/js/lib/etc/accessibility.js @@ -3,7 +3,7 @@ var accessibility = (function() { var accessibility = {} accessibility.voiceOver = false - accessibility.DEBUG = true + accessibility.DEBUG = false accessibility.init = function(ready) { console.log('Accessibility init') diff --git a/StoneIsland/platforms/ios/Stone Island.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist b/StoneIsland/platforms/ios/Stone Island.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist index 605e51b3..4dadab85 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/StoneIsland/platforms/ios/Stone Island.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist @@ -12,7 +12,7 @@ <key>Stone Island.xcscheme_^#shared#^_</key> <dict> <key>orderHint</key> - <integer>3</integer> + <integer>2</integer> </dict> </dict> </dict> 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 eacaa1b4..2156bf4f 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/www/js/lib/etc/accessibility.js b/StoneIsland/platforms/ios/www/js/lib/etc/accessibility.js index 3cbda2a0..8108e461 100644 --- a/StoneIsland/platforms/ios/www/js/lib/etc/accessibility.js +++ b/StoneIsland/platforms/ios/www/js/lib/etc/accessibility.js @@ -3,7 +3,7 @@ var accessibility = (function() { var accessibility = {} accessibility.voiceOver = false - accessibility.DEBUG = true + accessibility.DEBUG = false accessibility.init = function(ready) { console.log('Accessibility init') diff --git a/StoneIsland/www/index.html b/StoneIsland/www/index.html index eaae059a..12c4c0ad 100755 --- a/StoneIsland/www/index.html +++ b/StoneIsland/www/index.html @@ -166,7 +166,7 @@ <div class="content"> <script type="text/html" class="template"> - <div class="image" style="background-image:url({{image}})"></div> + <div class="image" aria-label="{{label}}" style="background-image:url({{image}})"></div> <div class="text"> <h2> <b>{{code}}</b><br> diff --git a/StoneIsland/www/js/lib/blogs/ArchiveView.js b/StoneIsland/www/js/lib/blogs/ArchiveView.js index f10f7744..2fd2497b 100755 --- a/StoneIsland/www/js/lib/blogs/ArchiveView.js +++ b/StoneIsland/www/js/lib/blogs/ArchiveView.js @@ -58,7 +58,6 @@ var ArchiveView = ScrollableView.extend({ // id title images[ uri label code caption ] this.data.forEach(function(row, index){ - var t = this.menu_template.replace(/{{title}}/, row.title) var $t = $(t) $t.data("aria-label", stonewash(row.title.replace(/'/g, " '").trim())) @@ -86,7 +85,7 @@ var ArchiveView = ScrollableView.extend({ var $t = $("<div>") $t.addClass("row").addClass("loading") var t = this.row_template.replace(/{{image}}/, cell.uri) - .replace(/{{label}}/, cell.label) + .replace(/{{label}}/g, cell.label) .replace(/{{code}}/, cell.code) .replace(/{{caption}}/, cell.caption) $t.html(t) |
