Subversion Repositories SmartDukaan

Rev

Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed

$(function() {
        $(".create-vendor").live('click', function() {
                loadCreateVendor("main-content");
        });
        
        $(".vendors").live('click', function() {
                loadVendors("main-content");
        });
        
        $("#vendors-paginated .next").live('click', function() {
                loadPaginatedNextItems('/getPaginatedVendors', null, 'vendors-paginated', 'vendors-table', null);
                $(this).blur();
    });
        
        $("#vendors-paginated .previous").live('click', function() {
                loadPaginatedPreviousItems('/getPaginatedVendors', null, 'vendors-paginated', 'vendors-table', null);
                $(this).blur();
    });
});

function loadCreateVendor(domId){
        doGetAjaxRequestHandler(context+"/createVendor", function(response){
                $('#' + domId).html(response);
        });
}

function loadVendors(domId){
        doGetAjaxRequestHandler(context+"/getVendors", function(response){
                $('#' + domId).html(response);
        });
}