Subversion Repositories SmartDukaan

Rev

Rev 14564 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14564 Rev 14568
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
    
-
 
10
    $('#doa-in').submit(function( event ) {
6
    $(document).on('submit','.doaIn', function(){
11
    	event.preventDefault();
-
 
12
        $.ajax({
7
    	$.ajax({
13
            type    : "PUT",
8
            type    : "PUT",
14
            url     : "/inventory/doa-in/" + $(this).attr('inventoryItemId'),
9
            url     : "/inventory/doa-in/" + $(this).attr('inventoryItemId'),
15
            data    : $(this).serialize(),
10
            data    : $(this).serialize(),
16
            success : function(response) {
11
            success : function(response) {
17
                document.location.href = "/inventory/doa-in";
12
                document.location.href = "/inventory/doa-in";
Line 19... Line 14...
19
        });
14
        });
20
        
15
        
21
        return false;
16
        return false;
22
    });
17
    });
23
    
18
    
24
    $('#doaOut_'+$(this).attr('inventoryItemId')).on('click', function(){
-
 
25
    	$('#doa-out').submit();
-
 
26
    });
-
 
27
    
-
 
28
    $('#doa-out').on('submit', function() {
19
    $(document).on('submit','.doaOut', function(){
29
        $.ajax({
20
        $.ajax({
30
            type    : "PUT",
21
            type    : "PUT",
31
            url     : "/inventory/doa-out/" + $(this).attr('inventoryItemId'),
22
            url     : "/inventory/doa-out/" + $(this).attr('inventoryItemId'),
32
            data    : $(this).serialize(),
23
            data    : $(this).serialize(),
33
            success : function(response) {
24
            success : function(response) {
Line 36... Line 27...
36
        });
27
        });
37
 
28
 
38
        return false;
29
        return false;
39
    });
30
    });
40
    
31
    
41
    $('.orderIdInfo').on('click', function(){
32
    $(document).on('click','.orderIdInfo', function(){
42
		inventoryItemId = $(this).attr('id');
33
		inventoryItemId = $(this).attr('id');
43
		$.ajax({
34
		$.ajax({
44
	        type : "GET",
35
	        type : "GET",
45
	        url : "/inventory/doa-in!getOrderIdDOAInItem?id="+inventoryItemId,
36
	        url : "/inventory/doa-in!getOrderIdDOAInItem?id="+inventoryItemId,
46
	        success : function(response) {
37
	        success : function(response) {