first upload
This commit is contained in:
parent
49508db0dd
commit
49a206e06e
445 changed files with 145982 additions and 0 deletions
|
@ -0,0 +1,84 @@
|
|||
.frame-type-felogin_login form {
|
||||
background-color: #ECEDED;
|
||||
padding-top: 15px;
|
||||
padding-bottom: 15px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.frame-type-felogin_login label > span{
|
||||
width: 200px;
|
||||
padding-top: 6px;
|
||||
flex: 0 0 100px;
|
||||
}
|
||||
|
||||
|
||||
.frame-type-felogin_login input {
|
||||
margin-left: 20px;
|
||||
background: none repeat scroll 0 0 #F8F8F8;
|
||||
border: 1px solid #CCCCCC;
|
||||
padding: 2px;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.frame-type-felogin_login label {
|
||||
display: flex;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.frame-type-felogin_login input[type=submit] {
|
||||
/*margin-left: 120px;
|
||||
width: 206px;*/
|
||||
clear: both;
|
||||
border-radius: 0 0 0 0 !important;
|
||||
box-shadow: none !important;
|
||||
color: #333333 !important;
|
||||
cursor: pointer !important;
|
||||
height: 18px !important;
|
||||
line-height: 18px !important;
|
||||
margin-left: 120px !important;
|
||||
padding: 0 !important;
|
||||
text-shadow: none !important;
|
||||
background: url(../../../../../../fileadmin/template/images/button.jpg) no-repeat scroll 0 0 transparent !important;
|
||||
border: 0 none !important;
|
||||
cursor: pointer !important;
|
||||
font-size: 1em !important;
|
||||
font-weight: normal !important;
|
||||
height: 18px !important;
|
||||
line-height: 18px !important;
|
||||
margin-left: 120px !important;
|
||||
padding: 0 !important;
|
||||
text-align: center !important;
|
||||
width: 112px !important;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.frame-type-felogin_login form {
|
||||
}
|
||||
|
||||
.frame-type-felogin_login label {
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.frame-type-felogin_login label > span{
|
||||
flex: 1;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.frame-type-felogin_login input {
|
||||
margin-left: 0;
|
||||
flex: 1;
|
||||
float: none;
|
||||
display: block;
|
||||
width: auto;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.frame-type-felogin_login input[type=submit] {
|
||||
margin-left: 0;
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
/*!
|
||||
* GBA v1.0.0 (https://www.koerbler.com)
|
||||
* Copyright 2017-2022 Mathias Stieger
|
||||
* Licensed under the GPL-2.0-or-later license
|
||||
*/
|
||||
console.log("WE LOVE TYPO3");
|
Binary file not shown.
After Width: | Height: | Size: 8.3 KiB |
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
.lb-loader,.lightbox{text-align:center;line-height:0;position:absolute;left:0}body.lb-disable-scrolling{overflow:hidden}.lightboxOverlay{position:absolute;top:0;left:0;z-index:9999;background-color:#000;filter:alpha(Opacity=80);opacity:.8;display:none}.lightbox{width:100%;z-index:10000;font-weight:400;outline:0}.lightbox .lb-image{display:block;height:auto;max-width:inherit;max-height:none;border-radius:3px;border:4px solid #fff}.lightbox a img{border:none}.lb-outerContainer{position:relative;width:250px;height:250px;margin:0 auto;border-radius:4px;background-color:#fff}.lb-outerContainer:after{content:"";display:table;clear:both}.lb-loader{top:43%;height:25%;width:100%}.lb-cancel{display:block;width:32px;height:32px;margin:0 auto;background:url(../Icons/loading.gif) no-repeat}.lb-nav{position:absolute;top:0;left:0;height:100%;width:100%;z-index:10}.lb-container>.nav{left:0}.lb-nav a{outline:0;background-image:url(data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==)}.lb-next,.lb-prev{height:100%;cursor:pointer;display:block}.lb-nav a.lb-prev{width:34%;left:0;float:left;background:url(../Icons/prev.png) left 48% no-repeat;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-prev:hover{filter:alpha(Opacity=100);opacity:1}.lb-nav a.lb-next{width:64%;right:0;float:right;background:url(../Icons/next.png) right 48% no-repeat;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-next:hover{filter:alpha(Opacity=100);opacity:1}.lb-dataContainer{margin:0 auto;padding-top:5px;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.lb-dataContainer:after{content:"";display:table;clear:both}.lb-data{padding:0 4px;color:#ccc}.lb-data .lb-details{width:85%;float:left;text-align:left;line-height:1.1em}.lb-data .lb-caption{font-size:13px;font-weight:700;line-height:1em}.lb-data .lb-caption a{color:#4ae}.lb-data .lb-number{display:block;clear:left;padding-bottom:1em;font-size:12px;color:#999}.lb-data .lb-close{display:block;float:right;width:30px;height:30px;background:url(../Icons/close.png) top right no-repeat;text-align:right;outline:0;filter:alpha(Opacity=70);opacity:.7;-webkit-transition:opacity .2s;-moz-transition:opacity .2s;-o-transition:opacity .2s;transition:opacity .2s}.lb-data .lb-close:hover{cursor:pointer;filter:alpha(Opacity=100);opacity:1}
|
|
@ -0,0 +1,102 @@
|
|||
/**
|
||||
* jQuery.LocalScroll
|
||||
* Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
|
||||
* Dual licensed under MIT and GPL.
|
||||
* Date: 3/10/2008
|
||||
*
|
||||
* @projectDescription Animated scrolling navigation, using anchors.
|
||||
* http://flesler.blogspot.com/2007/10/jquerylocalscroll-10.html
|
||||
* @author Ariel Flesler
|
||||
* @version 1.2.5
|
||||
*
|
||||
* @id jQuery.fn.localScroll
|
||||
* @param {Object} settings Hash of settings, it is passed in to jQuery.ScrollTo, none is required.
|
||||
* @return {jQuery} Returns the same jQuery object, for chaining.
|
||||
*
|
||||
* @example $('ul.links').localScroll();
|
||||
*
|
||||
* @example $('ul.links').localScroll({ filter:'.animated', duration:400, axis:'x' });
|
||||
*
|
||||
* @example $.localScroll({ target:'#pane', axis:'xy', queue:true, event:'mouseover' });
|
||||
*
|
||||
* Notes:
|
||||
* - The plugin requires jQuery.ScrollTo.
|
||||
* - The hash of settings, is passed to jQuery.ScrollTo, so the settings are valid for that plugin as well.
|
||||
* - jQuery.localScroll can be used if the desired links, are all over the document, it accepts the same settings.
|
||||
* - If the setting 'lazy' is set to true, then the binding will still work for later added anchors.
|
||||
* - The setting 'speed' is deprecated, use 'duration' instead.
|
||||
* - If onBefore returns false, the event is ignored.
|
||||
**/
|
||||
;(function( $ ){
|
||||
var URI = location.href.replace(/#.*/,'');//local url without hash
|
||||
|
||||
var $localScroll = $.localScroll = function( settings ){
|
||||
$('body').localScroll( settings );
|
||||
};
|
||||
|
||||
//Many of these defaults, belong to jQuery.ScrollTo, check it's demo for an example of each option.
|
||||
//@see http://www.freewebs.com/flesler/jQuery.ScrollTo/
|
||||
$localScroll.defaults = {//the defaults are public and can be overriden.
|
||||
duration:1000, //how long to animate.
|
||||
axis:'y',//which of top and left should be modified.
|
||||
event:'click',//on which event to react.
|
||||
stop:true//avoid queuing animations
|
||||
/*
|
||||
lock:false,//ignore events if already animating
|
||||
lazy:false,//if true, links can be added later, and will still work.
|
||||
target:null, //what to scroll (selector or element). Keep it null if want to scroll the whole window.
|
||||
filter:null, //filter some anchors out of the matched elements.
|
||||
hash: false//if true, the hash of the selected link, will appear on the address bar.
|
||||
*/
|
||||
};
|
||||
|
||||
//if the URL contains a hash, it will scroll to the pointed element
|
||||
$localScroll.hash = function( settings ){
|
||||
settings = $.extend( {}, $localScroll.defaults, settings );
|
||||
settings.hash = false;//can't be true
|
||||
if( location.hash )
|
||||
setTimeout(function(){ scroll( 0, location, settings ); }, 0 );//better wrapped with a setTimeout
|
||||
};
|
||||
|
||||
$.fn.localScroll = function( settings ){
|
||||
settings = $.extend( {}, $localScroll.defaults, settings );
|
||||
|
||||
return ( settings.persistent || settings.lazy )
|
||||
? this.bind( settings.event, function( e ){//use event delegation, more links can be added later.
|
||||
var a = $([e.target, e.target.parentNode]).filter(filter)[0];//if a valid link was clicked.
|
||||
a && scroll( e, a, settings );//do scroll.
|
||||
})
|
||||
: this.find('a')//bind concretely, to each matching link
|
||||
.filter( filter ).bind( settings.event, function(e){
|
||||
scroll( e, this, settings );
|
||||
}).end()
|
||||
.end();
|
||||
|
||||
function filter(){//is this a link that points to an anchor and passes a possible filter ? href is checked to avoid a bug in FF.
|
||||
return !!this.href && !!this.hash && this.href.replace(this.hash,'') == URI && (!settings.filter || $(this).is( settings.filter ));
|
||||
};
|
||||
};
|
||||
|
||||
function scroll( e, link, settings ){
|
||||
var id = link.hash.slice(1),
|
||||
elem = document.getElementById(id) || document.getElementsByName(id)[0];
|
||||
if ( elem ){
|
||||
e && e.preventDefault();
|
||||
var $target = $( settings.target || $.scrollTo.window() );//if none specified, then the window.
|
||||
|
||||
if( settings.lock && $target.is(':animated') ||
|
||||
settings.onBefore && settings.onBefore.call(link, e, elem, $target) === false ) return;
|
||||
|
||||
if( settings.stop )
|
||||
$target.queue('fx',[]).stop();//remove all its animations
|
||||
$target
|
||||
.scrollTo( elem, settings )//do scroll
|
||||
.trigger('notify.serialScroll',[elem]);//notify serialScroll about this change
|
||||
if( settings.hash )
|
||||
$target.queue(function(){
|
||||
location = link.hash;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
})( jQuery );
|
|
@ -0,0 +1,150 @@
|
|||
/**
|
||||
* jQuery.ScrollTo
|
||||
* Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
|
||||
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
||||
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
||||
* Date: 2/19/2008
|
||||
*
|
||||
* @projectDescription Easy element scrolling using jQuery.
|
||||
* Tested with jQuery 1.2.1. On FF 2.0.0.11, IE 6, Opera 9.22 and Safari 3 beta. on Windows.
|
||||
*
|
||||
* @author Ariel Flesler
|
||||
* @version 1.3.3
|
||||
*
|
||||
* @id jQuery.scrollTo
|
||||
* @id jQuery.fn.scrollTo
|
||||
* @param {String, Number, DOMElement, jQuery, Object} target Where to scroll the matched elements.
|
||||
* The different options for target are:
|
||||
* - A number position (will be applied to all axes).
|
||||
* - A string position ('44', '100px', '+=90', etc ) will be applied to all axes
|
||||
* - A jQuery/DOM element ( logically, child of the element to scroll )
|
||||
* - A string selector, that will be relative to the element to scroll ( 'li:eq(2)', etc )
|
||||
* - A hash { top:x, left:y }, x and y can be any kind of number/string like above.
|
||||
* @param {Number} duration The OVERALL length of the animation, this argument can be the settings object instead.
|
||||
* @param {Object} settings Hash of settings, optional.
|
||||
* @option {String} axis Which axis must be scrolled, use 'x', 'y', 'xy' or 'yx'.
|
||||
* @option {Number} duration The OVERALL length of the animation.
|
||||
* @option {String} easing The easing method for the animation.
|
||||
* @option {Boolean} margin If true, the margin of the target element will be deducted from the final position.
|
||||
* @option {Object, Number} offset Add/deduct from the end position. One number for both axes or { top:x, left:y }.
|
||||
* @option {Object, Number} over Add/deduct the height/width multiplied by 'over', can be { top:x, left:y } when using both axes.
|
||||
* @option {Boolean} queue If true, and both axis are given, the 2nd axis will only be animated after the first one ends.
|
||||
* @option {Function} onAfter Function to be called after the scrolling ends.
|
||||
* @option {Function} onAfterFirst If queuing is activated, this function will be called after the first scrolling ends.
|
||||
* @return {jQuery} Returns the same jQuery object, for chaining.
|
||||
*
|
||||
* @example $('div').scrollTo( 340 );
|
||||
*
|
||||
* @example $('div').scrollTo( '+=340px', { axis:'y' } );
|
||||
*
|
||||
* @example $('div').scrollTo( 'p.paragraph:eq(2)', 500, { easing:'swing', queue:true, axis:'xy' } );
|
||||
*
|
||||
* @example var second_child = document.getElementById('container').firstChild.nextSibling;
|
||||
* $('#container').scrollTo( second_child, { duration:500, axis:'x', onAfter:function(){
|
||||
* alert('scrolled!!');
|
||||
* }});
|
||||
*
|
||||
* @example $('div').scrollTo( { top: 300, left:'+=200' }, { offset:-20 } );
|
||||
*
|
||||
* Notes:
|
||||
* - jQuery.scrollTo will make the whole window scroll, it accepts the same arguments as jQuery.fn.scrollTo.
|
||||
* - If you are interested in animated anchor navigation, check http://jquery.com/plugins/project/LocalScroll.
|
||||
* - The options margin, offset and over are ignored, if the target is not a jQuery object or a DOM element.
|
||||
* - The option 'queue' won't be taken into account, if only 1 axis is given.
|
||||
*/
|
||||
;(function( $ ){
|
||||
|
||||
var $scrollTo = $.scrollTo = function( target, duration, settings ){
|
||||
$scrollTo.window().scrollTo( target, duration, settings );
|
||||
};
|
||||
|
||||
$scrollTo.defaults = {
|
||||
axis:'y',
|
||||
duration:1
|
||||
};
|
||||
|
||||
//returns the element that needs to be animated to scroll the window
|
||||
$scrollTo.window = function(){
|
||||
return $( $.browser.safari ? 'body' : 'html' );
|
||||
};
|
||||
|
||||
$.fn.scrollTo = function( target, duration, settings ){
|
||||
if( typeof duration == 'object' ){
|
||||
settings = duration;
|
||||
duration = 0;
|
||||
}
|
||||
settings = $.extend( {}, $scrollTo.defaults, settings );
|
||||
duration = duration || settings.speed || settings.duration;//speed is still recognized for backwards compatibility
|
||||
settings.queue = settings.queue && settings.axis.length > 1;//make sure the settings are given right
|
||||
if( settings.queue )
|
||||
duration /= 2;//let's keep the overall speed, the same.
|
||||
settings.offset = both( settings.offset );
|
||||
settings.over = both( settings.over );
|
||||
|
||||
return this.each(function(){
|
||||
var elem = this, $elem = $(elem),
|
||||
t = target, toff, attr = {},
|
||||
win = $elem.is('html,body');
|
||||
switch( typeof t ){
|
||||
case 'number'://will pass the regex
|
||||
case 'string':
|
||||
if( /^([+-]=)?\d+(px)?$/.test(t) ){
|
||||
t = both( t );
|
||||
break;//we are done
|
||||
}
|
||||
t = $(t,this);// relative selector, no break!
|
||||
case 'object':
|
||||
if( t.is || t.style )//DOM/jQuery
|
||||
toff = (t = $(t)).offset();//get the real position of the target
|
||||
}
|
||||
$.each( settings.axis.split(''), function( i, axis ){
|
||||
var Pos = axis == 'x' ? 'Left' : 'Top',
|
||||
pos = Pos.toLowerCase(),
|
||||
key = 'scroll' + Pos,
|
||||
act = elem[key],
|
||||
Dim = axis == 'x' ? 'Width' : 'Height',
|
||||
dim = Dim.toLowerCase();
|
||||
|
||||
if( toff ){//jQuery/DOM
|
||||
attr[key] = toff[pos] + ( win ? 0 : act - $elem.offset()[pos] );
|
||||
|
||||
if( settings.margin ){//if it's a dom element, reduce the margin
|
||||
attr[key] -= parseInt(t.css('margin'+Pos)) || 0;
|
||||
attr[key] -= parseInt(t.css('border'+Pos+'Width')) || 0;
|
||||
}
|
||||
|
||||
attr[key] += settings.offset[pos] || 0;//add/deduct the offset
|
||||
|
||||
if( settings.over[pos] )//scroll to a fraction of its width/height
|
||||
attr[key] += t[dim]() * settings.over[pos];
|
||||
}else
|
||||
attr[key] = t[pos];//remove the unnecesary 'px'
|
||||
|
||||
if( /^\d+$/.test(attr[key]) )//number or 'number'
|
||||
attr[key] = attr[key] <= 0 ? 0 : Math.min( attr[key], max(Dim) );//check the limits
|
||||
|
||||
if( !i && settings.queue ){//queueing each axis is required
|
||||
if( act != attr[key] )//don't waste time animating, if there's no need.
|
||||
animate( settings.onAfterFirst );//intermediate animation
|
||||
delete attr[key];//don't animate this axis again in the next iteration.
|
||||
}
|
||||
});
|
||||
animate( settings.onAfter );
|
||||
|
||||
function animate( callback ){
|
||||
$elem.animate( attr, duration, settings.easing, callback && function(){
|
||||
callback.call(this, target);
|
||||
});
|
||||
};
|
||||
function max( Dim ){
|
||||
var el = win ? $.browser.opera ? document.body : document.documentElement : elem;
|
||||
return el['scroll'+Dim] - el['client'+Dim];
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
function both( val ){
|
||||
return typeof val == 'object' ? val : { top:val, left:val };
|
||||
};
|
||||
|
||||
})( jQuery );
|
|
@ -0,0 +1,246 @@
|
|||
/*!
|
||||
* jQuery.serialScroll
|
||||
* Copyright (c) 2007-2015 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
|
||||
* Licensed under MIT.
|
||||
* @projectDescription Animated scrolling of series with jQuery
|
||||
* @author Ariel Flesler
|
||||
* @version 1.3.1
|
||||
* https://github.com/flesler/jquery.serialScroll
|
||||
*/
|
||||
;(function($) {
|
||||
|
||||
var NAMESPACE = '.serialScroll';
|
||||
|
||||
var $serialScroll = $.serialScroll = function(settings) {
|
||||
return $(window).serialScroll(settings);
|
||||
};
|
||||
|
||||
// Many of these defaults, belong to jQuery.ScrollTo, check it's demo for an example of each option.
|
||||
// @link {http://demos.flesler.com/jquery/scrollTo/ ScrollTo's Demo}
|
||||
$serialScroll.defaults = {// the defaults are public and can be overriden.
|
||||
duration:1000, // how long to animate.
|
||||
axis:'x', // which of top and left should be scrolled
|
||||
event:'click', // on which event to react.
|
||||
start:0, // first element (zero-based index)
|
||||
step: 1, // how many elements to scroll on each action
|
||||
lock:true,// ignore events if already animating
|
||||
cycle:true, // cycle endlessly (constant velocity)
|
||||
constant:true // use contant speed ?
|
||||
/*
|
||||
navigation:null,// if specified, it's a selector to a collection of items to navigate the container
|
||||
target:window, // if specified, it's a selector to the element to be scrolled.
|
||||
interval:0, // it's the number of milliseconds to automatically go to the next
|
||||
lazy:false,// go find the elements each time (allows AJAX or JS content, or reordering)
|
||||
stop:false, // stop any previous animations to avoid queueing
|
||||
force:false,// force the scroll to the first element on start ?
|
||||
jump: false,// if true, when the event is triggered on an element, the pane scrolls to it
|
||||
items:null, // selector to the items (relative to the matched elements)
|
||||
prev:null, // selector to the 'prev' button
|
||||
next:null, // selector to the 'next' button
|
||||
onBefore: function() {}, // function called before scrolling, if it returns false, the event is ignored
|
||||
exclude:0 // exclude the last x elements, so we cannot scroll past the end
|
||||
*/
|
||||
};
|
||||
|
||||
$.fn.serialScroll = function(options) {
|
||||
|
||||
return this.each(function() {
|
||||
var
|
||||
settings = $.extend({}, $serialScroll.defaults, options),
|
||||
// this one is just to get shorter code when compressed
|
||||
event = settings.event,
|
||||
// ditto
|
||||
step = settings.step,
|
||||
// ditto
|
||||
lazy = settings.lazy,
|
||||
// if a target is specified, then everything's relative to 'this'.
|
||||
context = settings.target ? this : document,
|
||||
// the element to be scrolled (will carry all the events)
|
||||
$pane = $(settings.target || this, context),
|
||||
// will be reused, save it into a variable
|
||||
pane = $pane[0],
|
||||
// will hold a lazy list of elements
|
||||
items = settings.items,
|
||||
// index of the currently selected item
|
||||
active = settings.start,
|
||||
// boolean, do automatic scrolling or not
|
||||
auto = settings.interval,
|
||||
// save it now to make the code shorter
|
||||
nav = settings.navigation,
|
||||
// holds the interval id
|
||||
timer;
|
||||
|
||||
// Incompatible with $().animate()
|
||||
delete settings.step;
|
||||
delete settings.start;
|
||||
|
||||
// If no match, just ignore
|
||||
if (!pane) return;
|
||||
|
||||
// if not lazy, save the items now
|
||||
if (!lazy) {
|
||||
items = getItems();
|
||||
}
|
||||
|
||||
// generate an initial call
|
||||
if (settings.force || auto) {
|
||||
jump({}, active);
|
||||
}
|
||||
|
||||
// Button binding, optional
|
||||
$(settings.prev||[], context).bind(event, -step, move);
|
||||
$(settings.next||[], context).bind(event, step, move);
|
||||
|
||||
// Custom events bound to the container
|
||||
if (!pane._bound_) {
|
||||
$pane
|
||||
// You can trigger with just 'prev'
|
||||
.bind('prev'+NAMESPACE, -step, move)
|
||||
// f.e: $(container).trigger('next');
|
||||
.bind('next'+NAMESPACE, step, move)
|
||||
// f.e: $(container).trigger('goto', 4);
|
||||
.bind('goto'+NAMESPACE, jump);
|
||||
}
|
||||
|
||||
if (auto) {
|
||||
$pane
|
||||
.bind('start'+NAMESPACE, function(e) {
|
||||
if (!auto) {
|
||||
clear();
|
||||
auto = true;
|
||||
next();
|
||||
}
|
||||
})
|
||||
.bind('stop'+NAMESPACE, function() {
|
||||
clear();
|
||||
auto = false;
|
||||
});
|
||||
}
|
||||
|
||||
// Let serialScroll know that the index changed externally
|
||||
$pane.bind('notify'+NAMESPACE, function(e, elem) {
|
||||
var i = index(elem);
|
||||
if (i > -1) {
|
||||
active = i;
|
||||
}
|
||||
});
|
||||
|
||||
// Avoid many bindings
|
||||
pane._bound_ = true;
|
||||
|
||||
// Can't use jump if using lazy items and a non-bubbling event
|
||||
if (settings.jump) {
|
||||
(lazy ? $pane : getItems()).bind(event, function(e) {
|
||||
jump(e, index(e.target));
|
||||
});
|
||||
}
|
||||
|
||||
if (nav) {
|
||||
nav = $(nav, context).bind(event, function(e) {
|
||||
e.data = Math.round(getItems().length / nav.length) * nav.index(this);
|
||||
jump(e, this);
|
||||
});
|
||||
}
|
||||
|
||||
function move(e) {
|
||||
e.data += active;
|
||||
jump(e, this);
|
||||
}
|
||||
|
||||
function jump(e, pos) {
|
||||
if (!$.isNumeric(pos)) {
|
||||
pos = e.data;
|
||||
}
|
||||
|
||||
var n,
|
||||
// Is a real event triggering ?
|
||||
real = e.type,
|
||||
// Handle a possible exclude
|
||||
$items = settings.exclude ? getItems().slice(0,-settings.exclude) : getItems(),
|
||||
limit = $items.length - 1,
|
||||
elem = $items[pos],
|
||||
duration = settings.duration;
|
||||
|
||||
if (real) e.preventDefault();
|
||||
|
||||
if (auto) {
|
||||
// clear any possible automatic scrolling.
|
||||
clear();
|
||||
timer = setTimeout(next, settings.interval);
|
||||
}
|
||||
|
||||
// exceeded the limits
|
||||
if (!elem) {
|
||||
n = pos < 0 ? 0 : limit;
|
||||
// we exceeded for the first time
|
||||
if (active !== n) {
|
||||
pos = n;
|
||||
// this is a bad case
|
||||
} else if (!settings.cycle) {
|
||||
return;
|
||||
// invert, go to the other side
|
||||
} else {
|
||||
pos = limit - n;
|
||||
}
|
||||
elem = $items[pos];
|
||||
}
|
||||
|
||||
// no animations while busy
|
||||
if (!elem || settings.lock && $pane.is(':animated') ||
|
||||
real && settings.onBefore &&
|
||||
// Allow implementors to cancel scrolling
|
||||
settings.onBefore(e, elem, $pane, getItems(), pos) === false) return;
|
||||
|
||||
if (settings.stop) {
|
||||
// remove all running animations
|
||||
$pane.stop(true);
|
||||
}
|
||||
|
||||
if (settings.constant) {
|
||||
// keep constant velocity
|
||||
duration = Math.abs(duration/step * (active - pos));
|
||||
}
|
||||
|
||||
$pane.scrollTo(elem, duration, settings);
|
||||
|
||||
// in case serialScroll was called on this elemement more than once.
|
||||
trigger('notify', pos);
|
||||
}
|
||||
|
||||
function next() {
|
||||
trigger('next');
|
||||
}
|
||||
|
||||
function clear() {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
|
||||
function getItems() {
|
||||
return $(items, pane);
|
||||
}
|
||||
|
||||
// I'll use the namespace to avoid conflicts
|
||||
function trigger(event) {
|
||||
$pane.trigger(
|
||||
event+NAMESPACE,
|
||||
[].slice.call(arguments,1)
|
||||
);
|
||||
}
|
||||
|
||||
function index(elem) {
|
||||
// Already a number
|
||||
if ($.isNumeric(elem)) {
|
||||
return elem;
|
||||
}
|
||||
|
||||
var $items = getItems(), i;
|
||||
// See if it matches or one of its ancestors
|
||||
while((i = $items.index(elem)) === -1 && elem !== pane) {
|
||||
elem = elem.parentNode;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
})(jQuery);
|
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 1 KiB |
Loading…
Add table
editor.link_modal.header
Reference in a new issue