Subversion Repositories SmartDukaan

Rev

Rev 10490 | Rev 14491 | Go to most recent revision | Details | Compare with Previous | 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
 
10886 manish.sha 35
    $('.orderIdInfo').live('click', function(){
36
		inventoryItemId = $(this).attr('id');
37
		$.ajax({
38
	        type : "GET",
39
	        url : "/inventory/doa-in!getOrderIdDOAInItem?id="+inventoryItemId,
40
	        success : function(response) {
41
	        	$.colorbox({
42
					inline : true,
43
			        width : "350px",
44
			        height : "150px",
45
			        opacity : "0.20",
46
			        overlayClose :	true,
47
			        escKey :	true,
48
			        href : $(response),
49
			        onClosed : function() {
50
 
51
			        }
52
				});
53
	        },
54
	        error : function(response) {
55
				alert("Error in fetching Order Id");
56
			}			
57
	    });
58
	});
59
 
10490 amar.kumar 60
    /*$('.doa-close-credit-note').hide();
10489 amar.kumar 61
 
62
    $('.closeDOAButton').live('click', function() {
63
        $(this).hide();
64
        $(this).siblings('.doa-close-credit-note').show();
10490 amar.kumar 65
    });*/
10489 amar.kumar 66
 
5185 mandeep.dh 67
});