From 324494b21b2ba63525e299e71e060df91253af19 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Thu, 24 Aug 2017 12:45:40 -0400 Subject: [PATCH] We don't actually *use* jqtouch anywhere. Mobile controllers are defunct and redirect to root. Should we revisit this, I imagine we'll use a different technology. --- client/galaxy/scripts/libs/jquery/jqtouch.js | 747 ------------------- client/gulpfile.js | 1 - client/package.json | 1 - client/yarn.lock | 4 - static/scripts/libs/jquery/jqtouch.js | 1 - 5 files changed, 754 deletions(-) delete mode 100644 client/galaxy/scripts/libs/jquery/jqtouch.js delete mode 100644 static/scripts/libs/jquery/jqtouch.js diff --git a/client/galaxy/scripts/libs/jquery/jqtouch.js b/client/galaxy/scripts/libs/jquery/jqtouch.js deleted file mode 100644 index d29f65204f6..00000000000 --- a/client/galaxy/scripts/libs/jquery/jqtouch.js +++ /dev/null @@ -1,747 +0,0 @@ -/* - _/ _/_/ _/_/_/_/_/ _/ - _/ _/ _/ _/_/ _/ _/ _/_/_/ _/_/_/ - _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/ - _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ - _/ _/_/ _/ _/ _/_/ _/_/_/ _/_/_/ _/ _/ - _/ - _/ - - Created by David Kaneda - Maintained by Thomas Yip - Sponsored by Sencha Labs - Special thanks to Jonathan Stark - - Documentation and issue tracking on GitHub - - (c) 2009-2015 Sencha Labs - - Version: 1.0.1- - 2015-01-31 - - jQTouch may be freely distributed under the MIT license. -*/ -(function() { - $.jQT = (function() { - var $body, $currentPage, $head, animations, customHistory, newPageCount, tapBuffer, touchSelectors; - - jQT.prototype.extensions = []; - - jQT.prototype.animations = [ - { - name: "cubeleft", - selector: ".cubeleft, .cube", - is3d: true - }, { - name: "cuberight", - selector: ".cuberight", - is3d: true - }, { - name: "dissolve", - selector: ".dissolve" - }, { - name: "fade", - selector: ".fade" - }, { - name: "flipleft", - selector: ".flipleft, .flip", - is3d: true - }, { - name: "flipright", - selector: ".flipright", - is3d: true - }, { - name: "pop", - selector: ".pop", - is3d: true - }, { - name: "swapleft", - selector: ".swapleft, .swap", - is3d: true - }, { - name: "swapright", - selector: ".swapright", - is3d: true - }, { - name: "slidedown", - selector: ".slidedown" - }, { - name: "slideright", - selector: ".slideright" - }, { - name: "slideup", - selector: ".slideup" - }, { - name: "slideleft", - selector: ".slideleft, .slide, #jqt > * > ul li a" - } - ]; - - jQT.prototype.orientation = 'portrait'; - - jQT.prototype.tapHandlers = []; - - jQT.prototype.defaults = { - addGlossToIcon: true, - backSelector: ".back, .cancel, .goback", - cacheGetRequests: true, - defaultAnimation: "slideleft", - fixedViewport: true, - formSelector: "form", - fullScreen: true, - fullScreenClass: "fullscreen", - icon: null, - icon4: null, - minimalUIViewport: true, - preloadImages: false, - starter: $(document).ready, - startupScreen: null, - statusBar: "default", - submitSelector: ".submit", - touchSelector: "a, .touch", - updateHash: true, - useAnimations: true, - useFastTouch: true, - useTouchScroll: true - }; - - jQT.addExtension = function(extension) { - return this.prototype.extensions.push(extension); - }; - - jQT.addTapHandler = function(tapHandler) { - if (typeof tapHandler.name === "string" && typeof tapHandler.isSupported === "function" && typeof tapHandler.fn === "function") { - return this.prototype.tapHandlers.push(tapHandler); - } - }; - - jQT.addAnimation = function(animation) { - if (typeof animation.selector === "string" && typeof animation.name === "string") { - return this.animations.push(animation); - } - }; - - $body = void 0; - - $head = $("head"); - - animations = jQT.prototype.animations; - - customHistory = []; - - newPageCount = 0; - - $currentPage = ""; - - touchSelectors = []; - - tapBuffer = 100; - - function jQT(options) { - var addPageToHistory, clickHandler, doNavigation, getAnimation, hashChangeHandler, initHairExtensions, insertPages, isExternalLink, orientationChangeHandler, reverseAnimation, setHash, showPageByHref, start, submitHandler, submitParentForm, support, tapHandler, touchStartHandler; - this.tapHandlers = this.tapHandlers.concat([ - { - name: "external-link", - isSupported: function(e, params) { - return isExternalLink(params.$el); - }, - fn: function(e, params) { - params.$el.removeClass('active'); - return true; - } - }, { - name: "back-selector", - isSupported: (function(_this) { - return function(e, params) { - return params.$el.is(_this.settings.backSelector); - }; - })(this), - fn: (function(_this) { - return function(e, params) { - _this.goBack(params.hash); - return false; - }; - })(this) - }, { - name: "submit-selector", - isSupported: (function(_this) { - return function(e, params) { - return params.$el.is(_this.settings.submitSelector); - }; - })(this), - fn: function(e, params) { - submitParentForm(params.$el); - } - }, { - name: "webapp", - isSupported: function(e, params) { - return params.target === "_webapp"; - }, - fn: function(e, params) { - window.location = params.href; - return false; - } - }, { - name: "no-op", - isSupported: function(e, params) { - return params.href === "#"; - }, - fn: function(e, params) { - params.$el.removeClass('active'); - return true; - } - }, { - name: "standard", - isSupported: function(e, params) { - return params.hash && params.hash !== "#"; - }, - fn: (function(_this) { - return function(e, params) { - var animation; - animation = getAnimation(params.$el); - params.$el.addClass("active"); - _this.goTo($(params.hash).data("referrer", params.$el), animation, params.$el.hasClass("reverse")); - return false; - }; - })(this) - }, { - name: "external", - isSupported: function(e, params) { - return true; - }, - fn: function(e, params) { - var animation; - animation = getAnimation(params.$el); - params.$el.addClass("loading active"); - showPageByHref(params.$el.attr("href"), { - animation: animation, - callback: function() { - params.$el.removeClass("loading"); - return setTimeout(function() { - return params.$el.removeClass('active'); - }, 250); - }, - $referrer: params.$el - }); - return false; - } - } - ]); - this.goTo = (function(_this) { - return function(toPage, animation) { - var anim, fromPage, nextPage, _i, _len; - fromPage = customHistory[0].page; - if (typeof animation === "string") { - for (_i = 0, _len = animations.length; _i < _len; _i++) { - anim = animations[_i]; - if (anim.name === animation) { - animation = anim; - break; - } - } - } - if (typeof toPage === "string") { - nextPage = $(toPage); - if (!nextPage.length) { - showPageByHref(toPage, { - animation: animation - }); - return; - } else { - toPage = nextPage; - } - } - if (doNavigation(fromPage, toPage, animation)) { - _this; - } else { - console.warn("Could not animate pages."); - return false; - } - }; - })(this); - this.goBack = (function(_this) { - return function(toPage) { - var end, from, h, i, to, _i, _len; - if (customHistory.length < 1) { - console.warn("History is empty."); - } - if (customHistory.length === 1) { - console.warn("You are on the first panel."); - window.history.go(-1); - } - if (typeof toPage === 'number') { - if (toPage > 0) { - customHistory.splice(1, toPage); - } else if (toPage < 0) { - customHistory.splice(1, customHistory.length + toPage - 1); - } - } else if (/^#.+/.test(toPage)) { - end = 0; - for (i = _i = 0, _len = customHistory.length; _i < _len; i = ++_i) { - h = customHistory[i]; - if (h.hash === toPage) { - end = i; - break; - } - } - customHistory.splice(1, end - 1); - } - from = customHistory[0]; - to = customHistory[1]; - if (!((from != null) && (to != null))) { - return; - } - if (doNavigation(from.page, to.page, from.animation, true)) { - _this; - } else { - console.warn("Could not go back."); - return false; - } - }; - })(this); - this.history = customHistory; - initHairExtensions = (function(_this) { - return function(options) { - var hairExtensions, i, precomposed, viewports, _i, _len, _ref; - _ref = _this.settings.preloadImages; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - i = _ref[_i]; - (new Image()).src = _this.settings.preloadImages[i]; - } - hairExtensions = []; - precomposed = _this.settings.addGlossToIcon ? '' : '-precomposed'; - if (_this.settings.icon) { - hairExtensions.push(""); - } - if (_this.settings.icon4) { - hairExtensions.push(""); - } - if (_this.settings.startupScreen) { - hairExtensions.push(""); - } - viewports = []; - if (_this.settings.fixedViewport) { - viewports.push("initial-scale=1.0", "maximum-scale=1.0", "user-scalable=0"); - } - if (_this.settings.minimalUIViewport) { - viewports.push("minimal-ui"); - } - if (viewports) { - hairExtensions.push(""); - } - if (_this.settings.fullScreen) { - hairExtensions.push(""); - if (_this.settings.statusBar) { - hairExtensions.push(""); - } - } - if (hairExtensions.length) { - return $head.prepend(hairExtensions.join('')); - } - }; - })(this); - insertPages = (function(_this) { - return function(nodes, animation) { - var targetPage; - targetPage = null; - $(nodes).each(function(index, node) { - var $node; - $node = $(this); - if (!$node.attr("id")) { - $node.attr("id", "page-" + (++newPageCount)); - } - $("#" + $node.attr("id")).remove(); - $body.append($node); - $body.trigger("pageInserted", { - page: $node - }); - if ($node.hasClass("current") || !targetPage) { - return targetPage = $node; - } - }); - if (targetPage != null) { - _this.goTo(targetPage, animation); - targetPage; - } else { - return false; - } - }; - })(this); - addPageToHistory = function(page, animation) { - var id; - id = page.attr('id'); - return customHistory.unshift({ - page: page, - animation: animation, - hash: "#" + id, - id: id - }); - }; - clickHandler = (function(_this) { - return function(e) { - var $el; - $el = $(e.target); - if (!$el.is(touchSelectors.join(", "))) { - $el = $el.closest(touchSelectors.join(", ")); - } - if ($el && $el.attr("href") && !isExternalLink($el)) { - console.warn("Need to prevent default click behavior."); - e.preventDefault(); - } else { - console.warn("No need to prevent default click behavior."); - } - if (!support.touch) { - console.warn("Converting click event to a tap event because touch handlers are not present or off."); - $(e.target).trigger("tap", e); - } - }; - })(this); - hashChangeHandler = (function(_this) { - return function(e) { - if (location.hash === customHistory[0].hash) { - console.log("We are on the right panel."); - return true; - } else if (location.hash === "") { - _this.goBack(); - return true; - } else if (customHistory[1] && location.hash === customHistory[1].hash) { - _this.goBack(); - return true; - } else { - console.warn("Could not find ID in history, just forwarding to DOM element."); - _this.goTo($(location.hash), _this.settings.defaultAnimation); - } - }; - })(this); - isExternalLink = function($el) { - return $el.attr("target") === "_blank" || $el.attr("rel") === "external" || $el.is("a[href^=\"http://maps.google.com\"], a[href^=\"mailto:\"], a[href^=\"tel:\"], a[href^=\"javascript:\"], a[href*=\"youtube.com/v\"], a[href*=\"youtube.com/watch\"]"); - }; - getAnimation = (function(_this) { - return function($el) { - var animation, resultAnimation, _i, _len; - for (_i = 0, _len = animations.length; _i < _len; _i++) { - animation = animations[_i]; - if ($el.is(animation.selector)) { - resultAnimation = animation; - break; - } - } - if (!resultAnimation) { - console.warn("Animation could not be found. Using " + _this.settings.defaultAnimation + "."); - resultAnimation = _this.settings.defaultAnimation; - } - return resultAnimation; - }; - })(this); - showPageByHref = (function(_this) { - return function(href, options) { - options = $.extend({}, { - data: null, - method: "GET", - animation: null, - $referrer: null - }, options); - if (href.charAt(0) !== '#') { - return $.ajax({ - url: href, - data: options.data, - type: options.method, - success: function(data) { - var firstPage; - firstPage = insertPages(data, options.animation); - if (firstPage) { - if (options.method === "GET" && _this.settings.cacheGetRequests === true && options.$referrer) { - return options.$referrer.attr("href", "#" + firstPage.attr("id")); - } - } - }, - error: function(data) { - if (options.$referrer) { - return options.$referrer.removeClass('active'); - } - } - }); - } else { - if (options.$referrer) { - return options.$referrer.removeClass('active'); - } - } - }; - })(this); - support = void 0; - start = (function(_this) { - return function() { - var $touchSelectors, anatomyLessons, extFn, startHash, _i, _len, _ref; - support = $.support || {}; - $.extend(support, { - animationEvents: typeof window.WebKitAnimationEvent !== "undefined", - touch: (typeof window.TouchEvent !== "undefined") && (window.navigator.userAgent.indexOf("Mobile") > -1) && _this.settings.useFastTouch, - transform3d: function() { - var body, div, head, result, style; - head = $head.get(0); - body = document.body; - style = document.createElement("style"); - style.textContent = "@media (transform-3d),(-o-transform-3d),(-moz-transform-3d),(-webkit-transform-3d){#jqt-3dtest{height:3px}}"; - div = document.createElement("div"); - div.id = "jqt-3dtest"; - head.appendChild(style); - body.appendChild(div); - result = div.offsetHeight === 3; - style.parentNode.removeChild(style); - div.parentNode.removeChild(div); - console.warn("Support for 3d transforms: " + result + "."); - return result; - } - }); - if (!support.touch) { - console.warn("This device does not support touch interaction, or it has been deactivated by the developer. Some features might be unavailable."); - } - if (!support.transform3d) { - console.warn("This device does not support 3d animation. 2d animations will be used instead."); - } - _ref = _this.extensions; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - extFn = _ref[_i]; - if ($.isFunction(extFn)) { - $.extend(_this, extFn(_this)); - } - } - touchSelectors.push(_this.settings.touchSelector.concat(_this.settings.backSelector, _this.settings.submitSelector)); - $touchSelectors = $(touchSelectors.join(', ')).css('-webkit-touch-callout', 'none'); - $body = $("#jqt"); - anatomyLessons = []; - if (!$body.length) { - console.warn("Could not find an element with the id “jqt”, so the body id has been set to \"jqt\". If you are having any problems, wrapping your panels in a div with the id “jqt” might help."); - $body = $(document.body).attr("id", "jqt"); - } - if (support.transform3d) { - anatomyLessons.push("supports3d"); - } - anatomyLessons.push(_this.settings.useTouchScroll ? 'touchscroll' : 'autoscroll'); - if (_this.settings.fullScreenClass && window.navigator.standalone) { - anatomyLessons.push(_this.settings.fullScreenClass, _this.settings.statusBar); - } - $body.addClass(anatomyLessons.join(" ")).on("click", clickHandler).on("orientationchange", orientationChangeHandler).on("submit", submitHandler).on("tap", tapHandler).on((support.touch ? "touchstart" : "mousedown"), touchStartHandler).trigger("orientationchange"); - if (_this.settings.updateHash) { - $(window).on("hashchange", hashChangeHandler); - } - startHash = location.hash; - if (!$("#jqt > .current").length) { - $currentPage = $("#jqt > *:first-child").addClass("current"); - } else { - $currentPage = $("#jqt > .current"); - } - setHash($currentPage.attr("id")); - addPageToHistory($currentPage); - if (_this.settings.updateHash && $(startHash).length) { - return _this.goTo(startHash); - } - }; - })(this); - orientationChangeHandler = function() { - var orientation; - scrollTo(0, 0); - orientation = (Math.abs(window.orientation) === 90 ? "landscape" : "portrait"); - return $body.removeClass("portrait landscape").addClass(orientation).trigger("turn", { - orientation: orientation - }); - }; - reverseAnimation = function(animation) { - var opposites; - opposites = { - up: "down", - down: "up", - left: "right", - right: "left", - "in": "out", - out: "in" - }; - return opposites[animation] || animation; - }; - setHash = (function(_this) { - return function(hash) { - if (_this.settings.updateHash) { - return location.hash = "#" + hash.replace(/^#/, ""); - } - }; - })(this); - submitHandler = (function(_this) { - return function(e, callback) { - var $form; - $(":focus").trigger("blur"); - $form = (typeof e === "string" ? $(e).eq(0) : (e.target ? $(e.target) : $(e))); - if ($form.length && $form.is(_this.settings.formSelector) && $form.attr("action")) { - e.preventDefault(); - return showPageByHref($form.attr("action"), { - data: $form.serialize(), - method: $form.attr("method") || "POST", - animation: getAnimation($form), - callback: callback - }); - } - }; - })(this); - submitParentForm = function($el) { - var $form; - $form = $el.closest("form"); - if ($form.length) { - console.warn("About to submit parent form."); - $form.trigger("submit"); - return false; - } else { - console.warn("No parent form found."); - return true; - } - }; - tapHandler = (function(_this) { - return function(e) { - var $el, flag, handler, hash, href, params, selectors, target, _i, _len, _ref; - if (e.isDefaultPrevented()) { - return true; - } - $el = $(e.target); - selectors = touchSelectors.join(','); - if (!$el.is(selectors)) { - $el = $el.closest(selectors); - } - if (!$el.length || !$el.attr("href")) { - console.warn("Could not find a link related to tapped element."); - return true; - } - target = $el.attr("target"); - hash = $el.prop("hash"); - href = $el.attr("href"); - params = { - e: e, - $el: $el, - target: target, - hash: hash, - href: href - }; - _ref = _this.tapHandlers; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - handler = _ref[_i]; - if (handler.isSupported(e, params)) { - return flag = handler.fn(e, params); - } - } - }; - })(this); - touchStartHandler = function(e) { - var $el, selectors; - $el = $(e.target); - selectors = touchSelectors.join(", "); - if (!$el.is(selectors)) { - $el = $el.closest(selectors); - } - if ($el.length && $el.attr("href")) { - $el.addClass("active"); - } - $el.on((support.touch ? "touchmove" : "mousemove"), function() { - return $el.removeClass("active"); - }); - return $el.on("touchend", function() { - $el.off("touchend mouseup"); - return $el.off("touchmove mousemove"); - }); - }; - doNavigation = (function(_this) { - return function(fromPage, toPage, animation, goingBack) { - var finalAnimationName, is3d, navigationEndHandler; - if (goingBack == null) { - goingBack = false; - } - navigationEndHandler = function(event) { - if (support.animationEvents && animation && _this.settings.useAnimations) { - fromPage.off("webkitAnimationEnd", navigationEndHandler); - fromPage.removeClass(finalAnimationName + " out"); - if (finalAnimationName) { - toPage.removeClass(finalAnimationName); - } - $body.removeClass("animating animating3d"); - } else { - fromPage.removeClass(finalAnimationName + " out"); - if (finalAnimationName) { - toPage.removeClass(finalAnimationName); - } - } - setTimeout(function() { - toPage.removeClass('in'); - return window.scroll(0, 0); - }, tapBuffer); - fromPage.find('.active').removeClass('active'); - toPage.trigger("pageAnimationEnd", { - direction: "in", - animation: animation, - back: goingBack - }); - return fromPage.trigger("pageAnimationEnd", { - direction: "out", - animation: animation, - back: goingBack - }); - }; - if (!toPage.length) { - $('.active').removeClass('active'); - console.warn("Target element is missing."); - return false; - } - if (toPage.hasClass("current")) { - $('.active').removeClass('active'); - console.warn("You are already on the page you are trying to navigate to."); - return false; - } - $(":focus").trigger("blur"); - fromPage.trigger("pageAnimationStart", { - direction: "out", - back: goingBack - }); - toPage.trigger("pageAnimationStart", { - direction: "in", - back: goingBack - }); - if (support.animationEvents && animation && _this.settings.useAnimations) { - finalAnimationName = animation.name; - is3d = animation.is3d ? " animating3d" : ""; - if (!support.transform3d && animation.is3d) { - console.warn("Did not detect support for 3d animations, falling back to " + _this.settings.defaultAnimation + "."); - finalAnimationName = _this.settings.defaultAnimation; - is3d = ''; - } - if (goingBack) { - finalAnimationName = finalAnimationName.replace(/left|right|up|down|in|out/, reverseAnimation); - } - if (finalAnimationName == null) { - finalAnimationName = _this.settings.defaultAnimation; - } - console.warn("finalAnimationName:", finalAnimationName); - fromPage.on("webkitAnimationEnd", navigationEndHandler); - $body.addClass("animating" + is3d); - toPage.addClass(finalAnimationName + " in current"); - fromPage.removeClass("current").addClass(finalAnimationName + " out"); - } else { - toPage.addClass("current in"); - fromPage.removeClass("current"); - navigationEndHandler(); - } - $currentPage = toPage; - if (goingBack) { - customHistory.shift(); - } else { - addPageToHistory($currentPage, animation); - } - setHash($currentPage.attr("id")); - return true; - }; - })(this); - this.settings = $.extend({}, this.defaults, options); - initHairExtensions(); - this.settings.starter(start); - } - - return jQT; - - })(); - - $.jQTouch = $.jQT; - -}).call(this); diff --git a/client/gulpfile.js b/client/gulpfile.js index 09107191c82..63048c6adcf 100644 --- a/client/gulpfile.js +++ b/client/gulpfile.js @@ -25,7 +25,6 @@ var paths = { 'bib2json': [ 'Parser.js', 'bibtex.js' ], 'jquery': ['dist/jquery.js', 'jquery/jquery.js'], 'jquery-migrate': [ 'dist/jquery-migrate.js', 'jquery/jquery.migrate.js' ], - 'jqt': [ 'dist/src/jqt.js', 'jquery/jqtouch.js' ], 'raven-js': ['dist/raven.js', 'raven.js'], 'requirejs': [ 'require.js', 'require.js' ], 'underscore': [ 'underscore.js', 'underscore.js' ], diff --git a/client/package.json b/client/package.json index fd5e51ad806..cf4881a1e29 100644 --- a/client/package.json +++ b/client/package.json @@ -36,7 +36,6 @@ "gulp-sourcemaps": "^2.5.1", "gulp-uglify": "^3.0.0", "gulp-watch": "^4.3.11", - "jqt": "^1.0.1", "jquery": "1.12", "jquery-migrate": "~1.4", "jshint": "^2.9.4", diff --git a/client/yarn.lock b/client/yarn.lock index 3cccfdd7379..203e39f61c9 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -2648,10 +2648,6 @@ jpeg-js@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/jpeg-js/-/jpeg-js-0.1.2.tgz#135b992c0575c985cfa0f494a3227ed238583ece" -jqt@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/jqt/-/jqt-1.0.1.tgz#483dcb7a41ffae4e7625cdc2ee4e8442d6908ed3" - jquery-migrate@~1.4: version "1.4.1" resolved "https://registry.yarnpkg.com/jquery-migrate/-/jquery-migrate-1.4.1.tgz#85152f3ec99a95625f4f7d0bcf62e9b8638f5a76" diff --git a/static/scripts/libs/jquery/jqtouch.js b/static/scripts/libs/jquery/jqtouch.js deleted file mode 100644 index e246a724d7a..00000000000 --- a/static/scripts/libs/jquery/jqtouch.js +++ /dev/null @@ -1 +0,0 @@ -(function(){$.jQT=function(){function t(t){var u,c,d,f,h,p,m,g,v,w,b,C,y,k,S,j,T,A;this.tapHandlers=this.tapHandlers.concat([{name:"external-link",isSupported:function(t,e){return g(e.$el)},fn:function(t,e){return e.$el.removeClass("active"),!0}},{name:"back-selector",isSupported:function(t){return function(e,n){return n.$el.is(t.settings.backSelector)}}(this),fn:function(t){return function(e,n){return t.goBack(n.hash),!1}}(this)},{name:"submit-selector",isSupported:function(t){return function(e,n){return n.$el.is(t.settings.submitSelector)}}(this),fn:function(t,e){S(e.$el)}},{name:"webapp",isSupported:function(t,e){return"_webapp"===e.target},fn:function(t,e){return window.location=e.href,!1}},{name:"no-op",isSupported:function(t,e){return"#"===e.href},fn:function(t,e){return e.$el.removeClass("active"),!0}},{name:"standard",isSupported:function(t,e){return e.hash&&"#"!==e.hash},fn:function(t){return function(e,n){var r;return r=f(n.$el),n.$el.addClass("active"),t.goTo($(n.hash).data("referrer",n.$el),r,n.$el.hasClass("reverse")),!1}}(this)},{name:"external",isSupported:function(t,e){return!0},fn:function(t,e){var n;return n=f(e.$el),e.$el.addClass("loading active"),C(e.$el.attr("href"),{animation:n,callback:function(){return e.$el.removeClass("loading"),setTimeout(function(){return e.$el.removeClass("active")},250)},$referrer:e.$el}),!1}}]),this.goTo=function(t,e){var n,r,a,s,l;if(r=i[0].page,"string"==typeof e)for(s=0,l=o.length;s0?i.splice(1,t):t<0&&i.splice(1,i.length+t-1);else if(/^#.+/.test(t)){for(e=0,r=a=0,s=i.length;a'),t.settings.icon4&&n.push(''),t.settings.startupScreen&&n.push(''),a=[],t.settings.fixedViewport&&a.push("initial-scale=1.0","maximum-scale=1.0","user-scalable=0"),t.settings.minimalUIViewport&&a.push("minimal-ui"),a&&n.push(''),t.settings.fullScreen&&(n.push(''),t.settings.statusBar&&n.push('')),n.length)return r.prepend(n.join(""))}}(this),m=function(t){return function(n,r){var o;if(o=null,$(n).each(function(t,n){var r;if((r=$(this)).attr("id")||r.attr("id","page-"+ ++a),$("#"+r.attr("id")).remove(),e.append(r),e.trigger("pageInserted",{page:r}),r.hasClass("current")||!o)return o=r}),null==o)return!1;t.goTo(o,r)}}(this),u=function(t,e){var n;return n=t.attr("id"),i.unshift({page:t,animation:e,hash:"#"+n,id:n})},c=function(t){var e;(e=$(t.target)).is(l.join(", "))||(e=e.closest(l.join(", "))),e&&e.attr("href")&&!g(e)?(console.warn("Need to prevent default click behavior."),t.preventDefault()):console.warn("No need to prevent default click behavior."),j.touch||(console.warn("Converting click event to a tap event because touch handlers are not present or off."),$(t.target).trigger("tap",t))},h=function(t){return function(e){return location.hash===i[0].hash?(console.log("We are on the right panel."),!0):""===location.hash?(t.goBack(),!0):i[1]&&location.hash===i[1].hash?(t.goBack(),!0):(console.warn("Could not find ID in history, just forwarding to DOM element."),void t.goTo($(location.hash),t.settings.defaultAnimation))}}(this),g=function(t){return"_blank"===t.attr("target")||"external"===t.attr("rel")||t.is('a[href^="http://maps.google.com"], a[href^="mailto:"], a[href^="tel:"], a[href^="javascript:"], a[href*="youtube.com/v"], a[href*="youtube.com/watch"]')},f=function(t){return function(e){var n,r,i,a;for(i=0,a=o.length;i-1&&t.settings.useFastTouch,transform3d:function(){var t,e,n,o,i;return n=r.get(0),t=document.body,i=document.createElement("style"),i.textContent="@media (transform-3d),(-o-transform-3d),(-moz-transform-3d),(-webkit-transform-3d){#jqt-3dtest{height:3px}}",e=document.createElement("div"),e.id="jqt-3dtest",n.appendChild(i),t.appendChild(e),o=3===e.offsetHeight,i.parentNode.removeChild(i),e.parentNode.removeChild(e),console.warn("Support for 3d transforms: "+o+"."),o}}),j.touch||console.warn("This device does not support touch interaction, or it has been deactivated by the developer. Some features might be unavailable."),j.transform3d||console.warn("This device does not support 3d animation. 2d animations will be used instead."),s=0,d=(f=t.extensions).length;s .current").length?$("#jqt > .current"):$("#jqt > *:first-child").addClass("current"),b(n.attr("id")),u(n),t.settings.updateHash&&$(a).length)return t.goTo(a)}}(this),v=function(){var t;return scrollTo(0,0),t=90===Math.abs(window.orientation)?"landscape":"portrait",e.removeClass("portrait landscape").addClass(t).trigger("turn",{orientation:t})},w=function(t){return{up:"down",down:"up",left:"right",right:"left",in:"out",out:"in"}[t]||t},b=function(t){return function(e){if(t.settings.updateHash)return location.hash="#"+e.replace(/^#/,"")}}(this),k=function(t){return function(e,n){var r;if($(":focus").trigger("blur"),(r="string"==typeof e?$(e).eq(0):e.target?$(e.target):$(e)).length&&r.is(t.settings.formSelector)&&r.attr("action"))return e.preventDefault(),C(r.attr("action"),{data:r.serialize(),method:r.attr("method")||"POST",animation:f(r),callback:n})}}(this),S=function(t){var e;return(e=t.closest("form")).length?(console.warn("About to submit parent form."),e.trigger("submit"),!1):(console.warn("No parent form found."),!0)},T=function(t){return function(e){var n,r,o,i,a,s,u;if(e.isDefaultPrevented())return!0;if(n=$(e.target),i=l.join(","),n.is(i)||(n=n.closest(i)),!n.length||!n.attr("href"))return console.warn("Could not find a link related to tapped element."),!0;for(o={e:e,$el:n,target:n.attr("target"),hash:n.prop("hash"),href:n.attr("href")},a=0,s=(u=t.tapHandlers).length;a * > ul li a"}],t.prototype.orientation="portrait",t.prototype.tapHandlers=[],t.prototype.defaults={addGlossToIcon:!0,backSelector:".back, .cancel, .goback",cacheGetRequests:!0,defaultAnimation:"slideleft",fixedViewport:!0,formSelector:"form",fullScreen:!0,fullScreenClass:"fullscreen",icon:null,icon4:null,minimalUIViewport:!0,preloadImages:!1,starter:$(document).ready,startupScreen:null,statusBar:"default",submitSelector:".submit",touchSelector:"a, .touch",updateHash:!0,useAnimations:!0,useFastTouch:!0,useTouchScroll:!0},t.addExtension=function(t){return this.prototype.extensions.push(t)},t.addTapHandler=function(t){if("string"==typeof t.name&&"function"==typeof t.isSupported&&"function"==typeof t.fn)return this.prototype.tapHandlers.push(t)},t.addAnimation=function(t){if("string"==typeof t.selector&&"string"==typeof t.name)return this.animations.push(t)},e=void 0,r=$("head"),o=t.prototype.animations,i=[],a=0,n="",l=[],s=100,t}(),$.jQTouch=$.jQT}).call(this); \ No newline at end of file