Subversion Repositories SmartDukaan

Rev

Rev 10490 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

$(function() {
    $('table#doa-items').dataTable({
        "aaSorting" : [ [ 1, 'desc' ] ],
        "iDisplayLength" : 20,
        "sDom": 'T<"clear">lfrtip',
        "aLengthMenu" : [ [ 20, 50, 100, -1 ], [ 20, 50, 100, "All" ] ]
    });
    
    $('#doa-in').live('submit', function() {
        $.ajax({
            type    : "PUT",
            url     : "/inventory/doa-in/" + $(this).attr('inventoryItemId'),
            data    : $(this).serialize(),
            success : function(response) {
                document.location.href = "/inventory/doa-in";
            }
        });
        
        return false;
    });
    
    $('#doa-out').live('submit', function() {
        $.ajax({
            type    : "PUT",
            url     : "/inventory/doa-out/" + $(this).attr('inventoryItemId'),
            data    : $(this).serialize(),
            success : function(response) {
                document.location.href = "/inventory/doa-out";
            }
        });

        return false;
    });
    
});