Subversion Repositories SmartDukaan

Rev

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

$(function() {
        $(".create-warehouse").live('click', function() {
                loadCreateWarehouse("main-content");
        });
        
        $(".warehouses").live('click', function() {
                loadWarehouses("main-content");
        });
        
        $("#warehouses-paginated .next").live('click', function() {
                loadPaginatedNextItems('/getPaginatedWarehouses', null, 'warehouses-paginated', 'warehouses-table', null);
                $(this).blur();
    });
        
        $("#warehouses-paginated .previous").live('click', function() {
                loadPaginatedPreviousItems('/getPaginatedWarehouses', null, 'warehouses-paginated', 'warehouses-table', null);
                $(this).blur();
    });
});

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

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