Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added WeatherBug App

  • Loading branch information...
commit da36bb95fc8e5a282049ef4684bfab3749163a2d 1 parent 74e60c7
Amit Jotwani authored
Showing with 2,793 additions and 0 deletions.
  1. +93 −0 mashery.weatherbug/3.4.0/Readme.md
  2. +186 −0 mashery.weatherbug/3.4.0/_appMobi/xhr.js
  3. +860 −0 mashery.weatherbug/3.4.0/aUX_ui.css
  4. +50 −0 mashery.weatherbug/3.4.0/aUX_ui.min.js
  5. +55 −0 mashery.weatherbug/3.4.0/aUX_web.all.min.js
  6. BIN  mashery.weatherbug/3.4.0/images/ajax-loader.png
  7. BIN  mashery.weatherbug/3.4.0/images/background.jpg
  8. BIN  mashery.weatherbug/3.4.0/images/food.png
  9. BIN  mashery.weatherbug/3.4.0/images/greenspace.png
  10. BIN  mashery.weatherbug/3.4.0/images/icons-18-white.png
  11. BIN  mashery.weatherbug/3.4.0/images/listArrow.png
  12. BIN  mashery.weatherbug/3.4.0/images/listArrowSel.png
  13. BIN  mashery.weatherbug/3.4.0/images/listGroup.png
  14. BIN  mashery.weatherbug/3.4.0/images/lodging.png
  15. BIN  mashery.weatherbug/3.4.0/images/masherymade.png
  16. BIN  mashery.weatherbug/3.4.0/images/paw.png
  17. BIN  mashery.weatherbug/3.4.0/images/project_icon.png
  18. BIN  mashery.weatherbug/3.4.0/images/refresh.png
  19. BIN  mashery.weatherbug/3.4.0/images/vet.png
  20. BIN  mashery.weatherbug/3.4.0/images/weatherbug.jpg
  21. +106 −0 mashery.weatherbug/3.4.0/index.html
  22. BIN  mashery.weatherbug/3.4.0/master
  23. +100 −0 mashery.weatherbug/3.4.0/style.css
  24. +141 −0 mashery.weatherbug/3.4.0/weatherbug.js
  25. +338 −0 mashery.weatherbug/3.4.0/web/aUX_webCarousel.js
  26. +103 −0 mashery.weatherbug/3.4.0/web/aUX_webCss3animate.js
  27. +111 −0 mashery.weatherbug/3.4.0/web/aUX_webPasswordBox.js
  28. +439 −0 mashery.weatherbug/3.4.0/web/aUX_webScroll.js
  29. +1 −0  mashery.weatherbug/3.4.0/web/aUX_webSelectBox.js
  30. +55 −0 mashery.weatherbug/3.4.0/web/aUX_webShake.js
  31. +122 −0 mashery.weatherbug/3.4.0/web/aUX_webSwipe.js
  32. +33 −0 mashery.weatherbug/3.4.0/web/aUX_webTemplate.js
93 mashery.weatherbug/3.4.0/Readme.md
View
@@ -0,0 +1,93 @@
+WeatherBug API Demo App
+-----------------------------------
+Created lovingly for the developer community by Mashery.
+
+http://www.mashery.com
+
+http://developer.mashery.com
+
+
+SYNOPSIS
+==================================================================
+
+This demo App provides a way to see the WeatherBug API in action.
+It's built using appMobi's Cross Platform Development Kit (XDK) that
+lets you create mobile apps for smartphones and tablets using standard
+web languages (HTML5, CSS, and JavaScript).
+
+FEATURES
+==================================================================
+
+1. Uses WeatherBug's API to get weather forecast for the next 7 days
+based on your current Geo Location (Using appMobi's built in GeoLocation
+Detection API)
+2. Uses WeatherBug's API to get weather forecast for the next 7 days
+based on a zip code.
+
+
+GETTING STARTED
+==================================================================
+
+You will need the following to get started -
+
+1. appMobi's XDK. Free Download - http://www.appmobi.com/?q=node/27
+2. A WeatherBug API key (Register at http://developer.weatherbug.com/member/register).
+
+OBTAINING THE API KEY
+==================================================================
+
+Before you can begin using this app, you need need to get an API key
+from WeatherBug at http://developer.weatherbug.com/member/register.
+This will also give you a Single Sign-On Mashery ID with access to
+hundreds of other APIs.
+
+
+SETTING UP THE API KEY IN THIS APP
+==================================================================
+
+Once you have obtained your API key (use the WeatherBug REST XML Key),
+assign the API key to the variable api_key on line 1 of the file
+weatherbug.js, like so -
+
+<pre>
+ var api_key ='your_api_key_here';
+</pre>
+
+Note: It must be your WeatherBug REST XML API Key, not the GEO API Key.
+
+ABOUT WEATHER BUG API
+==================================================================
+
+The WeatherBug API provides the world's best source for intelligent
+weather information. Tap into the datasource and develop your own
+customized weather apps. Learn more about the WeatherBug API at http://developer.weatherbug.com
+
+
+WEATHER BUG DOCUMENTATION
+==================================================================
+
+To learn more about the data set provided by WeatherBug's API, you
+can read through the API documentation at
+http://developer.weatherbug.com/docs
+
+
+ABOUT MASHERY API Network
+==================================================================
+This app is built using the WeatherBug API, part of the Mashery API
+Network. The Mashery API Network gives you access to hundreds of APIs
+with single sign-on (SSO) access. When you sign in at
+http://developer.mashery.com, access and manage all of your applications
+and API keys in one central location.
+
+
+EXPLORE MORE APIs
+==================================================================
+Check out Mashery's API Network at http://developer.mashery.com/apis
+to explore other awesome APIs including NY Times, Klout, USA Today,
+Rotten Tomatoes and many more.
+
+
+SUPPORT
+==================================================================
+If you have any questions or need any help obtaining an API key,
+you can reach out to us at: developer-relations@mashery.com
186 mashery.weatherbug/3.4.0/_appMobi/xhr.js
View
@@ -0,0 +1,186 @@
+/* xhr.js
+ * This overrides the XMLHTTPRequest object to allow cross domain ajax requests
+ */
+(function () {
+ document.addEventListener("appMobi.device.remote.data", getRemoteExtCB, false);
+ var ajaxCallbacks = [];
+
+ function getRemoteExtCB(obj) {
+ if (ajaxCallbacks.length > 0 && ajaxCallbacks[obj.id]) {
+ ajaxCallbacks[obj.id](obj);
+ }
+ }
+
+ XMLHttpRequest_Native = XMLHttpRequest;
+ XMLHttpRequest.Extension = new Object;
+
+ XMLHttpRequest.Extension.addObject = function (object) {
+ uniqueId = Math.floor(Math.random() * 99999999);
+ object.uniqueId = uniqueId;
+ this[uniqueId] = object;
+ return uniqueId;
+ }
+
+ XMLHttpRequest.Extension.sendXMLHTTP = function (data) {
+ var myparams = new AppMobi.Device.RemoteDataParameters();
+ for (var j in data.headers) {
+ myparams.addHeader(j, data.headers[j]);
+ }
+
+ myparams.url = data.requestData.URL;
+ myparams.id = data.uniqueId;
+ myparams.method = data.requestData.method
+ myparams.body = data.body;
+ try{
+ if(typeof myparams.body=="object"){
+ myparams.body=JSON.stringify(myparams.body);
+ }
+ ajaxCallbacks[myparams.id] = this.handleResponseData;
+ AppMobi.device.getRemoteDataExt(myparams);
+ }
+ catch(e){}
+ }
+
+ XMLHttpRequest.Extension.handleResponseData = function (object) {
+
+ var XMLObj = XMLHttpRequest.Extension[object.id];
+ //EMULATED "HEADERS RECEIVED" CHANGES
+ var newHeaders = [];
+ for (var j in object.extras.headers) {
+ newHeaders[j.toLowerCase()] = object.extras.headers[j]; //jQuery looks for lowercase
+ newHeaders[j] = object.extras.headers[j];
+ }
+ XMLObj.responseData.headers = newHeaders;
+ XMLObj.readyState = XMLObj.HEADERS_RECEIVED;
+ if (typeof XMLObj.onreadystatechange == 'function') XMLObj.onreadystatechange();
+
+ XMLObj.readyState = XMLObj.LOADING;
+ if (typeof XMLObj.onreadystatechange == 'function') XMLObj.onreadystatechange();
+
+ XMLObj.response = object.response;
+ XMLObj.status = object.extras.status;
+ XMLObj.responseText = object.response;
+ XMLObj.responseXML = object.response;
+ XMLObj.readyState = XMLObj.DONE;
+
+ if (typeof XMLObj.onreadystatechange == 'function') XMLObj.onreadystatechange();
+ }
+
+
+ // XMLHTTP REDEFINE
+ //=======================================================================================================================
+ //DEFINE "CONSTANTS" FOR CONSTRUCTOR
+ XMLHttpRequest.UNSENT = 0; //const
+ XMLHttpRequest.OPENED = 1; //const
+ XMLHttpRequest.HEADERS_RECEIVED = 2; //const
+ XMLHttpRequest.LOADING = 3; //const
+ XMLHttpRequest.DONE = 4; //const
+
+ //DEFINE "CONSTANTS" PROTOTYPE
+ XMLHttpRequest.prototype.UNSENT = 0; //const
+ XMLHttpRequest.prototype.OPENED = 1; //const
+ XMLHttpRequest.prototype.HEADERS_RECEIVED = 2; //const
+ XMLHttpRequest.prototype.LOADING = 3; //const
+ XMLHttpRequest.prototype.DONE = 4; //const
+ //XMLHttpRequest = {readyState:0 };
+ XMLHttpRequest.prototype.open;
+ XMLHttpRequest.prototype.readyState = 0;
+ XMLHttpRequest.prototype.onreadystatechange;
+ XMLHttpRequest.prototype.headers = {};
+ XMLHttpRequest.prototype.body = "";
+
+
+
+ XMLHttpRequest.prototype.requestData = {
+ 'method': null,
+ 'URL': null,
+ 'asynchronous': true,
+ 'username': null,
+ 'password': null,
+ 'headers': null
+ };
+ XMLHttpRequest.prototype.responseData = {
+ 'headers': null
+ };
+
+
+ XMLHttpRequest.prototype.abort = function abort() {};
+ XMLHttpRequest.prototype.addEventListener = function addEventListener() {};
+ XMLHttpRequest.prototype.constructor = function XMLHttpRequest() {};
+ XMLHttpRequest.prototype.dispatchEvent = function dispatchEvent() {};
+
+ XMLHttpRequest.prototype.getAllResponseHeaders = function getAllResponseHeaders() {
+ if (this.readyState == this.OPENED || this.readyState == this.UNSENT) return "";
+ else {
+ return this.responseData.headers;
+ }
+ };
+
+ XMLHttpRequest.prototype.getResponseHeader = function getResponseHeader(header) {
+ return this.responseData.headers && this.responseData.headers[header] ? this.responseData.headers[header] : "";
+ };
+
+ XMLHttpRequest.prototype.open = function (method, url, async, user, password) {
+ //supported methods: CONNECT, DELETE, GET, HEAD, OPTIONS, POST, PUT, TRACE, or TRACK
+ /* Empty the list of author request headers.
+ Set the request method to method.
+ Set the request URL to url.
+ Set the request username to temp user.
+ Set the request password to temp password.
+ Set the asynchronous flag to the value of async.
+ */
+ this.requestData.method = method;
+ this.requestData.URL = url;
+ this.requestData.asynchronous = async;
+ this.requestData.user = user;
+ this.requestData.password = password;
+ this.readyState = this.OPENED;
+ if (typeof this.onreadystatechange == 'function') this.onreadystatechange();
+
+ }
+
+ XMLHttpRequest.prototype.overrideMimeType = function overrideMimeType() {};
+ XMLHttpRequest.prototype.removeEventListener = function removeEventListener() {};
+
+ XMLHttpRequest.prototype.send = function send(data) {
+ this.body = data;
+ if(this.requestData.asynchronous===false)
+ {
+ throw ("Synchronous XMLHtppRequest calls are not allowed. Please change your request to be asynchronous");
+ return;
+ }
+ XMLHttpRequest.Extension.sendXMLHTTP(this);
+ };
+
+ XMLHttpRequest.prototype.setRequestHeader = function setRequestHeader(header, value) {
+ this.headers[header] = value;
+ };
+
+
+ function XMLHttpRequest() {
+ XMLHttpRequest.Extension.addObject(this);
+ this.onabort = null;
+ this.onerror = null;
+ this.onload = null;
+ this.onloadstart = null;
+ this.onprogress = null;
+ this.onreadystatechange = null;
+ this.readyState = 0;
+ this.response = "";
+ this.responseText = "";
+ this.responseType = "";
+ this.responseXML = null;
+ this.status = 0;
+ this.statusText = "";
+ this.withCredentials = false;
+ this.requestData = {
+ 'method': null,
+ 'URL': null,
+ 'asynchronous': null,
+ 'username': null,
+ 'password': null,
+ 'headers': null
+ };
+ }
+ window.XMLHttpRequest = XMLHttpRequest;
+})();
860 mashery.weatherbug/3.4.0/aUX_ui.css
View
@@ -0,0 +1,860 @@
+/* Prevent copy paste for all elements except text fields */
+* {
+ -webkit-user-select: none;
+ -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
+}
+
+input,textarea {
+ -webkit-user-select: text;
+}
+
+/* Set up the page with a default background image */
+ body {
+ background-color: #fff;
+ color: #000;
+ font-size: 16pt;
+ margin: 0px;
+ padding: 0px;
+ font-family: Helvetica;
+ overflow-x: hidden;
+ -webkit-user-select: none;
+ -webkit-text-size-adjust: none;
+ }
+
+ body > #navbar {
+ box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ border-bottom: 1px solid #2d3642;
+ border-top: 1px solid #6d84a2;
+ padding: 10px;
+ height: 45px;
+ background-image: -webkit-gradient(
+ linear,
+ left bottom,
+ left top,
+ color-stop(0.09, rgb(45,54,66)),
+ color-stop(0.49, rgb(109,132,162)),
+ color-stop(0.81, rgb(109,132,162))
+ );
+ }
+
+ p{line-height:140%; padding:10px; font-size: 12pt;}
+
+/**********************************************************
+ NAV BAR
+**********************************************************/
+ #navbar > h1 {
+ position: absolute;
+ overflow: hidden;
+ left: 50%;
+ margin: 1px 0 0 -75px;
+ height: 45px;
+ font-size: 20px;
+ width: 150px;
+ font-weight: bold;
+ text-shadow: rgba(0, 0, 0, 0.4) 0px -1px 0;
+ text-align: center;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ color: #FFFFFF;
+ }
+
+ body[orient="landscape"] > #navbar > h1 {
+ margin-left: -125px;
+ width: 250px;
+ }
+
+#backButton {
+ /*display: none;*/
+ top:4px;
+ position: absolute;
+ left: 6px;
+ right: auto;
+ max-width:50px;
+ text-overflow: ellipsis;
+ }
+
+#backButton > div{
+ max-width: 50px;
+ overflow:hidden;
+ text-overflow: ellipsis;
+}
+
+
+
+
+/**********************************************************
+ CONTENT
+**********************************************************/
+ #content{
+ position: absolute;
+ overflow: hidden;
+ left:0px;
+ right:0px;
+ top: 45px;
+ bottom: 48px;
+ background: #fff;
+ }
+
+
+/**********************************************************
+ TOOL BAR
+**********************************************************/
+ #toolbar{
+ height: 48px;
+ background: #6d84a2;
+ bottom: 0px;
+ position: absolute;
+ width: 100%;
+ z-index: 1000;
+ text-align: center;
+ }
+
+ #toolbar a{
+ height: 44px;
+ width: 51px;
+ overflow: hidden;
+ display: inline-block;
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ border-left: 0px;
+ margin:0;
+ padding:6px 0 0 4px; /*fixes the 4px margin set by inline-block*/
+ }
+ #toolbar .last{
+ border-right: 0px;
+ }
+
+ .panel {
+ width:100%;height:100%;
+ display:block;
+ position:absolute;top:0px;left:-100%;
+ position:absolute;top:0px;left:-100%;
+ overflow:hidden;
+ background:white;
+ }
+
+/**********************************************************
+ UL > LI
+**********************************************************/
+ ul {
+ margin:0;
+ padding:0;
+ }
+
+ ul > li {
+ position: relative;
+ margin: 0;
+ border-bottom: 1px solid #E0E0E0;
+ padding: 8px 0 8px 10px;
+ font-size: 20px;
+ font-weight: bold;
+ list-style: none;
+ }
+
+ ul > li > a {
+ display: block;
+ margin: -8px 0 -8px -10px;
+ padding: 8px 32px 8px 10px;
+ text-decoration: none;
+ color: inherit;
+ background: url(images/listArrow.png) no-repeat right center;
+ }
+
+ ul > li > a[selected], ul > li > a:active {
+ background-color: #194fdb !important;
+ color: #FFFFFF !important;
+ }
+
+
+
+ ul > li.group {
+ position: relative;
+ top: -1px;
+ margin-bottom: -2px;
+ border-top: 1px solid #7d7d7d;
+ border-bottom: 1px solid #999999;
+ padding: 1px 10px;
+ background-image: -webkit-gradient(
+ linear,
+ left bottom,
+ left top,
+ color-stop(0.09, rgb(125,125,125)),
+ color-stop(0.49, rgb(153,153,153)),
+ color-stop(0.81, rgb(153,153,153))
+ );
+ font-size: 17px;
+ font-weight: bold;
+ text-shadow: rgba(0, 0, 0, 0.4) 0 1px 0;
+ color: #FFFFFF;
+ }
+
+ ul > li.group:first-child {
+ top: 0;
+ border-top: none;
+ }
+
+
+/**********************************************************
+ Fieldsets
+**********************************************************/
+
+ fieldset {
+ position: relative;
+ margin: 0 0 20px 0;
+ padding: 0;
+ background: #FFFFFF;
+ -webkit-border-radius: 10px;
+ -moz-border-radius: 10px;
+ border: 1px solid #999999;
+ text-align: right;
+ font-size: 16px;
+ }
+
+ .row {
+ position: relative;
+ min-height: 42px;
+ border-bottom: 1px solid #999999;
+ -webkit-border-radius: 0;
+ text-align: right;
+ }
+
+ fieldset > .row:last-child {
+ border-bottom: none !important;
+ }
+
+ .row > input:not(input[type|=radio]):not(input[type|=checkbox]) {
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ margin: 0;
+ border: none;
+ padding: 12px 10px 0 110px;
+ height: 42px;
+ background: none;
+ }
+ .row > input[type|=radio], .row > input[type|=checkbox] {
+ margin: 7px 7px 0 0;
+ height: 25px;
+ width: 25px;
+ }
+
+ .row > label {
+ position: absolute;
+ margin: 0 0 0 14px;
+ line-height: 42px;
+ font-weight: bold;
+ }
+
+ .row > span {
+ position: absolute;
+ padding: 12px 10px 0 110px;
+ margin: 0;
+ }
+
+ .row > .toggle {
+ position: absolute;
+ top: 6px;
+ right: 6px;
+ width: 100px;
+ height: 28px;
+ }
+
+ .toggle {
+ border: 1px solid #888888;
+ -webkit-border-radius: 6px;
+ background: #FFFFFF url(images/toggle.png) repeat-x;
+ font-size: 19px;
+ font-weight: bold;
+ line-height: 30px;
+ }
+
+ .toggle[toggled="true"] {
+ border: 1px solid #143fae;
+ background: #194fdb url(images/toggleOn.png) repeat-x;
+ }
+
+ .toggleOn {
+ display: none;
+ position: absolute;
+ width: 60px;
+ text-align: center;
+ left: 0;
+ top: 0;
+ color: #FFFFFF;
+ text-shadow: rgba(0, 0, 0, 0.4) 0px -1px 0;
+ }
+
+ .toggleOff {
+ position: absolute;
+ width: 60px;
+ text-align: center;
+ right: 0;
+ top: 0;
+ color: #666666;
+ }
+
+ .toggle[toggled="true"] > .toggleOn {
+ display: block;
+ }
+
+ .toggle[toggled="true"] > .toggleOff {
+ display: none;
+ }
+
+ .thumb {
+ position: absolute;
+ top: -1px;
+ left: -1px;
+ width: 40px;
+ height: 28px;
+ border: 1px solid #888888;
+ -webkit-border-radius: 6px;
+ background: #ffffff url(images/thumb.png) repeat-x;
+ }
+
+ .toggle[toggled="true"] > .thumb {
+ left: auto;
+ right: -1px;
+ }
+
+
+
+/**********************************************************
+ UI
+**********************************************************/
+.ui-icon {
+ background: #666;
+ background: rgba(0,0,0,.4);
+ background-image: url(images/icons-18-white.png);
+ background-repeat: no-repeat;
+ -moz-border-radius: 9px;
+ -webkit-border-radius: 9px;
+ border-radius: 9px;
+}
+
+
+.ui-loading .ui-loader { display: block; }
+.ui-loader { display: none; position: absolute; opacity: .85; z-index: 100; left: 50%; width: 200px; margin-left: -130px; margin-top: -35px; padding: 10px 30px; }
+.ui-loader h1 { font-size: 15px; text-align: center; }
+.ui-loader .ui-icon { position: static; display: block; opacity: .9; margin: 0 auto; width: 35px; height: 35px; background-color: transparent; }
+
+
+.spin {
+ -webkit-transform: rotate(360deg);
+ -webkit-animation-name: spin;
+ -webkit-animation-duration: 1s;
+ -webkit-animation-iteration-count: infinite;
+}
+@-webkit-keyframes spin {
+ from {-webkit-transform: rotate(0deg);}
+ to {-webkit-transform: rotate(360deg);}
+}
+
+.ui-icon-loading {
+ background-image: url(images/ajax-loader.png);
+ width: 40px;
+ height: 40px;
+ -moz-border-radius: 20px;
+ -webkit-border-radius: 20px;
+ border-radius: 20px;
+ background-size: 35px 35px;
+}
+
+
+.ui-corner-all {
+ -moz-border-radius: .6em;
+ -webkit-border-radius: .6em;
+ border-radius: .6em;
+}
+.ui-body-a {
+ border: 1px solid #2A2A2A;
+ background: #222222;
+ color: #fff;
+ text-shadow: 0 1px 0 #000;
+ font-weight: normal;
+ background-image: -moz-linear-gradient(top,
+ #666666,
+ #222222);
+ background-image: -webkit-gradient(linear,left top,left bottom,
+ color-stop(0, #666666),
+ color-stop(1, #222222));
+}
+.ui-body-a,
+.ui-body-a input,
+.ui-body-a select,
+.ui-body-a textarea,
+.ui-body-a button {
+ font-family: Helvetica, Arial, sans-serif;
+}
+.ui-body-a .ui-link-inherit {
+ color: #fff;
+}
+.ui-body-a .ui-link {
+ color: #2489CE;
+ font-weight: bold;
+}
+
+#AMUI_mask {position:absolute;top:45%;}
+
+.scrollBarV {
+ opacity: .7;
+ background: black;
+ width: 4px;
+ border-radius: 4px;
+}
+
+/***************************************************************
+ Buttons
+****************************************************************/
+.button {
+ background: #e4eafa none 0 0 repeat-x;
+ border: solid 1px #adc0ed;
+ color: black;
+ cursor: pointer;
+ display: inline-block;
+ font-weight: bold;
+ font-size: 12px;
+ margin: 1px;
+ padding: 0.83em 1em;
+ position: relative;
+ text-decoration: none;
+ text-shadow: #fff 0 1px 0;
+ vertical-align: middle;
+ white-space: nowrap;
+ min-width:40px;
+ text-overflow: ellipsis;
+
+ /* webkit */
+ -webkit-user-select: none;
+ -webkit-border-radius: 6px;
+
+
+ background-image: -webkit-gradient(linear,left top,left bottom,
+ color-stop(0.01, #eee),
+ color-stop(0.05, #f3f5fa),
+ color-stop(0.70, #e4eafa),
+ color-stop(1, #c9d5f6));
+}
+
+.button:focus {
+ outline: none;
+}
+
+.button.icon img {
+ border: none;
+ display: block;
+ height: 1em;
+ vertical-align: middle;
+ width: 1em;
+}
+
+.button.pressed {
+ color: #fff;
+ text-shadow: #2e4987 0 1px 0;
+ background-color: #5884d6;
+ border-color: #7488b8;
+
+
+ /* webkit */
+ background-image: -webkit-gradient(linear,left top,left bottom,
+ color-stop(0.01, #eee),
+ color-stop(0.05, #709de7),
+ color-stop(0.70, #5884d6),
+ color-stop(1, #4470ca));
+}
+
+.button.startArrow {
+ border-left: none !important;
+ margin-left: 26px;
+ padding-left: 0;
+
+ /* webkit */
+ -webkit-border-top-left-radius: 2px;
+ -webkit-border-bottom-left-radius: 2px;
+}
+
+
+.button.startArrow:after,
+.button.endArrow:after {
+ border: solid 1px #adc0ed;
+ bottom: -1px;
+ content: '';
+ display: block;
+ position: absolute;
+ text-shadow: none;
+ top: -1px;
+ width: 2.60em;
+ z-index: -1;
+}
+
+.button.startArrow:after {
+ left: -16px;
+
+ /* webkit */
+ -webkit-transform: rotate(45deg);
+ -webkit-border-top-left-radius: 17px;
+ -webkit-border-bottom-right-radius: 17px;
+ background-image: -webkit-gradient(linear,0 0,100% 100%,
+ color-stop(0.12, #eee),
+ color-stop(0.20, #f3f5fa),
+ color-stop(0.60, #e4eafa),
+ color-stop(1, #c9d5f6));
+}
+
+.button.pressed.startArrow:after {
+ background-color: #5884d6;
+ border-color: #7488b8;
+
+ background-image: -moz-linear-gradient(-45deg,
+ #eeeeee 12%,
+ #709de7 20%,
+ #5884d6 60%,
+ #4470ca 100%);
+
+ /* webkit */
+ background-image: -webkit-gradient(linear,0 0,100% 100%,
+ color-stop(0.12, #eee),
+ color-stop(0.20, #709de7),
+ color-stop(0.60, #5884d6),
+ color-stop(1, #4470ca));
+}
+
+
+.button.endArrow {
+ border-right: none;
+ margin-right: 26px;
+ padding-right: 0;
+
+ /* webkit */
+ -webkit-border-top-right-radius: 2px;
+ -webkit-border-bottom-right-radius: 2px;
+}
+
+.button.endArrow:after {
+ right: -16px;
+
+
+ /* webkit */
+ -webkit-transform:rotate(-45deg);
+ -webkit-border-top-right-radius:17px;
+ -webkit-border-bottom-left-radius:17px;
+ background-image: -webkit-gradient(linear,100% 0%, 0% 100%,
+ color-stop(0.12, #eee),
+ color-stop(0.20, #f3f5fa),
+ color-stop(0.60, #e4eafa),
+ color-stop(1, #c9d5f6));
+}
+
+
+.button.pressed.endArrow:after {
+ background-color: #5884d6;
+ border-color: #7488b8;
+
+ /* webkit */
+ background-image: -webkit-gradient(linear,100% 0%, 0% 100%,
+ color-stop(0.12, #eee),
+ color-stop(0.20, #709de7),
+ color-stop(0.60, #5884d6),
+ color-stop(1, #4470ca));
+}
+
+.buttons {
+ margin: 1px 2px;
+ overflow: hidden;
+ white-space: nowrap;
+}
+
+.buttons .button {
+ border-left-width: 0;
+ margin: 0;
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+}
+
+.buttons .button:first-child {
+ border-left-width: 1px;
+
+
+ /* webkit */
+ -webkit-border-top-left-radius: 6px;
+ -webkit-border-bottom-left-radius: 6px;
+}
+
+.buttons .button:last-child {
+
+ /* webkit */
+ -webkit-border-top-right-radius: 6px;
+ -webkit-border-bottom-right-radius: 6px;
+}
+
+
+
+/*************************************************
+ RED BUTTONS
+*************************************************/
+ .redButton{
+ background:#990000;
+ color:#fff;
+ text-shadow: #990000 0 1px 0;
+ border: solid 1px #990000;
+
+ background-image: -moz-linear-gradient(-90deg,
+ #C67172 1%,
+ #BD5A5B 5%,
+ #AD3234 70%,
+ #990000 100%);
+ background-image: -webkit-gradient(linear,left top,left bottom,
+ color-stop(0.01, #C67172),
+ color-stop(0.05, #BD5A5B),
+ color-stop(0.70, #AD3234),
+ color-stop(1, #990000));
+ }
+
+ .redButton:active{
+ background-image: -moz-linear-gradient(-90deg,
+ #990000 100%);
+ background-image: -webkit-gradient(linear,left top,left bottom,
+ color-stop(1, #990000));
+ }
+
+
+ .button.startArrow.redButton:after{
+ border: solid 1px #990000;
+ background:#990000;
+
+ background-image: -moz-linear-gradient(-45deg,
+ #C67172 12%,
+ #BD5A5B 20%,
+ #AD3234 60%,
+ #990000 100%);
+
+ background-image: -webkit-gradient(linear,0 0,100% 100%,
+ color-stop(0.12, #C67172),
+ color-stop(0.20, #BD5A5B),
+ color-stop(0.60, #AD3234),
+ color-stop(1, #990000));
+ }
+
+
+ .button.startArrow.redButton:active:after{
+ background-image: -moz-linear-gradient(-45deg,
+ #990000 100%);
+
+ background-image: -webkit-gradient(linear,0 0,100% 100%,
+ color-stop(1, #990000));
+ }
+
+
+ .button.endArrow.redButton:after {
+ border: solid 1px #990000;
+ background:#990000;
+ background-image: -moz-linear-gradient(-135deg,
+ #C67172 12%,
+ #BD5A5B 20%,
+ #AD3234 60%,
+ #990000 100%);
+
+ background-image: -webkit-gradient(linear,100% 0%, 0% 100%,
+ color-stop(0.12, #C67172),
+ color-stop(0.20, #BD5A5B),
+ color-stop(0.60, #AD3234),
+ color-stop(1, #990000));
+ }
+
+ .button.endArrow.redButton:active:after {
+ border: solid 1px #990000;
+ background:#990000;
+ background-image: -moz-linear-gradient(-135deg,
+ #990000 100%);
+
+ background-image: -webkit-gradient(linear,100% 0%, 0% 100%,
+ color-stop(1, #990000));
+ }
+
+
+
+/*************************************************
+ GREEN BUTTONS
+*************************************************/
+ .greenButton{
+ background:#12A545;
+ color:#fff;
+ text-shadow: #12A545 0 1px 0;
+ border: solid 1px #12A545;
+
+ background-image: -moz-linear-gradient(-90deg,
+ #71C98F 1%,
+ #51BD76 5%,
+ #32B15E 70%,
+ #12A545 100%);
+ background-image: -webkit-gradient(linear,left top,left bottom,
+ color-stop(0.01, #71C98F),
+ color-stop(0.05, #51BD76),
+ color-stop(0.70, #32B15E),
+ color-stop(1, #12A545));
+ }
+
+ .greenButton:active{
+ background-image: -moz-linear-gradient(-90deg,
+ #12A545 100%);
+ background-image: -webkit-gradient(linear,left top,left bottom,
+ color-stop(1, #12A545));
+ }
+
+
+ .button.startArrow.greenButton:after{
+ border: solid 1px #12A545;
+ background:#12A545;
+
+ background-image: -moz-linear-gradient(-45deg,
+ #71C98F 12%,
+ #51BD76 20%,
+ #32B15E 60%,
+ #12A545 100%);
+
+ background-image: -webkit-gradient(linear,0 0,100% 100%,
+ color-stop(0.12, #71C98F),
+ color-stop(0.20, #51BD76),
+ color-stop(0.60, #32B15E),
+ color-stop(1, #12A545));
+ }
+
+
+ .button.startArrow.greenButton:active:after{
+ background-image: -moz-linear-gradient(-45deg,
+ #12A545 100%);
+
+ background-image: -webkit-gradient(linear,0 0,100% 100%,
+ color-stop(1, #12A545));
+ }
+
+
+ .button.endArrow.greenButton:after {
+ border: solid 1px #12A545;
+ background:#12A545;
+ background-image: -moz-linear-gradient(-135deg,
+ #71C98F 12%,
+ #51BD76 20%,
+ #32B15E 60%,
+ #12A545 100%);
+
+ background-image: -webkit-gradient(linear,100% 0%, 0% 100%,
+ color-stop(0.12, #71C98F),
+ color-stop(0.20, #51BD76),
+ color-stop(0.60, #32B15E),
+ color-stop(1, #12A545));
+ }
+
+ .button.endArrow.greenButton:active:after {
+ border: solid 1px #12A545;
+ background:#12A545;
+ background-image: -moz-linear-gradient(-135deg,
+ #12A545 100%);
+
+ background-image: -webkit-gradient(linear,100% 0%, 0% 100%,
+ color-stop(1, #12A545));
+ }
+
+
+
+/*************************************************
+ GRAY BUTTONS
+*************************************************/
+ .grayButton{
+ background:#555;
+ color:#fff;
+ text-shadow: #555 0 1px 0;
+ border: solid 1px #555;
+
+ background-image: -moz-linear-gradient(-90deg,
+ #ccc 1%,
+ #999 5%,
+ #666 70%,
+ #555 100%);
+ background-image: -webkit-gradient(linear,left top,left bottom,
+ color-stop(0.01, #ccc),
+ color-stop(0.05, #999),
+ color-stop(0.70, #666),
+ color-stop(1, #555));
+ }
+
+ .grayButton:active{
+ background-image: -moz-linear-gradient(-90deg,
+ #555 100%);
+ background-image: -webkit-gradient(linear,left top,left bottom,
+ color-stop(1, #555));
+ }
+
+
+ .button.startArrow.grayButton:after{
+ border: solid 1px #555;
+ background:#555;
+
+ background-image: -moz-linear-gradient(-45deg,
+ #ccc 12%,
+ #999 20%,
+ #666 60%,
+ #555 100%);
+
+ background-image: -webkit-gradient(linear,0 0,100% 100%,
+ color-stop(0.12, #ccc),
+ color-stop(0.20, #999),
+ color-stop(0.60, #666),
+ color-stop(1, #555));
+ }
+
+
+ .button.startArrow.grayButton:active:after{
+ background-image: -moz-linear-gradient(-45deg,
+ #555 100%);
+
+ background-image: -webkit-gradient(linear,0 0,100% 100%,
+ color-stop(1, #555));
+ }
+
+
+ .button.endArrow.grayButton:after {
+ border: solid 1px #555;
+ background:#555;
+ background-image: -moz-linear-gradient(-135deg,
+ #ccc 12%,
+ #999 20%,
+ #666 60%,
+ #555 100%);
+
+ background-image: -webkit-gradient(linear,100% 0%, 0% 100%,
+ color-stop(0.12, #ccc),
+ color-stop(0.20, #999),
+ color-stop(0.60, #666),
+ color-stop(1, #555));
+ }
+
+ .button.endArrow.grayButton:active:after {
+ border: solid 1px #555;
+ background:#555;
+ background-image: -moz-linear-gradient(-135deg,
+ #555 100%);
+
+ background-image: -webkit-gradient(linear,100% 0%, 0% 100%,
+ color-stop(1, #555));
+ }
+
+
+
+
+/*************************************************
+ BARS
+*************************************************/
+ .buttonBar{
+ position:relative;
+ z-index:0;
+ box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ padding: 10px;
+ background-color:#7287a4;
+ background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, rgba(255,255,255,0.55)),color-stop(1, rgba(255,255,255,0.00))); /* Saf4+, Chrome */
+ text-align:center;
+ }
+
50 mashery.weatherbug/3.4.0/aUX_ui.min.js
View
@@ -0,0 +1,50 @@
+window.aUX||(aUX={});if(!aUX.web)aUX.web={};
+aUX.web.scroller=function(){function b(c,b){var a=document.createElement("div");a.style.position="absolute";a.style.width=c+"px";a.style.height=b+"px";a.style.webkitBorderRadius="2px";a.className="scrollBar";a.style.opacity=0.7;a.style.background="black";return a}var a="m11"in new WebKitCSSMatrix?"3d(":"(",g="m11"in new WebKitCSSMatrix?",0)":")",d=!1,f=function(c,h){if(this.el=typeof c=="string"||c instanceof String?document.getElementById(c):c){if(this instanceof f)for(j in h)this[j]=h[j];else return new f(c,
+h);try{this.container=this.el.parentNode;var a=this;this.el.addEventListener("touchmove",function(c){a.touchMove(c)},!1);this.el.addEventListener("touchend",function(c){a.touchEnd(c)},!1);if(this.verticalScroll&&this.verticalScroll==!0&&this.scrollBars==!0){var e=b(5,20);e.style.top="0px";e.className=this.vScrollCSS;e.style.opacity="0";this.container.appendChild(e);this.vscrollBar=e}if(this.horizontalScroll&&this.horizontalScroll==!0&&this.scrollBars==!0)e=b(20,5),e.style.bottom="0px",e.className=
+this.hScrollCSS,e.style.opacity="0",this.container.appendChild(e),this.hscrollBar=e}catch(d){alert("error adding scroller"+d)}}else alert("Could not find element for scroller "+c)};f.prototype={lockX:0,lockY:0,boolScrollLock:!1,currentScrollingObject:null,bottomMargin:0,maxTop:0,startTop:0,verticalScroll:!0,horizontalScroll:!1,scrollBars:!0,vscrollBar:null,hscrollBar:null,hScrollCSS:"scrollBar",vScrollCSS:"scrollBar",divHeight:0,lastScrollbar:"",timeMoved:0,vdistanceMoved:0,hdistanceMoved:0,prevTime:0,
+finishScrollingObject:null,container:null,maxLeft:0,startLeft:0,rightMargin:0,divWidth:0,touchMove:function(c){try{if(d||(d=!0,this.touchStart(c)),this.currentScrollingObject!=null){c.preventDefault();var b={x:0,y:0},a=0,e=0,f=0,g=0;if(this.verticalScroll){var p=this.lockY-c.touches[0].pageY,p=-p,a=this.startTop+p,e=(new WebKitCSSMatrix(window.getComputedStyle(this.el).webkitTransform)).f;b.y=a}if(this.horizontalScroll){var m=this.lockX-c.touches[0].pageX,m=-m,p=f=this.startLeft+m,g=-(new WebKitCSSMatrix(window.getComputedStyle(this.el).webkitTransform)).e;
+b.x=p}this.scrollerMoveCSS(this.currentScrollingObject,b,0);if(this.vscrollBar){var q=this.bottomMargin-numOnly(this.vscrollBar.style.height)-(this.maxTop+a)/this.maxTop*(this.bottomMargin-numOnly(this.vscrollBar.style.height));this.scrollerMoveCSS(this.vscrollBar,{x:0,y:q},0)}this.hscrollBar&&(q=this.rightMargin-numOnly(this.hscrollBar.style.width)-(this.maxLeft+f)/this.maxLeft*(this.rightMargin-numOnly(this.hscrollBar.style.width)),this.scrollerMoveCSS(this.hscrollBar,{x:q,y:0},0));if(this.prevTime){var t=
+Math.abs(e)-Math.abs(a),s=Math.abs(g)-Math.abs(f),o=c.timeStamp-this.prevTime;o<1E3?(this.timeMoved+=o,this.vdistanceMoved+=t,this.hdistanceMoved+=s):this.hdistanceMoved=this.vdistanceMoved=this.timeMoved=0}this.prevTime=c.timeStamp}}catch(n){alert("error in scrollMove: "+n)}},touchStart:function(c){var b=this.container,a=this.el;if(b)try{if(c.touches[0].target&&c.touches[0].target.type!=void 0){var e=c.touches[0].target.tagName.toLowerCase();if(e=="select"||e=="input"||e=="button")return}this.hdistanceMoved=
+this.vdistanceMoved=this.timeMoved=0;this.finishScrollingObject=this.prevTime=null;this.bottomMargin=b.clientHeight>window.innerHeight?window.innerHeight:b.clientHeight;this.maxTop=a.clientHeight-this.bottomMargin;this.divHeight=a.clientHeight;this.rightMargin=b.clientWidth>window.innerWidth?window.innerWidth:b.clientWidth;this.maxLeft=a.clientWidth-this.rightMargin;this.divWidth=a.clientWidth;if(!(this.maxTop<0)&&c.touches.length==1&&this.boolScrollLock==!1){try{this.startTop=(new WebKitCSSMatrix(window.getComputedStyle(a).webkitTransform)).f,
+this.startLeft=(new WebKitCSSMatrix(window.getComputedStyle(a).webkitTransform)).e}catch(d){this.startLeft=this.startTop=0,console.log("error scroller touchstart "+d)}this.lockX=c.touches[0].pageX;this.lockY=c.touches[0].pageY;this.currentScrollingObject=a;if(this.vscrollBar){this.vscrollBar.style.height=parseFloat(this.bottomMargin/this.divHeight)*this.bottomMargin+"px";var f=this.bottomMargin-numOnly(this.vscrollBar.style.height)-(this.maxTop+this.startTop)/this.maxTop*(this.bottomMargin-numOnly(this.vscrollBar.style.height));
+this.scrollerMoveCSS(this.vscrollBar,{x:0,y:f},0);this.container.clientWidth>window.innerWidth?this.vscrollBar.style.left=window.innerWidth-numOnly(this.vscrollBar.style.width)+"px":this.vscrollBar.style.right="0px";this.vscrollBar.webkitTransition="opacity";this.vscrollBar.style.opacity=1}if(this.hscrollBar)this.hscrollBar.style.width=parseFloat(this.rightMargin/this.divWidth)*this.rightMargin+"px",f=this.rightMargin-numOnly(this.hscrollBar.style.width)-(this.maxTop+this.startLeft)/this.maxtLeft*
+(this.rightMargin-numOnly(this.hscrollBar.style.width)),this.scrollerMoveCSS(this.hscrollBar,{x:f,y:0},0),this.container.clientHeight>window.innerHeight?this.hscrollBar.style.top=window.innerHeight-numOnly(this.hscrollBar.style.height)+"px":this.hscrollBar.style.bottom="0px",this.hscrollBar.webkitTransition="opacity",this.hscrollBar.style.opacity=1;c.preventDefault()}}catch(g){alert("error in scrollStart: "+g)}},touchEnd:function(b){if(this.currentScrollingObject!=null){b.preventDefault();b.stopPropagation();
+this.finishScrollingObject=this.currentScrollingObject;this.currentScrollingObject=null;b={x:0,y:0};if(this.verticalScroll){var a=-this.vdistanceMoved,f=this.timeMoved,e=2,g=Math.abs(a)/f*1E3,f=Math.abs(a)/f*e,e=g*g/e/1E3/f;newTime=0;e*=a<0?-1:1;newTime=g/2;a=(new WebKitCSSMatrix(window.getComputedStyle(this.el).webkitTransform)).f;a<0&&(a-=e);a>0&&(a=0);a<-this.maxTop&&(a=-this.maxTop);b.y=a}if(this.horizontalScroll)a=-this.hdistanceMoved,f=this.timeMoved,e=2,g=Math.abs(a)/f*1E3,f=Math.abs(a)/f*
+e,e=g*g/e/1E3/f,newTime=0,e*=a<0?-1:1,newTime=g/2,a=(new WebKitCSSMatrix(window.getComputedStyle(this.el).webkitTransform)).e,a<0&&(a-=e),a>0&&(a=0),a<-this.maxLeft&&(a=-this.maxLeft),b.x=a;this.scrollerMoveCSS(this.finishScrollingObject,b,300,"ease-out");if(this.vscrollBar){a=this.bottomMargin-numOnly(this.vscrollBar.style.height)-(this.maxTop+b.y)/this.maxTop*(this.bottomMargin-numOnly(this.vscrollBar.style.height));if(a>this.bottomMargin)a=this.bottomMargin;a<0&&(a=0);this.scrollerMoveCSS(this.vscrollBar,
+{x:0,y:a},300,"ease-out");this.vscrollBar.style.opacity="0"}if(this.hscrollBar){a=this.rightMargin-numOnly(this.hscrollBar.style.width)-(this.maxLeft+b.x)/this.maxLeft*(this.rightMargin-numOnly(this.hscrollBar.style.width));if(a>this.rightMargin)a=this.rightMargin;a<0&&(a=0);this.scrollerMoveCSS(this.hscrollBar,{x:a,y:0},300,"ease-out");this.hscrollBar.style.opacity="0"}}this.vdistanceMoved=this.hdistanceMoved=0;d=!1},scrollerMoveCSS:function(b,d,f,e){f||(f=0);e||(e="linear");b.style.webkitTransform=
+"translate"+a+d.x+"px,"+d.y+"px"+g;b.style.webkitTransitionDuration=f+"ms";b.style.webkitBackfaceVisiblity="hidden";b.style.webkitTransitionTimingFunction=e},scrollTo:function(a){this.scrollerMoveCSS(this.el,a,0)}};return f}();if(!window.numOnly)var numOnly=function(b){isNaN(parseFloat(b))&&(b=b.replace(/[^0-9.-]/,""));return parseFloat(b)};window.aUX||(aUX={});if(!aUX.web)aUX.web={};aUX.web.appMobiSelect=function(){this.oldSelects=[]};
+aUX.web.appMobiSelect.prototype={oldSelects:[],scroller:null,getOldSelects:function(b){if(aUX.web.scroller){var a=b&&document.getElementById(b)?document.getElementById(b):document;if(a){b=a.getElementsByTagName("select");for(a=0;a<b.length;a++)this.oldSelects.push(document.getElementById(b[a]));for(var g=this,a=0;a<b.length;a++){var d=document.createElement("input"),f=parseInt(b[a].style.width)>0?parseInt(b[a].style.width):100,c=parseInt(b[a].style.height)>0?parseInt(b[a].style.height):20;d.type=
+"text";d.style.width=f+"px";d.style.height=c+"px";d.style.position="absolute";d.style.left="0px";d.style.top="0px";d.style.zIndex="1";d.value=b[a].value;d.style.background="url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAeCAIAAABFWWJ4AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkM1NjQxRUQxNUFEODExRTA5OUE3QjE3NjI3MzczNDAzIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkM1NjQxRUQyNUFEODExRTA5OUE3QjE3NjI3MzczNDAzIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QzU2NDFFQ0Y1QUQ4MTFFMDk5QTdCMTc2MjczNzM0MDMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QzU2NDFFRDA1QUQ4MTFFMDk5QTdCMTc2MjczNzM0MDMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6YWbdCAAAAlklEQVR42mIsKChgIBGwAHFPTw/xGkpKSlggrG/fvhGjgYuLC0gyMZAOoPb8//9/0Or59+8f8XrICQN66SEnDOgcp3AgKiqKqej169dY9Hz69AnCuHv3rrKyMrIKoAhcVlBQELt/gIqwstHD4B8quH37NlAQSKKJEwg3iLbBED8kpeshoGcwh5uuri5peoBFMEluAwgwAK+5aXfuRb4gAAAAAElFTkSuQmCC') right top no-repeat";
+d.style.backgroundColor="white";d.className="appMobiSelect_fakeInput";d.id=b[a].id+"_appMobiSelect";var h=document.createElement("input");h.type="image";h.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";h.style.width=f+5+"px";h.style.height=c+5+"px";h.style.left="0px";h.style.top="0px";h.style.zIndex="2";h.style.position="absolute";h.linkId=b[a].id;h.className="appMobiSelect_imageMask";h.onclick=function(a){a.preventDefault();
+g.initDropDown(this.linkId)};b[a].parentNode.appendChild(d);b[a].parentNode.appendChild(h);b[a].parentNode.style.position="relative";b[a].style.display="none";b[a].style.webkitAppearance="none";for(f=0;f<b[a].options.length;f++){if(b[a].options[f].selected)d.value=b[a].options[f].text;this.watcher(b[a].options[f],"selected",function(a,b,c){if(c==!0)g.updateMaskValue(this.parentNode.id,this.text),this.parentNode.value=this.value;return c})}this.watcher(b,"selectedIndex",function(a,b,c){if(this.options[c])g.updateMaskValue(this.id,
+this.options[c].text),this.value=this.options[c].value;return c});this.createHtml()}}else alert("Could not find container element for aUX_web password "+b)}else alert("This library requires aUX_web scroller")},updateDropdown:function(b){if(b=document.getElementById(b))for(var a=0;a<b.options.length;a++){if(b.options[a].selected)fakeInput.value=b.options[a].text;this.watcher(b.options[a],"selected",function(a,b,f){if(f==!0)that.updateMaskValue(this.parentNode.id,this.text),this.parentNode.value=this.value;
+return f})}},initDropDown:function(b){var a=this,g=document.getElementById(b);if(g&&g.options&&g.options.length!=0){var d=0;document.getElementById("appMobiselectBoxScroll").innerHTML="";for(var f=0;f<g.options.length;f++){this.watcher(g.options[f],"selected",function(b,c,s){if(s==!0)a.updateMaskValue(this.parentNode.id,this.text),this.parentNode.value=this.value;return s});var c="",h="background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0.17, rgb(102,102,102)),color-stop(0.59, rgb(94,94,94)))",
+k;g.value==g.options[f].value?(h="background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0.17, rgb(8,8,8)),color-stop(0.59, rgb(38,38,38)))",c="checked",d=f,k="id='appmobiSelectBox_found'"):k="";var e=document.createElement("div");e.id=k;e.style.cssText=h+";padding-top:10px;font-size:80%;padding-left:10px;height:30px;width:100%;position:relative;width:100%;";h=document.createElement("a");h.href="javascript:;";h.tmpValue=f;h.onclick=function(){a.setDropDownValue(b,this.tmpValue)};
+h.style.cssText="text-decoration:none;color:white;";h.innerHTML=g.options[f].text;var r=document.createElement("span");r.style.cssText="float:right;margin-right:20px;margin-top:-2px";var l=document.createElement("button");l.style.cssText=k?"color: #ffffff;padding: 0px 0px;background: -webkit-gradient(linear, left top, left bottom,from(#ffffff),color-stop(0.50, #3b3b3b),color-stop(0.50, #242424),to(#ffffff));border-radius: 30px;border: 0px solid #000000;-webkit-box-shadow:\t0px 1px 3px rgba(000,000,000,0.5),inset 0px 0px 1px rgba(255,255,255,0.6);":
+"color: #ffffff;padding: 0px 0px;background: -webkit-gradient(linear, left top, left bottom,from(#ffffff),color-stop(0.44, #dbd8db),to(#ffffff));border-radius: 30px;border: 0px solid #000000;-webkit-box-shadow:\t0px 1px 3px rgba(000,000,000,0.5),inset 0px 0px 1px rgba(255,255,255,0.6);";l.style.width="20px";l.style.height="20px";l.tmpValue=f;l.onclick=function(){a.setDropDownValue(b,this.tmpValue)};l.checked=c;r.appendChild(l);e.appendChild(h);e.appendChild(r);document.getElementById("appMobiselectBoxScroll").appendChild(e)}try{document.getElementById("appMobiselectBoxContainer").style.display=
+"block"}catch(p){console.log("Error showing div "+p)}try{d>=3&&this.scroller.scrollTo({x:0,y:d*-40})}catch(m){console.log("error init dropdown"+m)}}},updateMaskValue:function(b,a){var g=document.getElementById(b+"_appMobiSelect");if(g)g.value=a},setDropDownValue:function(b,a){var g=document.getElementById(b);if(g)g.selectedIndex=a;this.scroller.scrollTo({x:0,y:0});this.hideDropDown()},hideDropDown:function(){document.getElementById("appMobiselectBoxContainer").style.display="none";document.getElementById("appMobiselectBoxScroll").innerHTML=
+""},createHtml:function(){var b=this;if(!document.getElementById("appMobiselectBoxContainer")){var a=document.createElement("div");a.id="appMobiselectBoxContainer";a.style.cssText="position:absolute;bottom:0px;display:none;width:100%;height:175px; z-index:200000;background:black;color:white;";a.innerHTML='<div style=\'height:35px;width:100%;text-align:center;\'><button id="appMobiSelectCloseButton" style="width:100px;background:#e3e3e3;border: 1px solid #bbb;border-radius: 6px;box-shadow: inset 0 0 1px 1px #f6f6f6;color: #333;font-weight: bold;line-height: 1;padding: 8px 0 9px;text-align: center;text-shadow: 0 1px 0 #fff;width: 6-px;">Done</button></div><div id="appMobiselectBoxFix" style="position:relative;height:150px;background:black;overflow:hidden;width:100%"><div id="appMobiselectBoxScroll"></div></div>';
+document.body.appendChild(a);document.getElementById("appMobiSelectCloseButton").onclick=function(){b.hideDropDown()};try{this.scroller=new aUX.web.scroller("appMobiselectBoxScroll",{scroller:!1,verticalScroll:!0})}catch(g){console.log("Error creating select html "+g)}}},watcher:function(b,a,g){var d=b[a];window.setInterval(function(){newval=b[a];newval!=d&&(g.call(b,a,d,newval),d=newval)},1500)}};function getScrollerValue(b){return document.getElementById(b).value};window.aUX||(aUX={});if(!aUX.web)aUX.web={};aUX.web.appMobiPassword=function(){this.oldPasswords={}};
+aUX.web.appMobiPassword.prototype={oldPasswords:[],showPasswordPlainText:!1,getOldPasswords:function(b){var a=b&&document.getElementById(b)?document.getElementById(b):document;if(a)for(var b=a.getElementsByTagName("input"),g=this,a=0;a<b.length;a++){if(b[a].type=="password"){this.oldPasswords[b[a].id]=b[a];var d=document.createElement("input"),f=parseInt(b[a].style.width)>0?parseInt(b[a].style.width):100,c=parseInt(b[a].style.height)>0?parseInt(b[a].style.height):20;d.type="text";if(b[a].className!=
+"")d.style.width=f+"px",d.style.height=c+"px",d.style.backgroundColor="white";d.style.position="relative";d.style.left="0px";d.style.top="0px";d.style.zIndex="1";d.value=b[a].value;d.showPasswordPlainText=g.showPasswordPlainText;d.className=b[a].className;d.id=b[a].id+"_appMobiPassword";d.placeHolder=b[a].placeHolder;d.oldPW=b[a];d.onkeyup=function(){var a=this.oldPW;if(a.value.length!=this.value.length){var b=this.value.substring(this.selectionStart-1,this.selectionStart),c=this.selectionStart;g.updatePassword(a,
+b,this.selectionStart,this.value.length);if(a.value.length>0&&!this.showPasswordPlainText)a=this.value,this.value="",this.value=a.replace(b,"*"),c!=this.value.length&&this.setSelectionRange(c,c);else if(a.value.length==0)this.value=""}};b[a].parentNode.appendChild(d);b[a].style.display="none";b[a].parentNode.appendChild(d)}}else alert("Could not find container element for appMobiPassword "+b)},updatePassword:function(b,a,g,d){if(d==0)b.value="";d>b.value.length&&a.length>0?(d=b.value,b.value=d.substring(0,
+g-1)+a+d.substring(g-1,d.length)):(d=b.value,b.value=d.substring(0,g)+d.substring(g+1,d.length))},changePasswordVisiblity:function(b,a){b=parseInt(b);if(this.oldPasswords[a]){var g=document.getElementById(a+"_appMobiPassword");if(b==1)this.showPasswordPlainText=!0,g.showPasswordPlainText=showPasswordPlainText=!0,g.value=this.oldPasswords[a].value;else{this.showPasswordPlainText=!1;g.showPasswordPlainText=showPasswordPlainText=!1;for(var d="",f=0;f<g.value.length;f++)d+="*";g.value=d}}}};window.aUX||(aUX={});if(!aUX.web)aUX.web={};
+aUX.web.css3Animate=function(){function b(a){a.preventDefault();var b=a.target;if(a.target.moving&&(a.target.moving=!1,b.callback&&typeof(b.callback=="function")))b.callback(),b.callback=""}var a="m11"in new WebKitCSSMatrix?"3d(":"(",g="m11"in new WebKitCSSMatrix?",0)":")",d=function(f,c){this.el=typeof f=="string"||f instanceof String?document.getElementById(f):f;if(!this instanceof d)return new d(f,c);if(this.el)if(c){this.el.addEventListener("webkitTransitionEnd",b,!1);if(c.opacity)this.el.style.opacity=
+c.opacity;c.y||(c.y=0);c.x||(c.x=0);c.previous&&(c.y+=(new WebKitCSSMatrix(window.getComputedStyle(this.el).webkitTransform)).f,c.x+=(new WebKitCSSMatrix(window.getComputedStyle(this.el).webkitTransform)).e);if(!c.origin)c.origin="0% 0%";if(!c.scale)c.scale="1";if(!c.rotateY)c.rotateY="0";if(!c.rotateX)c.rotateX="0";if(!c.skewY)c.skewY="0";if(!c.skewX)c.skewX="0";c.timingFunction||(c.timingFunction="linear");if(typeof c.x=="number"||c.x.indexOf("%")==-1&&c.x.toLowerCase().indexOf("px")==-1&&c.x.toLowerCase().indexOf("deg")==
+-1)c.x=parseInt(c.x)+"px";if(typeof c.y=="number"||c.y.indexOf("%")==-1&&c.y.toLowerCase().indexOf("px")==-1&&c.y.toLowerCase().indexOf("deg")==-1)c.y=parseInt(c.y)+"px";this.el.style.webkitTransform="translate"+a+c.x+","+c.y+g+" scale("+parseFloat(c.scale)+") rotate("+c.rotateX+") rotateY("+c.rotateY+") skew("+c.skewX+","+c.skewY+")";this.el.style.webkitBackfaceVisiblity="hidden";this.el.style.webkitTransition="all "+c.time;this.el.style.webkitTransitionTimingFunction=c.timingFunction;this.el.style.webkitTransformOrigin=
+c.origin;if(c.width)this.el.style.width=c.width;if(c.height)this.el.style.height=c.height;if(c.callback)this.el.callback=c.callback,this.el.moving=!0}else alert("Please provide configuration options for animation of "+f)};return d}();window.aUX||(aUX={});aUX.domFired=!1;document.addEventListener("DOMContentLoaded",function(){aUX.domFired=!0},!1);
+aUX.ui=function(){function b(a){return document.getElementById(a)}function a(a,b,c){var e=[];c||(c="*");a=a.getElementsByTagName(c);c=a.length;for(i=0;i<c;i++)a[i].className.indexOf(b)!=-1&&(e.push(a[i]),a[i].getAttribute("selected")&&(q=a[i]));return e}var g="",d="",f="",c="",h=[],k="",e=aUX.web.css3Animate,r=new aUX.web.appMobiPassword,l=new aUX.web.appMobiSelect,p="",m=[],q="",t=function(){if(aUX.domFired)this.hasLaunched=!0,this.launch();else{var a=this;document.addEventListener("DOMContentLoaded",
+function(){a.launch()},!1)}};t.prototype={hasLaunched:!1,launch:function(){if(this.hasLaunched==!1)this.hasLaunched=!0;else{var s=this,o=b("toolbar");g=b("content");d=b("navbar");if(!o){var o=document.createElement("div");o.id="toolbar";o.style.cssText="display:none"}if(!d)d=document.createElement("div"),d.id="navbar",document.body.appendChild(d);if(!g)g=document.createElement("div"),g.id="content",document.body.appendChild(g);d.innerHTML='<a id="backButton" href="javascript:;"><div>Back</div></a> <h1 id="pageTitle"></h1>'+
+d.innerHTML;f=b("backButton");f.className="button";f.onclick=function(){if(h.length>0){var a=h.pop();s.loadContent(a.target+"",0,1,a.transition)}};f.style.visibility="hidden";c=b("pageTitle");this.addContentDiv("AMUi_ajax","");var n=document.createElement("div");n.id="AMUI_mask";n.className="ui-loader ui-body-a ui-corner-all loading-mask";n.innerHTML="<span class='ui-icon ui-icon-loading spin'></span><h1>Loading Content</h1>";n.zIndex=2E4;n.style.display="none";document.body.appendChild(n);document.addEventListener("appMobi.device.orientation.change",
+s.updateOrientation,!1);this.updateAnchors(o,1);this.updateAnchors(d);for(o=a(document,"panel","div");o.length>0;){var m=n=o.pop();n.parentNode&&n.parentNode.id!="content"&&(n.parentNode.removeChild(n),this.addDivAndScroll(m))}q&&(k=q,window.setTimeout(function(){e(q,{x:"100%",time:"0ms"});if(k.title)c.innerHTML=k.title},100))}},clearHistory:function(){this.history=[]},updateContentDiv:function(a,c){var e=b(a);if(e)e.childNodes[0].innerHTML=c},addContentDiv:function(a,b){var c=document.getElementById(a);
+if(!c)c=document.createElement("div"),c.id=a,c.innerHTML=b;c.className="panel";this.addDivAndScroll(c)},addDivAndScroll:function(a){g.appendChild(a);var b=!0;a.getAttribute("scrolling")&&a.getAttribute("scrolling").toLowerCase()=="no"&&(b=!1);var c=document.createElement("div");c.innerHTML=a.innerHTML;c.innerHTML+="<Br>";a.innerHTML="";a.appendChild(c);this.updateAnchors(c);l.getOldSelects(a.id);r.getOldPasswords(a.id);b&&(m[a.id]=aUX.web.scroller(c,{scrollBars:!0,verticalScroll:!0,horizontalScroll:!1,
+vScrollCSS:"scrollBarV"}))},updateAnchors:function(a,b){for(var c=a.getElementsByTagName("a"),e=this,d=0;d<c.length;d++)if(c[d].href.indexOf("javascript:")==-1)c[d].oldhref=c[d].href,c[d].oldhash=c[d].hash,c[d].href="javascript:;",c[d].oldonclick=c[d].onclick,c[d].resetHistory=b,c[d].onclick=function(){var a="slide";if(this.target&&this.target!="")AppMobi.device&&AppMobi.device.showRemoteSite?AppMobi.device.showRemoteSite(this.oldhref):window.open(this.oldhref);else{switch(this.getAttribute("data-transition")){case "up":a=
+"up";break;case "down":a="down";break;case "flip":a="flip";break;case "fade":a="fade";break;case "pop":a="pop";break;default:a="slide"}e.loadContent(this.oldhash?this.oldhash:this.oldhref,this.resetHistory,0,a);this.oldonclick&&this.oldonclick()}}},updateOrientation:function(){for(var a=0;a<m.length;a++)m[a].scrollTo({x:0,y:0});e(k,{x:"100%",time:"0ms"})},loadContent:function(a,e,d,g){try{what=null;var l=this;l.hideMask();if(a.indexOf("#")==-1){if(!(k.id=="AMUi_ajax"&&a==p)){a.indexOf("http")==-1&&
+(a=AppMobi.webRoot+a);var u=new XMLHttpRequest;u.onreadystatechange=function(){if(u.readyState==4&&u.status==200)l.updateContentDiv("AMUi_ajax",u.responseText),b("AMUi_ajax").title=a,l.loadContent("#AMUi_ajax",e,d)};p=a;u.open("GET",a,!0);u.send();this.showMask()}}else if(what=a.replace("#",""),what=b(what),what!=k||d){what.style.display="block";m[what.id]&&m[what.id].scrollTo({x:0,y:0});e?(h=[],h.push({target:"#"+q.id,transition:"slide"})):d||h.push({target:"#"+k.id,transition:g});var v=k,w=what;
+switch(g){case "up":this.slideUpTransition(v,w,d);break;case "down":this.slideDownTransition(v,w,d);break;case "fade":this.fadeTransition(v,w,d);break;case "flip":this.flipTransition(v,w,d);break;case "pop":this.popTransition(v,w,d);break;default:this.slideTransition(v,w,d)}if(d){if(h.length>0){var r=b(h[h.length-1].target.replace("#",""));f.innerHTML="<div>"+r.title+"</div>"}}else f.innerHTML=k.title?"<div>"+k.title+"</div>":"<div>Back</div>";if(what.title)c.innerHTML=what.title;if(e)f.innerHTML=
+q.title;h.length==0?(f.style.visibility="hidden",h=[]):f.style.visibility="visible";k=what}}catch(t){console.log("Error with loading content "+t+" - "+a)}},showMask:function(){b("AMUI_mask").style.display="block"},hideMask:function(){b("AMUI_mask").style.display="none"},slideTransition:function(a,b,c){c?(e(a,{x:"200%",time:"200ms",callback:function(){e(a,{x:0,time:"1ms"})}}),e(b,{x:"100%",time:"200ms"})):(e(a,{x:"0%",time:"200ms"}),e(b,{x:"200%",time:"1ms",callback:function(){e(b,{x:"100%",time:"200ms"})}}))},
+slideUpTransition:function(a,b,c){c?(e(b,{x:"100%",y:"0%",time:"1ms"}),e(a,{y:"100%",x:"100%",time:"200ms",callback:function(){e(a,{x:0,y:0,time:"1ms"});b.style.zIndex=2;a.style.zIndex=1}})):(a.style.zIndex=1,b.style.zIndex=2,e(a,{x:"100%",time:"200ms",callback:function(){e(a,{x:0,y:0,time:"1ms"})}}),e(b,{y:"100%",x:"100%",time:"1ms",callback:function(){e(b,{y:"0%",x:"100%",time:"200ms"})}}))},slideDownTransition:function(a,b,c){c?(e(b,{x:"100%",y:"0%",time:"1ms"}),e(a,{y:"-100%",x:"100%",time:"200ms",
+callback:function(){e(a,{x:0,y:0,time:"1ms"});b.style.zIndex=2;a.style.zIndex=1}})):(a.style.zIndex=1,b.style.zIndex=2,e(a,{x:"100%",time:"200ms",callback:function(){e(a,{x:0,y:0,time:"1ms"})}}),e(b,{y:"-100%",x:"100%",time:"1ms",callback:function(){e(b,{y:"0%",x:"100%",time:"200ms"})}}))},flipTransition:function(a,b,c){c?(e(b,{x:"200%",time:"1ms",scale:0.8,rotateY:"180deg",callback:function(){e(b,{x:"100%",time:"200ms"})}}),e(a,{x:"200%",time:"200ms",scale:0.8,rotateY:"180deg",callback:function(){e(a,
+{x:0,time:"1ms",opacity:1});b.style.zIndex=2;a.style.zIndex=1}})):(a.style.zIndex=1,b.style.zIndex=2,e(a,{x:"200%",time:"200ms",scale:".8",rotateY:"180deg",callback:function(){e(a,{x:0,y:0,time:"1ms"})}}),e(b,{x:"200%",time:"1ms",scale:0.8,rotateY:"180deg",callback:function(){e(b,{x:"100%",time:"200ms"})}}))},fadeTransition:function(a,b,c){c?(e(b,{x:"100%",time:"1ms"}),e(a,{x:"100%",time:"200ms",opacity:0.1,callback:function(){e(a,{x:0,time:"1ms",opacity:1});b.style.zIndex=2;a.style.zIndex=1}})):
+(a.style.zIndex=1,b.style.zIndex=2,e(a,{x:"100%",time:"200ms",callback:function(){e(a,{x:0,y:0,time:"1ms"})}}),b.style.opacity=0,e(b,{x:"100%",time:"1ms",callback:function(){e(b,{x:"100%",time:"200ms",opacity:1})}}))},popTransition:function(a,b,c){c?(e(b,{x:"100%",time:"1ms"}),e(a,{x:"100%",time:"200ms",opacity:0.1,scale:0.2,origin:"50% 50%",callback:function(){e(a,{x:0,time:"1ms"});b.style.zIndex=2;a.style.zIndex=1}})):(a.style.zIndex=1,b.style.zIndex=2,e(a,{x:"100%",time:"200ms",callback:function(){e(a,
+{x:0,y:0,time:"1ms"})}}),e(b,{x:"100%",y:"0%",time:"1ms",scale:0.2,origin:"50% 50%",opacity:0.1,callback:function(){e(b,{x:"100%",time:"200ms",scale:1,opacity:1,origin:"0% 0%"})}}))}};return t}();
55 mashery.weatherbug/3.4.0/aUX_web.all.min.js
View
@@ -0,0 +1,55 @@
+window.aUX||(aUX={});if(!aUX.web)aUX.web={};aUX.web.shakeListener=function(a,b){var d=0,c=0,f=0,e=0;b||(b=5);var g=function(g){Math.abs(g.x-c)>0.8?d++:Math.abs(g.y-f)>0.8?d++:Math.abs(g.z-e)>0.8&&d++;c=g.x;f=g.y;e=g.z;d>=b&&(a(),d=0)};if(a&&typeof a=="function"){var k=new AppMobi.AccelerationOptions;k.frequency=100;AppMobi.accelerometer.watchAcceleration(g,k)}};if(!window.numOnly)var numOnly=function(a){isNaN(parseFloat(a))&&(a=a.replace(/[^0-9.-]/,""));return parseFloat(a)};window.aUX||(aUX={});if(!aUX.web)aUX.web={};
+aUX.web.social=function(){var a=function(b){if(!this instanceof a)return new a(b);this.serviceName=b;var d=this;document.addEventListener("appMobi.oauth.busy",function(b){b.id==d.serviceID&&d.error(b,"oAuth is busy")},!1);document.addEventListener("appMobi.oauth.unavailable",function(b){b.id==d.serviceID&&d.error(b,"oAuth is unavailable")},!1);document.addEventListener("appMobi.oauth.protected.data",function(b){b.id==d.serviceID&&d.processRequest(b)},!1)};a.prototype={callBacks:{},serviceName:null,
+serviceID:null,makeRequest:function(b,a,c,f,e,g){if(b){a||(a="");this.serviceID=this.serviceName+"_"+a;c||(c="GET");e||(e="");g||(g="");f&&(this.callBacks[this.serviceID]=f);try{var k=new AppMobi.OAuth.ProtectedDataParameters;k.service=this.serviceName;k.url=b;k.id=this.serviceID;k.method=c;k.body=e;k.headers=g;var b="",h;for(h in k)b+=h+" = "+k[h]+"\n";AppMobi.oauth.getProtectedData(k)}catch(l){alert("Error "+l.message)}}else alert("Please provide a request url")},error:function(b,a){var c="",f;
+for(f in a)c+=f+" "+a[f]+"\n";alert("Error with oAuth request "+this.serviceID+" "+c+" "+a)},processRequest:function(b){try{if(this.callBacks[b.id])this.callBacks[b.id](b)}catch(a){alert("error with cb "+a)}},deAuthorizeService:function(b){try{if(b)this.tmpCB=b,document.addEventListener("appMobi.oauth.unauthorize.service",this.deAuthorizeCB,!1);AppMobi.oauth.unauthorizeService(this.serviceName)}catch(a){alert("Error removing "+a)}},deAuthorizeCB:function(b){b.service==this.serviceName&&(b.success==
+!1?alert(b.error):this.tmpCB&&(this.tmpCB(),delete this.tmpCB));document.removeEventListener("appMobi.oauth.unauthorize.service",this.deAuthorizeCB)}};return a}();window.aUX||(aUX={});if(!aUX.web)aUX.web={};aUX.web.appMobiSelect=function(){this.oldSelects=[]};
+aUX.web.appMobiSelect.prototype={oldSelects:[],scroller:null,getOldSelects:function(a){if(aUX.web.scroller){var b=a&&document.getElementById(a)?document.getElementById(a):document;if(b){a=b.getElementsByTagName("select");for(b=0;b<a.length;b++)this.oldSelects.push(document.getElementById(a[b]));for(var d=this,b=0;b<a.length;b++){var c=document.createElement("input"),f=parseInt(a[b].style.width)>0?parseInt(a[b].style.width):100,e=parseInt(a[b].style.height)>0?parseInt(a[b].style.height):20;c.type=
+"text";c.style.width=f+"px";c.style.height=e+"px";c.style.position="absolute";c.style.left="0px";c.style.top="0px";c.style.zIndex="1";c.value=a[b].value;c.style.background="url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAeCAIAAABFWWJ4AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkM1NjQxRUQxNUFEODExRTA5OUE3QjE3NjI3MzczNDAzIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkM1NjQxRUQyNUFEODExRTA5OUE3QjE3NjI3MzczNDAzIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QzU2NDFFQ0Y1QUQ4MTFFMDk5QTdCMTc2MjczNzM0MDMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QzU2NDFFRDA1QUQ4MTFFMDk5QTdCMTc2MjczNzM0MDMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6YWbdCAAAAlklEQVR42mIsKChgIBGwAHFPTw/xGkpKSlggrG/fvhGjgYuLC0gyMZAOoPb8//9/0Or59+8f8XrICQN66SEnDOgcp3AgKiqKqej169dY9Hz69AnCuHv3rrKyMrIKoAhcVlBQELt/gIqwstHD4B8quH37NlAQSKKJEwg3iLbBED8kpeshoGcwh5uuri5peoBFMEluAwgwAK+5aXfuRb4gAAAAAElFTkSuQmCC') right top no-repeat";
+c.style.backgroundColor="white";c.className="appMobiSelect_fakeInput";c.id=a[b].id+"_appMobiSelect";var g=document.createElement("input");g.type="image";g.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";g.style.width=f+5+"px";g.style.height=e+5+"px";g.style.left="0px";g.style.top="0px";g.style.zIndex="2";g.style.position="absolute";g.linkId=a[b].id;g.className="appMobiSelect_imageMask";g.onclick=function(b){b.preventDefault();
+d.initDropDown(this.linkId)};a[b].parentNode.appendChild(c);a[b].parentNode.appendChild(g);a[b].parentNode.style.position="relative";a[b].style.display="none";a[b].style.webkitAppearance="none";for(f=0;f<a[b].options.length;f++){if(a[b].options[f].selected)c.value=a[b].options[f].text;this.watcher(a[b].options[f],"selected",function(b,a,e){if(e==!0)d.updateMaskValue(this.parentNode.id,this.text),this.parentNode.value=this.value;return e})}this.watcher(a,"selectedIndex",function(b,a,e){if(this.options[e])d.updateMaskValue(this.id,
+this.options[e].text),this.value=this.options[e].value;return e});this.createHtml()}}else alert("Could not find container element for aUX_web password "+a)}else alert("This library requires aUX_web scroller")},updateDropdown:function(a){if(a=document.getElementById(a))for(var b=0;b<a.options.length;b++){if(a.options[b].selected)fakeInput.value=a.options[b].text;this.watcher(a.options[b],"selected",function(b,a,f){if(f==!0)that.updateMaskValue(this.parentNode.id,this.text),this.parentNode.value=this.value;
+return f})}},initDropDown:function(a){var b=this,d=document.getElementById(a);if(d&&d.options&&d.options.length!=0){var c=0;document.getElementById("appMobiselectBoxScroll").innerHTML="";for(var f=0;f<d.options.length;f++){this.watcher(d.options[f],"selected",function(a,e,c){if(c==!0)b.updateMaskValue(this.parentNode.id,this.text),this.parentNode.value=this.value;return c});var e="",g="background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0.17, rgb(102,102,102)),color-stop(0.59, rgb(94,94,94)))",
+k;d.value==d.options[f].value?(g="background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0.17, rgb(8,8,8)),color-stop(0.59, rgb(38,38,38)))",e="checked",c=f,k="id='appmobiSelectBox_found'"):k="";var h=document.createElement("div");h.id=k;h.style.cssText=g+";padding-top:10px;font-size:80%;padding-left:10px;height:30px;width:100%;position:relative;width:100%;";g=document.createElement("a");g.href="javascript:;";g.tmpValue=f;g.onclick=function(){b.setDropDownValue(a,this.tmpValue)};
+g.style.cssText="text-decoration:none;color:white;";g.innerHTML=d.options[f].text;var l=document.createElement("span");l.style.cssText="float:right;margin-right:20px;margin-top:-2px";var m=document.createElement("button");m.style.cssText=k?"color: #ffffff;padding: 0px 0px;background: -webkit-gradient(linear, left top, left bottom,from(#ffffff),color-stop(0.50, #3b3b3b),color-stop(0.50, #242424),to(#ffffff));border-radius: 30px;border: 0px solid #000000;-webkit-box-shadow:\t0px 1px 3px rgba(000,000,000,0.5),inset 0px 0px 1px rgba(255,255,255,0.6);":
+"color: #ffffff;padding: 0px 0px;background: -webkit-gradient(linear, left top, left bottom,from(#ffffff),color-stop(0.44, #dbd8db),to(#ffffff));border-radius: 30px;border: 0px solid #000000;-webkit-box-shadow:\t0px 1px 3px rgba(000,000,000,0.5),inset 0px 0px 1px rgba(255,255,255,0.6);";m.style.width="20px";m.style.height="20px";m.tmpValue=f;m.onclick=function(){b.setDropDownValue(a,this.tmpValue)};m.checked=e;l.appendChild(m);h.appendChild(g);h.appendChild(l);document.getElementById("appMobiselectBoxScroll").appendChild(h)}try{document.getElementById("appMobiselectBoxContainer").style.display=
+"block"}catch(n){console.log("Error showing div "+n)}try{c>=3&&this.scroller.scrollTo({x:0,y:c*-40})}catch(o){console.log("error init dropdown"+o)}}},updateMaskValue:function(a,b){var d=document.getElementById(a+"_appMobiSelect");if(d)d.value=b},setDropDownValue:function(a,b){var d=document.getElementById(a);if(d)d.selectedIndex=b;this.scroller.scrollTo({x:0,y:0});this.hideDropDown()},hideDropDown:function(){document.getElementById("appMobiselectBoxContainer").style.display="none";document.getElementById("appMobiselectBoxScroll").innerHTML=
+""},createHtml:function(){var a=this;if(!document.getElementById("appMobiselectBoxContainer")){var b=document.createElement("div");b.id="appMobiselectBoxContainer";b.style.cssText="position:absolute;bottom:0px;display:none;width:100%;height:175px; z-index:200000;background:black;color:white;";b.innerHTML='<div style=\'height:35px;width:100%;text-align:center;\'><button id="appMobiSelectCloseButton" style="width:100px;background:#e3e3e3;border: 1px solid #bbb;border-radius: 6px;box-shadow: inset 0 0 1px 1px #f6f6f6;color: #333;font-weight: bold;line-height: 1;padding: 8px 0 9px;text-align: center;text-shadow: 0 1px 0 #fff;width: 6-px;">Done</button></div><div id="appMobiselectBoxFix" style="position:relative;height:150px;background:black;overflow:hidden;width:100%"><div id="appMobiselectBoxScroll"></div></div>';
+document.body.appendChild(b);document.getElementById("appMobiSelectCloseButton").onclick=function(){a.hideDropDown()};try{this.scroller=new aUX.web.scroller("appMobiselectBoxScroll",{scroller:!1,verticalScroll:!0})}catch(d){console.log("Error creating select html "+d)}}},watcher:function(a,b,d){var c=a[b];window.setInterval(function(){newval=a[b];newval!=c&&(d.call(a,b,c,newval),c=newval)},1500)}};function getScrollerValue(a){return document.getElementById(a).value};window.aUX||(aUX={});if(!aUX.web)aUX.web={};
+aUX.web.css3Animate=function(){function a(b){b.preventDefault();var a=b.target;if(b.target.moving&&(b.target.moving=!1,a.callback&&typeof(a.callback=="function")))a.callback(),a.callback=""}var b="m11"in new WebKitCSSMatrix?"3d(":"(",d="m11"in new WebKitCSSMatrix?",0)":")",c=function(f,e){this.el=typeof f=="string"||f instanceof String?document.getElementById(f):f;if(!this instanceof c)return new c(f,e);if(this.el)if(e){this.el.addEventListener("webkitTransitionEnd",a,!1);if(e.opacity)this.el.style.opacity=
+e.opacity;e.y||(e.y=0);e.x||(e.x=0);e.previous&&(e.y+=(new WebKitCSSMatrix(window.getComputedStyle(this.el).webkitTransform)).f,e.x+=(new WebKitCSSMatrix(window.getComputedStyle(this.el).webkitTransform)).e);if(!e.origin)e.origin="0% 0%";if(!e.scale)e.scale="1";if(!e.rotateY)e.rotateY="0";if(!e.rotateX)e.rotateX="0";if(!e.skewY)e.skewY="0";if(!e.skewX)e.skewX="0";e.timingFunction||(e.timingFunction="linear");if(typeof e.x=="number"||e.x.indexOf("%")==-1&&e.x.toLowerCase().indexOf("px")==-1&&e.x.toLowerCase().indexOf("deg")==
+-1)e.x=parseInt(e.x)+"px";if(typeof e.y=="number"||e.y.indexOf("%")==-1&&e.y.toLowerCase().indexOf("px")==-1&&e.y.toLowerCase().indexOf("deg")==-1)e.y=parseInt(e.y)+"px";this.el.style.webkitTransform="translate"+b+e.x+","+e.y+d+" scale("+parseFloat(e.scale)+") rotate("+e.rotateX+") rotateY("+e.rotateY+") skew("+e.skewX+","+e.skewY+")";this.el.style.webkitBackfaceVisiblity="hidden";this.el.style.webkitTransition="all "+e.time;this.el.style.webkitTransitionTimingFunction=e.timingFunction;this.el.style.webkitTransformOrigin=
+e.origin;if(e.width)this.el.style.width=e.width;if(e.height)this.el.style.height=e.height;if(e.callback)this.el.callback=e.callback,this.el.moving=!0}else alert("Please provide configuration options for animation of "+f)};return c}();window.aUX||(aUX={});if(!aUX.web)aUX.web={};
+aUX.web.scroller=function(){function a(b,a){var c=document.createElement("div");c.style.position="absolute";c.style.width=b+"px";c.style.height=a+"px";c.style.webkitBorderRadius="2px";c.className="scrollBar";c.style.opacity=0.7;c.style.background="black";return c}var b="m11"in new WebKitCSSMatrix?"3d(":"(",d="m11"in new WebKitCSSMatrix?",0)":")",c=!1,f=function(b,c){if(this.el=typeof b=="string"||b instanceof String?document.getElementById(b):b){if(this instanceof f)for(j in c)this[j]=c[j];else return new f(b,
+c);try{this.container=this.el.parentNode;var d=this;this.el.addEventListener("touchmove",function(b){d.touchMove(b)},!1);this.el.addEventListener("touchend",function(b){d.touchEnd(b)},!1);if(this.verticalScroll&&this.verticalScroll==!0&&this.scrollBars==!0){var h=a(5,20);h.style.top="0px";h.className=this.vScrollCSS;h.style.opacity="0";this.container.appendChild(h);this.vscrollBar=h}if(this.horizontalScroll&&this.horizontalScroll==!0&&this.scrollBars==!0)h=a(20,5),h.style.bottom="0px",h.className=
+this.hScrollCSS,h.style.opacity="0",this.container.appendChild(h),this.hscrollBar=h}catch(l){alert("error adding scroller"+l)}}else alert("Could not find element for scroller "+b)};f.prototype={lockX:0,lockY:0,boolScrollLock:!1,currentScrollingObject:null,bottomMargin:0,maxTop:0,startTop:0,verticalScroll:!0,horizontalScroll:!1,scrollBars:!0,vscrollBar:null,hscrollBar:null,hScrollCSS:"scrollBar",vScrollCSS:"scrollBar",divHeight:0,lastScrollbar:"",timeMoved:0,vdistanceMoved:0,hdistanceMoved:0,prevTime:0,
+finishScrollingObject:null,container:null,maxLeft:0,startLeft:0,rightMargin:0,divWidth:0,touchMove:function(b){try{if(c||(c=!0,this.touchStart(b)),this.currentScrollingObject!=null){b.preventDefault();var a={x:0,y:0},f=0,d=0,l=0,m=0;if(this.verticalScroll){var n=this.lockY-b.touches[0].pageY,n=-n,f=this.startTop+n,d=(new WebKitCSSMatrix(window.getComputedStyle(this.el).webkitTransform)).f;a.y=f}if(this.horizontalScroll){var o=this.lockX-b.touches[0].pageX,o=-o,n=l=this.startLeft+o,m=-(new WebKitCSSMatrix(window.getComputedStyle(this.el).webkitTransform)).e;
+a.x=n}this.scrollerMoveCSS(this.currentScrollingObject,a,0);if(this.vscrollBar){var p=this.bottomMargin-numOnly(this.vscrollBar.style.height)-(this.maxTop+f)/this.maxTop*(this.bottomMargin-numOnly(this.vscrollBar.style.height));this.scrollerMoveCSS(this.vscrollBar,{x:0,y:p},0)}this.hscrollBar&&(p=this.rightMargin-numOnly(this.hscrollBar.style.width)-(this.maxLeft+l)/this.maxLeft*(this.rightMargin-numOnly(this.hscrollBar.style.width)),this.scrollerMoveCSS(this.hscrollBar,{x:p,y:0},0));if(this.prevTime){var r=
+Math.abs(d)-Math.abs(f),s=Math.abs(m)-Math.abs(l),q=b.timeStamp-this.prevTime;q<1E3?(this.timeMoved+=q,this.vdistanceMoved+=r,this.hdistanceMoved+=s):this.hdistanceMoved=this.vdistanceMoved=this.timeMoved=0}this.prevTime=b.timeStamp}}catch(t){alert("error in scrollMove: "+t)}},touchStart:function(b){var a=this.container,c=this.el;if(a)try{if(b.touches[0].target&&b.touches[0].target.type!=void 0){var f=b.touches[0].target.tagName.toLowerCase();if(f=="select"||f=="input"||f=="button")return}this.hdistanceMoved=
+this.vdistanceMoved=this.timeMoved=0;this.finishScrollingObject=this.prevTime=null;this.bottomMargin=a.clientHeight>window.innerHeight?window.innerHeight:a.clientHeight;this.maxTop=c.clientHeight-this.bottomMargin;this.divHeight=c.clientHeight;this.rightMargin=a.clientWidth>window.innerWidth?window.innerWidth:a.clientWidth;this.maxLeft=c.clientWidth-this.rightMargin;this.divWidth=c.clientWidth;if(!(this.maxTop<0)&&b.touches.length==1&&this.boolScrollLock==!1){try{this.startTop=(new WebKitCSSMatrix(window.getComputedStyle(c).webkitTransform)).f,
+this.startLeft=(new WebKitCSSMatrix(window.getComputedStyle(c).webkitTransform)).e}catch(d){this.startLeft=this.startTop=0,console.log("error scroller touchstart "+d)}this.lockX=b.touches[0].pageX;this.lockY=b.touches[0].pageY;this.currentScrollingObject=c;if(this.vscrollBar){this.vscrollBar.style.height=parseFloat(this.bottomMargin/this.divHeight)*this.bottomMargin+"px";var m=this.bottomMargin-numOnly(this.vscrollBar.style.height)-(this.maxTop+this.startTop)/this.maxTop*(this.bottomMargin-numOnly(this.vscrollBar.style.height));
+this.scrollerMoveCSS(this.vscrollBar,{x:0,y:m},0);this.container.clientWidth>window.innerWidth?this.vscrollBar.style.left=window.innerWidth-numOnly(this.vscrollBar.style.width)+"px":this.vscrollBar.style.right="0px";this.vscrollBar.webkitTransition="opacity";this.vscrollBar.style.opacity=1}if(this.hscrollBar)this.hscrollBar.style.width=parseFloat(this.rightMargin/this.divWidth)*this.rightMargin+"px",m=this.rightMargin-numOnly(this.hscrollBar.style.width)-(this.maxTop+this.startLeft)/this.maxtLeft*
+(this.rightMargin-numOnly(this.hscrollBar.style.width)),this.scrollerMoveCSS(this.hscrollBar,{x:m,y:0},0),this.container.clientHeight>window.innerHeight?this.hscrollBar.style.top=window.innerHeight-numOnly(this.hscrollBar.style.height)+"px":this.hscrollBar.style.bottom="0px",this.hscrollBar.webkitTransition="opacity",this.hscrollBar.style.opacity=1;b.preventDefault()}}catch(n){alert("error in scrollStart: "+n)}},touchEnd:function(b){if(this.currentScrollingObject!=null){b.preventDefault();b.stopPropagation();
+this.finishScrollingObject=this.currentScrollingObject;this.currentScrollingObject=null;b={x:0,y:0};if(this.verticalScroll){var a=-this.vdistanceMoved,f=this.timeMoved,d=2,l=Math.abs(a)/f*1E3,f=Math.abs(a)/f*d,d=l*l/d/1E3/f;newTime=0;d*=a<0?-1:1;newTime=l/2;a=(new WebKitCSSMatrix(window.getComputedStyle(this.el).webkitTransform)).f;a<0&&(a-=d);a>0&&(a=0);a<-this.maxTop&&(a=-this.maxTop);b.y=a}if(this.horizontalScroll)a=-this.hdistanceMoved,f=this.timeMoved,d=2,l=Math.abs(a)/f*1E3,f=Math.abs(a)/f*
+d,d=l*l/d/1E3/f,newTime=0,d*=a<0?-1:1,newTime=l/2,a=(new WebKitCSSMatrix(window.getComputedStyle(this.el).webkitTransform)).e,a<0&&(a-=d),a>0&&(a=0),a<-this.maxLeft&&(a=-this.maxLeft),b.x=a;this.scrollerMoveCSS(this.finishScrollingObject,b,300,"ease-out");if(this.vscrollBar){a=this.bottomMargin-numOnly(this.vscrollBar.style.height)-(this.maxTop+b.y)/this.maxTop*(this.bottomMargin-numOnly(this.vscrollBar.style.height));if(a>this.bottomMargin)a=this.bottomMargin;a<0&&(a=0);this.scrollerMoveCSS(this.vscrollBar,
+{x:0,y:a},300,"ease-out");this.vscrollBar.style.opacity="0"}if(this.hscrollBar){a=this.rightMargin-numOnly(this.hscrollBar.style.width)-(this.maxLeft+b.x)/this.maxLeft*(this.rightMargin-numOnly(this.hscrollBar.style.width));if(a>this.rightMargin)a=this.rightMargin;a<0&&(a=0);this.scrollerMoveCSS(this.hscrollBar,{x:a,y:0},300,"ease-out");this.hscrollBar.style.opacity="0"}}this.vdistanceMoved=this.hdistanceMoved=0;c=!1},scrollerMoveCSS:function(a,c,f,h){f||(f=0);h||(h="linear");a.style.webkitTransform=
+"translate"+b+c.x+"px,"+c.y+"px"+d;a.style.webkitTransitionDuration=f+"ms";a.style.webkitBackfaceVisiblity="hidden";a.style.webkitTransitionTimingFunction=h},scrollTo:function(a){this.scrollerMoveCSS(this.el,a,0)}};return f}();window.numOnly||(numOnly=function(a){isNaN(parseFloat(a))&&(a=a.replace(/[^0-9.-]/,""));return parseFloat(a)});window.aUX||(aUX={});if(!aUX.web)aUX.web={};
+aUX.web.swipeListener=function(){var a=function(a,d){var c=this;if(this.el=typeof a=="string"?document.getElementById(a):a)for(j in this.el.addEventListener("touchmove",function(a){c.touchMove(a)},!1),this.el.addEventListener("touchend",function(a){c.touchEnd(a)},!1),d)this[j]=d[j];else alert("Error adding swipe listener for "+a)};a.prototype={startX:0,startY:0,movingX:0,movingY:0,vthreshold:50,hthreshold:50,movingElement:!1,swipeDirection:{north:!1,south:!1,east:!1,west:!1},callBack:null,cancel:function(){this.movingY=
+this.movingX=this.startY=this.startX=0;this.movingElement=!1;this.swipeDirection={north:!1,south:!1,east:!1,west:!1}},touchStart:function(a){if(!(a.touches[0].target&&a.touches[0].target.type!=void 0)&&a.touches.length==1)this.movingElement=!0,this.startX=a.touches[0].pageX,this.startY=a.touches[0].pageY,a.preventDefault()},touchMove:function(a){this.movingElement==!1&&this.touchStart(a);a.preventDefault();a.touches.length>1||!this.movingElement?this.cancel():(this.movingX=a.touches[0].pageX-this.startX,
+this.movingY=a.touches[0].pageY-this.startY)},touchEnd:function(a){if(this.movingElement){a.preventDefault();a=!1;if(Math.abs(this.movingX)>this.hthreshold)this.swipeDirection.east=this.movingX>0,this.swipeDirection.west=this.movingX<0,a=!0;if(Math.abs(this.movingY)>this.vthreshold)this.swipeDirection.north=this.movingY<0,this.swipeDirection.south=this.movingY>0,a=!0;a&&typeof(this.callBack=="function")&&this.callBack(this.swipeDirection);this.cancel()}}};return a}();
+window.numOnly||(numOnly=function(a){isNaN(parseFloat(a))&&(a=a.replace(/[^0-9.-]/,""));return parseFloat(a)});window.aUX||(aUX={});if(!aUX.web)aUX.web={};aUX.web.template=function(a,b){b||(b={});return tmpl(a,b)};
+(function(){var a={};this.tmpl=function d(c,f){var e=!/\W/.test(c)?a[c]=a[c]||d(document.getElementById(c).innerHTML):new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+c.replace(/[\r\t\n]/g," ").replace(/'(?=[^%]*%>)/g,"\t").split("'").join("\\'").split("\t").join("'").replace(/<%=(.+?)%>/g,"',$1,'").split("<%").join("');").split("%>").join("p.push('")+"');}return p.join('');");return f?e(f):e}})();window.aUX||(aUX={});if(!aUX.web)aUX.web={};
+aUX.web.carousel=function(){var a="m11"in new WebKitCSSMatrix?"3d(":"(",b="m11"in new WebKitCSSMatrix?",0)":")",d=function(a,b){if(this.container=typeof a=="string"||a instanceof String?document.getElementById(a):a){if(this instanceof d)for(j in b)this[j]=b[j];else return new d(a,b);try{var e=this;this.pagingDiv=this.pagingDiv?document.getElementById(this.pagingDiv):null;if(this.container.style.width)if(this.myDivWidth=numOnly(this.container.style.width),this.container.style.height){this.myDivHeight=
+numOnly(this.container.style.height);this.container.style.overflow="hidden";this.vertical&&(this.horizontal=!1);var g=this.container.innerHTML;this.container.innerHTML="";var k=document.createElement("div");k.innerHTML=g;this.container.appendChild(k);this.childrenCount=this.totalPages&&this.totalPages>0?this.totalPages:k.childNodes.length;this.moveCSS3(k,{x:0,y:0});k.style.width=Math.ceil((this.totalPages+1)*this.myDivWidth)+"px";k.style.height=this.myDivHeight;if(this.pagingDiv){for(i=0;i<this.childrenCount;i++){var h=
+document.createElement("div");h.id=this.container.id+"_"+i;h.pageId=i;h.className=i!=0?this.pagingCssName:this.pagingCssNameSelected;h.onclick=function(){e.onMoveIndex(this.pageId)};var l=document.createElement("div");this.vertical?(l.style.height="20px",l.style.display="block",l.style.clear="both",l.innerHTML="<br>"):(l.style.cssFloat="left",l.style.width="20px",l.innerHTML="&nbsp");this.pagingDiv.appendChild(h);this.pagingDiv.appendChild(l)}this.vertical?(this.pagingDiv.style.height=this.childrenCount*
+50+"px",this.pagingDiv.style.width="25px"):(this.pagingDiv.style.width=this.childrenCount*50+"px",this.pagingDiv.style.height="25px")}k.addEventListener("touchmove",function(a){e.touchMove(a)},!1);k.addEventListener("touchend",function(a){e.touchEnd(a)},!1);k.addEventListener("touchstart",function(a){e.touchStart(a)},!1);this.el=k}else alert("Please set the height on "+this.container.id+" object to use the carousel script");else alert("Please set the width on "+this.container.id+" object to use the carousel script")}catch(m){console("error adding carousel "+
+m)}}else alert("Error finding container for carousel "+a)};d.prototype={startX:0,startY:0,dx:0,dy:0,currentIndex:0,myDivWidth:0,myDivHeight:0,cssMoveStart:0,childrenCount:0,totalPages:0,thisCarouselIndex:0,vertical:!1,horizontal:!0,el:null,movingElement:!1,container:null,pagingDiv:null,pagingCssName:"carousel_paging",pagingCssNameSelected:"carousel_paging_selected",touchStart:function(a){if(a.touches[0].target&&a.touches[0].target.type!=void 0){var b=a.touches[0].target.tagName.toLowerCase();if(b==
+"select"||b=="input"||b=="button")return}if(a.touches.length==1)this.movingElement=!0,a.preventDefault(),a.stopPropagation(),this.vertical?(this.startY=a.touches[0].pageY,this.cssMoveStart=(new WebKitCSSMatrix(window.getComputedStyle(this.el,null).webkitTransform)).f):(this.startX=a.touches[0].pageX,this.cssMoveStart=(new WebKitCSSMatrix(window.getComputedStyle(this.el,null).webkitTransform)).e)},touchEnd:function(a){if(this.movingElement){a.preventDefault();a.stopPropagation();try{var b=this.vertical?
+(new WebKitCSSMatrix(window.getComputedStyle(this.el,null).webkitTransform)).f:(new WebKitCSSMatrix(window.getComputedStyle(this.el,null).webkitTransform)).e;if(b>0)this.moveCSS3(this.el,{x:0,y:0},"300");else{var e=this.vertical?this.dy%this.myDivHeight/this.myDivHeight*-100:this.dx%this.myDivWidth/this.myDivWidth*-100,d=this.thisCarouselIndex;b<this.cssMoveStart&&e>30?d++:b>this.cssMoveStart&&e<70&&d--;d>this.childrenCount-1&&(d=this.childrenCount-1);d<0&&(d=0);a={x:0,y:0};this.vertical?a.y=d*this.myDivHeight*
+-1:a.x=d*this.myDivWidth*-1;this.moveCSS3(this.el,a,"300");if(this.pagingDiv&&this.carouselIndex!=d)document.getElementById(this.container.id+"_"+this.thisCarouselIndex).className=this.pagingCssName,document.getElementById(this.container.id+"_"+d).className=this.pagingCssNameSelected;this.thisCarouselIndex=d}}catch(k){console.log(k)}this.dx=0;this.movingElement=!1;this.startY=this.dy=this.startX=0}},touchMove:function(a){if(this.movingElement){a.preventDefault();a.stopPropagation();if(a.touches.length>
+1)this.dx=0,this.movingElement=!1,this.startY=this.dy=this.startX=0;var b={x:0,y:0};this.vertical?(this.dy=a.touches[0].pageY-this.startY,this.dy+=this.cssMoveStart,b.y=this.dy):(this.dx=a.touches[0].pageX-this.startX,this.dx+=this.cssMoveStart,b.x=this.dx);this.moveCSS3(this.el,b)}},onMoveIndex:function(a){try{document.getElementById(this.container.id+"_"+this.thisCarouselIndex).className=this.pagingCssName;a<0&&(a=0);a>this.childrenCount-1&&(a=this.childrenCount-1);var b={x:0,y:0};this.vertical?
+b.y=a*this.myDivHeight*-1:b.x=a*this.myDivWidth*-1;this.moveCSS3(this.el,b,"300");this.thisCarouselIndex=a;if(this.pagingDiv)document.getElementById(this.container.id+"_"+this.thisCarouselIndex).className=this.pagingCssNameSelected}catch(d){console.log("Error "+d)}},moveCSS3:function(c,d,e,g){e=e?parseInt(e):0;g||(g="linear");c.style.webkitTransform="translate"+a+d.x+"px,"+d.y+"px"+b;c.style.webkitTransitionDuration=e+"ms";c.style.webkitBackfaceVisiblity="hidden";c.style.webkitTransformStyle="preserve-3d";
+c.style.webkitTransitionTimingFunction=g}};return d}();window.numOnly||(numOnly=function(a){isNaN(parseFloat(a))&&(a=a.replace(/[^0-9.-]/,""));return parseFloat(a)});window.aUX||(aUX={});if(!aUX.web)aUX.web={};aUX.web.appMobiPassword=function(){this.oldPasswords={}};
+aUX.web.appMobiPassword.prototype={oldPasswords:[],showPasswordPlainText:!1,getOldPasswords:function(a){var b=a&&document.getElementById(a)?document.getElementById(a):document;if(b)for(var a=b.getElementsByTagName("input"),d=this,b=0;b<a.length;b++){if(a[b].type=="password"){this.oldPasswords[a[b].id]=a[b];var c=document.createElement("input"),f=parseInt(a[b].style.width)>0?parseInt(a[b].style.width):100,e=parseInt(a[b].style.height)>0?parseInt(a[b].style.height):20;c.type="text";if(a[b].className!=
+"")c.style.width=f+"px",c.style.height=e+"px",c.style.backgroundColor="white";c.style.position="relative";c.style.left="0px";c.style.top="0px";c.style.zIndex="1";c.value=a[b].value;c.showPasswordPlainText=d.showPasswordPlainText;c.className=a[b].className;c.id=a[b].id+"_appMobiPassword";c.placeHolder=a[b].placeHolder;c.oldPW=a[b];c.onkeyup=function(){var a=this.oldPW;if(a.value.length!=this.value.length){var b=this.value.substring(this.selectionStart-1,this.selectionStart),c=this.selectionStart;d.updatePassword(a,
+b,this.selectionStart,this.value.length);if(a.value.length>0&&!this.showPasswordPlainText)a=this.value,this.value="",this.value=a.replace(b,"*"),c!=this.value.length&&this.setSelectionRange(c,c);else if(a.value.length==0)this.value=""}};a[b].parentNode.appendChild(c);a[b].style.display="none";a[b].parentNode.appendChild(c)}}else alert("Could not find container element for appMobiPassword "+a)},updatePassword:function(a,b,d,c){if(c==0)a.value="";c>a.value.length&&b.length>0?(c=a.value,a.value=c.substring(0,
+d-1)+b+c.substring(d-1,c.length)):(c=a.value,a.value=c.substring(0,d)+c.substring(d+1,c.length))},changePasswordVisiblity:function(a,b){a=parseInt(a);if(this.oldPasswords[b]){var d=document.getElementById(b+"_appMobiPassword");if(a==1)this.showPasswordPlainText=!0,d.showPasswordPlainText=showPasswordPlainText=!0,d.value=this.oldPasswords[b].value;else{this.showPasswordPlainText=!1;d.showPasswordPlainText=showPasswordPlainText=!1;for(var c="",f=0;f<d.value.length;f++)c+="*";d.value=c}}}};
BIN  mashery.weatherbug/3.4.0/images/ajax-loader.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  mashery.weatherbug/3.4.0/images/background.jpg
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  mashery.weatherbug/3.4.0/images/food.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  mashery.weatherbug/3.4.0/images/greenspace.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  mashery.weatherbug/3.4.0/images/icons-18-white.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  mashery.weatherbug/3.4.0/images/listArrow.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  mashery.weatherbug/3.4.0/images/listArrowSel.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  mashery.weatherbug/3.4.0/images/listGroup.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  mashery.weatherbug/3.4.0/images/lodging.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  mashery.weatherbug/3.4.0/images/masherymade.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  mashery.weatherbug/3.4.0/images/paw.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  mashery.weatherbug/3.4.0/images/project_icon.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  mashery.weatherbug/3.4.0/images/refresh.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  mashery.weatherbug/3.4.0/images/vet.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  mashery.weatherbug/3.4.0/images/weatherbug.jpg
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
106 mashery.weatherbug/3.4.0/index.html
View
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<!--HTML5 doctype-->
+<html>
+ <head>
+ <title>WeatherBug API Demo App</title>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <script type="text/javascript" charset="utf-8" src="http://localhost:58888/_appMobi/appmobi.js"></script>
+ <script type="text/javascript" charset="utf-8" src="http://localhost:58888/_appMobi/xhr.js"></script>
+ <script src="aUX_ui.min.js"></script>
+ <script src="aUX_web.all.min.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
+ <script src="weatherbug.js"></script>
+ <script type="text/javascript">
+ /* This function runs once the page is loaded, but appMobi is not yet active */
+ var init = function() {
+ };
+ window.addEventListener("load", init, false);
+
+ /* This code prevents users from dragging the page */
+ var preventDefaultScroll = function(event) {
+ event.preventDefault();
+ window.scroll(0, 0);
+ return false;
+ };
+ document.addEventListener('touchmove', preventDefaultScroll, false);
+
+ /* This code is used to run as soon as appMobi activates */
+ var AMUi = "";
+ var onDeviceReady = function() {
+ AppMobi.display.useViewport(320, 480);
+
+ //Use the appMobi UI
+ AMUi = new aUX.ui();
+
+ AppMobi.device.hideSplashScreen();
+
+ setdefaultFlash();
+ check_keys();
+ getData();
+
+ };
+ document.addEventListener("appMobi.device.ready", onDeviceReady, false);
+
+ function test(e) {
+ console.log(e);
+ }
+ </script>
+ <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
+ <link rel="stylesheet" type="text/css" href="aUX_ui.css" />
+ <link rel="stylesheet" type="text/css" href="style.css" />
+ </head>
+ <body>
+ <div title="WeatherBug API" id="main" class="panel" selected="true">
+ <div id="flash"></div>
+
+ <div id="header_images">
+ <img id="logo1" src="images/weatherbug.jpg"/>
+ <img id="logo2" src="images/masherymade.png"/>
+ </div>
+
+ <p>The WeatherBug API provides the world's best source for intelligent weather information. Tap into the datasource and develop your own customized weather apps.</p>
+
+ <p>Visit <a href="http://developer.weatherbug.com" target="_blank">developer.weatherbug.com</a> to get your free API key today.</p>
+
+ <p><a href="#divGeo" style="text-align:center;">Use my Current Location</a></p>
+
+ <p>
+ <input type="text" id="zip_code" placeholder="Example: 94103" />
+ <button id="btnFindByZip" ontouchstart="findWeatherZip();">Search by Zip</button>
+ </p>
+
+ <div id="output"></div>
+
+ </div>
+
+ <div id="divGeo" title="Geo" class="panel">
+ <script type="text/html" id="geo_list_tpl">
+ <ul>
+ <% for(i=0;i<forecastList.length;i++) {
+ %>
+ <% if (forecastList[i].hasDay) %>
+ <li><a href='javascript:;' onClick=''><img class="photo" src="http://img.weather.weatherbug.com/forecast/icons/localized/50x42/en/trans/<%= forecastList[i].dayIcon%>.png" /><%=forecastList[i].title%><br/>&nbsp;<small><%=forecastList[i].dayPred%></small></a></li>
+ <% else %>
+ <li><a href='javascript:;' onClick=''><img class="photo" src="http://img.weather.weatherbug.com/forecast/icons/localized/50x42/en/trans/<%= forecastList[i].nightIcon%>.png" /><%=forecastList[i].title%><br/>&nbsp;<small><%=forecastList[i].dayPred%></small></a></li>
+ <%}%>
+
+ </ul>
+ </script>
+ </div>
+ <div id="divZip" title="Zip" class="panel">
+ <script type="text/html" id="zip_list_tpl">
+ <ul>
+ <% for(i=0;i<forecastList.length;i++) {
+ %>
+ <% if (forecastList[i].hasDay) %>
+ <li><a href='javascript:;' onClick=''><img class="photo" src="http://img.weather.weatherbug.com/forecast/icons/localized/50x42/en/trans/<%= forecastList[i].dayIcon%>.png" /><%=forecastList[i].title%><br/>&nbsp;<small><%=forecastList[i].dayPred%></small></a></li>
+ <% else %>
+ <li><a href='javascript:;' onClick=''><img class="photo" src="http://img.weather.weatherbug.com/forecast/icons/localized/50x42/en/trans/<%= forecastList[i].nightIcon%>.png" /><%=forecastList[i].title%><br/>&nbsp;<small><%=forecastList[i].dayPred%></small></a></li>
+ <%}%>
+
+ </ul>
+ </script>
+ </div>
+
+ </body>
+</html>
BIN  mashery.weatherbug/3.4.0/master
View
Binary file not shown
100 mashery.weatherbug/3.4.0/style.css
View
@@ -0,0 +1,100 @@
+h1#pageTitle{
+ font-size:0.7em;
+}
+
+#flash{
+ display:none;
+ text-align: center;
+}
+
+#flash.red{
+ background: #ff696f;
+}
+
+#flash.green{
+ background: #57ac00;
+}
+
+.center{
+ text-align: center;
+}
+
+#header_images{
+ padding:5px;
+ border-bottom:1px solid #eaeaea;
+}
+
+p{
+ font-size:0.6em;
+}
+
+#main p{
+ line-height: 1.5em;
+ margin-top: 0;
+ margin-bottom: 0;
+ padding-top: 5px;
+ padding-bottom: 5px;
+}
+
+.content{
+ margin-top: 15px;
+}
+
+#output{
+ padding: 5px;
+ border-top:1px solid #eaeaea;
+ padding-top: 10px;
+ font-size: 1em;
+}
+
+#output p{
+ line-height: 1.3em;
+ margin-top: 0;
+ margin-bottom: 0;
+ padding-top: 5px;
+ padding-bottom: 5px;
+ text-transform: capitalize;
+ font-weight: bold;
+}
+
+#output span{
+ font-weight: normal;
+ font-style: normal;
+}
+
+#output .url{
+ text-transform: lowercase;
+ color: #3d00ff;
+}
+
+hr{
+ color: #eaeaea;
+}
+
+h3 {
+ text-align: center;
+ font-size: 35px;
+}
+ul.iconLinks li {
+ font-size: 12px;
+ font-weight: normal;
+}
+#header_images {
+ position: relative;
+}
+#header img {
+ position: absolute; bottom: 0; left: 0
+}
+#logo1 {
+ margin-left: 5px; margin-top: 2px;
+}
+#logo2 {
+ float:right; margin-right: 5px;
+}
+.middle{
+ vertical-align: middle;
+}
+
+#flash{
+ text-align:left;
+}
141 mashery.weatherbug/3.4.0/weatherbug.js
View
@@ -0,0 +1,141 @@
+// *******************SET YOUR API KEY HERE*******************
+// ***********************************************************
+
+// Insert your WeatherBug REST XML API Key here. ReadMe for more info.
+// Do not plug in your WeatherBug GEO Basic API Key. It must be the
+// REST XML API Key (which also works for JSON requests)
+// var api_key ='your_api_key_here';
+var api_key ='your_api_key_here';
+
+// ***********************************************************
+// ***********************************************************
+
+var map=""; //google maps object
+
+function setdefaultFlash(){
+ $('#flash').show();
+ $('#flash').addClass('red');
+ $('#flash').removeClass('green');
+ $('#flash').html("<p class='center'><strong>Weather Bug API Key Not Found</strong></p><p>Please see <a target='_blank' href='Readme.md'>ReadMe</a> file located in the Project directory for instructions.</p><p>(Hint: To locate your project directory, click on the <img class='middle' style='width:35px;margin-left:-5px;' src='images/project_icon.png'/> icon on the Emulator Toolbar above</p>");
+
+}
+// Check if valid API Key
+function check_keys(){
+ var url = 'http://i.wxbug.net/REST/Direct/GetForecastHourly.ashx?zip=21044&ht=d&api_key=' + api_key + '&f=displayMessage';
+ $.ajax({
+ url: url,
+ dataType: "jsonp",
+ success: displayMessage
+ });
+
+}
+
+function displayErrorMessage(data) {
+ $('#flash').addClass('red');
+ $('#flash').removeClass('green');
+ $('#flash').html("<p class='center'><strong>Weather Bug API Key Not Found</strong></p><p>Please see <a target='_blank' href='Readme.md'>ReadMe</a> file located in the Project directory for instructions.</p><p>(Hint: To locate your project directory, click on the <img class='middle' style='width:35px;margin-left:-5px;' src='images/project_icon.png'/> icon on the Emulator Toolbar above</p>");
+}
+
+function displayMessage(data) {
+
+ if (data.forecastHourlyList[0].dateTime){
+ $('#flash').addClass('green');
+ $('#flash').html("<p class='center green'>Valid API Key Found</p>");
+ return false;
+ }
+ else{
+ AppMobi.notification.alert('Please check the Readme.md file for instructions','Invalid API Key','OK');
+ $('#flash').addClass('red');
+ $('#flash').html("<p class='center'><strong>Weather Bug API Key Not Found</strong></p><p>Please see <a target='_blank' href='Readme.md'>ReadMe</a> file located in the Project directory for instructions.</p><p>(Hint: To locate your project directory, click on the <img class='middle' style='width:35px;margin-left:-5px;' src='images/project_icon.png'/> icon on the Emulator Toolbar above</p>");
+ }
+
+ }
+
+function getData() {
+
+ var successFunction=function(p)
+ {
+
+ var lat=p.coords.latitude;
+ var lng=p.coords.longitude;
+
+ findWeatherGeo(lat,lng,"findWeatherGeoCB");
+
+ var myLatlng = new google.maps.LatLng(lat, lng);
+ var myOptions = {
+ zoom: 8,
+ center: myLatlng,
+ mapTypeId: google.maps.MapTypeId.ROADMAP
+ }
+
+ map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
+
+ }
+ var errorFunction=function( ){
+ alert("Error getting location");
+ }
+
+ // Getting current GeoLocation using appMobi's built-in GeoLocation API.
+ // Then calling the success function if position is successfully retrieved
+ AppMobi.geolocation.getCurrentPosition(successFunction,errorFunction);
+}
+
+// Using WeatherBug's API to get forecast based on the current latitude/longitude positions
+function findWeatherGeo(latitude, longitude, callbackFunction)
+{
+ check_keys();
+
+ AppMobi.device.getRemoteData('http://i.wxbug.net/REST/Direct/GetForecast.ashx?la='+ latitude + '&lo='+ longitude + '&nf=7&ht=t&ht=i&l=en&c=US&api_key='+ api_key,"GET","",callbackFunction,"errorCB");
+}
+
+// Using WeatherBug's API to get forecast based on the zip code entered in the zip_code input box.
+function findWeatherZip(zip, callbackFunction)
+{
+ check_keys();
+
+ var zip = document.getElementById("zip_code").value;
+ var callbackFunction = 'findWeatherZipCB'
+ AppMobi.device.getRemoteData('http://i.wxbug.net/REST/Direct/GetForecast.ashx?zip='+ zip +'&api_key='+ api_key + '&nf=7&ht=t&ht=cp',"GET","",callbackFunction,"errorCB");
+}
+
+// Callback function for the function findWeatherGeo()
+function findWeatherGeoCB(data)
+{
+ try {
+
+ data=JSON.parse(data);
+
+ var content=aUX.web.template("geo_list_tpl",{forecastList:data.forecastList});
+ AMUi.updateContentDiv("divGeo",content);
+
+ AMUi.hideMask();
+
+ } catch(e){ alert("error in findWeatherGeoCB: " + e.message); AMUi.hideMask(); }
+}
+
+// Callback function for the function findWeatherZip()
+function findWeatherZipCB(data)
+{
+ try {
+
+ data=JSON.parse(data);
+
+ var content=aUX.web.template("zip_list_tpl",{forecastList:data.forecastList});
+ AMUi.updateContentDiv("divZip",content);
+
+ document.getElementById("output").innerHTML = content;
+
+ AMUi.hideMask();
+
+ } catch(e){ reset_screen(); AppMobi.notification.alert('Invalid Zip','Weather Not Found','OK'); AMUi.hideMask(); }
+}
+
+function reset_screen(){
+ $("#output").html('');
+}
+
+
+function errorCB(data)
+{
+ console.log ("GRD error "+data);
+}
338 mashery.weatherbug/3.4.0/web/aUX_webCarousel.js
View
@@ -0,0 +1,338 @@
+/**
+ * aUX.web.carousel - a carousel library for AppMobi/css3
+ *
+ * @copyright AppMobi 2011 - AppMobi
+ *
+ * @todo - spacer css class name
+ *
+ */
+
+if(!window.aUX)
+ aUX={};
+if (!aUX.web)
+ aUX.web = {};
+
+aUX.web.carousel = (function() {
+ var translateOpen = 'm11' in new WebKitCSSMatrix() ? "3d(" : "(";
+ var translateClose = 'm11' in new WebKitCSSMatrix() ? ",0)" : ")";
+
+ var carousel = function(containerEl, opts) {
+ if (typeof containerEl == "string" || containerEl instanceof String) {
+ this.container = document.getElementById(containerEl);
+ } else {
+ this.container = containerEl;
+ }
+ if (!this.container) {
+ alert("Error finding container for carousel " + containerEl);
+ return;
+ }
+ if (this instanceof carousel) {
+ for (j in opts) {
+ this[j] = opts[j];
+ }
+ } else {
+
+ return new carousel(containerEl, opts);
+ }
+ try {
+ var that = this;
+ this.pagingDiv = this["pagingDiv"] ? document
+ .getElementById(this["pagingDiv"]) : null;
+
+ if (this.container.style.width)
+ this.myDivWidth = numOnly(this.container.style.width);
+ else {
+ alert("Please set the width on " + this.container.id
+ + " object to use the carousel script");
+ return;
+ }
+ if (this.container.style.height)
+ this.myDivHeight = numOnly(this.container.style.height);
+ else {
+ alert("Please set the height on " + this.container.id
+ + " object to use the carousel script");
+ return;
+ }
+ // initial setup
+
+ this.container.style.overflow = "hidden";
+ if (this["vertical"])
+ this["horizontal"] = false;
+ var tmpHTML = this.container.innerHTML;
+ this.container.innerHTML = "";
+ var el = document.createElement("div");
+ el.innerHTML = tmpHTML;
+ this.container.appendChild(el);
+ if (this["totalPages"] && this["totalPages"] > 0)
+ this.childrenCount = this["totalPages"];
+ else
+ this.childrenCount = el.childNodes.length;
+
+ this.moveCSS3(el, {
+ x : 0,
+ y : 0
+ });
+ el.style.width = Math.ceil((this["totalPages"] + 1)
+ * this.myDivWidth)
+ + "px";
+ el.style.height = this.myDivHeight;
+ // Create the paging dots
+ if (this.pagingDiv) {
+ for (i = 0; i < this.childrenCount; i++) {
+
+ var pagingEl = document.createElement("div");
+ pagingEl.id = this.container.id + "_" + i;
+ pagingEl.pageId = i;
+ if (i != 0)
+ pagingEl.className = this.pagingCssName;
+ else
+ pagingEl.className = this.pagingCssNameSelected;
+ pagingEl.onclick = function() {
+ that.onMoveIndex(this.pageId);
+ };
+ var spacerEl = document.createElement("div");
+ if (!this["vertical"]) {
+ spacerEl.style.cssFloat = "left";
+ spacerEl.style.width = "20px";
+ spacerEl.innerHTML = "&nbsp";
+ } else {
+ spacerEl.style.height = "20px";
+ spacerEl.style.display = "block";
+ spacerEl.style.clear = "both";
+ spacerEl.innerHTML = "<br>";
+ }
+
+ this.pagingDiv.appendChild(pagingEl);
+ this.pagingDiv.appendChild(spacerEl);
+ }
+ if (this["vertical"]) {
+ this.pagingDiv.style.height = (this.childrenCount) * 50
+ + "px";
+ this.pagingDiv.style.width = "25px";
+ } else {
+ this.pagingDiv.style.width = (this.childrenCount) * 50
+ + "px";
+ this.pagingDiv.style.height = "25px";
+ }
+ }
+
+ el.addEventListener('touchmove', function(e) {
+ that.touchMove(e);
+ }, false);
+ el.addEventListener('touchend', function(e) {
+ that.touchEnd(e);
+ }, false);
+ el.addEventListener('touchstart', function(e) {
+ that.touchStart(e);
+ }, false);
+ this.el = el;
+ } catch (e) {
+ console("error adding carousel " + e);
+ }
+ };
+
+ carousel.prototype = {
+ startX : 0,
+ startY : 0,
+ dx : 0,
+ dy : 0,
+ currentIndex : 0,
+ myDivWidth : 0,
+ myDivHeight : 0,
+ cssMoveStart : 0,
+ childrenCount : 0,
+ totalPages : 0,
+ thisCarouselIndex : 0,
+ vertical : false,
+ horizontal : true,
+ el : null,
+ movingElement : false,
+ container : null,