Subversion Repositories SmartDukaan

Rev

Rev 10932 | Rev 12729 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7410 amar.kumar 1
 
7676 amar.kumar 2
 
3
function closeColorBox(){
4
	$.colorbox.close();
5
}
6
 
7
$('.link-requiring-warehouse-selection').live('click', function(){
8
	var linkurl = $(this).attr('href');
9
	$('<form id = "tempForm" onsubmit = "closeColorBox() "style = "text-align:center" method = "GET" action = "'+ linkurl +'">').appendTo('body');
10
 
11
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "7">Mahipalpur</input>'));
12
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "12">Goregaon</input></br>'));
13
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "13">Biwandi</input>'));
10864 manish.sha 14
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "16">Mum-Amazon</input><br/>'));
15
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "1765">Bangalore</input>'));
16
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "1768">Bangalore-SR</input><br/>'));
17
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "1771">BAN-AMZ/Bangalore</input><br/><br/>'));
12543 manish.sha 18
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "2857">HR-SORPL/Gurgaon</input><br/><br/>'));
19
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "2854">HR-FK/Gurgaon</input><br/><br/>'));
7676 amar.kumar 20
	$('form#tempForm').append($('<input type = "submit"  value = "Submit"/>'));
21
 
22
	$.colorbox({
23
		inline : true,
24
        width : "325px",
10864 manish.sha 25
        height : "200px",
7676 amar.kumar 26
        opacity : "0.30",
27
        overlayClose :	true,
28
        escKey :	true,
29
        href : "#tempForm",
30
        onClosed : function() {
31
            $('#tempForm').remove();
32
        }
33
	});
34
	event.preventDefault();
35
	return false;
36
 
37
});
38
 
39
 
40
 
7410 amar.kumar 41
function selectWarehouseForPOCreation() {
42
	$('#warehouse-selector-po-creation').show();
43
	$.colorbox({
44
		inline : true,
45
        width : "325px",
10932 manish.sha 46
        height : "200px",
7410 amar.kumar 47
        opacity : "0.30",
48
        overlayClose :	true,
49
        escKey :	true,
50
        href : "#warehouse-selector-po-creation",
51
        onClosed : function() {
52
            $("#warehouse-selector-po-creation").hide();
53
            $('#warehouse-selection-error').html("");
54
        }
55
	});
56
	event.preventDefault();
57
	return false;
58
}
59
 
60
function selectWarehouseForListingPO() {
61
	$('#warehouse-selector-po-recieve').show();
62
	$.colorbox({
63
		inline : true,
64
        width : "325px",
10932 manish.sha 65
        height : "200px",
7410 amar.kumar 66
        opacity : "0.30",
67
        overlayClose :	true,
68
        escKey :	true,
69
        href : "#warehouse-selector-po-recieve",
70
        onClosed : function() {
71
            $("#warehouse-selector-po-recieve").hide();
72
            $('#warehouse-selection-error').html("");
73
        }
74
	});
75
	event.preventDefault();
76
	return false;
77
}
78
 
79
function openPOCreationPage() {
80
	$.colorbox.close();
81
	warehouseId = $("#warehouse-selector-po-creation input[name='warehouse']:checked").val();
82
	if(warehouseId != 'undefined') {
83
		this.location.href = "/inventory/purchase-order/new?warehouseId="+warehouseId;
84
	} else {
85
		$('#warehouse-selection-error').html("<span>Please select warehouse</span>");
86
	}
87
}
88
 
89
function showOpenPOpage() {
90
	$.colorbox.close();
91
	warehouseId = $("#warehouse-selector-po-recieve input[name='warehouse']:checked").val();
92
	if(warehouseId != 'undefined') {
93
		this.location.href = "/inventory/purchase-order?warehouseId="+warehouseId;
94
	} else {
95
		$('#warehouse-selection-error').html("<span>Please select warehouse</span>");
96
	}
97
}