Uname: Linux webm005.cluster107.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
User: 6036 (villadal)
Group: 100 (users)
Disabled functions: NONE
Safe mode: On[ PHPinfo ]
//home/villadal/www/old/booked/Web/scripts/admin      ( Reset | Go to )
File Name: quota.js
Edit
function QuotaManagement(opts)
{
    var options = opts;
    
    var elements = {
        
        addForm: $('#addQuotaForm'),
        deleteForm: $('#deleteQuotaForm'),
        deleteDialog: $('#deleteDialog')
    };

    var activeQuotaId = null;
    
    QuotaManagement.prototype.init = function()
    {
        ConfigureAdminDialog(elements.deleteDialog,  400, 200);
            
        $('.delete').click(function(e) {
            e.preventDefault();
            setActiveQuotaId($(this).attr('quotaId'));
            elements.deleteDialog.dialog('open');
        });

        $(".save").click(function() {
            $(this).closest('form').submit();
        });
        
        $(".cancel").click(function() {
            $(this).closest('.dialog').dialog("close");
        });

        ConfigureAdminForm(elements.addForm, getSubmitCallback(options.actions.addQuota), null, handleAddError);
        ConfigureAdminForm(elements.deleteForm, getSubmitCallback(options.actions.deleteQuota), null, handleAddError);
    };

    var getSubmitCallback = function(action)
    {
        return function() {
            return options.submitUrl + "?qid=" + getActiveQuotaId() + "&action=" + action;
        };
    };

    var handleAddError = function(responseText)
    {
        alert(responseText);
    };

    var setActiveQuotaId = function (quotaId)
    {
        activeQuotaId = quotaId
    };
    
    var getActiveQuotaId = function()
    {
        return activeQuotaId;
    };
}

All system for education purposes only. For more tools: Telegram @jackleet

Mr.X Private Shell

Logo
-
New File | New Folder
Command
SQL