Вход Регистрация
Файл: CloudBox-main/CloudBox/admin_assets/js/jquery.toolbar.min.js
Строк: 162
<?php
/*! toolbar.js 2013-04-05 */
"function" != typeof Object.create && (Object.create = function (t) {
    function 
o() {
    }

    return 
o.prototype t, new o
}), function (to) {
    var 
= {init: function (oe) {
        var 
this;
        
i.elem ei.$elem t(e), i.options t.extend({}, t.fn.toolbar.optionso), i.toolbar t('<div class="tool-container gradient" />').addClass("tool-" i.options.position).addClass("tool-rounded").append('<div class="tool-items" />').append('<div class="arrow" />').appendTo("body").css("opacity"0).hide(), i.toolbar_arrow i.toolbar.find(".arrow"), i.initializeToolbar()
    }, 
initializeToolbar: function () {
        var 
this;
        
t.populateContent(), t.setTrigger(), t.toolbarWidth t.toolbar.width()
    }, 
setTrigger: function () {
        var 
this;
        
e.$elem.on("click", function (t) {
            
t.preventDefault(), e.$elem.hasClass("pressed") ? e.hide() : e.show()
        }), 
e.options.hideOnClick && t("html").on("click.toolbar", function (t) {
            
t.target != e.elem && === e.$elem.has(t.target).length && === e.toolbar.has(t.target).length && e.toolbar.is(":visible") && e.hide()
        }), 
t(o).resize(function (t) {
            
t.stopPropagation(), e.toolbar.is(":visible") && (e.toolbarCss e.getCoordinates(e.options.position20), e.collisionDetection(), e.toolbar.css(e.toolbarCss), e.toolbar_arrow.css(e.arrowCss))
        })
    }, 
populateContent: function () {
        var 
thiso.toolbar.find(".tool-items"), t(o.options.content).clone(!0).find("a").addClass("tool-item gradient");
        
e.html(i), e.find(".tool-item").on("click", function (t) {
            
t.preventDefault(), o.$elem.trigger("toolbarItemClick"this)
        })
    }, 
calculatePosition: function () {
        var 
this;
        
t.arrowCss = {}, t.toolbarCss t.getCoordinates(t.options.position0), t.toolbarCss.position "absolute"t.toolbarCss.zIndex t.options.zIndext.collisionDetection(), t.toolbar.css(t.toolbarCss), t.toolbar_arrow.css(t.arrowCss)
    }, 
getCoordinates: function (to) {
        var 
this;
        switch (
e.coordinates e.$elem.offset(), e.options.adjustment && e.options.adjustment[e.options.position] && (e.options.adjustment[e.options.position]), e.options.position) {
            case
"top":
                return{
lefte.coordinates.left e.toolbar.width() / e.$elem.outerWidth() / 2tope.coordinates.top e.$elem.height() - oright"auto"};
            case
"left":
                return{
lefte.coordinates.left e.toolbar.width() / e.$elem.width() / otope.coordinates.top e.toolbar.height() / e.$elem.outerHeight() / 2right"auto"};
            case
"right":
                return{
lefte.coordinates.left e.toolbar.width() / e.$elem.width() / otope.coordinates.top e.toolbar.height() / e.$elem.outerHeight() / 2right"auto"};
            case
"bottom":
                return{
lefte.coordinates.left e.toolbar.width() / e.$elem.outerWidth() / 2tope.coordinates.top e.$elem.height() + oright"auto"}
        }
    }, 
collisionDetection: function () {
        var 
this20;
        (
"top" == e.options.position || "bottom" == e.options.position) && (e.arrowCss = {left"50%"right"50%"}, e.toolbarCss.left ? (e.toolbarCss.left ie.arrowCss.left e.$elem.offset().left e.$elem.width() / i) : t(o).width() - (e.toolbarCss.left e.toolbarWidth) && (e.toolbarCss.right ie.toolbarCss.left "auto"e.arrowCss.left "auto"e.arrowCss.right t(o).width() - e.$elem.offset().left e.$elem.width() / 5))
    }, 
show: function () {
        var 
this= {opacity1};
        switch (
t.$elem.addClass("pressed"), t.calculatePosition(), t.options.position) {
            case
"top":
                
o.top "-=20";
                break;
            case
"left":
                
o.left "-=20";
                break;
            case
"right":
                
o.left "+=20";
                break;
            case
"bottom":
                
o.top "+=20"
        
}
        
t.toolbar.show().animate(o200), t.$elem.trigger("toolbarShown")
    }, 
hide: function () {
        var 
this= {opacity0};
        switch (
t.$elem.removeClass("pressed"), t.options.position) {
            case
"top":
                
o.top "+=20";
                break;
            case
"left":
                
o.left "+=20";
                break;
            case
"right":
                
o.left "-=20";
                break;
            case
"bottom":
                
o.top "-=20"
        
}
        
t.toolbar.animate(o200, function () {
            
t.toolbar.hide()
        }), 
t.$elem.trigger("toolbarHidden")
    }, 
getToolbarElement: function () {
        return 
this.toolbar.find(".tool-items")
    }};
    
t.fn.toolbar = function (o) {
        if (
t.isPlainObject(o))return this.each(function () {
            var 
Object.create(e);
            
i.init(othis), t(this).data("toolbarObj"i)
        });
        if (
"string" == typeof o && !== o.indexOf("_")) {
            var 
t(this).data("toolbarObj"), i[o];
            return 
s.apply(it.makeArray(arguments).slice(1))
        }
    }, 
t.fn.toolbar.options = {content"#myContent"position"top"hideOnClick: !1zIndex120}
}(
jQuerywindowdocument);
?>
Онлайн: 3
Реклама