This commit is contained in:
2024-12-14 20:41:41 +03:00
parent 74cd10de8a
commit 0f779b7ebf
103 changed files with 3212 additions and 1387 deletions
+6 -5
View File
@@ -32,7 +32,7 @@ kit.config = kit.config || {};
*/
var MD_TYPE = { // module definition
ES: 'ES', // CMAScript2020 or ES11
UMD: 'UMD', // https://github.com/umdjs/umd
UMD: 'UMD', // https://github.com/umdjs/umd // Node/CommonJS
HMD: 'HMD', // HandlerMD - function(require, exports, module, global){module.exports = {}; return {};}
default: 'default',
};
@@ -553,10 +553,7 @@ kit.config = kit.config || {};
self.config.debug && console.log(`Plugin ${self.id}: load script ${src}`);
var script = document.createElement('script');
script.src = src;
if(self.config.isSetTimestamp){
script.src = getUrlWithTimestamp(src);
}
script.async = true;
script.onload = function() {resolve(script);};
script.onerror = function() {
var error = new Error(`Ошибка загрузки скрипта ${src}`);
@@ -564,6 +561,10 @@ kit.config = kit.config || {};
console.log(`%cPlugin.load(${self.id}): error load script ${src}!`, "color: red;");
reject(error);
};
script.src = src;
if(self.config.isSetTimestamp){
script.src = getUrlWithTimestamp(src);
}
document.head.append(script);
});
};
+1 -1
View File
File diff suppressed because one or more lines are too long
+33 -19
View File
@@ -35,7 +35,7 @@ var __PluginManagerConfigHandler__ = function() {
module: '/support.min.js',
type: 'HMD',
},
jqueryProxy: {
jQueryProxy: {
type: 'HMD',
handler: function(require, exports, module, global){
init = function(c, prop = '$', args = []){
@@ -52,7 +52,7 @@ var __PluginManagerConfigHandler__ = function() {
var J = function(){
if(!J.init){
J.init = true;
__PluginManager__.ready('jquery');
__PluginManager__.ready('jQuery');
}
var c = [];
J.queue.push(c);
@@ -104,17 +104,17 @@ var __PluginManagerConfigHandler__ = function() {
module.exports = new JQueryProxy();
},
},
jquery: {
jQuery: {
path: root + '/jquery',
module: '/jquery.min.js',
type: 'UMD',
alias: ['$', 'jQuery'],
alias: ['$', 'jquery'],
onRegister: function (plugin) {
if(hasJQuery()){
plugin.module.exports = window.jQuery;
plugin.config.module = '';
} else {
plugin.proxy = kit.require('jqueryProxy');
plugin.proxy = kit.require('jQueryProxy');
plugin.proxy.onJQueryRegister(plugin);
}
},
@@ -173,7 +173,6 @@ var __PluginManagerConfigHandler__ = function() {
type: 'HMD',
css: '/tooltip2.css',
onInstall: function (plugin) {
console.log('tt2 install');
document.addEventListener('mouseover', function (event) {
// console.log(event);
// console.log(event.target);
@@ -370,18 +369,19 @@ var __PluginManagerConfigHandler__ = function() {
plugin.module.exports(kit.require('jQuery'));
}
},
jqueryMousewheel: {
path: root + '/jqueryMousewheel',
alias: 'jquery-mousewheel',
js: '/jquery.mousewheel.js',
'jQuery.Mousewheel': {
path: root + '/jquery/Mousewheel',
module: '/jquery.mousewheel.min.js',
type: 'UMD',
alias: ['jquery-mousewheel', 'jqueryMousewheel'],
deps: ['jQuery'],
onInstall: function (plugin) {
plugin.module.exports(kit.require('jQuery'));
}
},
jqueryLazy: {
path: root + '/jquery-lazy',
alias: 'jquery-lazy',
'jQuery.Lazy': {
path: root + '/jquery/Lazy',
alias: ['jquery-lazy', 'jqueryLazy'],
js: [
'/jquery.lazy.min.js',
'/jquery.lazy.plugins.min.js',
@@ -413,23 +413,24 @@ var __PluginManagerConfigHandler__ = function() {
type: 'default',
deps: ['jQuery'],
},
selectric: {
path: root + '/selectric',
'jQuery.Selectric': {
path: root + '/jquery/Selectric',
module: '/jquery.selectric.min.js',
css: [
'/selectric.css',
],
type: 'UMD',
alias: ['jquerySelectric'],
alias: ['jquerySelectric', 'selectric'],
deps: ['jQuery'],
},
jBox: {
path: root + '/jBox',
'jQuery.jBox': {
path: root + '/jquery/jBox',
module: '/jBox.min.js',
css: [
'/jBox.min.css',
],
type: 'UMD',
type: 'default',
alias: ['jBox'],
deps: ['jQuery'],
},
intlTelInput: {
@@ -449,5 +450,18 @@ var __PluginManagerConfigHandler__ = function() {
],
type: 'HMD',
},
'jQuery.FlexSlider': {
path: root + '/jquery/FlexSlider',
module: '',
js: [
'/jquery.flexslider-min.js',
],
css: [
'/flexslider.css',
],
alias: ['FlexSlider', 'flexslider'],
type: 'default',
deps: ['jQuery'],
},
};
};
File diff suppressed because one or more lines are too long
-730
View File
@@ -1,730 +0,0 @@
var kit;
kit = window.kit = window.kit || {};
kit.service = kit.service || {};
kit.config = kit.config || {};
(function(global){
var stateList = {
undefined: 0,
registered: 1,
loaded: 3,
installed: 4,
};
var moduleTypeList = {
loader: 'loader',
import: 'import',
};
/**
* @class PluginManager
* @param global
* @param plugins
* @memberOf kit
*/
var PluginManager = function(global, plugins = {}){
this.plugins = {};
this.global = global;
this.registerPlugins(plugins);
};
/**
*
* @type {kit.PluginManager|PluginManager}
* @private
*/
var __proto = PluginManager.prototype;
__proto.__checkState = function(pluginId, state){
return this.plugins.hasOwnProperty(pluginId) && this.plugins[pluginId].state >= state;
};
/**
* @param plugins
* @return {PluginManager}
*/
__proto.registerPlugins = function (plugins) {
if(Array.isArray(plugins)) {
plugins = Object.assign({}, plugins);
}
for (var pluginId in plugins) {
if(plugins.hasOwnProperty(pluginId)) {
this.register(pluginId, plugins[pluginId]);
}
}
return this;
};
/**
* @return {boolean}
*/
__proto.register = function (pluginId, config = {}) {
//console.warn('PluginManager.register: plugin ' + pluginId + ' ('+(this.plugins[pluginId]?this.plugins[pluginId].state:'0')+')');
var defaultPlugin = {
module: {
exports: {},
},
config: {
},
promise: new Promise(function(resolve, reject){resolve()}),
id: pluginId,
state: stateList.undefined,
stateInit: {
loading: false,
installing: false,
},
};
var plugin = this.__getPlugin(pluginId);
if(plugin) {
pluginId = plugin.id;
} else {
plugin = this.plugins[pluginId] = defaultPlugin;
}
/**
* @todo !!!
*/
if(
(this.__checkState(pluginId, stateList.installed) && typeof config.loader === 'function') ||
(
(plugin.stateInit.loading || this.__checkState(pluginId, stateList.loaded)) && typeof config === 'object'
)
) {
console.warn('PluginManager.register: plugin ' + pluginId + ' уже невозможно конфигурировать ('+plugin.state+')');
return false;
}
var loader;
if(typeof config === 'function') {
loader = config;
config = plugin.config;
config.loader = loader;
config.type = 'loader';
if(this.__checkState(pluginId, stateList.registered)) {
if(this.__checkState(pluginId, stateList.loaded)){
plugin.stateInit.installing = false;
}
//console.log(`PluginManager.register(${pluginId}): (${plugin.state} > ${stateList.registered})`);
plugin.state = stateList.registered;
if(plugin.config.autoRequire) {
this.require(pluginId);
}
}
}
if(typeof config === 'object') {
if(typeof config.onLoad !== 'function') {
config.onLoad = function(){};
}
if(typeof config.onInstall !== 'function') {
config.onInstall = function(){};
}
if(typeof config.onRegister !== 'function') {
config.onRegister = function(){};
}
if(typeof config.path !== 'string') {
config.path = '';
}
if(!config.hasOwnProperty('modulePath')) {
config.modulePath = config.path;
} else if(typeof config.modulePath !== 'string') {
config.modulePath = config.path;
}
if(typeof config.js === 'string') {
config.js = [config.js];
} else if(!Array.isArray(config.js)) {
config.js = [];
}
if(typeof config.css === 'string') {
config.css = [config.css];
} else if(!Array.isArray(config.css)) {
config.css = [];
}
if(typeof config.alias === 'string') {
config.alias = [config.alias];
} else if(!Array.isArray(config.alias)) {
config.alias = [];
}
config.loadJsAfterModule = !!config.loadJsAfterModule;
config.isSetTimestamp = config.hasOwnProperty('isSetTimestamp')?!!config.isSetTimestamp:true;
config.type = config.type || 'import'; //loader
if(typeof config.deps === 'string') {
config.deps = [config.deps];
} else if(!Array.isArray(config.deps)) {
config.deps = [];
}
} else {
console.warn('PluginManager.register: plugin ' + pluginId + ' is not a valid format');
return false;
}
Object.assign(plugin.config, config);
if(!this.__checkState(pluginId, stateList.registered)) {
plugin.state = stateList.registered;
plugin.config.onRegister(plugin);
var event = new CustomEvent("onRegister" + plugin.id + "Plugin", {
"detail": {plugin: plugin}
});
document.dispatchEvent(event);
}
return true;
};
/**
* @param pluginId
* @param callback
* @return {PluginManager}
*/
__proto.load = function (pluginId, callback) {
var self = this;
//console.log('PluginManager.load: plugin ' + pluginId + ' ('+(this.plugins[pluginId]?this.plugins[pluginId].state:'0')+')');
if(typeof callback !== 'function') {
callback = function(){};
}
var plugin = this.__getPlugin(pluginId);
if(plugin) {
pluginId = plugin.id;
}
if(!this.__checkState(pluginId, stateList.registered)) {
console.warn('kit.load: plugin ' + pluginId + ' is not register');
return this;
}
if(this.__checkState(pluginId, stateList.loaded)) {
//console.warn('PluginManager.load: plugin ' + pluginId + ' уже загружен');
callback();
return this;
}
if(plugin.stateInit.loading) {
//console.log('PluginManager.install: plugin ' + pluginId + ' уже грузится');
this.__exec(pluginId, callback);
return this;
}
plugin.stateInit.loading = true;
var configModule = plugin.config;
var stackPush = function (callbackPromise, argArr = []){
if(typeof plugin.promise === 'undefined') {
plugin.promise = callbackPromise.apply(this, argArr);
} else {
plugin.promise = plugin.promise.then(function(m){
return callbackPromise.apply(this, argArr);
});
}
}.bind(this);
var getModulePromise = (function () {
function getFileLoadNode(src) {
src = src.match(/^[^#?]*/)[0];
return document.querySelector('script[src^="'+src+'"]') ||
document.querySelector('link[href^="'+src+'"]') ||
document.querySelector('meta[property="kit:file-load"][content="'+src+'"]');
}
function loadScript(src, resolveCallback, rejectCallback) {
var originSrc = src;
src = String(src).split('?')[0];
if(typeof resolveCallback !== 'function'){
resolveCallback = function(){};
}
if(typeof rejectCallback !== 'function'){
rejectCallback = function(res){
console.warn(res.message, originSrc);
};
}
return new Promise(function(resolve, reject) {
var loadNode = getFileLoadNode(src);
if (loadNode) {
global.config.debug && console.warn(`Скрипт ${src} уже загружен`);
// self.__ready(resolve, [loadNode]);
resolve();
} else {
var script = document.createElement('script');
try {
var url = new URL(originSrc);
if(plugin.config.isSetTimestamp){
url.searchParams.append('__pm', (new Date()).getTime());
}
script.src = url.toString();
} catch (e) {
script.src = '' + src + '?__pm' + ((new Date()).getTime());
}
script.onload = function() {resolve(script);};
script.onerror = function() {reject(new Error(`Ошибка загрузки скрипта ${src}`));};
document.head.append(script);
}
}).then(resolveCallback, rejectCallback);
}
function syncLoadScriptList(list) {
return new Promise(function(resolve, reject) {
var i = 0;
var status = true;
var count = list.length;
var checkResolve = function(src, cond){
if(!cond) {
console.error(`Ошибка загрузки скрипта ${src}`)
}
status = status && cond;
i++;
if(i === count) {
resolve();
}
};
var syncPromise = new Promise(function(_resolve, _reject){_resolve();});
list.forEach(function(item, i, arr){
syncPromise.then(function(){
var src = configModule.path + item;
var loadNode = getFileLoadNode(src);
if(loadNode){
self.__ready(resolve, [src, true]);
// resolve(src, true);
} else {
var script = document.createElement('script');
script.src = '' + src + '?__pm' + (new Date()).getTime();
script.onload = () => checkResolve(src, true);
script.onerror = () => checkResolve(src, false);
document.head.append(script);
}
});
});
})
}
function loadStyle(src) {
return new Promise(function(resolve, reject) {
var loadNode = getFileLoadNode(src);
if(loadNode) {
global.config.debug && console.warn(`Стиль ${src} уже загружен`);
// self.__ready(resolve, [src]);
resolve();
} else {
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = src + '?__pm' + (new Date()).getTime();
link.media = 'all';
document.head.append(link);
resolve(link);
}
});
}
var getImportPromise = function (){
if(configModule.module && configModule.type === 'import') {
return import(configModule.modulePath + configModule.module).then(function(m) {
m.__esModule = true;
plugin.module.exports = m;
}.bind(this), function(r){
console.error(r);
});
} else if(configModule.module && configModule.type === 'loader' && !(configModule.hasOwnProperty('loader') && typeof configModule.loader === 'function')) {
return loadScript(configModule.modulePath + configModule.module).then(function() {
}.bind(this));
}
return new Promise(function(resolve, reject){resolve();});
}.bind(this);
var getResPromise = function(){
var p = new Promise(function(resolve, reject){resolve();});
configModule.js.forEach(function(item, i, array){
if(Array.isArray(item)) {
p = p.then(function () {
return syncLoadScriptList(item);
});
} else {
p = p.then(function () {
return loadScript(configModule.path + item);
});
}
//loadScript(configModule.path + item);
});
return p;
}.bind(this);
var setSkipLoadPromise = function (depsPromise) {
var jsPromiseExists = true, importPromiseExists = true;
if(configModule.js.length === 0) {
jsPromiseExists = false;
}
if((!configModule.module && configModule.type === 'import') || (configModule.type === 'loader' && typeof configModule.loader === 'function')) {
importPromiseExists = false;
}
plugin.skipLoadPromise = !importPromiseExists && !jsPromiseExists && !depsPromise;
return plugin.skipLoadPromise;
}.bind(this);
configModule.css.forEach(function(item, i, array){
loadStyle(configModule.path + item);
});
var depsPromise = this.__getDepsPromise(this.depsCorrection(configModule.deps));
setSkipLoadPromise(depsPromise);
if(depsPromise) {
stackPush(function () {
return depsPromise;
});
}
if(configModule.loadJsAfterModule) {
stackPush(getImportPromise);
stackPush(getResPromise);
} else {
stackPush(getResPromise);
stackPush(getImportPromise);
}
this.__exec(pluginId, function(){
plugin.state = stateList.loaded;
plugin.skipLoadPromise = true;
configModule.onLoad.call(plugin.module.exports);
var event = new CustomEvent("onLoad" + plugin.id + "Plugin", {
"detail": {plugin: plugin}
});
document.dispatchEvent(event);
callback();
}.bind(this));
return plugin.promise;
}).bind(this);
getModulePromise();
return this;
};
/**
* @param pluginId
* @param callback
* @return {PluginManager}
*/
__proto.install = function(pluginId, callback){
//console.warn('PluginManager.install: plugin ' + pluginId + ' ('+(this.plugins[pluginId]?this.plugins[pluginId].state:'0')+')');
if(typeof callback !== 'function') {
callback = function(){};
}
var plugin = this.__getPlugin(pluginId);
if(plugin) {
pluginId = plugin.id;
}
var module = plugin.module;
if(!this.__checkState(pluginId, stateList.registered)) {
console.warn('PluginManager.install: plugin ' + pluginId + ' is not register');
return this;
}
if(this.__checkState(pluginId, stateList.installed)) {
callback();
return this;
}
if(plugin.stateInit.installing) {
//console.warn(`PluginManager.install(${pluginId}): уже устанавливается (${plugin.state}).`);
this.__exec(pluginId, callback);
return this;
}
plugin.stateInit.installing = true;
this.load(pluginId);
var installer = function(){
var setGlobalExtension = function (key, aliasList, data) {
if(data === undefined) {
return;
}
if(!this.global.hasOwnProperty(key)) {
this.global[key] = data;
}
if(Array.isArray(aliasList) && aliasList.length) {
aliasList.forEach(function (alias) {
setGlobalExtension(alias, [], data)
}.bind(this))
}
}.bind(this);
/**
* @todo !!!
*/
var returnData;
if(plugin.config.type === moduleTypeList.loader && typeof plugin.config.loader === 'function') {
// var returnData = plugin.config.loader.bind(module.exports).call(module.exports, module, module.exports, this.require.bind(this), global);
returnData = plugin.config.loader.bind(this.global).call(this.global, module, module.exports, this.require.bind(this), this.global);
if(returnData === undefined && module.exports){
returnData = module.exports;
}
setGlobalExtension(pluginId, plugin.config.alias, returnData);
} else if(plugin.config.type === moduleTypeList.import && typeof plugin.config.module === 'string') {
returnData = (typeof module.exports === 'object' && module.exports.default !== undefined)?module.exports.default:module.exports;
setGlobalExtension(pluginId, plugin.config.alias, returnData);
}
console.log(`%cPluginManager.install(${pluginId}): installed (${plugin.state} > ${stateList.installed}).`, "color: green;");
plugin.state = stateList.installed;
return true;
}.bind(this);
this.__exec(pluginId, function(){
if(!this.__checkState(pluginId, stateList.installed)) {
if(installer()){
plugin.config.onInstall.call(module.exports, plugin);
var event = new CustomEvent("onInstall" + plugin.id + "Plugin", {
"detail": {plugin: plugin}
});
document.dispatchEvent(event);
}
}
callback();
}.bind(this));
return this;
};
/**
* @name kitPluginManagerRequire
* @param {string} pluginId
* @param {callback} callback
* @return {boolean}
* @memberOf {kit}
*/
__proto.require = function (pluginId, callback) {
var plugin = this.__getPlugin(pluginId);
if(!plugin) {
console.warn('PluginManager.require: plugin ' + pluginId + ' not found ('+(this.plugins[pluginId]?this.plugins[pluginId].state:'0')+')');
return undefined;
}
pluginId = plugin.id;
var module = plugin.module;
if(!this.__checkState(pluginId, stateList.registered)) {
console.warn('PluginManager.require: plugin ' + pluginId + ' is not register');
return undefined;
}
if(typeof callback !== 'function') {
callback = function(){};
}
this.install(pluginId, callback);
return module.exports;
};
__proto.depsCorrection = function(deps){
if(!Array.isArray(deps) ) {
deps = [deps];
}
var correct = [];
deps.forEach(function(pluginId, i, arr) {
var realPlugin = this.__getPlugin(pluginId);
if(realPlugin === undefined) {
console.warn(`Plugin "${pluginId}" not registered!`);
return false;
}
correct.push(realPlugin.id);
}.bind(this));
return correct;
};
/**
* @memberOf kit
*/
__proto.exec = function (deps, callback, argArr = [], context = undefined) {
if(typeof deps === 'function') {
context = argArr;
argArr = callback;
callback = deps;
deps = [];
}
if(context === undefined) {
context = this;
}
deps = this.depsCorrection(deps);
if(typeof argArr === 'undefined') {
argArr = [];
}
deps = Array.from(new Set(deps.concat(global.config.requiredDependencies)));
if(typeof callback !== 'function') {
return undefined;
}
var depsPromise = this.__getDepsPromise(deps);
var getArgArr = function () {
if(argArr.length === 0) {
deps.forEach(function (pluginId) {
argArr.push(this.require(pluginId));
}.bind(this));
return argArr;
}
return argArr;
}.bind(this);
if(depsPromise) {
depsPromise.then(function(){
callback.apply(context, getArgArr());
});
} else {
callback.apply(context, getArgArr())
}
};
__proto.__exec = function (pluginId, callback, argArr = []) {
var plugin = this.plugins[pluginId];
var exec = function(_callback, argArr){
if(plugin.skipLoadPromise) {
_callback.apply(this, argArr);
} else {
plugin.promise = plugin.promise.then(function(){
_callback.apply(this, argArr);
}.bind(this));
}
}.bind(this);
exec(callback, argArr);
};
__proto.__getDepsPromise = function (pluginList) {
var skipPromise = true;
var promise = new Promise((resolve, reject)=>{
var i = 0;
var checkModule = function(){
if(++i === pluginList.length + 1) {
resolve();
}
};
checkModule();
pluginList.forEach(function(pluginId, i, array){
if(!this.__checkState(pluginId, stateList.registered)) {
checkModule();
return false;
}
this.install(pluginId, checkModule);
skipPromise = skipPromise && this.plugins[pluginId].skipLoadPromise;
}.bind(this));
});
return !skipPromise?promise:undefined;
};
/**
* @param {(string|string[])} deps
* @param {function} callback
* @memberOf kit
*/
__proto.ready = function(deps, callback = undefined) {
if(typeof deps === 'function') {
callback = deps;
deps = [];
}
this.__ready(this.exec, [deps, callback], this);
};
__proto.__ready = function(fn, args = [], context = window) {
context = context || this;
if (/complete|interactive|loaded/.test(document.readyState)) {
fn.apply(context, args);
} else {
document.addEventListener("DOMContentLoaded", function () {
fn.apply(context, args);
}.bind(this));
}
};
__proto.__getPlugin = function (pluginId) {
if(this.plugins.hasOwnProperty(pluginId)) {
return this.plugins[pluginId];
}
var _pluginId, alias;
for (_pluginId in this.plugins) {
if(this.plugins.hasOwnProperty(_pluginId) && this.plugins[_pluginId].config.alias.indexOf(pluginId) !== -1) {
return this.plugins[_pluginId];
}
}
var pluginIdLowerCase = pluginId.toLowerCase();
for (_pluginId in this.plugins) {
if(!this.plugins.hasOwnProperty(_pluginId)) {
continue;
}
if(pluginIdLowerCase === _pluginId.toLowerCase()) {
return this.plugins[_pluginId];
}
for(alias of this.plugins[_pluginId].config.alias) {
if(pluginIdLowerCase === alias.toLowerCase()) {
return this.plugins[_pluginId];
}
}
}
return undefined;
};
/**
* @class kitConfig
*/
var defaultConfig = {
version: '1.10',
assetsPath: '',
requiredDependencies: [],
autoloadPluginList: [],
debug: false,
defaultPhoneMask: '+7 (999) 999-99-99',
};
var script = document.currentScript;
if(script){
var path = script.src.split('?')[0];
defaultConfig.assetsPath = path.split('/').slice(0, -2).join('/');
}
var manager = new PluginManager(global);
manager.register('PluginManager', {
alias: 'pm',
type: moduleTypeList.loader,
loader: function(module, exports, require) {
return module.exports = manager;
}
});
manager.install('PluginManager');
manager.register('config', {
type: moduleTypeList.loader,
loader: function(module, exports, require, global) {
var config = global.config || {};
config = Object.assign({}, defaultConfig, config);
window.__pmConfig__ = global.config = config;
}
});
manager.install('config');
window.__PluginManager__ = manager;
global.ready = manager.ready.bind(manager);
global.exec = manager.exec.bind(manager);
global.require = manager.require.bind(manager);
/**
* @var __pmGlobal__
*/
window.__pmGlobal__ = global;
})(kit);
-391
View File
@@ -1,391 +0,0 @@
__PluginManager__.registerPlugins({
menu: {
path: __pmConfig__.assetsPath + '/menu',
module: '/menu.js',
css: [
'/menu.css'
],
type: 'loader',
deps: ['lib', 'align', 'dataStructures', 'animations', 'userAction', 'Collection', 'support', 'ActionCollection', 'Action', 'Viewer']
},
lib: {
path: __pmConfig__.assetsPath + '/lib',
module: '/lib.js',
type: 'loader',
},
align: {
path: __pmConfig__.assetsPath + '/align',
module: '/align.js',
type: 'loader',
deps: ['support']
},
flexKit: {
path: __pmConfig__.assetsPath + '/flex-kit',
css: '/flex-kit.css'
},
support: {
path: __pmConfig__.assetsPath + '/support',
module: '/support.js',
type: 'loader',
},
jquery: {
path: __pmConfig__.assetsPath + '/jquery',
module: '/jquery.min.js',
type: 'loader',
alias: ['$', 'jQuery'],
autoRequire: true,
},
popper: {
path: __pmConfig__.assetsPath + '/popper',
alias: 'popper.js',
module: '/popper.js',
type: 'loader',
css: '/popper.css',
},
bsCore: {
path: __pmConfig__.assetsPath + '/bsCore',
module: '/bsCore.js',
type: 'loader',
css: [
'/bsCore.css'
]
},
bsToast: {
path: __pmConfig__.assetsPath + '/bsToast',
module: '/bsToast.js',
type: 'loader',
deps: ['bsCore'],
},
bsToastService: {
path: __pmConfig__.assetsPath + '/bsToastService',
module: '/bsToastService.js',
type: 'loader',
css: [
'/bsToastService.css'
],
deps: ['bsToast', 'support', 'Collection'],
},
Tooltip: {
path: __pmConfig__.assetsPath + '/tooltip',
module: '/tooltip.js',
type: 'loader',
css: '/tooltip.css',
onInstall: function(plugin){
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
return __pmGlobal__.Tooltip.getOrCreateInstance(tooltipTriggerEl, {sanitize: false});
});
},
deps: ['popper', 'bsCore'],
},
Tooltip2: {
path: __pmConfig__.assetsPath + '/tooltip2',
module: '/tooltip2.js',
type: 'loader',
css: '/tooltip2.css',
onInstall: function(plugin){
console.log('tt2 install');
document.addEventListener('mouseover', function(event) {
// console.log(event);
// console.log(event.target);
if(!(event.target && event.target.dataset.kitTooltip2 === 'autoload')) {
return;
}
// console.log(1);
if(kit.support.getNodeData(event.target, 'tooltip2')){
return;
}
// console.log(2);
var tooltip = new __pmGlobal__.Tooltip2(event.target);
tooltip.run();
tooltip.show();
});
// var elements = [].slice.call(document.querySelectorAll('[data-kit-tooltip2="autoload"]'));
// elements.map(function (element) {
// var tooltip = new __pmGlobal__.Tooltip2(element);
// tooltip.run();
// console.log(tooltip);
// });
},
deps: ['Viewer', 'support', 'ActionCollection', 'Action', 'userAction', 'align', 'Collection', 'animations'],
},
Popover: {
path: __pmConfig__.assetsPath + '/popover',
module: '/popover.js',
type: 'loader',
css: '/popover.css',
onInstall: function(){
var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'));
var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
return new __pmGlobal__.Popover(popoverTriggerEl);
});
},
deps: ['popper', 'bsCore', 'Tooltip'],
},
mask: {
path: __pmConfig__.assetsPath + '/mask',
module: '/mask.js',
type: 'loader',
deps: ['jQuery'],
},
toolkit: {
path: __pmConfig__.assetsPath + '/toolkit',
module: '/toolkit.js',
type: 'loader',
css: ['/toolkit.css'],
deps: ['jQuery', 'mask', 'support'],
},
Modal: {
path: __pmConfig__.assetsPath + '/modal',
module: '/modal.js',
type: 'loader',
css: [
'/modal.css',
],
deps: ['bsCore'],
onRegister: function (plugin) {
plugin.onLoadConditionHandler = function (event) {
if(event.target && event.target.dataset && event.target.dataset.bsTarget && event.target.dataset.bsToggle === 'modal') {
kit.exec(plugin.id, function(){
var newEvent = new Event("click");
event.target.dispatchEvent(newEvent);
});
}
};
window.addEventListener('click', plugin.onLoadConditionHandler, false);
},
onInstall: function (plugin) {
if(plugin.onLoadConditionHandler) {
window.removeEventListener('click', plugin.onLoadConditionHandler, false);
}
},
},
collapse: {
path: __pmConfig__.assetsPath + '/collapse',
module: '/collapse.js',
type: 'loader',
css: [
'/collapse.css',
],
deps: ['bsCore'],
onRegister: function (plugin) {
//kit.PluginManager.install('collapse')
},
onInstall: function (plugin) {
},
},
datepicker: {
path: __pmConfig__.assetsPath + '/datepicker',
module: '/js/datepicker.js',
type: 'loader',
css: [
'/css/datepicker.css',
],
deps: ['jQuery'],
onRegister: function (plugin) {
//kit.PluginManager.install(plugin.id)
},
onInstall: function (plugin) {
},
},
cookie: {
path: __pmConfig__.assetsPath + '/cookie',
module: '/cookie.js',
type: 'loader',
},
animations: {
path: __pmConfig__.assetsPath + '/animations',
css: '/animations.css',
module: '/animations.js',
type: 'loader',
},
Collection: {
path: __pmConfig__.assetsPath + '/collection',
module: '/collection.js',
type: 'loader',
deps: ['support'],
},
dataStructures: {
path: __pmConfig__.assetsPath + '/dataStructures',
module: '/dataStructures.js',
type: 'loader',
},
userAction: {
path: __pmConfig__.assetsPath + '/userAction',
module: '/userAction.js',
type: 'loader',
deps: ['support', 'ActionCollection', 'Action', 'Viewer'],
},
Viewer: {
path: __pmConfig__.assetsPath + '/Viewer',
module: '/Viewer.js',
type: 'loader',
deps: ['Collection', 'support', 'ActionCollection', 'Action'],
},
ActionCollection: {
path: __pmConfig__.assetsPath + '/ActionCollection',
module: '/ActionCollection.js',
type: 'loader',
deps: ['Collection', 'support', 'Action'],
},
Action: {
path: __pmConfig__.assetsPath + '/Action',
module: '/Action.js',
type: 'loader',
deps: ['support'],
},
date: {
path: __pmConfig__.assetsPath + '/date',
module: '/date.js',
type: 'loader',
deps: [],
},
testing: {
path: __pmConfig__.assetsPath + '/testing',
module: '/testing.js',
type: 'loader',
deps: ['log'],
},
log: {
path: __pmConfig__.assetsPath + '/log',
module: '/log.js',
css: '/log.css',
type: 'loader',
deps: ['support', 'Collection', 'lib']
},
fancybox: {
path: __pmConfig__.assetsPath + '/fancybox',
css: '/fancybox.css',
js: '/fancybox.umd.js',
},
lightGallery: {
path: __pmConfig__.assetsPath + '/lightGallery',
css: '/lightGallery.css',
js: '/lightGallery.js',
deps: ['jQuery'],
},
owlCarousel: {
path: __pmConfig__.assetsPath + '/owlCarousel',
css: '/owlCarousel.css',
js: '/owlCarousel.js',
deps: ['jQuery'],
},
Chosen: {
path: __pmConfig__.assetsPath + '/chosen',
css: '/chosen.css',
js: '/chosen.jquery.js',
deps: ['jQuery'],
onRegister: function (module) {
}
},
makeCSSAnimations: {
path: __pmConfig__.assetsPath + '/makeCSSAnimations',
js: '/makeCSSAnimations.js',
deps: ['jQuery', 'support'],
},
mCustomScrollbar: {
path: __pmConfig__.assetsPath + '/mCustomScrollbar',
alias: 'malihu-custom-scrollbar-plugin',
js: '/mCustomScrollbar.js',
css: '/jquery.mCustomScrollbar.css',
deps: ['jQuery', 'jqueryMousewheel'],
onInstall: function (plugin) {
plugin.module.exports(kit.require('jQuery'));
}
},
jqueryMousewheel: {
path: __pmConfig__.assetsPath + '/jqueryMousewheel',
alias: 'jquery-mousewheel',
js: '/jquery.mousewheel.js',
deps: ['jQuery'],
onInstall: function (plugin) {
plugin.module.exports(kit.require('jQuery'));
}
},
jqueryLazy: {
path: __pmConfig__.assetsPath + '/jquery-lazy',
alias: 'jquery-lazy',
js: [
'/jquery.lazy.min.js',
'/jquery.lazy.plugins.min.js',
],
deps: ['jQuery'],
},
slickCarousel: {
path: __pmConfig__.assetsPath + '/slickCarousel',
alias: ['slick', 'slick-carousel'],
js: '/slick.min.js',
css: [
'/slick.css',
'/slick-theme.css',
],
deps: ['jQuery'],
},
mustache: {
path: __pmConfig__.assetsPath + '/mustache',
alias: ['mustache.js'],
js: '/mustache.js',
deps: [],
},
bxSlider: {
path: __pmConfig__.assetsPath + '/bxSlider',
module: '/jquery.bxslider.min.js',
css: [
'/jquery.bxslider.min.css',
],
type: 'import',
deps: ['jQuery'],
},
selectric: {
path: __pmConfig__.assetsPath + '/selectric',
module: '/jquery.selectric.min.js',
css: [
'/selectric.css',
],
type: 'import',
alias: ['jquerySelectric'],
deps: ['jQuery'],
},
jBox: {
path: __pmConfig__.assetsPath + '/jBox',
module: '/jBox.min.js',
css: [
'/jBox.min.css',
],
type: 'import',
deps: ['jQuery'],
},
intlTelInput: {
path: __pmConfig__.assetsPath + '/intl-tel-input',
module: '/js/intlTelInput.min.js',
css: [
'/css/intlTelInput.min.css',
],
type: 'import',
alias: ['intl-tel-input'],
},
autoComplete: {
path: __pmConfig__.assetsPath + '/autoComplete',
module: '/autoComplete.min.js',
css: [
'/css/autoComplete.css',
],
type: 'loader',
},
});
__pmConfig__.debug && (function(){
console.log('%ckit.reg', 'color:#2053ff');
document.addEventListener("DOMContentLoaded", function () {
console.log('%cDOMContentLoaded', 'color:#2053ff');
});
__PluginManager__.exec(function () {
console.log('%ckit.exec', 'color:#2053ff');
});
}());
__PluginManager__.ready(__pmConfig__.autoloadPluginList, function () {
__pmConfig__.debug && (function() {
console.log('%ckit.ready', 'color:#2053ff');
}());
});
+3 -3
View File
@@ -1,8 +1,8 @@
/* flex-kit.css */
* {
outline: none;
margin: 0;
padding: 0;
/*outline: none;*/
/*margin: 0;*/
/*padding: 0;*/
}
:root {
--flex-padding: 15px 15px;
+35
View File
@@ -0,0 +1,35 @@
# How to contribute
Community made patches, localisations, bug reports and contributions are always welcome and are crucial to ensure FlexSlider remains the #1 responsive jQuery slideshow solution. :)
When contributing, please ensure you follow the guidelines below so that we can keep on top of things.
__Note:__
GitHub is for *bug reports and contributions only* - if you have a setup question, please be mindful of this and keep your question clear and concise, if you must post it to this repository.
If you are a WooThemes customer, use [WooThemes Support](http://support.woothemes.com). Our ninjas are on hand to assist with your set up query.
## Getting Started
* Make sure you have a [GitHub account](https://github.com/signup/free)
* Submit a ticket for your issue, assuming one does not already exist (please look over the currently open issues before creating a new issue).
* Clearly describe the issue including steps to reproduce when it is a bug.
* Make sure you fill in the earliest version that you know has the issue.
## Making Changes
* Fork the repository on GitHub.
* Make the changes to your forked repository.
* Ensure you use LF line endings - no crazy windows line endings. :)
* When committing, reference your issue (#1234) and include a note about the fix.
* Push the changes to your fork and submit a pull request on the **master** branch of the FlexSlider repository. Existing maintenance branches will be maintained of by FlexSlider developers.
* Please don't modify the changelog, this will be maintained by FlexSlider developers.
At this point you're waiting on us to merge your pull request. We'll review all pull requests, and make suggestions and changes if necessary.
# Additional Resources
* [General GitHub documentation](http://help.github.com/)
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
* [WooThemes Support](http://support.woothemes.com)
+339
View File
@@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{description}
Copyright (C) {year} {fullname}
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
{signature of Ty Coon}, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
+225
View File
@@ -0,0 +1,225 @@
[![Gitter chat](https://badges.gitter.im/woothemes/FlexSlider.png)](https://gitter.im/woothemes/FlexSlider)
# FlexSlider 2.7.2
http://www.woocommerce.com/flexslider/ - Copyright (c) 2015 WooThemes
## Releases
The `master` branch of this repository is always the latest development version of FlexSlider. Please view the [Releases](https://github.com/woocommerce/FlexSlider/releases) section for a list of official FlexSlider builds.
### Contributing
We encourage contributions to FlexSlider and will review all pull requests submitted.
Before contributing, please see our [Contributing Guide](https://github.com/woocommerce/FlexSlider/blob/master/CONTRIBUTING.md).
### Roadmap
To keep up to date with how FlexSlider's development roadmap looks, please see our [development roadmap](https://github.com/woocommerce/FlexSlider/wiki/Roadmap).
## Updates
** Version 2.7.2 **
** Refactor jQuery HTML output for img attributes.
** Version 2.7.1 **
** RTL fixes for Firefox browser.
** Version 2.7.0 **
** Fixes resize method call for orientationchange. Adds RTL feature - param "rtl" added. **
** Version 2.6.3 **
** Rollback fade fixes, due to harsh fade reports. **
** Version 2.6.2 **
** Minor update to fix issues with varying heights and overflow onto content below the slider. Fixes the visibility of the pagination and the navigation in the "fade" mode. **
** Version 2.6.1 **
** SmoothHeight now uses innerHeight() instead of height() to account for padding in calculation. Defining var altText to prevent error. bower.json add fonts folder on main field. Changed true to false in order to make sure whether or not to allow a slider comprised of a single slide. **
** Version 2.6.0 **
** Adds composer json file, scope fix for focused keyword, fixes bower demo folder exclusion, z-index fix for disabled nav arrow, play/pause accessibility fix, itemMargin fix for slider items, fixes accessibility for in focus elements and pagination controls, firefox fix for text selection on slider carousel, adds data-thumb-alt image alt attribute. **
** Version 2.5.0 **
** Bumped compatibility support starting with jQuery 1.7+. pausePlay icon fix. Firefox touch event fix. Adds customDirectionNav param. **
** Version 2.4.0 **
** Update for improved standards. Adds classes to li nav elements. Reset for li elements in stylesheet. **
** Version 2.3.0 **
** Fixes pauseInvisible attribute issue with Chrome and the Page Visibility API. **
** Version 2.2.2 **
** Fixes minified JavaScript file to remove merge conflicts. **
** Version 2.2.0 **
- Fixed event handler conflicts with devices that are both click and touch enabled. e.g., Windows 8.
- Made all slider variables public, stored in `slider.vars`. This allows manipulation of `slider.vars.minItems` and `slider.vars.maxItems` on the fly to create different fluid grids at certain breakpoints. [Check out this example demonstrating a basic technique](http://flexslider.woothemes.com/dynamic-carousel-min-max.html)
- Fixed calculations that were causing strange issues with paging and certain FlexSliders to move out of alignment.
*Be sure to test v2.2.0 with your current slider, before pushing live, to ensure everything is playing nicely.*
-----
## General Notes
FlexSlider is no longer licensed under the MIT license. FlexSlider now uses the license, GPLv2 and later.
In an effort to move the plugin forward, support for jQuery 1.4.2 has been dropped. The plugin now requires jQuery 1.7.0+. If you don't have access to the later versions of jQuery, [FlexSlider 1.8](https://github.com/woocommerce/FlexSlider/tree/flexslider1) should be a perfectly suitable substitute for your needs!
Your old styles and properties *might not work out of the box*. Some property names have been changed, noted below, as well as namespacing prefixes being applied to all elements. This means that `.flex-direction-nav .next` is now `.flex-direction-nav .flex-next` by default. The namespacing property is exposed, free for you to change.
No more overflow hidden woes! The plugin now generates a viewport element to handle the tedious task of working around overflow hidden. Yay!
The slider element is now accessible outside of the callback API via the jQuery .data() method. Example use: `$('#slider').data('flexslider')`
Helper strings have been added for performing actions quickly on FlexSlider elements. Example uses:
- `$('#slider').flexslider("play") //Play slideshow`
- `$('#slider').flexslider("pause") //Pause slideshow`
- `$('#slider').flexslider("stop") //Stop slideshow`
- `$('#slider').flexslider("next") //Go to next slide`
- `$('#slider').flexslider("prev") //Go to previous slide`
- `$('#slider').flexslider(3) //Go fourth slide`
Two new methods are available for adding/removing slides, `slider.addSlide()` and `slider.removeSlide()`. More details about this coming soon.
- `slider.addSlide(obj, pos)` accepts two parameters, a string/jQuery object and an index.
- `slider.removeSlide(obj)` accepts one parameter, either an object to be removed, or an index.
## Examples
- [Basic Slider](http://flexslider.woothemes.com/)
- [Basic Slider customDirectionNav](http://flexslider.woothemes.com/basic-slider-with-custom-direction-nav.html)
- [Basic Slider with Simple Caption](http://flexslider.woothemes.com/basic-slider-with-caption.html)
- [Slider w/thumbnail controlNav pattern](http://flexslider.woothemes.com/thumbnail-controlnav.html)
- [Slider w/thumbnail slider](http://flexslider.woothemes.com/thumbnail-slider.html)
- [Basic Carousel](http://flexslider.woothemes.com/basic-carousel.html)
- [Carousel with min and max ranges](http://flexslider.woothemes.com/carousel-min-max.html)
- [Carousel with min and max ranges](http://flexslider.woothemes.com/dynamic-carousel-min-max.html)
- [Video with Vimeo API](http://flexslider.woothemes.com/video.html)
- [Video with Wistia API](http://flexslider.woothemes.com/video-wistia.html)
## RTL Examples
- [Basic Slider](http://flexslider.woothemes.com/index-rtl.html)
- [Slider with Simple Caption w/thumbnail slider](http://flexslider.woothemes.com/asnavfor-rtl.html)
- [Basic Slider with Simple Caption](http://flexslider.woothemes.com/basic-carousel-rtl.html)
## Properties
### namespace: *{new}*
`namespace` controls the prefixes attached to elements created by the plugin. In previous releases, only certain elements were tagged with a prefix class, which was causing class generalization issues for some users. FlexSlider now prefixes all generated elements with the appropriate namespace.
*Hint: `namespace` can be an empty string.*
### selector: *{new}*
The markup structure for FlexSlider has been limited to a "ul.slide li" pattern in previous versions of FlexSlider; no longer. You can now take full control of the markup structure used for your FlexSlider. The `selector` pattern "{container} > {slide}" is mandatory, allowing the plugin to predictably interpret the selector property. Omitting the ">" from the selector is not suggested, but is possible if your markup doesn't follow the immediate descendant pattern.
*Examples: "section > article", ".slides > .slide", "#hero .slide"*
### easing: *{new}*
`easing` allows support for jQuery easing! Default options provided by jQuery are "swing" and "linear," but more can be used by included the jQuery Easing plugin. *If you chose a non-existent easing method, the slider will break.*
*Note: You need to set `useCSS: false` to force transitions in browsers that support translate3d.*
*Optional: [jQuery Easing Plugin](http://gsgd.co.uk/sandbox/jquery/easing/)*
### direction: *{changed}*
Previously called "slideDirection" in v1.8 and below.
### reverse: *{new}*
`reverse` will reverse the animation direction of the slider. Meaning, horizontal sliders can move from right to left, and vertical sliders can move bottom to top.
### smoothHeight: *{new}*
`smoothHeight` allows for smooth height transitions between slides. This property currently works for the fade and horizontal slide animation. The property has no effect on horizontal sliding carousels, however.
### startAt: *{changed}*
Previously called "slideToStart" in v1.8 and below.
### animationSpeed: *{changed}*
Previously called "animationDuration" in v1.8 and below.
### initDelay: *{new}*
`initDelay` will delay the initial slideshow of a slider, given in milliseconds. The slider will still initialize, generating controls and displaying the first image, but the slideshow will wait until the `initDelay` time has completed before starting the slideshow.
### useCSS: *{new}*
`useCSS` allow users to override using CSS3 for animation. Translate3d still has numerous bugs that can crop up and wreak havoc, so this is a great property to play with if you are experiencing unexplainable issues in Webkit browsers.
*Hint: Use conditionals to enable/disable the use of CSS3 on desktops and mobile devices. Mobile devices, in my experience, do not share many of the translate3d bugs seen on desktop browsers.*
### touch: *{new}*
`touch` allows users to exclude touch swipe functionality from their sliders.
### keyboard: *{changed}*
Previously called "keyboardNav" in v1.8 and below.
### multipleKeyboard *{new}*
`multipleKeyboard` allows users to override the default plugin keyboard behavior, enabling keyboard control of more than one slider on the page. This means that all visible sliders will animate, at the same time, via keyboard input.
*Hint: You can use `multipleKeyboard` to allow keyboard navigation on pages where multiple sliders are present, but only one is visible.*
### mousewheel: *{updated}*
`mousewheel` now requires the jQuery Mousewheel plugin. There are a few reasons for this, but primarily because there is no need for FlexSlider itself to reinvent the awkward complexity of mousewheel interactivity that is handled perfectly by the Mousewheel plugin.
*Required: [jQuery Mousewheel Plugin](https://github.com/brandonaaron/jquery-mousewheel)*
### controlsContainer: *{updated}*
`controlsContainer` is one of the more painstaking, potentially confusing properties within FlexSlider. First, the property is no longer required to workaround `overflow: hidden` on slide animation. Second, the property now accepts a **jQuery object**, giving you precise control over the object you want. The plugin no longer attempts to guess what element you are selecting.
### customDirectionNav: *{new}*
`customDirectionNav` allows the ability to add custom directional navigation elements. Can be used in conjunction with controlsContainer for pagination controls container.
*[Example of customDirectionNav being used](http://flexslider.woothemes.com/basic-slider-with-custom-direction-nav.html)*
### sync: *{new}*
`sync` is a new property that will allow other slider(s) to hook into the current slider via a given selector. The selector should describe an object that has already been initialized as a FlexSlider. Right now, `sync` will synchronize animation, play, and pause behaviors. More behaviors can be added in the future as the property matures.
*[Example of sync being used](http://flex.madebymufffin.com/examples/basic-carousel.html)*
### asNavFor: *{new}*
Description to be added.
### itemWidth: *{new}*
`itemWidth` is the primary property for the new carousel options. Without this property, your slider is not considered a carousel. To use `itemWidth`, give an integer value of the width of your individual slides. This should include borders and paddings applied to your slides; a total width measurement.
### itemMargin: *{new}*
`itemMargin` describes the gutter between the slide elements. If each slide has a margin-left of 10px, your itemMargin value would be 10. If elements have margin: 0 10px, your itemMargin would be 20.
### minItems: *{new}*
`minItems` describes the minimum number of slide elements that should be visible in the carousel. When the slider reaches the minimum item count, the slides will resize fluidly with the slider.
### maxItems: *{new}*
`maxItems` describes the maximum number of slide elements that should be visible in the carousel. When the slider reaches the maximum item count, the slides will resize fluidly with the sider.
### move: *{new}*
`move` determines how many slides should be animated within the carousel. When left at 0, the slider will animate the number of visible slides. If any value greater than 0 is given, the slider will animate that number of slides in the carousel on each animation interval.
*Hint: The move property will be ignored if the value is higher than the number of visible slides, which can be utilized in responsive design.*
### added: *{new}*
`added()` is a new callback event fired in the new slider.addSlide() function.
### removed: *{new}*
`removed()` is a new callback event fired in the new slider.removeSlide() function.
### allowOneSlide: *{new}*
Boolean. Whether or not you'd like FlexSlider to initialize as usual if only one slide is present.
### rtl: *{new}*
Boolean. False by default. Supports RTL functionality in the slider.
*Note: you must add `style="direction:rtl"` to your container div in order for this to work.*
### isFirefox: *{new}*
Boolean. False by default. Set to true if the Firefox browser is in use.
*Note: used for RTL compatibility logic.*
+32
View File
@@ -0,0 +1,32 @@
{
"name": "flexslider",
"version": "2.7.2",
"homepage": "https://github.com/woocommerce/FlexSlider",
"authors": [
"Automattic <jeff@woothemes.com>"
],
"description": "An awesome, fully responsive jQuery slider toolkit.",
"main": [
"jquery.flexslider.js",
"flexslider.css"
],
"keywords": [
"flexslider",
"jquery",
"slider",
"woothemes",
"automattic"
],
"license": "GPLv2 and later",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests",
"demo"
],
"dependencies": {
"jquery": ">=1.11.3"
}
}
+55
View File
@@ -0,0 +1,55 @@
FLEXSLIDER CHANGELOG
2013.02.15 - Version 2.0
* Added changelog.txt
2014.05.7 - Version 2.2.2
* Added flexslider.less
2015.02.11 - Version 2.3.0
* Fix for pauseInvisible attribute for Chrome and the Page Visibility API
2015.02.27 - Version 2.4.0
* Update for improved standards. Adds classes to li nav elements. Reset for li elements in stylesheet.
2015.05.19 - Version 2.5.0
* CSS fix for pausePlay play icon.
* Firefox touchstart event fix.
* Compatibility change for jQuery to 1.7.0+
* Adds customDirectionNav param for custom navigation controls
2015.11.16 - Version 2.6.0
* Adds composer json file keywords
* Scope fix for focused keyword
* Fixes bower demo folder exclusion
* z-index fix for disabled nav arrow
* play/pause accessibility fix
* itemMargin fix for slider items margins
* Fixes accessibility for in focus elements and pagination controls
* Firefox fix for text selection on slider carousel
* Adds data-thumb-alt image alt attribute
2016.05.12 - Version 2.6.1
* smoothHeight now uses innerHeight() instead of height() to account for padding in calculation.
* Defining var altText to prevent error.
* bower.json add fonts folder on main field.
* Changed `true` to `false` in order to make sure whether or not to allow a slider comprised of a single slide.
2016.08.18 - Version 2.6.2
* Fixes overflow issue with varying height images.
* Fixes the visibility of the pagination and the navigation in the "fade" mode.
2016.09.06 - Version 2.6.3
* Rollback fade fixes, due to harsh fade reports.
2018.02.01 - Version 2.7.0
* Fixes resize method call for orientationchange.
* Adds RTL feature - param "rtl" added.
* Adds RTL demo's.
2018.06.15 - Version 2.7.1
* Firefox RTL fixes.
* Adds "isFirefox" param.
2019.03.07 - Version 2.7.2
* Refactor jQuery HTML output for img attributes.
+6
View File
@@ -0,0 +1,6 @@
{
"name": "woocommerce/FlexSlider",
"description": "An awesome, fully responsive jQuery slider toolkit.",
"keywords": ["flexslider","slider","jquery","woocommerce","automattic"],
"homepage": "https://github.com/woocommerce/FlexSlider"
}
+77
View File
@@ -0,0 +1,77 @@
/* ====================================================================================================================
* BASE STYLES
* ====================================================================================================================*/
.flexslider {
margin: 0;
padding: 0;
.slides {
> li {
display: none;
-webkit-backface-visibility: hidden;
}
img{
width: 100%;
display: block;
}
//
// Clearfix for the .slides element
//
&:after{
content: "\0020";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
html[xmlns] &{
display: block;
}
* html &{
height: 1%;
}
//
// No JavaScript Fallback
// If you are not using another script, such as Modernizr, make sure you
// include js that eliminates this class on page load
//
.no-js &{
> li{
&:first-child{
display: block;
}
}
}
}
}
+17
View File
@@ -0,0 +1,17 @@
/* ====================================================================================================================
* FONT-FACE
* ====================================================================================================================*/
@font-face {
font-family: '@{font-name}';
src:url('@{font-path}/@{font-file-name}.eot');
src:url('@{font-path}/@{font-file-name}.eot?#iefix') format('embedded-opentype'),
url('@{font-path}/@{font-file-name}.woff') format('woff'),
url('@{font-path}/@{font-file-name}.ttf') format('truetype'),
url('@{font-path}/@{font-file-name}.svg#flexslider-icon') format('svg');
font-weight: normal;
font-style: normal;
}
+40
View File
@@ -0,0 +1,40 @@
//
// Transition
//
.transition( @duration: @default-duration, @easing: @default-easing ) {
-webkit-transition: all @duration @easing;
-moz-transition: all @duration @easing;
-ms-transition: all @duration @easing;
-o-transition: all @duration @easing;
transition: all @duration @easing;
}
//
// Border-radius
//
.border-radius( @radius: @default-border-radius ){
-webkit-border-radius: @arguments;
-moz-border-radius: @arguments;
border-radius: @arguments;
}
//
// Box-shadow
//
.box-shadow( @x-axis: @default-box-shadow-x-axis, @y-axis: @default-box-shadow-y-axis, @blur: @default-box-shadow-blur, @color: @default-box-shadow-color, @inset: @default-box-shadow-inset ) {
-webkit-box-shadow: @inset @x-axis @y-axis @blur @color;
-moz-box-shadow: @inset @x-axis @y-axis @blur @color;
-o-box-shadow: @inset @x-axis @y-axis @blur @color;
box-shadow: @inset @x-axis @y-axis @blur @color;
}
+32
View File
@@ -0,0 +1,32 @@
/* ====================================================================================================================
* RESETS
* ====================================================================================================================*/
.flex-container,
.flex-slider {
a:hover {
outline: none;
}
}
.slides,
.slides > li,
.flex-control-nav,
.flex-direction-nav {
margin: 0;
padding: 0;
list-style: none;
}
.flex-pauseplay span {
text-transform: capitalize;
}
@@ -0,0 +1,23 @@
/* ====================================================================================================================
* RESPONSIVE
* ====================================================================================================================*/
@media screen and ( max-width: 860px ) {
.flex-direction-nav {
.flex-prev {
opacity: 1;
left: 10px;
}
.flex-next {
opacity: 1;
right: 10px;
}
}
}
+317
View File
@@ -0,0 +1,317 @@
/* ====================================================================================================================
* DEFAULT THEME
* ====================================================================================================================*/
.flexslider {
margin: @flexslider-margin;
background: @flexslider-bg;
border: @flexslider-border;
position: relative;
zoom: 1;
.border-radius( @flexslider-border-radius );
.box-shadow( @flexslider-box-shadow-x-axis, @flexslider-box-shadow-y-axis, @flexslider-box-shadow-blur, @flexslider-box-shadow-color, @flexslider-box-shadow-inset);
.slides {
zoom: 1;
img {
height: auto;
-moz-user-select: none;
}
}
}
.flex-viewport {
max-height: @flex-viewport-max-height;
.transition();
.loading &{
max-height: @flex-viewport-loading-max-height;
}
}
@-moz-document url-prefix() {
.loading {
.flex-viewport {
max-height: none;
}
}
}
.carousel li {
margin-right: 5px;
}
//
// Direction Nav
//
.flex-direction-nav {
*height: 0;
//
// Global styles
//
a {
text-decoration: none;
display: block;
width: 40px;
height: 40px;
margin: -20px 0 0;
position: absolute;
top: 50%;
z-index: 10;
overflow: hidden;
opacity: 0;
cursor: pointer;
color: @flex-direction-nav-color;
text-shadow: @flex-direction-nav-text-shadow;
.transition( 0.3s, ease-in-out );
&:before {
font-family: "@{font-name}";
font-size: 40px;
display: inline-block;
content: @flex-direction-nav-icon-prev;
color: @flex-direction-nav-icon-color;
text-shadow: @flex-direction-nav-icon-text-shadow;
}
&.flex-next:before {
content: @flex-direction-nav-icon-next;
}
}
//
// Prev
//
.flex-prev {
left: -50px;
}
//
// Next
//
.flex-next {
right: -50px;
text-align: right;
}
//
// Hover states
//
.flexslider:hover &{
.flex-prev {
opacity: 0.7;
left: 10px;
&:hover{
opacity: 1;
}
}
.flex-next {
opacity: 0.7;
right: 10px;
&:hover{
opacity: 1;
}
}
}
//
// Disabled
//
.flex-disabled {
opacity: 0!important;
filter: alpha(opacity=0);
cursor: default;
z-index: -1;
}
}
//
// Pause/Play
//
.flex-pauseplay a {
display: block;
width: 20px;
height: 20px;
position: absolute;
bottom: 5px;
left: 10px;
opacity: 0.8;
z-index: 10;
overflow: hidden;
cursor: pointer;
color: #000;
&:before {
font-family: "@{font-name}";
font-size: 20px;
display: inline-block;
content: @flex-pauseplay-icon-pause;
}
&:hover {
opacity: 1;
}
&.flex-play:before {
content: @flex-pauseplay-icon-play;
}
}
//
// Control Nav
//
.flex-control-nav {
width: 100%;
position: absolute;
bottom: -40px;
text-align: center;
li {
margin: 0 6px;
display: inline-block;
zoom: 1;
*display: inline;
}
}
//
// Control paging
//
.flex-control-paging li {
a {
width: 11px;
height: 11px;
display: block;
background: #666;
background: rgba(0,0,0,0.5);
cursor: pointer;
text-indent: -9999px;
.box-shadow( 0, 0, 3px, rgba(0,0,0,0.3), inset );
.border-radius( 20px );
&:hover {
background: #333;
background: rgba(0,0,0,0.7);
}
&.flex-active {
background: #000;
background: rgba( 0, 0, 0, 0.9 );
cursor: default;
}
}
}
.flex-control-thumbs {
margin: @flex-control-thumbs;
position: static;
overflow: hidden;
li {
width: 25%;
float: left;
margin: 0;
}
img {
width: 100%;
height: auto;
display: block;
opacity: .7;
cursor: pointer;
-moz-user-select: none;
.transition();
&:hover {opacity: 1;}
}
.flex-active {
opacity: 1;
cursor: default;
}
}
@@ -0,0 +1,31 @@
@font-path: "fonts";
@font-name: "flexslider-icon";
@font-file-name: "flexslider-icon";
@default-duration: 1s;
@default-easing: ease;
@default-border-radius: 5px;
@default-box-shadow-x-axis: 0;
@default-box-shadow-y-axis: 1px;
@default-box-shadow-blur: 2px;
@default-box-shadow-color: rgba( 0, 0, 0, 0.2 );
@default-box-shadow-inset: '';
@flexslider-margin: 0 0 60px;
@flexslider-bg: #fff;
@flexslider-border: 4px solid #fff;
@flexslider-border-radius: 4px;
@flexslider-box-shadow-x-axis: 0;
@flexslider-box-shadow-y-axis: 1px;
@flexslider-box-shadow-blur: 4px;
@flexslider-box-shadow-color: rgba( 0, 0, 0, 0.2 );
@flexslider-box-shadow-inset: '';
@flex-viewport-max-height: 2000px;
@flex-viewport-loading-max-height: 300px;
@flex-control-thumbs: 5px 0 0;
@flex-direction-nav-color: rgba(0,0,0,0.8);
@flex-direction-nav-text-shadow: 1px 1px 0 rgba( 255, 255, 255, 0.3 );
@flex-direction-nav-icon-color: rgba(0,0,0,0.8);
@flex-direction-nav-icon-text-shadow: 1px 1px 0 rgba( 255, 255, 255, 0.3 );
@flex-direction-nav-icon-prev: '\f001';
@flex-direction-nav-icon-next: '\f002';
@flex-pauseplay-icon-play: '\f003';
@flex-pauseplay-icon-pause: '\f004';
+11
View File
@@ -0,0 +1,11 @@
/*
* jQuery FlexSlider v2.7.2
* https://www.woocommerce.com/flexslider/
*
* Copyright 2012 WooThemes
* Free to use under the GPLv2 and later license.
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Contributing author: Tyler Smith (@mbmufffin)
*
*/.flexslider{direction:rtl}.carousel li{margin-right:5px}.flex-direction-nav{*height:0}.flex-direction-nav a:before{content:'\f002'}.flex-direction-nav a.flex-next:before{content:'\f001'}.flex-direction-nav .flex-prev{left:auto;right:-50px}.flex-direction-nav .flex-next{right:auto;left:-50px;text-align:left}.flexslider:hover .flex-direction-nav .flex-prev{opacity:0.7;left:auto;right:10px}.flexslider:hover .flex-direction-nav .flex-next{opacity:0.7;right:auto;left:10px}.flex-pauseplay a{left:auto;right:10px}@media screen and (max-width: 860px){.flex-direction-nav .flex-prev{left:auto;right:10px}.flex-direction-nav .flex-next{right:auto;left:10px}}
@@ -0,0 +1,75 @@
/*
* jQuery FlexSlider v2.7.2
* https://www.woocommerce.com/flexslider/
*
* Copyright 2012 WooThemes
* Free to use under the GPLv2 and later license.
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Contributing author: Tyler Smith (@mbmufffin)
*
*/
/* ====================================================================================================================
* FONT-FACE
* ====================================================================================================================*/
/* ====================================================================================================================
* RESETS
* ====================================================================================================================*/
/* ====================================================================================================================
* BASE STYLES
* ====================================================================================================================*/
.flexslider {
direction:rtl;
}
/* ====================================================================================================================
* DEFAULT THEME
* ====================================================================================================================*/
.carousel li {
margin-right: 5px;
}
.flex-direction-nav {
*height: 0;
}
.flex-direction-nav a:before {
content: '\f002';
}
.flex-direction-nav a.flex-next:before {
content: '\f001';
}
.flex-direction-nav .flex-prev {
left: auto; right: -50px;
}
.flex-direction-nav .flex-next {
right: auto; left: -50px;
text-align: left;
}
.flexslider:hover .flex-direction-nav .flex-prev {
opacity: 0.7;
left: auto; right: 10px;
}
.flexslider:hover .flex-direction-nav .flex-next {
opacity: 0.7;
right: auto; left: 10px;
}
.flex-pauseplay a {
left: auto; right: 10px;
}
/* ====================================================================================================================
* RESPONSIVE
* ====================================================================================================================*/
@media screen and (max-width: 860px) {
.flex-direction-nav .flex-prev {
left: auto; right: 10px;
}
.flex-direction-nav .flex-next {
right: auto; left: 10px;
}
}
+280
View File
@@ -0,0 +1,280 @@
/*
* jQuery FlexSlider v2.7.2
* https://www.woocommerce.com/flexslider/
*
* Copyright 2012 WooThemes
* Free to use under the GPLv2 and later license.
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Contributing author: Tyler Smith (@mbmufffin)
*
*/
/* ====================================================================================================================
* FONT-FACE
* ====================================================================================================================*/
@font-face {
font-family: 'flexslider-icon';
src: url('fonts/flexslider-icon.eot');
src: url('fonts/flexslider-icon.eot?#iefix') format('embedded-opentype'), url('fonts/flexslider-icon.woff') format('woff'), url('fonts/flexslider-icon.ttf') format('truetype'), url('fonts/flexslider-icon.svg#flexslider-icon') format('svg');
font-weight: normal;
font-style: normal;
}
/* ====================================================================================================================
* RESETS
* ====================================================================================================================*/
.flex-container a:hover,
.flex-slider a:hover {
outline: none;
}
.slides,
.slides > li,
.flex-control-nav,
.flex-direction-nav {
margin: 0;
padding: 0;
list-style: none;
}
.flex-pauseplay span {
text-transform: capitalize;
}
/* ====================================================================================================================
* BASE STYLES
* ====================================================================================================================*/
.flexslider {
margin: 0;
padding: 0;
}
.flexslider .slides > li {
display: none;
-webkit-backface-visibility: hidden;
}
.flexslider .slides img {
width: 100%;
display: block;
}
.flexslider .slides:after {
content: "\0020";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
html[xmlns] .flexslider .slides {
display: block;
}
* html .flexslider .slides {
height: 1%;
}
.no-js .flexslider .slides > li:first-child {
display: block;
}
/* ====================================================================================================================
* DEFAULT THEME
* ====================================================================================================================*/
.flexslider {
margin: 0 0 60px;
background: #fff;
border: 4px solid #fff;
position: relative;
zoom: 1;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-webkit-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2);
-moz-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2);
-o-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2);
box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2);
}
.flexslider .slides {
zoom: 1;
}
.flexslider .slides img {
height: auto;
-moz-user-select: none;
}
.flex-viewport {
max-height: 2000px;
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-ms-transition: all 1s ease;
-o-transition: all 1s ease;
transition: all 1s ease;
}
.loading .flex-viewport {
max-height: 300px;
}
@-moz-document url-prefix() {
.loading .flex-viewport {
max-height: none;
}
}
.carousel li {
margin-right: 5px;
}
.flex-direction-nav {
*height: 0;
}
.flex-direction-nav a {
text-decoration: none;
display: block;
width: 40px;
height: 40px;
margin: -20px 0 0;
position: absolute;
top: 50%;
z-index: 10;
overflow: hidden;
opacity: 0;
cursor: pointer;
color: rgba(0, 0, 0, 0.8);
text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-ms-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
.flex-direction-nav a:before {
font-family: "flexslider-icon";
font-size: 40px;
display: inline-block;
content: '\f001';
color: rgba(0, 0, 0, 0.8);
text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);
}
.flex-direction-nav a.flex-next:before {
content: '\f002';
}
.flex-direction-nav .flex-prev {
left: -50px;
}
.flex-direction-nav .flex-next {
right: -50px;
text-align: right;
}
.flexslider:hover .flex-direction-nav .flex-prev {
opacity: 0.7;
left: 10px;
}
.flexslider:hover .flex-direction-nav .flex-prev:hover {
opacity: 1;
}
.flexslider:hover .flex-direction-nav .flex-next {
opacity: 0.7;
right: 10px;
}
.flexslider:hover .flex-direction-nav .flex-next:hover {
opacity: 1;
}
.flex-direction-nav .flex-disabled {
opacity: 0!important;
filter: alpha(opacity=0);
cursor: default;
z-index: -1;
}
.flex-pauseplay a {
display: block;
width: 20px;
height: 20px;
position: absolute;
bottom: 5px;
left: 10px;
opacity: 0.8;
z-index: 10;
overflow: hidden;
cursor: pointer;
color: #000;
}
.flex-pauseplay a:before {
font-family: "flexslider-icon";
font-size: 20px;
display: inline-block;
content: '\f004';
}
.flex-pauseplay a:hover {
opacity: 1;
}
.flex-pauseplay a.flex-play:before {
content: '\f003';
}
.flex-control-nav {
width: 100%;
position: absolute;
bottom: -40px;
text-align: center;
}
.flex-control-nav li {
margin: 0 6px;
display: inline-block;
zoom: 1;
*display: inline;
}
.flex-control-paging li a {
width: 11px;
height: 11px;
display: block;
background: #666;
background: rgba(0, 0, 0, 0.5);
cursor: pointer;
text-indent: -9999px;
-webkit-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3);
-moz-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3);
-o-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3);
box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3);
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
}
.flex-control-paging li a:hover {
background: #333;
background: rgba(0, 0, 0, 0.7);
}
.flex-control-paging li a.flex-active {
background: #000;
background: rgba(0, 0, 0, 0.9);
cursor: default;
}
.flex-control-thumbs {
margin: 5px 0 0;
position: static;
overflow: hidden;
}
.flex-control-thumbs li {
width: 25%;
float: left;
margin: 0;
}
.flex-control-thumbs img {
width: 100%;
height: auto;
display: block;
opacity: .7;
cursor: pointer;
-moz-user-select: none;
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-ms-transition: all 1s ease;
-o-transition: all 1s ease;
transition: all 1s ease;
}
.flex-control-thumbs img:hover {
opacity: 1;
}
.flex-control-thumbs .flex-active {
opacity: 1;
cursor: default;
}
/* ====================================================================================================================
* RESPONSIVE
* ====================================================================================================================*/
@media screen and (max-width: 860px) {
.flex-direction-nav .flex-prev {
opacity: 1;
left: 10px;
}
.flex-direction-nav .flex-next {
opacity: 1;
right: 10px;
}
}
+18
View File
@@ -0,0 +1,18 @@
/*
* jQuery FlexSlider v2.7.2
* https://www.woocommerce.com/flexslider/
*
* Copyright 2012 WooThemes
* Free to use under the GPLv2 and later license.
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Contributing author: Tyler Smith (@mbmufffin)
*
*/
@import "css/variables.less";
@import "css/mixins.less";
@import "css/font.less";
@import "css/resets.less";
@import "css/base.less";
@import "css/theme.less";
@import "css/responsive.less";
Binary file not shown.
@@ -0,0 +1,19 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
This is a custom SVG font generated by IcoMoon.
<iconset grid="14"></iconset>
</metadata>
<defs>
<font id="flexslider-icon" horiz-adv-x="448" >
<font-face units-per-em="448" ascent="384" descent="-64" />
<missing-glyph horiz-adv-x="448" />
<glyph unicode="&#xf001;" d="M 185.50-9.25l-163.00,162.75q-9.25,9.25 -9.25,22.625t 9.25,22.625l 163.00,162.75q 9.25,9.25 22.625,9.25t 22.625-9.25l 18.75-18.75q 9.25-9.25 9.25-22.625t-9.25-22.625l-121.50-121.50l 121.50-121.25q 9.25-9.50 9.25-22.75t-9.25-22.50l-18.75-18.75q-9.25-9.25 -22.625-9.25t-22.625,9.25z" horiz-adv-x="288" />
<glyph unicode="&#xf002;" d="M 274.75,176.00q0.00-13.00 -9.25-22.75l-163.00-162.75q-9.25-9.25 -22.50-9.25t-22.50,9.25l-19.00,18.75q-9.25,9.75 -9.25,22.75q0.00,13.25 9.25,22.50l 121.50,121.50l-121.50,121.25q-9.25,9.75 -9.25,22.75q0.00,13.25 9.25,22.50l 19.00,18.75q 9.00,9.50 22.50,9.50t 22.50-9.50l 163.00-162.75q 9.25-9.25 9.25-22.50z" horiz-adv-x="288" />
<glyph unicode="&#xf003;" d="M 346.00,152.25l-332.00-184.50q-5.75-3.25 -9.875-0.75t-4.125,9.00l0.00,368.00 q0.00,6.50 4.125,9.00t 9.875-0.75l 332.00-184.50q 5.75-3.25 5.75-7.75t-5.75-7.75z" horiz-adv-x="352" />
<glyph unicode="&#xf004;" d="M 384.00,336.00l0.00-352.00 q0.00-6.50 -4.75-11.25t-11.25-4.75l-128.00,0.00 q-6.50,0.00 -11.25,4.75t-4.75,11.25l0.00,352.00 q0.00,6.50 4.75,11.25t 11.25,4.75l 128.00,0.00 q 6.50,0.00 11.25-4.75t 4.75-11.25zM 160.00,336.00l0.00-352.00 q0.00-6.50 -4.75-11.25t-11.25-4.75l-128.00,0.00 q-6.50,0.00 -11.25,4.75t-4.75,11.25l0.00,352.00 q0.00,6.50 4.75,11.25t 11.25,4.75l 128.00,0.00 q 6.50,0.00 11.25-4.75t 4.75-11.25z" horiz-adv-x="384" />
<glyph unicode="&#xf005;" d="M 402.75,208.00q0.00-13.25 -9.25-22.50l-162.75-162.75q-9.50-9.50 -22.75-9.50q-13.50,0.00 -22.50,9.50l-162.75,162.75q-9.50,9.00 -9.50,22.50q0.00,13.25 9.50,22.75l 18.50,18.75q 9.75,9.25 22.75,9.25q 13.25,0.00 22.50-9.25l 121.50-121.50l 121.50,121.50q 9.25,9.25 22.50,9.25q 13.00,0.00 22.75-9.25l 18.75-18.75q 9.25-9.75 9.25-22.75z" horiz-adv-x="416" />
<glyph unicode="&#x20;" horiz-adv-x="224" />
<glyph class="hidden" unicode="&#xf000;" d="M0,384L 448 -64L0 -64 z" horiz-adv-x="0" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+29
View File
@@ -0,0 +1,29 @@
{
"name": "flexslider",
"version": "2.7.2",
"description": "An awesome, fully responsive jQuery slider toolkit.",
"main": "jquery.flexslider.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/woothemes/FlexSlider.git"
},
"keywords": [
"flexslider",
"jquery",
"slider",
"woocommerce",
"automattic"
],
"author": "Automattic <jeff@woothemes.com>",
"license": "GPL-2.0",
"bugs": {
"url": "https://github.com/woocommerce/FlexSlider/issues"
},
"homepage": "https://github.com/woocommerce/FlexSlider#readme",
"dependencies": {
"jquery": ">=1.11.3"
}
}
@@ -0,0 +1,238 @@
/*!
* jQuery Mousewheel 3.1.13
* Copyright OpenJS Foundation and other contributors
*/
( function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define( [ "jquery" ], factory );
} else if ( typeof exports === "object" ) {
// Node/CommonJS style for Browserify
module.exports = factory;
} else {
// Browser globals
factory( jQuery );
}
} )( function( $ ) {
var toFix = [ "wheel", "mousewheel", "DOMMouseScroll", "MozMousePixelScroll" ],
toBind = ( "onwheel" in window.document || window.document.documentMode >= 9 ) ?
[ "wheel" ] : [ "mousewheel", "DomMouseScroll", "MozMousePixelScroll" ],
slice = Array.prototype.slice,
nullLowestDeltaTimeout, lowestDelta;
if ( $.event.fixHooks ) {
for ( var i = toFix.length; i; ) {
$.event.fixHooks[ toFix[ --i ] ] = $.event.mouseHooks;
}
}
var special = $.event.special.mousewheel = {
version: "3.1.12",
setup: function() {
if ( this.addEventListener ) {
for ( var i = toBind.length; i; ) {
this.addEventListener( toBind[ --i ], handler, false );
}
} else {
this.onmousewheel = handler;
}
// Store the line height and page height for this particular element
$.data( this, "mousewheel-line-height", special.getLineHeight( this ) );
$.data( this, "mousewheel-page-height", special.getPageHeight( this ) );
},
teardown: function() {
if ( this.removeEventListener ) {
for ( var i = toBind.length; i; ) {
this.removeEventListener( toBind[ --i ], handler, false );
}
} else {
this.onmousewheel = null;
}
// Clean up the data we added to the element
$.removeData( this, "mousewheel-line-height" );
$.removeData( this, "mousewheel-page-height" );
},
getLineHeight: function( elem ) {
var $elem = $( elem ),
$parent = $elem[ "offsetParent" in $.fn ? "offsetParent" : "parent" ]();
if ( !$parent.length ) {
$parent = $( "body" );
}
return parseInt( $parent.css( "fontSize" ), 10 ) ||
parseInt( $elem.css( "fontSize" ), 10 ) || 16;
},
getPageHeight: function( elem ) {
return $( elem ).height();
},
settings: {
adjustOldDeltas: true, // see shouldAdjustOldDeltas() below
normalizeOffset: true // calls getBoundingClientRect for each event
}
};
$.fn.extend( {
mousewheel: function( fn ) {
return fn ? this.on( "mousewheel", fn ) : this.trigger( "mousewheel" );
},
unmousewheel: function( fn ) {
return this.off( "mousewheel", fn );
}
} );
function handler( event ) {
var orgEvent = event || window.event,
args = slice.call( arguments, 1 ),
delta = 0,
deltaX = 0,
deltaY = 0,
absDelta = 0;
event = $.event.fix( orgEvent );
event.type = "mousewheel";
// Old school scrollwheel delta
if ( "detail" in orgEvent ) {
deltaY = orgEvent.detail * -1;
}
if ( "wheelDelta" in orgEvent ) {
deltaY = orgEvent.wheelDelta;
}
if ( "wheelDeltaY" in orgEvent ) {
deltaY = orgEvent.wheelDeltaY;
}
if ( "wheelDeltaX" in orgEvent ) {
deltaX = orgEvent.wheelDeltaX * -1;
}
// Firefox < 17 horizontal scrolling related to DOMMouseScroll event
if ( "axis" in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
deltaX = deltaY * -1;
deltaY = 0;
}
// Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
delta = deltaY === 0 ? deltaX : deltaY;
// New school wheel delta (wheel event)
if ( "deltaY" in orgEvent ) {
deltaY = orgEvent.deltaY * -1;
delta = deltaY;
}
if ( "deltaX" in orgEvent ) {
deltaX = orgEvent.deltaX;
if ( deltaY === 0 ) {
delta = deltaX * -1;
}
}
// No change actually happened, no reason to go any further
if ( deltaY === 0 && deltaX === 0 ) {
return;
}
// Need to convert lines and pages to pixels if we aren't already in pixels
// There are three delta modes:
// * deltaMode 0 is by pixels, nothing to do
// * deltaMode 1 is by lines
// * deltaMode 2 is by pages
if ( orgEvent.deltaMode === 1 ) {
var lineHeight = $.data( this, "mousewheel-line-height" );
delta *= lineHeight;
deltaY *= lineHeight;
deltaX *= lineHeight;
} else if ( orgEvent.deltaMode === 2 ) {
var pageHeight = $.data( this, "mousewheel-page-height" );
delta *= pageHeight;
deltaY *= pageHeight;
deltaX *= pageHeight;
}
// Store lowest absolute delta to normalize the delta values
absDelta = Math.max( Math.abs( deltaY ), Math.abs( deltaX ) );
if ( !lowestDelta || absDelta < lowestDelta ) {
lowestDelta = absDelta;
// Adjust older deltas if necessary
if ( shouldAdjustOldDeltas( orgEvent, absDelta ) ) {
lowestDelta /= 40;
}
}
// Adjust older deltas if necessary
if ( shouldAdjustOldDeltas( orgEvent, absDelta ) ) {
// Divide all the things by 40!
delta /= 40;
deltaX /= 40;
deltaY /= 40;
}
// Get a whole, normalized value for the deltas
delta = Math[ delta >= 1 ? "floor" : "ceil" ]( delta / lowestDelta );
deltaX = Math[ deltaX >= 1 ? "floor" : "ceil" ]( deltaX / lowestDelta );
deltaY = Math[ deltaY >= 1 ? "floor" : "ceil" ]( deltaY / lowestDelta );
// Normalise offsetX and offsetY properties
if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {
var boundingRect = this.getBoundingClientRect();
event.offsetX = event.clientX - boundingRect.left;
event.offsetY = event.clientY - boundingRect.top;
}
// Add information to the event object
event.deltaX = deltaX;
event.deltaY = deltaY;
event.deltaFactor = lowestDelta;
// Go ahead and set deltaMode to 0 since we converted to pixels
// Although this is a little odd since we overwrite the deltaX/Y
// properties with normalized deltas.
event.deltaMode = 0;
// Add event and delta to the front of the arguments
args.unshift( event, delta, deltaX, deltaY );
// Clearout lowestDelta after sometime to better
// handle multiple device types that give different
// a different lowestDelta
// Ex: trackpad = 3 and mouse wheel = 120
if ( nullLowestDeltaTimeout ) {
window.clearTimeout( nullLowestDeltaTimeout );
}
nullLowestDeltaTimeout = window.setTimeout( nullLowestDelta, 200 );
return ( $.event.dispatch || $.event.handle ).apply( this, args );
}
function nullLowestDelta() {
lowestDelta = null;
}
function shouldAdjustOldDeltas( orgEvent, absDelta ) {
// If this is an older event and the delta is divisable by 120,
// then we are assuming that the browser is treating this as an
// older mouse wheel event and that we should divide the deltas
// by 40 to try and get a more usable deltaFactor.
// Side note, this actually impacts the reported scroll distance
// in older browsers and can cause scrolling to be slower than native.
// Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
return special.settings.adjustOldDeltas && orgEvent.type === "mousewheel" &&
absDelta % 120 === 0;
}
} );
+1
View File
@@ -0,0 +1 @@
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(h){var a,u,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],t="onwheel"in window.document||9<=window.document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],r=Array.prototype.slice;if(h.event.fixHooks)for(var n=e.length;n;)h.event.fixHooks[e[--n]]=h.event.mouseHooks;var f=h.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=t.length;e;)this.addEventListener(t[--e],i,!1);else this.onmousewheel=i;h.data(this,"mousewheel-line-height",f.getLineHeight(this)),h.data(this,"mousewheel-page-height",f.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=t.length;e;)this.removeEventListener(t[--e],i,!1);else this.onmousewheel=null;h.removeData(this,"mousewheel-line-height"),h.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var e=h(e),t=e["offsetParent"in h.fn?"offsetParent":"parent"]();return t.length||(t=h("body")),parseInt(t.css("fontSize"),10)||parseInt(e.css("fontSize"),10)||16},getPageHeight:function(e){return h(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function i(e){var t,n=e||window.event,i=r.call(arguments,1),o=0,l=0,s=0;if((e=h.event.fix(n)).type="mousewheel","detail"in n&&(s=-1*n.detail),"wheelDelta"in n&&(s=n.wheelDelta),"wheelDeltaY"in n&&(s=n.wheelDeltaY),"wheelDeltaX"in n&&(l=-1*n.wheelDeltaX),"axis"in n&&n.axis===n.HORIZONTAL_AXIS&&(l=-1*s,s=0),o=0===s?l:s,"deltaY"in n&&(o=s=-1*n.deltaY),"deltaX"in n&&(l=n.deltaX,0===s)&&(o=-1*l),0!==s||0!==l)return 1===n.deltaMode?(o*=t=h.data(this,"mousewheel-line-height"),s*=t,l*=t):2===n.deltaMode&&(o*=t=h.data(this,"mousewheel-page-height"),s*=t,l*=t),t=Math.max(Math.abs(s),Math.abs(l)),(!u||t<u)&&w(n,u=t)&&(u/=40),w(n,t)&&(o/=40,l/=40,s/=40),o=Math[1<=o?"floor":"ceil"](o/u),l=Math[1<=l?"floor":"ceil"](l/u),s=Math[1<=s?"floor":"ceil"](s/u),f.settings.normalizeOffset&&this.getBoundingClientRect&&(n=this.getBoundingClientRect(),e.offsetX=e.clientX-n.left,e.offsetY=e.clientY-n.top),e.deltaX=l,e.deltaY=s,e.deltaFactor=u,e.deltaMode=0,i.unshift(e,o,l,s),a&&window.clearTimeout(a),a=window.setTimeout(d,200),(h.event.dispatch||h.event.handle).apply(this,i)}function d(){u=null}function w(e,t){return f.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}h.fn.extend({mousewheel:function(e){return e?this.on("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.off("mousewheel",e)}})});
@@ -1,228 +0,0 @@
/** @module jqueryMousewheel */
__PluginManager__.register('jqueryMousewheel', function(require, exports, module, global){
var jQuery = require('jQuery');
/*!
* jQuery Mousewheel 3.1.13
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*/
(function (factory) {
if ( typeof define === 'function' && define.amd ) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else if (typeof exports === 'object') {
// Node/CommonJS style for Browserify
module.exports = factory;
} else {
// Browser globals
factory(jQuery);
}
}(function ($) {
var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'],
toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ?
['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],
slice = Array.prototype.slice,
nullLowestDeltaTimeout, lowestDelta;
if ( $.event.fixHooks ) {
for ( var i = toFix.length; i; ) {
$.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;
}
}
var special = $.event.special.mousewheel = {
version: '3.1.12',
setup: function() {
if ( this.addEventListener ) {
for ( var i = toBind.length; i; ) {
this.addEventListener( toBind[--i], handler, false );
}
} else {
this.onmousewheel = handler;
}
// Store the line height and page height for this particular element
$.data(this, 'mousewheel-line-height', special.getLineHeight(this));
$.data(this, 'mousewheel-page-height', special.getPageHeight(this));
},
teardown: function() {
if ( this.removeEventListener ) {
for ( var i = toBind.length; i; ) {
this.removeEventListener( toBind[--i], handler, false );
}
} else {
this.onmousewheel = null;
}
// Clean up the data we added to the element
$.removeData(this, 'mousewheel-line-height');
$.removeData(this, 'mousewheel-page-height');
},
getLineHeight: function(elem) {
var $elem = $(elem),
$parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent']();
if (!$parent.length) {
$parent = $('body');
}
return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16;
},
getPageHeight: function(elem) {
return $(elem).height();
},
settings: {
adjustOldDeltas: true, // see shouldAdjustOldDeltas() below
normalizeOffset: true // calls getBoundingClientRect for each event
}
};
$.fn.extend({
mousewheel: function(fn) {
return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');
},
unmousewheel: function(fn) {
return this.unbind('mousewheel', fn);
}
});
function handler(event) {
var orgEvent = event || window.event,
args = slice.call(arguments, 1),
delta = 0,
deltaX = 0,
deltaY = 0,
absDelta = 0,
offsetX = 0,
offsetY = 0;
event = $.event.fix(orgEvent);
event.type = 'mousewheel';
// Old school scrollwheel delta
if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; }
if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; }
if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; }
if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }
// Firefox < 17 horizontal scrolling related to DOMMouseScroll event
if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
deltaX = deltaY * -1;
deltaY = 0;
}
// Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
delta = deltaY === 0 ? deltaX : deltaY;
// New school wheel delta (wheel event)
if ( 'deltaY' in orgEvent ) {
deltaY = orgEvent.deltaY * -1;
delta = deltaY;
}
if ( 'deltaX' in orgEvent ) {
deltaX = orgEvent.deltaX;
if ( deltaY === 0 ) { delta = deltaX * -1; }
}
// No change actually happened, no reason to go any further
if ( deltaY === 0 && deltaX === 0 ) { return; }
// Need to convert lines and pages to pixels if we aren't already in pixels
// There are three delta modes:
// * deltaMode 0 is by pixels, nothing to do
// * deltaMode 1 is by lines
// * deltaMode 2 is by pages
if ( orgEvent.deltaMode === 1 ) {
var lineHeight = $.data(this, 'mousewheel-line-height');
delta *= lineHeight;
deltaY *= lineHeight;
deltaX *= lineHeight;
} else if ( orgEvent.deltaMode === 2 ) {
var pageHeight = $.data(this, 'mousewheel-page-height');
delta *= pageHeight;
deltaY *= pageHeight;
deltaX *= pageHeight;
}
// Store lowest absolute delta to normalize the delta values
absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );
if ( !lowestDelta || absDelta < lowestDelta ) {
lowestDelta = absDelta;
// Adjust older deltas if necessary
if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
lowestDelta /= 40;
}
}
// Adjust older deltas if necessary
if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
// Divide all the things by 40!
delta /= 40;
deltaX /= 40;
deltaY /= 40;
}
// Get a whole, normalized value for the deltas
delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta);
deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);
deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);
// Normalise offsetX and offsetY properties
if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {
var boundingRect = this.getBoundingClientRect();
offsetX = event.clientX - boundingRect.left;
offsetY = event.clientY - boundingRect.top;
}
// Add information to the event object
event.deltaX = deltaX;
event.deltaY = deltaY;
event.deltaFactor = lowestDelta;
event.offsetX = offsetX;
event.offsetY = offsetY;
// Go ahead and set deltaMode to 0 since we converted to pixels
// Although this is a little odd since we overwrite the deltaX/Y
// properties with normalized deltas.
event.deltaMode = 0;
// Add event and delta to the front of the arguments
args.unshift(event, delta, deltaX, deltaY);
// Clearout lowestDelta after sometime to better
// handle multiple device types that give different
// a different lowestDelta
// Ex: trackpad = 3 and mouse wheel = 120
if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }
nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);
return ($.event.dispatch || $.event.handle).apply(this, args);
}
function nullLowestDelta() {
lowestDelta = null;
}
function shouldAdjustOldDeltas(orgEvent, absDelta) {
// If this is an older event and the delta is divisable by 120,
// then we are assuming that the browser is treating this as an
// older mouse wheel event and that we should divide the deltas
// by 40 to try and get a more usable deltaFactor.
// Side note, this actually impacts the reported scroll distance
// in older browsers and can cause scrolling to be slower than native.
// Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0;
}
}));
});

Some files were not shown because too many files have changed in this diff Show More