Вход Регистрация
Файл: templates/backend/default/assets/plugins/jquery-slimscroll/jquery.slimscroll.min.js
Строк: 174
<?php
(function (e) {
    
jQuery.fn.extend({
        
slimScroll: function (n) {
            var 
e.extend({
                
width"auto",
                
height"250px",
                
size"7px",
                
color"#000",
                
position"right",
                
distance"1px",
                
start"top",
                
opacity.4,
                
alwaysVisible: !1,
                
disableFadeOut: !1,
                
railVisible: !1,
                
railColor"#333",
                
railOpacity.2,
                
railDraggable: !0,
                
railClass"slimScrollRail",
                
barClass"slimScrollBar",
                
wrapperClass"slimScrollDiv",
                
allowPageScroll: !1,
                
wheelStep20,
                
touchScrollStep200,
                
borderRadius"7px",
                
railBorderRadius"7px"
            
}, n);
            
this.each(function () {
                function 
i(t) {
                    if (
l) {
                        
|| window.event;
                        var 
0;
                        
t.wheelDelta && (= -t.wheelDelta 120);
                        
t.detail && (t.detail 3);
                        
e(t.target || t.srcTarget || t.srcElement).closest("." r.wrapperClass).is(w.parent()) && s(n, !0);
                        
t.preventDefault && !&& t.preventDefault();
                        
|| (t.returnValue = !1)
                    }
                }

                function 
s(etn) {
                    
= !1;
                    var 
e,
                        
w.outerHeight() - S.outerHeight();
                    
&& (parseInt(S.css("top")) + parseInt(r.wheelStep) / 100 S.outerHeight(), Math.min(Math.max(i0), s), Math.ceil(i) : Math.floor(i), S.css({
                        
top"px"
                    
}));
                    
parseInt(S.css("top")) / (w.outerHeight() - S.outerHeight());
                    
* (w[0].scrollHeight w.outerHeight());
                    
&& (ew[0].scrollHeight w.outerHeight(), Math.min(Math.max(e0), s), S.css({
                        
top"px"
                    
}));
                    
w.scrollTop(i);
                    
w.trigger("slimscrolling", ~~i);
                    
a();
                    
f()
                }

                function 
o() {
                    
window.addEventListener ? (this.addEventListener("DOMMouseScroll"i, !1), this.addEventListener("mousewheel"i, !1)) : document.attachEvent("onmousewheel"i)
                }

                function 
u() {
                    
Math.max(w.outerHeight() / w[0].scrollHeight w.outerHeight(), y);
                    
S.css({
                        
height"px"
                    
});
                    var 
== w.outerHeight() ? "none" "block";
                    
S.css({
                        
displaye
                    
})
                }

                function 
a() {
                    
u();
                    
clearTimeout(p);
                    
== ~~? (r.allowPageScroll!= && w.trigger("slimscroll"== ~~"top" "bottom")) : = !1;
                    
m;
                    
>= w.outerHeight() ? = !: (S.stop(!0, !0).fadeIn("fast"), r.railVisible && x.stop(!0, !0).fadeIn("fast"))
                }

                function 
f() {
                    
r.alwaysVisible || (setTimeout(function () {
                        
r.disableFadeOut && || || || (S.fadeOut("slow"), x.fadeOut("slow"))
                    }, 
1e3))
                }
                var 
lchpdvmg30,
                    
= !1,
                    
e(this);
                if (
w.parent().hasClass(r.wrapperClass)) {
                    var 
w.scrollTop(),
                        
w.parent().find("." r.barClass),
                        
w.parent().find("." r.railClass);
                    
u();
                    if (
e.isPlainObject(n)) {
                        if (
"height" in n && "auto" == n.height) {
                            
w.parent().css("height""auto");
                            
w.css("height""auto");
                            var 
w.parent().parent().height();
                            
w.parent().css("height"T);
                            
w.css("height"T)
                        }
                        if (
"scrollTo" in nparseInt(r.scrollTo);
                        else if (
"scrollBy" in n+= parseInt(r.scrollBy);
                        else if (
"destroy" in n) {
                            
S.remove();
                            
x.remove();
                            
w.unwrap();                           
                            return
                        } else if (
"resize" in n) {
                            
w.parent().css("height""auto");
                            
w.css("height""auto");
                            var 
w.parent().parent().height();
                            
w.parent().css("height"T);
                            
w.css("height"T)
                        }
                        
s(E, !1, !0)
                    }
                } else {
                    
r.height "auto" == r.height w.parent().height() : r.height;
                    
e("<div></div>").addClass(r.wrapperClass).css({
                        
position"relative",
                        
overflow"hidden",
                        
widthr.width,
                        
heightr.height
                    
});
                    
w.css({
                        
overflow"hidden",
                        
widthr.width,
                        
heightr.height
                    
});
                    var 
e("<div></div>").addClass(r.railClass).css({
                        
widthr.size,
                        
height"100%",
                        
position"absolute",
                        
top0,
                        
displayr.alwaysVisible && r.railVisible "block" "none",
                        
"border-radius"r.railBorderRadius,
                        
backgroundr.railColor,
                        
opacityr.railOpacity,
                        
zIndex90
                    
}),
                        
e("<div></div>").addClass(r.barClass).css({
                            
backgroundr.color,
                            
widthr.size,
                            
position"absolute",
                            
top0,
                            
opacityr.opacity,
                            
displayr.alwaysVisible "block" "none",
                            
"border-radius"r.borderRadius,
                            
BorderRadiusr.borderRadius,
                            
MozBorderRadiusr.borderRadius,
                            
WebkitBorderRadiusr.borderRadius,
                            
zIndex99
                        
}),
                        
"right" == r.position ? {
                            
rightr.distance
                        
} : {
                            
leftr.distance
                        
};
                    
x.css(T);
                    
S.css(T);
                    
w.wrap(E);
                    
w.parent().append(S);
                    
w.parent().append(x);
                    
r.railDraggable && S.bind("mousedown", function (n) {
                        var 
e(document);
                        
= !0;
                        
parseFloat(S.css("top"));
                        
pageY n.pageY;
                        
r.bind("mousemove.slimscroll", function (e) {
                            
currTop e.pageY pageY;
                            
S.css("top"currTop);
                            
s(0S.position().top, !1)
                        });
                        
r.bind("mouseup.slimscroll", function (e) {
                            
= !1;
                            
f();
                            
r.unbind(".slimscroll")
                        });
                        return !
1
                    
}).bind("selectstart.slimscroll", function (e) {
                        
e.stopPropagation();
                        
e.preventDefault();
                        return !
1
                    
});
                    
x.hover(function () {
                        
a()
                    }, function () {
                        
f()
                    });
                    
S.hover(function () {
                        
= !0
                    
}, function () {
                        
= !1
                    
});
                    
w.hover(function () {
                        
= !0;
                        
a();
                        
f()
                    }, function () {
                        
= !1;
                        
f()
                    });
                    
w.bind("touchstart", function (et) {
                        
e.originalEvent.touches.length && (e.originalEvent.touches[0].pageY)
                    });
                    
w.bind("touchmove", function (e) {
                        
|| e.originalEvent.preventDefault();
                        
e.originalEvent.touches.length && (s((e.originalEvent.touches[0].pageY) / r.touchScrollStep, !0), e.originalEvent.touches[0].pageY)
                    });
                    
u();
                    
"bottom" === r.start ? (S.css({
                        
topw.outerHeight() - S.outerHeight()
                    }), 
s(0, !0)) : "top" !== r.start && (s(e(r.start).position().topnull, !0), r.alwaysVisible || S.hide());
                    
o()
                }
            });
            return 
this
        
}
    });
    
jQuery.fn.extend({
        
slimscrolljQuery.fn.slimScroll
    
})
})(
jQuery)
?>
Онлайн: 1
Реклама