Subversion Repositories SmartDukaan

Rev

Rev 10489 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5185 mandeep.dh 1
$(function() {
2
    $('table#doa-items').dataTable({
3
        "aaSorting" : [ [ 1, 'desc' ] ],
4
        "iDisplayLength" : 20,
5
        "sDom": 'T<"clear">lfrtip',
6
        "aLengthMenu" : [ [ 20, 50, 100, -1 ], [ 20, 50, 100, "All" ] ]
7
    });
8
 
9
    $('#doa-in').live('submit', function() {
10
        $.ajax({
11
            type    : "PUT",
12
            url     : "/inventory/doa-in/" + $(this).attr('inventoryItemId'),
13
            data    : $(this).serialize(),
14
            success : function(response) {
15
                document.location.href = "/inventory/doa-in";
16
            }
17
        });
18
 
19
        return false;
20
    });
21
 
22
    $('#doa-out').live('submit', function() {
23
        $.ajax({
24
            type    : "PUT",
25
            url     : "/inventory/doa-out/" + $(this).attr('inventoryItemId'),
26
            data    : $(this).serialize(),
27
            success : function(response) {
28
                document.location.href = "/inventory/doa-out";
29
            }
30
        });
31
 
32
        return false;
33
    });
34
 
35
});