mirror of
https://github.com/documize/community.git
synced 2025-07-21 14:19:43 +02:00
Remove excess JS libs
This commit is contained in:
parent
75a19a80f9
commit
3b179d5bc0
8 changed files with 0 additions and 11360 deletions
|
@ -60,8 +60,6 @@ module.exports = {
|
||||||
"userLogin": true,
|
"userLogin": true,
|
||||||
"Keycloak": true,
|
"Keycloak": true,
|
||||||
"slug": true,
|
"slug": true,
|
||||||
"interact": true,
|
|
||||||
"velocity": true,
|
|
||||||
"iziToast": true
|
"iziToast": true
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -58,8 +58,6 @@ module.exports = function (defaults) {
|
||||||
app.import('vendor/datetimepicker.min.js');
|
app.import('vendor/datetimepicker.min.js');
|
||||||
app.import('vendor/documize.js');
|
app.import('vendor/documize.js');
|
||||||
app.import('vendor/dropzone.js');
|
app.import('vendor/dropzone.js');
|
||||||
app.import('vendor/hoverIntent.min.js');
|
|
||||||
app.import('vendor/interact.min.js');
|
|
||||||
app.import('vendor/is.js');
|
app.import('vendor/is.js');
|
||||||
app.import('vendor/iziToast.js');
|
app.import('vendor/iziToast.js');
|
||||||
app.import('vendor/keycloak.js');
|
app.import('vendor/keycloak.js');
|
||||||
|
@ -67,15 +65,11 @@ module.exports = function (defaults) {
|
||||||
app.import('vendor/md5.js');
|
app.import('vendor/md5.js');
|
||||||
app.import('vendor/moment.js');
|
app.import('vendor/moment.js');
|
||||||
app.import('vendor/mousetrap.js');
|
app.import('vendor/mousetrap.js');
|
||||||
app.import('vendor/overlay-scrollbars.js');
|
|
||||||
app.import('vendor/prism.js');
|
app.import('vendor/prism.js');
|
||||||
app.import('vendor/slug.js');
|
app.import('vendor/slug.js');
|
||||||
app.import('vendor/sortable.js');
|
app.import('vendor/sortable.js');
|
||||||
app.import('vendor/table-editor.min.js');
|
app.import('vendor/table-editor.min.js');
|
||||||
app.import('vendor/underscore.js');
|
app.import('vendor/underscore.js');
|
||||||
app.import('vendor/velocity.js');
|
|
||||||
app.import('vendor/velocity.ui.js');
|
|
||||||
app.import('vendor/waypoints.js');
|
|
||||||
app.import('vendor/codemirror.js'); // boot-up files
|
app.import('vendor/codemirror.js'); // boot-up files
|
||||||
|
|
||||||
app.import('vendor/bootstrap.bundle.min.js');
|
app.import('vendor/bootstrap.bundle.min.js');
|
||||||
|
|
9
gui/vendor/hoverIntent.min.js
vendored
9
gui/vendor/hoverIntent.min.js
vendored
|
@ -1,9 +0,0 @@
|
||||||
/*!
|
|
||||||
* hoverIntent v1.9.0 // 2017.09.01 // jQuery v1.7.0+
|
|
||||||
* http://briancherne.github.io/jquery-hoverIntent/
|
|
||||||
*
|
|
||||||
* You may use hoverIntent under the terms of the MIT license. Basically that
|
|
||||||
* means you are free to use hoverIntent as long as this header is left intact.
|
|
||||||
* Copyright 2007-2017 Brian Cherne
|
|
||||||
*/
|
|
||||||
!function(factory){"use strict";"function"==typeof define&&define.amd?define(["jquery"],factory):jQuery&&!jQuery.fn.hoverIntent&&factory(jQuery)}(function($){"use strict";var cX,cY,_cfg={interval:100,sensitivity:6,timeout:0},INSTANCE_COUNT=0,track=function(ev){cX=ev.pageX,cY=ev.pageY},compare=function(ev,$el,s,cfg){if(Math.sqrt((s.pX-cX)*(s.pX-cX)+(s.pY-cY)*(s.pY-cY))<cfg.sensitivity)return $el.off(s.event,track),delete s.timeoutId,s.isActive=!0,ev.pageX=cX,ev.pageY=cY,delete s.pX,delete s.pY,cfg.over.apply($el[0],[ev]);s.pX=cX,s.pY=cY,s.timeoutId=setTimeout(function(){compare(ev,$el,s,cfg)},cfg.interval)},delay=function(ev,$el,s,out){return delete $el.data("hoverIntent")[s.id],out.apply($el[0],[ev])};$.fn.hoverIntent=function(handlerIn,handlerOut,selector){var instanceId=INSTANCE_COUNT++,cfg=$.extend({},_cfg);$.isPlainObject(handlerIn)?(cfg=$.extend(cfg,handlerIn),$.isFunction(cfg.out)||(cfg.out=cfg.over)):cfg=$.isFunction(handlerOut)?$.extend(cfg,{over:handlerIn,out:handlerOut,selector:selector}):$.extend(cfg,{over:handlerIn,out:handlerIn,selector:handlerOut});var handleHover=function(e){var ev=$.extend({},e),$el=$(this),hoverIntentData=$el.data("hoverIntent");hoverIntentData||$el.data("hoverIntent",hoverIntentData={});var state=hoverIntentData[instanceId];state||(hoverIntentData[instanceId]=state={id:instanceId}),state.timeoutId&&(state.timeoutId=clearTimeout(state.timeoutId));var mousemove=state.event="mousemove.hoverIntent.hoverIntent"+instanceId;if("mouseenter"===e.type){if(state.isActive)return;state.pX=ev.pageX,state.pY=ev.pageY,$el.off(mousemove,track).on(mousemove,track),state.timeoutId=setTimeout(function(){compare(ev,$el,state,cfg)},cfg.interval)}else{if(!state.isActive)return;$el.off(mousemove,track),state.timeoutId=setTimeout(function(){delay(ev,$el,state,cfg.out)},cfg.timeout)}};return this.on({"mouseenter.hoverIntent":handleHover,"mouseleave.hoverIntent":handleHover},cfg.selector)}});
|
|
4
gui/vendor/interact.min.js
vendored
4
gui/vendor/interact.min.js
vendored
File diff suppressed because one or more lines are too long
4828
gui/vendor/overlay-scrollbars.js
vendored
4828
gui/vendor/overlay-scrollbars.js
vendored
File diff suppressed because it is too large
Load diff
4768
gui/vendor/velocity.js
vendored
4768
gui/vendor/velocity.js
vendored
File diff suppressed because it is too large
Load diff
804
gui/vendor/velocity.ui.js
vendored
804
gui/vendor/velocity.ui.js
vendored
|
@ -1,804 +0,0 @@
|
||||||
/**********************
|
|
||||||
Velocity UI Pack
|
|
||||||
**********************/
|
|
||||||
|
|
||||||
/* VelocityJS.org UI Pack (5.2.0). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License. Portions copyright Daniel Eden, Christian Pucci. */
|
|
||||||
|
|
||||||
(function(factory) {
|
|
||||||
"use strict";
|
|
||||||
/* CommonJS module. */
|
|
||||||
if (typeof require === "function" && typeof exports === "object") {
|
|
||||||
module.exports = factory();
|
|
||||||
/* AMD module. */
|
|
||||||
} else if (typeof define === "function" && define.amd) {
|
|
||||||
define(["velocity"], factory);
|
|
||||||
/* Browser globals. */
|
|
||||||
} else {
|
|
||||||
factory();
|
|
||||||
}
|
|
||||||
}(function() {
|
|
||||||
"use strict";
|
|
||||||
return function(global, window, document, undefined) {
|
|
||||||
|
|
||||||
/*************
|
|
||||||
Checks
|
|
||||||
*************/
|
|
||||||
var Velocity = global.Velocity;
|
|
||||||
|
|
||||||
if (!Velocity || !Velocity.Utilities) {
|
|
||||||
if (window.console) {
|
|
||||||
console.log("Velocity UI Pack: Velocity must be loaded first. Aborting.");
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var $ = Velocity.Utilities;
|
|
||||||
|
|
||||||
var velocityVersion = Velocity.version,
|
|
||||||
requiredVersion = {major: 1, minor: 1, patch: 0};
|
|
||||||
|
|
||||||
function greaterSemver(primary, secondary) {
|
|
||||||
var versionInts = [];
|
|
||||||
|
|
||||||
if (!primary || !secondary) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$.each([primary, secondary], function(i, versionObject) {
|
|
||||||
var versionIntsComponents = [];
|
|
||||||
|
|
||||||
$.each(versionObject, function(component, value) {
|
|
||||||
while (value.toString().length < 5) {
|
|
||||||
value = "0" + value;
|
|
||||||
}
|
|
||||||
versionIntsComponents.push(value);
|
|
||||||
});
|
|
||||||
|
|
||||||
versionInts.push(versionIntsComponents.join(""));
|
|
||||||
});
|
|
||||||
|
|
||||||
return (parseFloat(versionInts[0]) > parseFloat(versionInts[1]));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (greaterSemver(requiredVersion, velocityVersion)) {
|
|
||||||
var abortError = "Velocity UI Pack: You need to update Velocity (velocity.js) to a newer version. Visit http://github.com/julianshapiro/velocity.";
|
|
||||||
alert(abortError);
|
|
||||||
throw new Error(abortError);
|
|
||||||
}
|
|
||||||
|
|
||||||
/************************
|
|
||||||
Effect Registration
|
|
||||||
************************/
|
|
||||||
|
|
||||||
/* Note: RegisterUI is a legacy name. */
|
|
||||||
Velocity.RegisterEffect = Velocity.RegisterUI = function(effectName, properties) {
|
|
||||||
/* Animate the expansion/contraction of the elements' parent's height for In/Out effects. */
|
|
||||||
function animateParentHeight(elements, direction, totalDuration, stagger) {
|
|
||||||
var totalHeightDelta = 0,
|
|
||||||
parentNode;
|
|
||||||
|
|
||||||
/* Sum the total height (including padding and margin) of all targeted elements. */
|
|
||||||
$.each(elements.nodeType ? [elements] : elements, function(i, element) {
|
|
||||||
if (stagger) {
|
|
||||||
/* Increase the totalDuration by the successive delay amounts produced by the stagger option. */
|
|
||||||
totalDuration += i * stagger;
|
|
||||||
}
|
|
||||||
|
|
||||||
parentNode = element.parentNode;
|
|
||||||
|
|
||||||
var propertiesToSum = ["height", "paddingTop", "paddingBottom", "marginTop", "marginBottom"];
|
|
||||||
|
|
||||||
/* If box-sizing is border-box, the height already includes padding and margin */
|
|
||||||
if (Velocity.CSS.getPropertyValue(element, "boxSizing").toString().toLowerCase() === "border-box") {
|
|
||||||
propertiesToSum = ["height"];
|
|
||||||
}
|
|
||||||
|
|
||||||
$.each(propertiesToSum, function(i, property) {
|
|
||||||
totalHeightDelta += parseFloat(Velocity.CSS.getPropertyValue(element, property));
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
/* Animate the parent element's height adjustment (with a varying duration multiplier for aesthetic benefits). */
|
|
||||||
Velocity.animate(
|
|
||||||
parentNode,
|
|
||||||
{height: (direction === "In" ? "+" : "-") + "=" + totalHeightDelta},
|
|
||||||
{queue: false, easing: "ease-in-out", duration: totalDuration * (direction === "In" ? 0.6 : 1)}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Register a custom redirect for each effect. */
|
|
||||||
Velocity.Redirects[effectName] = function(element, redirectOptions, elementsIndex, elementsSize, elements, promiseData, loop) {
|
|
||||||
var finalElement = (elementsIndex === elementsSize - 1),
|
|
||||||
totalDuration = 0;
|
|
||||||
|
|
||||||
loop = loop || properties.loop;
|
|
||||||
if (typeof properties.defaultDuration === "function") {
|
|
||||||
properties.defaultDuration = properties.defaultDuration.call(elements, elements);
|
|
||||||
} else {
|
|
||||||
properties.defaultDuration = parseFloat(properties.defaultDuration);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get the total duration used, so we can share it out with everything that doesn't have a duration */
|
|
||||||
for (var callIndex = 0; callIndex < properties.calls.length; callIndex++) {
|
|
||||||
durationPercentage = properties.calls[callIndex][1];
|
|
||||||
if (typeof durationPercentage === "number") {
|
|
||||||
totalDuration += durationPercentage;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var shareDuration = totalDuration >= 1 ? 0 : properties.calls.length ? (1 - totalDuration) / properties.calls.length : 1;
|
|
||||||
|
|
||||||
/* Iterate through each effect's call array. */
|
|
||||||
for (callIndex = 0; callIndex < properties.calls.length; callIndex++) {
|
|
||||||
var call = properties.calls[callIndex],
|
|
||||||
propertyMap = call[0],
|
|
||||||
redirectDuration = 1000,
|
|
||||||
durationPercentage = call[1],
|
|
||||||
callOptions = call[2] || {},
|
|
||||||
opts = {};
|
|
||||||
|
|
||||||
if (redirectOptions.duration !== undefined) {
|
|
||||||
redirectDuration = redirectOptions.duration;
|
|
||||||
} else if (properties.defaultDuration !== undefined) {
|
|
||||||
redirectDuration = properties.defaultDuration;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Assign the whitelisted per-call options. */
|
|
||||||
opts.duration = redirectDuration * (typeof durationPercentage === "number" ? durationPercentage : shareDuration);
|
|
||||||
opts.queue = redirectOptions.queue || "";
|
|
||||||
opts.easing = callOptions.easing || "ease";
|
|
||||||
opts.delay = parseFloat(callOptions.delay) || 0;
|
|
||||||
opts.loop = !properties.loop && callOptions.loop;
|
|
||||||
opts._cacheValues = callOptions._cacheValues || true;
|
|
||||||
|
|
||||||
/* Special processing for the first effect call. */
|
|
||||||
if (callIndex === 0) {
|
|
||||||
/* If a delay was passed into the redirect, combine it with the first call's delay. */
|
|
||||||
opts.delay += (parseFloat(redirectOptions.delay) || 0);
|
|
||||||
|
|
||||||
if (elementsIndex === 0) {
|
|
||||||
opts.begin = function() {
|
|
||||||
/* Only trigger a begin callback on the first effect call with the first element in the set. */
|
|
||||||
if (redirectOptions.begin) {
|
|
||||||
redirectOptions.begin.call(elements, elements);
|
|
||||||
}
|
|
||||||
|
|
||||||
var direction = effectName.match(/(In|Out)$/);
|
|
||||||
|
|
||||||
/* Make "in" transitioning elements invisible immediately so that there's no FOUC between now
|
|
||||||
and the first RAF tick. */
|
|
||||||
if ((direction && direction[0] === "In") && propertyMap.opacity !== undefined) {
|
|
||||||
$.each(elements.nodeType ? [elements] : elements, function(i, element) {
|
|
||||||
Velocity.CSS.setPropertyValue(element, "opacity", 0);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Only trigger animateParentHeight() if we're using an In/Out transition. */
|
|
||||||
if (redirectOptions.animateParentHeight && direction) {
|
|
||||||
animateParentHeight(elements, direction[0], redirectDuration + opts.delay, redirectOptions.stagger);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If the user isn't overriding the display option, default to "auto" for "In"-suffixed transitions. */
|
|
||||||
if (redirectOptions.display !== null) {
|
|
||||||
if (redirectOptions.display !== undefined && redirectOptions.display !== "none") {
|
|
||||||
opts.display = redirectOptions.display;
|
|
||||||
} else if (/In$/.test(effectName)) {
|
|
||||||
/* Inline elements cannot be subjected to transforms, so we switch them to inline-block. */
|
|
||||||
var defaultDisplay = Velocity.CSS.Values.getDisplayType(element);
|
|
||||||
opts.display = (defaultDisplay === "inline") ? "inline-block" : defaultDisplay;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (redirectOptions.visibility && redirectOptions.visibility !== "hidden") {
|
|
||||||
opts.visibility = redirectOptions.visibility;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Special processing for the last effect call. */
|
|
||||||
if (callIndex === properties.calls.length - 1) {
|
|
||||||
/* Append promise resolving onto the user's redirect callback. */
|
|
||||||
var injectFinalCallbacks = function() {
|
|
||||||
if ((redirectOptions.display === undefined || redirectOptions.display === "none") && /Out$/.test(effectName)) {
|
|
||||||
$.each(elements.nodeType ? [elements] : elements, function(i, element) {
|
|
||||||
Velocity.CSS.setPropertyValue(element, "display", "none");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (redirectOptions.complete) {
|
|
||||||
redirectOptions.complete.call(elements, elements);
|
|
||||||
}
|
|
||||||
if (promiseData) {
|
|
||||||
promiseData.resolver(elements || element);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
opts.complete = function() {
|
|
||||||
if (loop) {
|
|
||||||
Velocity.Redirects[effectName](element, redirectOptions, elementsIndex, elementsSize, elements, promiseData, loop === true ? true : Math.max(0, loop - 1));
|
|
||||||
}
|
|
||||||
if (properties.reset) {
|
|
||||||
for (var resetProperty in properties.reset) {
|
|
||||||
if (!properties.reset.hasOwnProperty(resetProperty)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
var resetValue = properties.reset[resetProperty];
|
|
||||||
|
|
||||||
/* Format each non-array value in the reset property map to [ value, value ] so that changes apply
|
|
||||||
immediately and DOM querying is avoided (via forcefeeding). */
|
|
||||||
/* Note: Don't forcefeed hooks, otherwise their hook roots will be defaulted to their null values. */
|
|
||||||
if (Velocity.CSS.Hooks.registered[resetProperty] === undefined && (typeof resetValue === "string" || typeof resetValue === "number")) {
|
|
||||||
properties.reset[resetProperty] = [properties.reset[resetProperty], properties.reset[resetProperty]];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* So that the reset values are applied instantly upon the next rAF tick, use a zero duration and parallel queueing. */
|
|
||||||
var resetOptions = {duration: 0, queue: false};
|
|
||||||
|
|
||||||
/* Since the reset option uses up the complete callback, we trigger the user's complete callback at the end of ours. */
|
|
||||||
if (finalElement) {
|
|
||||||
resetOptions.complete = injectFinalCallbacks;
|
|
||||||
}
|
|
||||||
|
|
||||||
Velocity.animate(element, properties.reset, resetOptions);
|
|
||||||
/* Only trigger the user's complete callback on the last effect call with the last element in the set. */
|
|
||||||
} else if (finalElement) {
|
|
||||||
injectFinalCallbacks();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
if (redirectOptions.visibility === "hidden") {
|
|
||||||
opts.visibility = redirectOptions.visibility;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Velocity.animate(element, propertyMap, opts);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Return the Velocity object so that RegisterUI calls can be chained. */
|
|
||||||
return Velocity;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*********************
|
|
||||||
Packaged Effects
|
|
||||||
*********************/
|
|
||||||
|
|
||||||
/* Externalize the packagedEffects data so that they can optionally be modified and re-registered. */
|
|
||||||
/* Support: <=IE8: Callouts will have no effect, and transitions will simply fade in/out. IE9/Android 2.3: Most effects are fully supported, the rest fade in/out. All other browsers: full support. */
|
|
||||||
Velocity.RegisterEffect.packagedEffects =
|
|
||||||
{
|
|
||||||
/* Animate.css */
|
|
||||||
"callout.bounce": {
|
|
||||||
defaultDuration: 550,
|
|
||||||
calls: [
|
|
||||||
[{translateY: -30}, 0.25],
|
|
||||||
[{translateY: 0}, 0.125],
|
|
||||||
[{translateY: -15}, 0.125],
|
|
||||||
[{translateY: 0}, 0.25]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
/* Animate.css */
|
|
||||||
"callout.shake": {
|
|
||||||
defaultDuration: 800,
|
|
||||||
calls: [
|
|
||||||
[{translateX: -11}],
|
|
||||||
[{translateX: 11}],
|
|
||||||
[{translateX: -11}],
|
|
||||||
[{translateX: 11}],
|
|
||||||
[{translateX: -11}],
|
|
||||||
[{translateX: 11}],
|
|
||||||
[{translateX: -11}],
|
|
||||||
[{translateX: 0}]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
/* Animate.css */
|
|
||||||
"callout.flash": {
|
|
||||||
defaultDuration: 1100,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0, "easeInOutQuad", 1]}],
|
|
||||||
[{opacity: [1, "easeInOutQuad"]}],
|
|
||||||
[{opacity: [0, "easeInOutQuad"]}],
|
|
||||||
[{opacity: [1, "easeInOutQuad"]}]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
/* Animate.css */
|
|
||||||
"callout.pulse": {
|
|
||||||
defaultDuration: 825,
|
|
||||||
calls: [
|
|
||||||
[{scaleX: 1.1, scaleY: 1.1}, 0.50, {easing: "easeInExpo"}],
|
|
||||||
[{scaleX: 1, scaleY: 1}, 0.50]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
/* Animate.css */
|
|
||||||
"callout.swing": {
|
|
||||||
defaultDuration: 950,
|
|
||||||
calls: [
|
|
||||||
[{rotateZ: 15}],
|
|
||||||
[{rotateZ: -10}],
|
|
||||||
[{rotateZ: 5}],
|
|
||||||
[{rotateZ: -5}],
|
|
||||||
[{rotateZ: 0}]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
/* Animate.css */
|
|
||||||
"callout.tada": {
|
|
||||||
defaultDuration: 1000,
|
|
||||||
calls: [
|
|
||||||
[{scaleX: 0.9, scaleY: 0.9, rotateZ: -3}, 0.10],
|
|
||||||
[{scaleX: 1.1, scaleY: 1.1, rotateZ: 3}, 0.10],
|
|
||||||
[{scaleX: 1.1, scaleY: 1.1, rotateZ: -3}, 0.10],
|
|
||||||
["reverse", 0.125],
|
|
||||||
["reverse", 0.125],
|
|
||||||
["reverse", 0.125],
|
|
||||||
["reverse", 0.125],
|
|
||||||
["reverse", 0.125],
|
|
||||||
[{scaleX: 1, scaleY: 1, rotateZ: 0}, 0.20]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"transition.fadeIn": {
|
|
||||||
defaultDuration: 500,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0]}]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"transition.fadeOut": {
|
|
||||||
defaultDuration: 500,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0, 1]}]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
|
|
||||||
"transition.flipXIn": {
|
|
||||||
defaultDuration: 700,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], transformPerspective: [800, 800], rotateY: [0, -55]}]
|
|
||||||
],
|
|
||||||
reset: {transformPerspective: 0}
|
|
||||||
},
|
|
||||||
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
|
|
||||||
"transition.flipXOut": {
|
|
||||||
defaultDuration: 700,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0, 1], transformPerspective: [800, 800], rotateY: 55}]
|
|
||||||
],
|
|
||||||
reset: {transformPerspective: 0, rotateY: 0}
|
|
||||||
},
|
|
||||||
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
|
|
||||||
"transition.flipYIn": {
|
|
||||||
defaultDuration: 800,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], transformPerspective: [800, 800], rotateX: [0, -45]}]
|
|
||||||
],
|
|
||||||
reset: {transformPerspective: 0}
|
|
||||||
},
|
|
||||||
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
|
|
||||||
"transition.flipYOut": {
|
|
||||||
defaultDuration: 800,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0, 1], transformPerspective: [800, 800], rotateX: 25}]
|
|
||||||
],
|
|
||||||
reset: {transformPerspective: 0, rotateX: 0}
|
|
||||||
},
|
|
||||||
/* Animate.css */
|
|
||||||
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
|
|
||||||
"transition.flipBounceXIn": {
|
|
||||||
defaultDuration: 900,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0.725, 0], transformPerspective: [400, 400], rotateY: [-10, 90]}, 0.50],
|
|
||||||
[{opacity: 0.80, rotateY: 10}, 0.25],
|
|
||||||
[{opacity: 1, rotateY: 0}, 0.25]
|
|
||||||
],
|
|
||||||
reset: {transformPerspective: 0}
|
|
||||||
},
|
|
||||||
/* Animate.css */
|
|
||||||
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
|
|
||||||
"transition.flipBounceXOut": {
|
|
||||||
defaultDuration: 800,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0.9, 1], transformPerspective: [400, 400], rotateY: -10}],
|
|
||||||
[{opacity: 0, rotateY: 90}]
|
|
||||||
],
|
|
||||||
reset: {transformPerspective: 0, rotateY: 0}
|
|
||||||
},
|
|
||||||
/* Animate.css */
|
|
||||||
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
|
|
||||||
"transition.flipBounceYIn": {
|
|
||||||
defaultDuration: 850,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0.725, 0], transformPerspective: [400, 400], rotateX: [-10, 90]}, 0.50],
|
|
||||||
[{opacity: 0.80, rotateX: 10}, 0.25],
|
|
||||||
[{opacity: 1, rotateX: 0}, 0.25]
|
|
||||||
],
|
|
||||||
reset: {transformPerspective: 0}
|
|
||||||
},
|
|
||||||
/* Animate.css */
|
|
||||||
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
|
|
||||||
"transition.flipBounceYOut": {
|
|
||||||
defaultDuration: 800,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0.9, 1], transformPerspective: [400, 400], rotateX: -15}],
|
|
||||||
[{opacity: 0, rotateX: 90}]
|
|
||||||
],
|
|
||||||
reset: {transformPerspective: 0, rotateX: 0}
|
|
||||||
},
|
|
||||||
/* Magic.css */
|
|
||||||
"transition.swoopIn": {
|
|
||||||
defaultDuration: 850,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], transformOriginX: ["100%", "50%"], transformOriginY: ["100%", "100%"], scaleX: [1, 0], scaleY: [1, 0], translateX: [0, -700], translateZ: 0}]
|
|
||||||
],
|
|
||||||
reset: {transformOriginX: "50%", transformOriginY: "50%"}
|
|
||||||
},
|
|
||||||
/* Magic.css */
|
|
||||||
"transition.swoopOut": {
|
|
||||||
defaultDuration: 850,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0, 1], transformOriginX: ["50%", "100%"], transformOriginY: ["100%", "100%"], scaleX: 0, scaleY: 0, translateX: -700, translateZ: 0}]
|
|
||||||
],
|
|
||||||
reset: {transformOriginX: "50%", transformOriginY: "50%", scaleX: 1, scaleY: 1, translateX: 0}
|
|
||||||
},
|
|
||||||
/* Magic.css */
|
|
||||||
/* Support: Loses rotation in IE9/Android 2.3. (Fades and scales only.) */
|
|
||||||
"transition.whirlIn": {
|
|
||||||
defaultDuration: 850,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], transformOriginX: ["50%", "50%"], transformOriginY: ["50%", "50%"], scaleX: [1, 0], scaleY: [1, 0], rotateY: [0, 160]}, 1, {easing: "easeInOutSine"}]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
/* Magic.css */
|
|
||||||
/* Support: Loses rotation in IE9/Android 2.3. (Fades and scales only.) */
|
|
||||||
"transition.whirlOut": {
|
|
||||||
defaultDuration: 750,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0, "easeInOutQuint", 1], transformOriginX: ["50%", "50%"], transformOriginY: ["50%", "50%"], scaleX: 0, scaleY: 0, rotateY: 160}, 1, {easing: "swing"}]
|
|
||||||
],
|
|
||||||
reset: {scaleX: 1, scaleY: 1, rotateY: 0}
|
|
||||||
},
|
|
||||||
"transition.shrinkIn": {
|
|
||||||
defaultDuration: 750,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], transformOriginX: ["50%", "50%"], transformOriginY: ["50%", "50%"], scaleX: [1, 1.5], scaleY: [1, 1.5], translateZ: 0}]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"transition.shrinkOut": {
|
|
||||||
defaultDuration: 600,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0, 1], transformOriginX: ["50%", "50%"], transformOriginY: ["50%", "50%"], scaleX: 1.3, scaleY: 1.3, translateZ: 0}]
|
|
||||||
],
|
|
||||||
reset: {scaleX: 1, scaleY: 1}
|
|
||||||
},
|
|
||||||
"transition.expandIn": {
|
|
||||||
defaultDuration: 700,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], transformOriginX: ["50%", "50%"], transformOriginY: ["50%", "50%"], scaleX: [1, 0.625], scaleY: [1, 0.625], translateZ: 0}]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"transition.expandOut": {
|
|
||||||
defaultDuration: 700,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0, 1], transformOriginX: ["50%", "50%"], transformOriginY: ["50%", "50%"], scaleX: 0.5, scaleY: 0.5, translateZ: 0}]
|
|
||||||
],
|
|
||||||
reset: {scaleX: 1, scaleY: 1}
|
|
||||||
},
|
|
||||||
/* Animate.css */
|
|
||||||
"transition.bounceIn": {
|
|
||||||
defaultDuration: 800,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], scaleX: [1.05, 0.3], scaleY: [1.05, 0.3]}, 0.35],
|
|
||||||
[{scaleX: 0.9, scaleY: 0.9, translateZ: 0}, 0.20],
|
|
||||||
[{scaleX: 1, scaleY: 1}, 0.45]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
/* Animate.css */
|
|
||||||
"transition.bounceOut": {
|
|
||||||
defaultDuration: 800,
|
|
||||||
calls: [
|
|
||||||
[{scaleX: 0.95, scaleY: 0.95}, 0.35],
|
|
||||||
[{scaleX: 1.1, scaleY: 1.1, translateZ: 0}, 0.35],
|
|
||||||
[{opacity: [0, 1], scaleX: 0.3, scaleY: 0.3}, 0.30]
|
|
||||||
],
|
|
||||||
reset: {scaleX: 1, scaleY: 1}
|
|
||||||
},
|
|
||||||
/* Animate.css */
|
|
||||||
"transition.bounceUpIn": {
|
|
||||||
defaultDuration: 800,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], translateY: [-30, 1000]}, 0.60, {easing: "easeOutCirc"}],
|
|
||||||
[{translateY: 10}, 0.20],
|
|
||||||
[{translateY: 0}, 0.20]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
/* Animate.css */
|
|
||||||
"transition.bounceUpOut": {
|
|
||||||
defaultDuration: 1000,
|
|
||||||
calls: [
|
|
||||||
[{translateY: 20}, 0.20],
|
|
||||||
[{opacity: [0, "easeInCirc", 1], translateY: -1000}, 0.80]
|
|
||||||
],
|
|
||||||
reset: {translateY: 0}
|
|
||||||
},
|
|
||||||
/* Animate.css */
|
|
||||||
"transition.bounceDownIn": {
|
|
||||||
defaultDuration: 800,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], translateY: [30, -1000]}, 0.60, {easing: "easeOutCirc"}],
|
|
||||||
[{translateY: -10}, 0.20],
|
|
||||||
[{translateY: 0}, 0.20]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
/* Animate.css */
|
|
||||||
"transition.bounceDownOut": {
|
|
||||||
defaultDuration: 1000,
|
|
||||||
calls: [
|
|
||||||
[{translateY: -20}, 0.20],
|
|
||||||
[{opacity: [0, "easeInCirc", 1], translateY: 1000}, 0.80]
|
|
||||||
],
|
|
||||||
reset: {translateY: 0}
|
|
||||||
},
|
|
||||||
/* Animate.css */
|
|
||||||
"transition.bounceLeftIn": {
|
|
||||||
defaultDuration: 750,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], translateX: [30, -1250]}, 0.60, {easing: "easeOutCirc"}],
|
|
||||||
[{translateX: -10}, 0.20],
|
|
||||||
[{translateX: 0}, 0.20]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
/* Animate.css */
|
|
||||||
"transition.bounceLeftOut": {
|
|
||||||
defaultDuration: 750,
|
|
||||||
calls: [
|
|
||||||
[{translateX: 30}, 0.20],
|
|
||||||
[{opacity: [0, "easeInCirc", 1], translateX: -1250}, 0.80]
|
|
||||||
],
|
|
||||||
reset: {translateX: 0}
|
|
||||||
},
|
|
||||||
/* Animate.css */
|
|
||||||
"transition.bounceRightIn": {
|
|
||||||
defaultDuration: 750,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], translateX: [-30, 1250]}, 0.60, {easing: "easeOutCirc"}],
|
|
||||||
[{translateX: 10}, 0.20],
|
|
||||||
[{translateX: 0}, 0.20]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
/* Animate.css */
|
|
||||||
"transition.bounceRightOut": {
|
|
||||||
defaultDuration: 750,
|
|
||||||
calls: [
|
|
||||||
[{translateX: -30}, 0.20],
|
|
||||||
[{opacity: [0, "easeInCirc", 1], translateX: 1250}, 0.80]
|
|
||||||
],
|
|
||||||
reset: {translateX: 0}
|
|
||||||
},
|
|
||||||
"transition.slideUpIn": {
|
|
||||||
defaultDuration: 900,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], translateY: [0, 20], translateZ: 0}]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"transition.slideUpOut": {
|
|
||||||
defaultDuration: 900,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0, 1], translateY: -20, translateZ: 0}]
|
|
||||||
],
|
|
||||||
reset: {translateY: 0}
|
|
||||||
},
|
|
||||||
"transition.slideDownIn": {
|
|
||||||
defaultDuration: 900,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], translateY: [0, -20], translateZ: 0}]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"transition.slideDownOut": {
|
|
||||||
defaultDuration: 900,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0, 1], translateY: 20, translateZ: 0}]
|
|
||||||
],
|
|
||||||
reset: {translateY: 0}
|
|
||||||
},
|
|
||||||
"transition.slideLeftIn": {
|
|
||||||
defaultDuration: 1000,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], translateX: [0, -20], translateZ: 0}]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"transition.slideLeftOut": {
|
|
||||||
defaultDuration: 1050,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0, 1], translateX: -20, translateZ: 0}]
|
|
||||||
],
|
|
||||||
reset: {translateX: 0}
|
|
||||||
},
|
|
||||||
"transition.slideRightIn": {
|
|
||||||
defaultDuration: 1000,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], translateX: [0, 20], translateZ: 0}]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"transition.slideRightOut": {
|
|
||||||
defaultDuration: 1050,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0, 1], translateX: 20, translateZ: 0}]
|
|
||||||
],
|
|
||||||
reset: {translateX: 0}
|
|
||||||
},
|
|
||||||
"transition.slideUpBigIn": {
|
|
||||||
defaultDuration: 850,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], translateY: [0, 75], translateZ: 0}]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"transition.slideUpBigOut": {
|
|
||||||
defaultDuration: 800,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0, 1], translateY: -75, translateZ: 0}]
|
|
||||||
],
|
|
||||||
reset: {translateY: 0}
|
|
||||||
},
|
|
||||||
"transition.slideDownBigIn": {
|
|
||||||
defaultDuration: 850,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], translateY: [0, -75], translateZ: 0}]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"transition.slideDownBigOut": {
|
|
||||||
defaultDuration: 800,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0, 1], translateY: 75, translateZ: 0}]
|
|
||||||
],
|
|
||||||
reset: {translateY: 0}
|
|
||||||
},
|
|
||||||
"transition.slideLeftBigIn": {
|
|
||||||
defaultDuration: 800,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], translateX: [0, -75], translateZ: 0}]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"transition.slideLeftBigOut": {
|
|
||||||
defaultDuration: 750,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0, 1], translateX: -75, translateZ: 0}]
|
|
||||||
],
|
|
||||||
reset: {translateX: 0}
|
|
||||||
},
|
|
||||||
"transition.slideRightBigIn": {
|
|
||||||
defaultDuration: 800,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], translateX: [0, 75], translateZ: 0}]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"transition.slideRightBigOut": {
|
|
||||||
defaultDuration: 750,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0, 1], translateX: 75, translateZ: 0}]
|
|
||||||
],
|
|
||||||
reset: {translateX: 0}
|
|
||||||
},
|
|
||||||
/* Magic.css */
|
|
||||||
"transition.perspectiveUpIn": {
|
|
||||||
defaultDuration: 800,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], transformPerspective: [800, 800], transformOriginX: [0, 0], transformOriginY: ["100%", "100%"], rotateX: [0, -180]}]
|
|
||||||
],
|
|
||||||
reset: {transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%"}
|
|
||||||
},
|
|
||||||
/* Magic.css */
|
|
||||||
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
|
|
||||||
"transition.perspectiveUpOut": {
|
|
||||||
defaultDuration: 850,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0, 1], transformPerspective: [800, 800], transformOriginX: [0, 0], transformOriginY: ["100%", "100%"], rotateX: -180}]
|
|
||||||
],
|
|
||||||
reset: {transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%", rotateX: 0}
|
|
||||||
},
|
|
||||||
/* Magic.css */
|
|
||||||
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
|
|
||||||
"transition.perspectiveDownIn": {
|
|
||||||
defaultDuration: 800,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], transformPerspective: [800, 800], transformOriginX: [0, 0], transformOriginY: [0, 0], rotateX: [0, 180]}]
|
|
||||||
],
|
|
||||||
reset: {transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%"}
|
|
||||||
},
|
|
||||||
/* Magic.css */
|
|
||||||
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
|
|
||||||
"transition.perspectiveDownOut": {
|
|
||||||
defaultDuration: 850,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0, 1], transformPerspective: [800, 800], transformOriginX: [0, 0], transformOriginY: [0, 0], rotateX: 180}]
|
|
||||||
],
|
|
||||||
reset: {transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%", rotateX: 0}
|
|
||||||
},
|
|
||||||
/* Magic.css */
|
|
||||||
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
|
|
||||||
"transition.perspectiveLeftIn": {
|
|
||||||
defaultDuration: 950,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], transformPerspective: [2000, 2000], transformOriginX: [0, 0], transformOriginY: [0, 0], rotateY: [0, -180]}]
|
|
||||||
],
|
|
||||||
reset: {transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%"}
|
|
||||||
},
|
|
||||||
/* Magic.css */
|
|
||||||
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
|
|
||||||
"transition.perspectiveLeftOut": {
|
|
||||||
defaultDuration: 950,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0, 1], transformPerspective: [2000, 2000], transformOriginX: [0, 0], transformOriginY: [0, 0], rotateY: -180}]
|
|
||||||
],
|
|
||||||
reset: {transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%", rotateY: 0}
|
|
||||||
},
|
|
||||||
/* Magic.css */
|
|
||||||
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
|
|
||||||
"transition.perspectiveRightIn": {
|
|
||||||
defaultDuration: 950,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [1, 0], transformPerspective: [2000, 2000], transformOriginX: ["100%", "100%"], transformOriginY: [0, 0], rotateY: [0, 180]}]
|
|
||||||
],
|
|
||||||
reset: {transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%"}
|
|
||||||
},
|
|
||||||
/* Magic.css */
|
|
||||||
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
|
|
||||||
"transition.perspectiveRightOut": {
|
|
||||||
defaultDuration: 950,
|
|
||||||
calls: [
|
|
||||||
[{opacity: [0, 1], transformPerspective: [2000, 2000], transformOriginX: ["100%", "100%"], transformOriginY: [0, 0], rotateY: 180}]
|
|
||||||
],
|
|
||||||
reset: {transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%", rotateY: 0}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Register the packaged effects. */
|
|
||||||
for (var effectName in Velocity.RegisterEffect.packagedEffects) {
|
|
||||||
if (Velocity.RegisterEffect.packagedEffects.hasOwnProperty(effectName)) {
|
|
||||||
Velocity.RegisterEffect(effectName, Velocity.RegisterEffect.packagedEffects[effectName]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*********************
|
|
||||||
Sequence Running
|
|
||||||
**********************/
|
|
||||||
|
|
||||||
/* Note: Sequence calls must use Velocity's single-object arguments syntax. */
|
|
||||||
Velocity.RunSequence = function(originalSequence) {
|
|
||||||
var sequence = $.extend(true, [], originalSequence);
|
|
||||||
|
|
||||||
if (sequence.length > 1) {
|
|
||||||
$.each(sequence.reverse(), function(i, currentCall) {
|
|
||||||
var nextCall = sequence[i + 1];
|
|
||||||
|
|
||||||
if (nextCall) {
|
|
||||||
/* Parallel sequence calls (indicated via sequenceQueue:false) are triggered
|
|
||||||
in the previous call's begin callback. Otherwise, chained calls are normally triggered
|
|
||||||
in the previous call's complete callback. */
|
|
||||||
var currentCallOptions = currentCall.o || currentCall.options,
|
|
||||||
nextCallOptions = nextCall.o || nextCall.options;
|
|
||||||
|
|
||||||
var timing = (currentCallOptions && currentCallOptions.sequenceQueue === false) ? "begin" : "complete",
|
|
||||||
callbackOriginal = nextCallOptions && nextCallOptions[timing],
|
|
||||||
options = {};
|
|
||||||
|
|
||||||
options[timing] = function() {
|
|
||||||
var nextCallElements = nextCall.e || nextCall.elements;
|
|
||||||
var elements = nextCallElements.nodeType ? [nextCallElements] : nextCallElements;
|
|
||||||
|
|
||||||
if (callbackOriginal) {
|
|
||||||
callbackOriginal.call(elements, elements);
|
|
||||||
}
|
|
||||||
Velocity(currentCall);
|
|
||||||
};
|
|
||||||
|
|
||||||
if (nextCall.o) {
|
|
||||||
nextCall.o = $.extend({}, nextCallOptions, options);
|
|
||||||
} else {
|
|
||||||
nextCall.options = $.extend({}, nextCallOptions, options);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
sequence.reverse();
|
|
||||||
}
|
|
||||||
|
|
||||||
Velocity(sequence[0]);
|
|
||||||
};
|
|
||||||
}((window.jQuery || window.Zepto || window), window, (window ? window.document : undefined));
|
|
||||||
}));
|
|
939
gui/vendor/waypoints.js
vendored
939
gui/vendor/waypoints.js
vendored
|
@ -1,939 +0,0 @@
|
||||||
/*!
|
|
||||||
Waypoints - 4.0.1
|
|
||||||
Copyright © 2011-2016 Caleb Troughton
|
|
||||||
Licensed under the MIT license.
|
|
||||||
https://github.com/imakewebthings/waypoints/blob/master/licenses.txt
|
|
||||||
*/
|
|
||||||
(function() {
|
|
||||||
'use strict'
|
|
||||||
|
|
||||||
var keyCounter = 0
|
|
||||||
var allWaypoints = {}
|
|
||||||
|
|
||||||
/* http://imakewebthings.com/waypoints/api/waypoint */
|
|
||||||
function Waypoint(options) {
|
|
||||||
if (!options) {
|
|
||||||
throw new Error('No options passed to Waypoint constructor')
|
|
||||||
}
|
|
||||||
if (!options.element) {
|
|
||||||
throw new Error('No element option passed to Waypoint constructor')
|
|
||||||
}
|
|
||||||
if (!options.handler) {
|
|
||||||
throw new Error('No handler option passed to Waypoint constructor')
|
|
||||||
}
|
|
||||||
|
|
||||||
this.key = 'waypoint-' + keyCounter
|
|
||||||
this.options = Waypoint.Adapter.extend({}, Waypoint.defaults, options)
|
|
||||||
this.element = this.options.element
|
|
||||||
this.adapter = new Waypoint.Adapter(this.element)
|
|
||||||
this.callback = options.handler
|
|
||||||
this.axis = this.options.horizontal ? 'horizontal' : 'vertical'
|
|
||||||
this.enabled = this.options.enabled
|
|
||||||
this.triggerPoint = null
|
|
||||||
this.group = Waypoint.Group.findOrCreate({
|
|
||||||
name: this.options.group,
|
|
||||||
axis: this.axis
|
|
||||||
})
|
|
||||||
this.context = Waypoint.Context.findOrCreateByElement(this.options.context)
|
|
||||||
|
|
||||||
if (Waypoint.offsetAliases[this.options.offset]) {
|
|
||||||
this.options.offset = Waypoint.offsetAliases[this.options.offset]
|
|
||||||
}
|
|
||||||
this.group.add(this)
|
|
||||||
this.context.add(this)
|
|
||||||
allWaypoints[this.key] = this
|
|
||||||
keyCounter += 1
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Waypoint.prototype.queueTrigger = function(direction) {
|
|
||||||
this.group.queueTrigger(this, direction)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Waypoint.prototype.trigger = function(args) {
|
|
||||||
if (!this.enabled) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (this.callback) {
|
|
||||||
this.callback.apply(this, args)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public */
|
|
||||||
/* http://imakewebthings.com/waypoints/api/destroy */
|
|
||||||
Waypoint.prototype.destroy = function() {
|
|
||||||
this.context.remove(this)
|
|
||||||
this.group.remove(this)
|
|
||||||
delete allWaypoints[this.key]
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public */
|
|
||||||
/* http://imakewebthings.com/waypoints/api/disable */
|
|
||||||
Waypoint.prototype.disable = function() {
|
|
||||||
this.enabled = false
|
|
||||||
return this
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public */
|
|
||||||
/* http://imakewebthings.com/waypoints/api/enable */
|
|
||||||
Waypoint.prototype.enable = function() {
|
|
||||||
this.context.refresh()
|
|
||||||
this.enabled = true
|
|
||||||
return this
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public */
|
|
||||||
/* http://imakewebthings.com/waypoints/api/next */
|
|
||||||
Waypoint.prototype.next = function() {
|
|
||||||
return this.group.next(this)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public */
|
|
||||||
/* http://imakewebthings.com/waypoints/api/previous */
|
|
||||||
Waypoint.prototype.previous = function() {
|
|
||||||
return this.group.previous(this)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Waypoint.invokeAll = function(method) {
|
|
||||||
var allWaypointsArray = []
|
|
||||||
for (var waypointKey in allWaypoints) {
|
|
||||||
allWaypointsArray.push(allWaypoints[waypointKey])
|
|
||||||
}
|
|
||||||
for (var i = 0, end = allWaypointsArray.length; i < end; i++) {
|
|
||||||
allWaypointsArray[i][method]()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public */
|
|
||||||
/* http://imakewebthings.com/waypoints/api/destroy-all */
|
|
||||||
Waypoint.destroyAll = function() {
|
|
||||||
Waypoint.invokeAll('destroy')
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public */
|
|
||||||
/* http://imakewebthings.com/waypoints/api/disable-all */
|
|
||||||
Waypoint.disableAll = function() {
|
|
||||||
Waypoint.invokeAll('disable')
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public */
|
|
||||||
/* http://imakewebthings.com/waypoints/api/enable-all */
|
|
||||||
Waypoint.enableAll = function() {
|
|
||||||
Waypoint.Context.refreshAll()
|
|
||||||
for (var waypointKey in allWaypoints) {
|
|
||||||
allWaypoints[waypointKey].enabled = true
|
|
||||||
}
|
|
||||||
return this
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public */
|
|
||||||
/* http://imakewebthings.com/waypoints/api/refresh-all */
|
|
||||||
Waypoint.refreshAll = function() {
|
|
||||||
Waypoint.Context.refreshAll()
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public */
|
|
||||||
/* http://imakewebthings.com/waypoints/api/viewport-height */
|
|
||||||
Waypoint.viewportHeight = function() {
|
|
||||||
return window.innerHeight || document.documentElement.clientHeight
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public */
|
|
||||||
/* http://imakewebthings.com/waypoints/api/viewport-width */
|
|
||||||
Waypoint.viewportWidth = function() {
|
|
||||||
return document.documentElement.clientWidth
|
|
||||||
}
|
|
||||||
|
|
||||||
Waypoint.adapters = []
|
|
||||||
|
|
||||||
Waypoint.defaults = {
|
|
||||||
context: window,
|
|
||||||
continuous: true,
|
|
||||||
enabled: true,
|
|
||||||
group: 'default',
|
|
||||||
horizontal: false,
|
|
||||||
offset: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
Waypoint.offsetAliases = {
|
|
||||||
'bottom-in-view': function() {
|
|
||||||
return this.context.innerHeight() - this.adapter.outerHeight()
|
|
||||||
},
|
|
||||||
'right-in-view': function() {
|
|
||||||
return this.context.innerWidth() - this.adapter.outerWidth()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
window.Waypoint = Waypoint
|
|
||||||
}())
|
|
||||||
;(function() {
|
|
||||||
'use strict'
|
|
||||||
|
|
||||||
function requestAnimationFrameShim(callback) {
|
|
||||||
window.setTimeout(callback, 1000 / 60)
|
|
||||||
}
|
|
||||||
|
|
||||||
var keyCounter = 0
|
|
||||||
var contexts = {}
|
|
||||||
var Waypoint = window.Waypoint
|
|
||||||
var oldWindowLoad = window.onload
|
|
||||||
|
|
||||||
/* http://imakewebthings.com/waypoints/api/context */
|
|
||||||
function Context(element) {
|
|
||||||
this.element = element
|
|
||||||
this.Adapter = Waypoint.Adapter
|
|
||||||
this.adapter = new this.Adapter(element)
|
|
||||||
this.key = 'waypoint-context-' + keyCounter
|
|
||||||
this.didScroll = false
|
|
||||||
this.didResize = false
|
|
||||||
this.oldScroll = {
|
|
||||||
x: this.adapter.scrollLeft(),
|
|
||||||
y: this.adapter.scrollTop()
|
|
||||||
}
|
|
||||||
this.waypoints = {
|
|
||||||
vertical: {},
|
|
||||||
horizontal: {}
|
|
||||||
}
|
|
||||||
|
|
||||||
element.waypointContextKey = this.key
|
|
||||||
contexts[element.waypointContextKey] = this
|
|
||||||
keyCounter += 1
|
|
||||||
if (!Waypoint.windowContext) {
|
|
||||||
Waypoint.windowContext = true
|
|
||||||
Waypoint.windowContext = new Context(window)
|
|
||||||
}
|
|
||||||
|
|
||||||
this.createThrottledScrollHandler()
|
|
||||||
this.createThrottledResizeHandler()
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Context.prototype.add = function(waypoint) {
|
|
||||||
var axis = waypoint.options.horizontal ? 'horizontal' : 'vertical'
|
|
||||||
this.waypoints[axis][waypoint.key] = waypoint
|
|
||||||
this.refresh()
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Context.prototype.checkEmpty = function() {
|
|
||||||
var horizontalEmpty = this.Adapter.isEmptyObject(this.waypoints.horizontal)
|
|
||||||
var verticalEmpty = this.Adapter.isEmptyObject(this.waypoints.vertical)
|
|
||||||
var isWindow = this.element == this.element.window
|
|
||||||
if (horizontalEmpty && verticalEmpty && !isWindow) {
|
|
||||||
this.adapter.off('.waypoints')
|
|
||||||
delete contexts[this.key]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Context.prototype.createThrottledResizeHandler = function() {
|
|
||||||
var self = this
|
|
||||||
|
|
||||||
function resizeHandler() {
|
|
||||||
self.handleResize()
|
|
||||||
self.didResize = false
|
|
||||||
}
|
|
||||||
|
|
||||||
this.adapter.on('resize.waypoints', function() {
|
|
||||||
if (!self.didResize) {
|
|
||||||
self.didResize = true
|
|
||||||
Waypoint.requestAnimationFrame(resizeHandler)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Context.prototype.createThrottledScrollHandler = function() {
|
|
||||||
var self = this
|
|
||||||
function scrollHandler() {
|
|
||||||
self.handleScroll()
|
|
||||||
self.didScroll = false
|
|
||||||
}
|
|
||||||
|
|
||||||
this.adapter.on('scroll.waypoints', function() {
|
|
||||||
if (!self.didScroll || Waypoint.isTouch) {
|
|
||||||
self.didScroll = true
|
|
||||||
Waypoint.requestAnimationFrame(scrollHandler)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Context.prototype.handleResize = function() {
|
|
||||||
Waypoint.Context.refreshAll()
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Context.prototype.handleScroll = function() {
|
|
||||||
var triggeredGroups = {}
|
|
||||||
var axes = {
|
|
||||||
horizontal: {
|
|
||||||
newScroll: this.adapter.scrollLeft(),
|
|
||||||
oldScroll: this.oldScroll.x,
|
|
||||||
forward: 'right',
|
|
||||||
backward: 'left'
|
|
||||||
},
|
|
||||||
vertical: {
|
|
||||||
newScroll: this.adapter.scrollTop(),
|
|
||||||
oldScroll: this.oldScroll.y,
|
|
||||||
forward: 'down',
|
|
||||||
backward: 'up'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var axisKey in axes) {
|
|
||||||
var axis = axes[axisKey]
|
|
||||||
var isForward = axis.newScroll > axis.oldScroll
|
|
||||||
var direction = isForward ? axis.forward : axis.backward
|
|
||||||
|
|
||||||
for (var waypointKey in this.waypoints[axisKey]) {
|
|
||||||
var waypoint = this.waypoints[axisKey][waypointKey]
|
|
||||||
if (waypoint.triggerPoint === null) {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
var wasBeforeTriggerPoint = axis.oldScroll < waypoint.triggerPoint
|
|
||||||
var nowAfterTriggerPoint = axis.newScroll >= waypoint.triggerPoint
|
|
||||||
var crossedForward = wasBeforeTriggerPoint && nowAfterTriggerPoint
|
|
||||||
var crossedBackward = !wasBeforeTriggerPoint && !nowAfterTriggerPoint
|
|
||||||
if (crossedForward || crossedBackward) {
|
|
||||||
waypoint.queueTrigger(direction)
|
|
||||||
triggeredGroups[waypoint.group.id] = waypoint.group
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var groupKey in triggeredGroups) {
|
|
||||||
triggeredGroups[groupKey].flushTriggers()
|
|
||||||
}
|
|
||||||
|
|
||||||
this.oldScroll = {
|
|
||||||
x: axes.horizontal.newScroll,
|
|
||||||
y: axes.vertical.newScroll
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Context.prototype.innerHeight = function() {
|
|
||||||
/*eslint-disable eqeqeq */
|
|
||||||
if (this.element == this.element.window) {
|
|
||||||
return Waypoint.viewportHeight()
|
|
||||||
}
|
|
||||||
/*eslint-enable eqeqeq */
|
|
||||||
return this.adapter.innerHeight()
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Context.prototype.remove = function(waypoint) {
|
|
||||||
delete this.waypoints[waypoint.axis][waypoint.key]
|
|
||||||
this.checkEmpty()
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Context.prototype.innerWidth = function() {
|
|
||||||
/*eslint-disable eqeqeq */
|
|
||||||
if (this.element == this.element.window) {
|
|
||||||
return Waypoint.viewportWidth()
|
|
||||||
}
|
|
||||||
/*eslint-enable eqeqeq */
|
|
||||||
return this.adapter.innerWidth()
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public */
|
|
||||||
/* http://imakewebthings.com/waypoints/api/context-destroy */
|
|
||||||
Context.prototype.destroy = function() {
|
|
||||||
var allWaypoints = []
|
|
||||||
for (var axis in this.waypoints) {
|
|
||||||
for (var waypointKey in this.waypoints[axis]) {
|
|
||||||
allWaypoints.push(this.waypoints[axis][waypointKey])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (var i = 0, end = allWaypoints.length; i < end; i++) {
|
|
||||||
allWaypoints[i].destroy()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public */
|
|
||||||
/* http://imakewebthings.com/waypoints/api/context-refresh */
|
|
||||||
Context.prototype.refresh = function() {
|
|
||||||
/*eslint-disable eqeqeq */
|
|
||||||
var isWindow = this.element == this.element.window
|
|
||||||
/*eslint-enable eqeqeq */
|
|
||||||
var contextOffset = isWindow ? undefined : this.adapter.offset()
|
|
||||||
var triggeredGroups = {}
|
|
||||||
var axes
|
|
||||||
|
|
||||||
this.handleScroll()
|
|
||||||
axes = {
|
|
||||||
horizontal: {
|
|
||||||
contextOffset: isWindow ? 0 : contextOffset.left,
|
|
||||||
contextScroll: isWindow ? 0 : this.oldScroll.x,
|
|
||||||
contextDimension: this.innerWidth(),
|
|
||||||
oldScroll: this.oldScroll.x,
|
|
||||||
forward: 'right',
|
|
||||||
backward: 'left',
|
|
||||||
offsetProp: 'left'
|
|
||||||
},
|
|
||||||
vertical: {
|
|
||||||
contextOffset: isWindow ? 0 : contextOffset.top,
|
|
||||||
contextScroll: isWindow ? 0 : this.oldScroll.y,
|
|
||||||
contextDimension: this.innerHeight(),
|
|
||||||
oldScroll: this.oldScroll.y,
|
|
||||||
forward: 'down',
|
|
||||||
backward: 'up',
|
|
||||||
offsetProp: 'top'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var axisKey in axes) {
|
|
||||||
var axis = axes[axisKey]
|
|
||||||
for (var waypointKey in this.waypoints[axisKey]) {
|
|
||||||
var waypoint = this.waypoints[axisKey][waypointKey]
|
|
||||||
var adjustment = waypoint.options.offset
|
|
||||||
var oldTriggerPoint = waypoint.triggerPoint
|
|
||||||
var elementOffset = 0
|
|
||||||
var freshWaypoint = oldTriggerPoint == null
|
|
||||||
var contextModifier, wasBeforeScroll, nowAfterScroll
|
|
||||||
var triggeredBackward, triggeredForward
|
|
||||||
|
|
||||||
if (waypoint.element !== waypoint.element.window) {
|
|
||||||
elementOffset = waypoint.adapter.offset()[axis.offsetProp]
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof adjustment === 'function') {
|
|
||||||
adjustment = adjustment.apply(waypoint)
|
|
||||||
}
|
|
||||||
else if (typeof adjustment === 'string') {
|
|
||||||
adjustment = parseFloat(adjustment)
|
|
||||||
if (waypoint.options.offset.indexOf('%') > - 1) {
|
|
||||||
adjustment = Math.ceil(axis.contextDimension * adjustment / 100)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
contextModifier = axis.contextScroll - axis.contextOffset
|
|
||||||
waypoint.triggerPoint = Math.floor(elementOffset + contextModifier - adjustment)
|
|
||||||
wasBeforeScroll = oldTriggerPoint < axis.oldScroll
|
|
||||||
nowAfterScroll = waypoint.triggerPoint >= axis.oldScroll
|
|
||||||
triggeredBackward = wasBeforeScroll && nowAfterScroll
|
|
||||||
triggeredForward = !wasBeforeScroll && !nowAfterScroll
|
|
||||||
|
|
||||||
if (!freshWaypoint && triggeredBackward) {
|
|
||||||
waypoint.queueTrigger(axis.backward)
|
|
||||||
triggeredGroups[waypoint.group.id] = waypoint.group
|
|
||||||
}
|
|
||||||
else if (!freshWaypoint && triggeredForward) {
|
|
||||||
waypoint.queueTrigger(axis.forward)
|
|
||||||
triggeredGroups[waypoint.group.id] = waypoint.group
|
|
||||||
}
|
|
||||||
else if (freshWaypoint && axis.oldScroll >= waypoint.triggerPoint) {
|
|
||||||
waypoint.queueTrigger(axis.forward)
|
|
||||||
triggeredGroups[waypoint.group.id] = waypoint.group
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Waypoint.requestAnimationFrame(function() {
|
|
||||||
for (var groupKey in triggeredGroups) {
|
|
||||||
triggeredGroups[groupKey].flushTriggers()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
return this
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Context.findOrCreateByElement = function(element) {
|
|
||||||
return Context.findByElement(element) || new Context(element)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Context.refreshAll = function() {
|
|
||||||
for (var contextId in contexts) {
|
|
||||||
contexts[contextId].refresh()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public */
|
|
||||||
/* http://imakewebthings.com/waypoints/api/context-find-by-element */
|
|
||||||
Context.findByElement = function(element) {
|
|
||||||
return contexts[element.waypointContextKey]
|
|
||||||
}
|
|
||||||
|
|
||||||
window.onload = function() {
|
|
||||||
if (oldWindowLoad) {
|
|
||||||
oldWindowLoad()
|
|
||||||
}
|
|
||||||
Context.refreshAll()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Waypoint.requestAnimationFrame = function(callback) {
|
|
||||||
var requestFn = window.requestAnimationFrame ||
|
|
||||||
window.mozRequestAnimationFrame ||
|
|
||||||
window.webkitRequestAnimationFrame ||
|
|
||||||
requestAnimationFrameShim
|
|
||||||
requestFn.call(window, callback)
|
|
||||||
}
|
|
||||||
Waypoint.Context = Context
|
|
||||||
}())
|
|
||||||
;(function() {
|
|
||||||
'use strict'
|
|
||||||
|
|
||||||
function byTriggerPoint(a, b) {
|
|
||||||
return a.triggerPoint - b.triggerPoint
|
|
||||||
}
|
|
||||||
|
|
||||||
function byReverseTriggerPoint(a, b) {
|
|
||||||
return b.triggerPoint - a.triggerPoint
|
|
||||||
}
|
|
||||||
|
|
||||||
var groups = {
|
|
||||||
vertical: {},
|
|
||||||
horizontal: {}
|
|
||||||
}
|
|
||||||
var Waypoint = window.Waypoint
|
|
||||||
|
|
||||||
/* http://imakewebthings.com/waypoints/api/group */
|
|
||||||
function Group(options) {
|
|
||||||
this.name = options.name
|
|
||||||
this.axis = options.axis
|
|
||||||
this.id = this.name + '-' + this.axis
|
|
||||||
this.waypoints = []
|
|
||||||
this.clearTriggerQueues()
|
|
||||||
groups[this.axis][this.name] = this
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Group.prototype.add = function(waypoint) {
|
|
||||||
this.waypoints.push(waypoint)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Group.prototype.clearTriggerQueues = function() {
|
|
||||||
this.triggerQueues = {
|
|
||||||
up: [],
|
|
||||||
down: [],
|
|
||||||
left: [],
|
|
||||||
right: []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Group.prototype.flushTriggers = function() {
|
|
||||||
for (var direction in this.triggerQueues) {
|
|
||||||
var waypoints = this.triggerQueues[direction]
|
|
||||||
var reverse = direction === 'up' || direction === 'left'
|
|
||||||
waypoints.sort(reverse ? byReverseTriggerPoint : byTriggerPoint)
|
|
||||||
for (var i = 0, end = waypoints.length; i < end; i += 1) {
|
|
||||||
var waypoint = waypoints[i]
|
|
||||||
if (waypoint.options.continuous || i === waypoints.length - 1) {
|
|
||||||
waypoint.trigger([direction])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.clearTriggerQueues()
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Group.prototype.next = function(waypoint) {
|
|
||||||
this.waypoints.sort(byTriggerPoint)
|
|
||||||
var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
|
|
||||||
var isLast = index === this.waypoints.length - 1
|
|
||||||
return isLast ? null : this.waypoints[index + 1]
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Group.prototype.previous = function(waypoint) {
|
|
||||||
this.waypoints.sort(byTriggerPoint)
|
|
||||||
var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
|
|
||||||
return index ? this.waypoints[index - 1] : null
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Group.prototype.queueTrigger = function(waypoint, direction) {
|
|
||||||
this.triggerQueues[direction].push(waypoint)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Group.prototype.remove = function(waypoint) {
|
|
||||||
var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
|
|
||||||
if (index > -1) {
|
|
||||||
this.waypoints.splice(index, 1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public */
|
|
||||||
/* http://imakewebthings.com/waypoints/api/first */
|
|
||||||
Group.prototype.first = function() {
|
|
||||||
return this.waypoints[0]
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public */
|
|
||||||
/* http://imakewebthings.com/waypoints/api/last */
|
|
||||||
Group.prototype.last = function() {
|
|
||||||
return this.waypoints[this.waypoints.length - 1]
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Group.findOrCreate = function(options) {
|
|
||||||
return groups[options.axis][options.name] || new Group(options)
|
|
||||||
}
|
|
||||||
|
|
||||||
Waypoint.Group = Group
|
|
||||||
}())
|
|
||||||
;(function() {
|
|
||||||
'use strict'
|
|
||||||
|
|
||||||
var $ = window.jQuery
|
|
||||||
var Waypoint = window.Waypoint
|
|
||||||
|
|
||||||
function JQueryAdapter(element) {
|
|
||||||
this.$element = $(element)
|
|
||||||
}
|
|
||||||
|
|
||||||
$.each([
|
|
||||||
'innerHeight',
|
|
||||||
'innerWidth',
|
|
||||||
'off',
|
|
||||||
'offset',
|
|
||||||
'on',
|
|
||||||
'outerHeight',
|
|
||||||
'outerWidth',
|
|
||||||
'scrollLeft',
|
|
||||||
'scrollTop'
|
|
||||||
], function(i, method) {
|
|
||||||
JQueryAdapter.prototype[method] = function() {
|
|
||||||
var args = Array.prototype.slice.call(arguments)
|
|
||||||
return this.$element[method].apply(this.$element, args)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
$.each([
|
|
||||||
'extend',
|
|
||||||
'inArray',
|
|
||||||
'isEmptyObject'
|
|
||||||
], function(i, method) {
|
|
||||||
JQueryAdapter[method] = $[method]
|
|
||||||
})
|
|
||||||
|
|
||||||
Waypoint.adapters.push({
|
|
||||||
name: 'jquery',
|
|
||||||
Adapter: JQueryAdapter
|
|
||||||
})
|
|
||||||
Waypoint.Adapter = JQueryAdapter
|
|
||||||
}())
|
|
||||||
;(function() {
|
|
||||||
'use strict'
|
|
||||||
|
|
||||||
var Waypoint = window.Waypoint
|
|
||||||
|
|
||||||
function createExtension(framework) {
|
|
||||||
return function() {
|
|
||||||
var waypoints = []
|
|
||||||
var overrides = arguments[0]
|
|
||||||
|
|
||||||
if (framework.isFunction(arguments[0])) {
|
|
||||||
overrides = framework.extend({}, arguments[1])
|
|
||||||
overrides.handler = arguments[0]
|
|
||||||
}
|
|
||||||
|
|
||||||
this.each(function() {
|
|
||||||
var options = framework.extend({}, overrides, {
|
|
||||||
element: this
|
|
||||||
})
|
|
||||||
if (typeof options.context === 'string') {
|
|
||||||
options.context = framework(this).closest(options.context)[0]
|
|
||||||
}
|
|
||||||
waypoints.push(new Waypoint(options))
|
|
||||||
})
|
|
||||||
|
|
||||||
return waypoints
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (window.jQuery) {
|
|
||||||
window.jQuery.fn.waypoint = createExtension(window.jQuery)
|
|
||||||
}
|
|
||||||
if (window.Zepto) {
|
|
||||||
window.Zepto.fn.waypoint = createExtension(window.Zepto)
|
|
||||||
}
|
|
||||||
}())
|
|
||||||
;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
Waypoints Sticky Element Shortcut - 4.0.1
|
|
||||||
Copyright © 2011-2016 Caleb Troughton
|
|
||||||
Licensed under the MIT license.
|
|
||||||
https://github.com/imakewebthings/waypoints/blob/master/licenses.txt
|
|
||||||
*/
|
|
||||||
(function() {
|
|
||||||
'use strict'
|
|
||||||
|
|
||||||
var $ = window.jQuery
|
|
||||||
var Waypoint = window.Waypoint
|
|
||||||
|
|
||||||
/* http://imakewebthings.com/waypoints/shortcuts/sticky-elements */
|
|
||||||
function Sticky(options) {
|
|
||||||
this.options = $.extend({}, Waypoint.defaults, Sticky.defaults, options)
|
|
||||||
this.element = this.options.element
|
|
||||||
this.$element = $(this.element)
|
|
||||||
this.createWrapper()
|
|
||||||
this.createWaypoint()
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Sticky.prototype.createWaypoint = function() {
|
|
||||||
var originalHandler = this.options.handler
|
|
||||||
|
|
||||||
this.waypoint = new Waypoint($.extend({}, this.options, {
|
|
||||||
element: this.wrapper,
|
|
||||||
handler: $.proxy(function(direction) {
|
|
||||||
var shouldBeStuck = this.options.direction.indexOf(direction) > -1
|
|
||||||
var wrapperHeight = shouldBeStuck ? this.$element.outerHeight(true) : ''
|
|
||||||
|
|
||||||
this.$wrapper.height(wrapperHeight)
|
|
||||||
this.$element.toggleClass(this.options.stuckClass, shouldBeStuck)
|
|
||||||
|
|
||||||
if (originalHandler) {
|
|
||||||
originalHandler.call(this, direction)
|
|
||||||
}
|
|
||||||
}, this)
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Sticky.prototype.createWrapper = function() {
|
|
||||||
if (this.options.wrapper) {
|
|
||||||
this.$element.wrap(this.options.wrapper)
|
|
||||||
}
|
|
||||||
this.$wrapper = this.$element.parent()
|
|
||||||
this.wrapper = this.$wrapper[0]
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public */
|
|
||||||
Sticky.prototype.destroy = function() {
|
|
||||||
if (this.$element.parent()[0] === this.wrapper) {
|
|
||||||
this.waypoint.destroy()
|
|
||||||
this.$element.removeClass(this.options.stuckClass)
|
|
||||||
if (this.options.wrapper) {
|
|
||||||
this.$element.unwrap()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Sticky.defaults = {
|
|
||||||
wrapper: '<div class="sticky-wrapper" />',
|
|
||||||
stuckClass: 'stuck',
|
|
||||||
direction: 'down right'
|
|
||||||
}
|
|
||||||
|
|
||||||
Waypoint.Sticky = Sticky
|
|
||||||
}())
|
|
||||||
;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
Waypoints Inview Shortcut - 4.0.1
|
|
||||||
Copyright © 2011-2016 Caleb Troughton
|
|
||||||
Licensed under the MIT license.
|
|
||||||
https://github.com/imakewebthings/waypoints/blob/master/licenses.txt
|
|
||||||
*/
|
|
||||||
(function() {
|
|
||||||
'use strict'
|
|
||||||
|
|
||||||
function noop() {}
|
|
||||||
|
|
||||||
var Waypoint = window.Waypoint
|
|
||||||
|
|
||||||
/* http://imakewebthings.com/waypoints/shortcuts/inview */
|
|
||||||
function Inview(options) {
|
|
||||||
this.options = Waypoint.Adapter.extend({}, Inview.defaults, options)
|
|
||||||
this.axis = this.options.horizontal ? 'horizontal' : 'vertical'
|
|
||||||
this.waypoints = []
|
|
||||||
this.element = this.options.element
|
|
||||||
this.createWaypoints()
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Inview.prototype.createWaypoints = function() {
|
|
||||||
var configs = {
|
|
||||||
vertical: [{
|
|
||||||
down: 'enter',
|
|
||||||
up: 'exited',
|
|
||||||
offset: '100%'
|
|
||||||
}, {
|
|
||||||
down: 'entered',
|
|
||||||
up: 'exit',
|
|
||||||
offset: 'bottom-in-view'
|
|
||||||
}, {
|
|
||||||
down: 'exit',
|
|
||||||
up: 'entered',
|
|
||||||
offset: 0
|
|
||||||
}, {
|
|
||||||
down: 'exited',
|
|
||||||
up: 'enter',
|
|
||||||
offset: function() {
|
|
||||||
return -this.adapter.outerHeight()
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
horizontal: [{
|
|
||||||
right: 'enter',
|
|
||||||
left: 'exited',
|
|
||||||
offset: '100%'
|
|
||||||
}, {
|
|
||||||
right: 'entered',
|
|
||||||
left: 'exit',
|
|
||||||
offset: 'right-in-view'
|
|
||||||
}, {
|
|
||||||
right: 'exit',
|
|
||||||
left: 'entered',
|
|
||||||
offset: 0
|
|
||||||
}, {
|
|
||||||
right: 'exited',
|
|
||||||
left: 'enter',
|
|
||||||
offset: function() {
|
|
||||||
return -this.adapter.outerWidth()
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var i = 0, end = configs[this.axis].length; i < end; i++) {
|
|
||||||
var config = configs[this.axis][i]
|
|
||||||
this.createWaypoint(config)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Inview.prototype.createWaypoint = function(config) {
|
|
||||||
var self = this
|
|
||||||
this.waypoints.push(new Waypoint({
|
|
||||||
context: this.options.context,
|
|
||||||
element: this.options.element,
|
|
||||||
enabled: this.options.enabled,
|
|
||||||
handler: (function(config) {
|
|
||||||
return function(direction) {
|
|
||||||
self.options[config[direction]].call(self, direction)
|
|
||||||
}
|
|
||||||
}(config)),
|
|
||||||
offset: config.offset,
|
|
||||||
horizontal: this.options.horizontal
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public */
|
|
||||||
Inview.prototype.destroy = function() {
|
|
||||||
for (var i = 0, end = this.waypoints.length; i < end; i++) {
|
|
||||||
this.waypoints[i].destroy()
|
|
||||||
}
|
|
||||||
this.waypoints = []
|
|
||||||
}
|
|
||||||
|
|
||||||
Inview.prototype.disable = function() {
|
|
||||||
for (var i = 0, end = this.waypoints.length; i < end; i++) {
|
|
||||||
this.waypoints[i].disable()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Inview.prototype.enable = function() {
|
|
||||||
for (var i = 0, end = this.waypoints.length; i < end; i++) {
|
|
||||||
this.waypoints[i].enable()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Inview.defaults = {
|
|
||||||
context: window,
|
|
||||||
enabled: true,
|
|
||||||
enter: noop,
|
|
||||||
entered: noop,
|
|
||||||
exit: noop,
|
|
||||||
exited: noop
|
|
||||||
}
|
|
||||||
|
|
||||||
Waypoint.Inview = Inview
|
|
||||||
}())
|
|
||||||
;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
Waypoints Infinite Scroll Shortcut - 4.0.1
|
|
||||||
Copyright © 2011-2016 Caleb Troughton
|
|
||||||
Licensed under the MIT license.
|
|
||||||
https://github.com/imakewebthings/waypoints/blob/master/licenses.txt
|
|
||||||
*/
|
|
||||||
(function() {
|
|
||||||
'use strict'
|
|
||||||
|
|
||||||
var $ = window.jQuery
|
|
||||||
var Waypoint = window.Waypoint
|
|
||||||
|
|
||||||
/* http://imakewebthings.com/waypoints/shortcuts/infinite-scroll */
|
|
||||||
function Infinite(options) {
|
|
||||||
this.options = $.extend({}, Infinite.defaults, options)
|
|
||||||
this.container = this.options.element
|
|
||||||
if (this.options.container !== 'auto') {
|
|
||||||
this.container = this.options.container
|
|
||||||
}
|
|
||||||
this.$container = $(this.container)
|
|
||||||
this.$more = $(this.options.more)
|
|
||||||
|
|
||||||
if (this.$more.length) {
|
|
||||||
this.setupHandler()
|
|
||||||
this.waypoint = new Waypoint(this.options)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
Infinite.prototype.setupHandler = function() {
|
|
||||||
this.options.handler = $.proxy(function() {
|
|
||||||
this.options.onBeforePageLoad()
|
|
||||||
this.destroy()
|
|
||||||
this.$container.addClass(this.options.loadingClass)
|
|
||||||
|
|
||||||
$.get($(this.options.more).attr('href'), $.proxy(function(data) {
|
|
||||||
var $data = $($.parseHTML(data))
|
|
||||||
var $newMore = $data.find(this.options.more)
|
|
||||||
|
|
||||||
var $items = $data.find(this.options.items)
|
|
||||||
if (!$items.length) {
|
|
||||||
$items = $data.filter(this.options.items)
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$container.append($items)
|
|
||||||
this.$container.removeClass(this.options.loadingClass)
|
|
||||||
|
|
||||||
if (!$newMore.length) {
|
|
||||||
$newMore = $data.filter(this.options.more)
|
|
||||||
}
|
|
||||||
if ($newMore.length) {
|
|
||||||
this.$more.replaceWith($newMore)
|
|
||||||
this.$more = $newMore
|
|
||||||
this.waypoint = new Waypoint(this.options)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
this.$more.remove()
|
|
||||||
}
|
|
||||||
|
|
||||||
this.options.onAfterPageLoad($items)
|
|
||||||
}, this))
|
|
||||||
}, this)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public */
|
|
||||||
Infinite.prototype.destroy = function() {
|
|
||||||
if (this.waypoint) {
|
|
||||||
this.waypoint.destroy()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Infinite.defaults = {
|
|
||||||
container: 'auto',
|
|
||||||
items: '.infinite-item',
|
|
||||||
more: '.infinite-more-link',
|
|
||||||
offset: 'bottom-in-view',
|
|
||||||
loadingClass: 'infinite-loading',
|
|
||||||
onBeforePageLoad: $.noop,
|
|
||||||
onAfterPageLoad: $.noop
|
|
||||||
}
|
|
||||||
|
|
||||||
Waypoint.Infinite = Infinite
|
|
||||||
}())
|
|
||||||
;
|
|
Loading…
Add table
Add a link
Reference in a new issue