Subversion Repositories SmartDukaan

Rev

Rev 14520 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14520 Rev 14564
Line 1... Line 1...
1
$(function() {
1
$(function() {
2
    $('table#doa-items').dataTable({
2
    $('table#doa-items').dataTable({
3
    	"lengthMenu": [[20, 50, 100, -1], [20, 50, 100, "All"]]
3
    	"lengthMenu": [[20, 50, 100, -1], [20, 50, 100, "All"]]
4
    });
4
    });
5
    
5
    
-
 
6
    $('#doaIn_'+$(this).attr('inventoryItemId')).on('click', function(){
-
 
7
    	$('#doa-in').submit();
-
 
8
    });
-
 
9
    
6
    /*$('.doa-in').on('submit', function() {
10
    $('#doa-in').submit(function( event ) {
-
 
11
    	event.preventDefault();
7
        $.ajax({
12
        $.ajax({
8
            type    : "PUT",
13
            type    : "PUT",
9
            url     : "/inventory/doa-in/" + $(this).attr('inventoryItemId'),
14
            url     : "/inventory/doa-in/" + $(this).attr('inventoryItemId'),
10
            data    : $(this).serialize(),
15
            data    : $(this).serialize(),
11
            success : function(response) {
16
            success : function(response) {
12
                document.location.href = "/inventory/doa-in";
17
                document.location.href = "/inventory/doa-in";
13
            },
18
            }
14
            
-
 
15
        });
19
        });
16
        
20
        
17
        return false;
21
        return false;
18
    });*/
22
    });
-
 
23
    
-
 
24
    $('#doaOut_'+$(this).attr('inventoryItemId')).on('click', function(){
-
 
25
    	$('#doa-out').submit();
-
 
26
    });
19
    
27
    
20
    $('.doa-out').on('submit', function() {
28
    $('#doa-out').on('submit', function() {
21
        $.ajax({
29
        $.ajax({
22
            type    : "PUT",
30
            type    : "PUT",
23
            url     : "/inventory/doa-out/" + $(this).attr('inventoryItemId'),
31
            url     : "/inventory/doa-out/" + $(this).attr('inventoryItemId'),
24
            data    : $(this).serialize(),
32
            data    : $(this).serialize(),
25
            success : function(response) {
33
            success : function(response) {