Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 3.144.255.198
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/3/cwd/proc/3/cwd/srv/modoboa/env/lib64/python3.5/site-packages/modoboa/static/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/3/cwd/proc/3/cwd/srv/modoboa/env/lib64/python3.5/site-packages/modoboa/static/js/notify.js
(function($) {
    var Notify = function(element, options) {
        this.$element = $(element);
        this.options = $.extend({}, $.fn.notify.defaults, options);
    };

    Notify.prototype = {
        constructor: Notify,

        build_box: function(bid) {
            if (bid === undefined) {
                bid = "notifybox";
            }
            var div = $("<div class='alert alert-dismissible' role='alert' />", {
                id: bid,
                click: $.proxy(this.destroy_box, this)
            }).css({
                position: "fixed"
            });

            return div;
        },

        destroy_box: function(evt) {
            evt.preventDefault();
            this.$element.hide().remove();
        },

        set_position: function(box) {
            box.css({
                'z-index': 100,
                top: this.options.top_position,
                left: "50%",
                'margin-left': -box.outerWidth(true) / 2
            });
        },

        set_message: function(box, value) {
            var content = '<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>' + value;

            box.html(content);
        },

        show: function(klass, message, timer) {
            var nbox = this.build_box();

            if (klass != "normal") {
                nbox.addClass("alert-" + klass);
            }
            this.set_message(nbox, message);
            this.$element.append(nbox);
            this.set_position(nbox);
            if (timer !== undefined) {
                window.setTimeout(function() {
                    nbox.alert('close');
                }, timer);
            }
            return this;
        },

        success: function(message, timer) {
            return this.show.apply(this, ["success", message, timer]);
        },

        info: function(message, timer) {
            return this.show.apply(this, ["info", message, timer]);
        },

        error: function(message, timer) {
            return this.show.apply(this, ["danger", message, timer]);
        },

        warning: function(message, timer) {
            return this.show.apply(this, ["warning", message, timer]);
        },

        hide: function() {

        }
    };

    $.fn.notify = function(method) {
        var args = arguments;

        return this.each(function() {
            var $this = $(this),
                data = $this.data('notify'),
                options = typeof method === "object" && method;

            if (!data) {
                $this.data('notify', new Notify(this, options));
                data = $this.data('notify');
            }
            if (typeof method === "string") {
                data[method].apply(data, Array.prototype.slice.call(args, 1));
            }
        });
    };

    $.fn.notify.defaults = {
        top_position: 50
    };

})(jQuery);

Anon7 - 2022
AnonSec Team