Вход Регистрация
Файл: CloudBox-main/CloudBox/admin_assets/js/icheck.min.js
Строк: 168
<?php
/*! iCheck v1.0.2 by Damir Sultanov, http://git.io/arlzeA, MIT Licensed */
(function (f) {
    function 
A(abd) {
        var 
a[0], = /er/.test(d) ? _indeterminate : /bl/.test(d) ? k== _update ? {checkedc[k], disabledc[n], indeterminate"true" == a.attr(_indeterminate) || "false" == a.attr(_determinate)} : c[g];
        if (/^(
ch|di|in)/.test(d) && !e)x(ag); else if (/^(un|en|de)/.test(d) && e)q(ag); else if (== _update)for (var f in e)e[f] ? x(af, !0) : q(af, !0); else if (!|| "toggle" == d) {
            if (!
b)a[_callback]("ifClicked");
            
c[_type] !== && q(ag) : x(ag)
        }
    }

    function 
x(abd) {
        var 
a[0], a.parent(), == k== _indeterminate,
            
== n_determinate "enabled"l(at(c[_type])), l(at(c[_type]));
        if (!
!== c[b]) {
            if (!
&& == && c[_type] == && c.name) {
                var 
a.closest("form"), 'input[name="' c.name '"]'w.length w.find(p) : f(p);
                
p.each(function () {
                    
this !== && f(this).data(m) && q(f(this), b)
                })
            }
            
? (c[b] = !0c[k] && q(ak"force")) : (|| (c[b] = !0), && c[_indeterminate] && q(a_indeterminate, !1));
            
D(aebd)
        }
        
c[n] && l(a_cursor, !0) && g.find("." C).css(_cursor"default");
        
g[_add](|| l(ab) || "");
        
g.attr("role") && !&& g.attr("aria-" + (k), "true");
        
g[_remove](|| l(as) || "")
    }

    function 
q(abd) {
        var 
a[0], a.parent(), == k== _indeterminate== n_determinate "enabled"l(at(c[_type])), l(at(c[_type]));
        if (!
!== c[b]) {
            if (
|| !|| "force" == d)c[b] = !1;
            
D(aesd)
        }
        !
c[n] && l(a_cursor, !0) && g.find("." C).css(_cursor"pointer");
        
g[_remove](|| l(ab) || "");
        
g.attr("role") && !&& g.attr("aria-" + (k), "false");
        
g[_add](|| l(as) || "")
    }

    function 
E(ab) {
        if (
a.data(m)) {
            
a.parent().html(a.attr("style"a.data(m).|| ""));
            if (
b)a[_callback](b);
            
a.off(".i").unwrap();
            
f(_label '[for="' a[0].id '"]').add(a.closest(_label)).off(".i")
        }
    }

    function 
l(abf) {
        if (
a.data(m))return a.data(m).o[+ ("" "Class")]
    }

    function 
t(a) {
        return 
a.charAt(0).toUpperCase() + a.slice(1)
    }

    function 
D(abfc) {
        if (!
c) {
            if (
b)a[_callback]("ifToggled");
            
a[_callback]("ifChanged")[_callback]("if" t(f))
        }
    }

    var 
"iCheck""-helper""radio""checked""un" k"disabled";
    
_determinate "determinate";
    
_indeterminate "in" _determinate;
    
_update "update";
    
_type "type";
    
_click "click";
    
_touch "touchbegin.i touchend.i";
    
_add "addClass";
    
_remove "removeClass";
    
_callback "trigger";
    
_label "label";
    
_cursor "cursor";
    
_mobile = /ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);
    
f.fn[m] = function (ab) {
        var 
'input[type="checkbox"], input[type="' '"]'f(), = function (a) {
            
a.each(function () {
                var 
f(this);
                
a.is(d) ? c.add(a) : c.add(a.find(d))
            })
        };
        if (/^(
check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(a))return a.toLowerCase(), g(this), c.each(function () {
            var 
=
                
f(this);
            
"destroy" == E(c"ifDestroyed") : A(c, !0a);
            
f.isFunction(b) && b()
        });
        if (
"object" != typeof a && a)return this;
        var 
f.extend({checkedClasskdisabledClassnindeterminateClass_indeterminatelabelHover: !0}, a), e.handlee.hoverClass || "hover"e.focusClass || "focus"e.activeClass || "active"= !!e.labelHovere.labelHoverClass || "hover"= ("" e.increaseArea).replace("%""") | 0;
        if (
"checkbox" == || == r)'input[type="' '"]';
        -
50 && (= -50);
        
g(this);
        return 
c.each(function () {
            var 
f(this);
            
E(a);
            var 
this,
                
c.id= -"%"100 "%"= {position"absolute"topgleftgdisplay"block"widthdheightdmargin0padding0background"#fff"border0opacity0}, _mobile ? {position"absolute"visibility"hidden"} : : {position"absolute"opacity0}, "checkbox" == c[_type] ? e.checkboxClass || "icheckbox" e.radioClass || "i" rf(_label '[for="' '"]').add(a.closest(_label)), = !!e.aria"-" Math.random().toString(36).substr(26), '<div class="' '" ' + ('role="' c[_type] + '" ' "");
            
&& z.each(function () {
                
+=
                    
'aria-labelledby="';
                
this.id += this.id : (this.id y+= y);
                
+= '"'
            
});
            
a.wrap("/>")[_callback]("ifCreated").parent().append(e.insert);
            
f('<ins class="' '"/>').css(d).appendTo(h);
            
a.data(m, {oesa.attr("style")}).css(g);
            
e.inheritClass && h[_add](c.className || "");
            
e.inheritID && && h.attr("id""-" b);
            
"static" == h.css("position") && h.css("position""relative");
            
A(a, !0_update);
            if (
z.length)z.on(_click ".i mouseover.i mouseout.i " _touch, function (b) {
                var 
b[_type], f(this);
                if (!
c[n]) {
                    if (
== _click) {
                        if (
f(b.target).is("a"))return;
                        
A(a, !1, !0)
                    } else 
&& (/ut|nd/.test(d) ? (h[_remove](v), e[_remove](w)) : (h[_add](v), e[_add](w)));
                    if (
_mobile)b.stopPropagation(); else return!1
                
}
            });
            
a.on(_click ".i focus.i blur.i keyup.i keydown.i keypress.i", function (b) {
                var 
b[_type];
                
b.keyCode;
                if (
== _click)return!1;
                if (
"keydown" == && 32 == b)return c[_type] == && c[k] || (c[k] ? q(ak) : x(ak)), !1;
                if (
"keyup" == && c[_type] == r)!c[k] && x(ak); else if (/us|ur/.test(d))h["blur" == _remove _add](s)
            });
            
d.on(_click " mousedown mouseup mouseover mouseout " _touch, function (b) {
                var 
=
                    
b[_type], = /wn|up/.test(d) ? v;
                if (!
c[n]) {
                    if (
== _click)A(a, !1, !0); else {
                        if (/
wn|er|in/.test(d))h[_add](e); else h[_remove](" " t);
                        if (
z.length && && == v)z[/ut|nd/.test(d) ? _remove _add](w)
                    }
                    if (
_mobile)b.stopPropagation(); else return!1
                
}
            })
        })
    }
})(
window.jQuery || window.Zepto);
?>
Онлайн: 1
Реклама