Subversion Repositories SmartDukaan

Rev

Rev 12543 | Rev 12769 | 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/>'));
12729 manish.sha 17
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "1771">BAN-AMZ/Bangalore</input><br/>'));
18
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "2857">HR-SORPL/Gurgaon</input>'));
19
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "2854">HR-FK/Gurgaon</input><br/>'));
20
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "3295">HR-AMZ/Mewat</input><br/><br/>'));
7676 amar.kumar 21
	$('form#tempForm').append($('<input type = "submit"  value = "Submit"/>'));
22
 
23
	$.colorbox({
24
		inline : true,
25
        width : "325px",
10864 manish.sha 26
        height : "200px",
7676 amar.kumar 27
        opacity : "0.30",
28
        overlayClose :	true,
29
        escKey :	true,
30
        href : "#tempForm",
31
        onClosed : function() {
32
            $('#tempForm').remove();
33
        }
34
	});
35
	event.preventDefault();
36
	return false;
37
 
38
});
39
 
40
 
41
 
7410 amar.kumar 42
function selectWarehouseForPOCreation() {
43
	$('#warehouse-selector-po-creation').show();
44
	$.colorbox({
45
		inline : true,
46
        width : "325px",
10932 manish.sha 47
        height : "200px",
7410 amar.kumar 48
        opacity : "0.30",
49
        overlayClose :	true,
50
        escKey :	true,
51
        href : "#warehouse-selector-po-creation",
52
        onClosed : function() {
53
            $("#warehouse-selector-po-creation").hide();
54
            $('#warehouse-selection-error').html("");
55
        }
56
	});
57
	event.preventDefault();
58
	return false;
59
}
60
 
61
function selectWarehouseForListingPO() {
62
	$('#warehouse-selector-po-recieve').show();
63
	$.colorbox({
64
		inline : true,
65
        width : "325px",
10932 manish.sha 66
        height : "200px",
7410 amar.kumar 67
        opacity : "0.30",
68
        overlayClose :	true,
69
        escKey :	true,
70
        href : "#warehouse-selector-po-recieve",
71
        onClosed : function() {
72
            $("#warehouse-selector-po-recieve").hide();
73
            $('#warehouse-selection-error').html("");
74
        }
75
	});
76
	event.preventDefault();
77
	return false;
78
}
79
 
80
function openPOCreationPage() {
81
	$.colorbox.close();
82
	warehouseId = $("#warehouse-selector-po-creation input[name='warehouse']:checked").val();
83
	if(warehouseId != 'undefined') {
84
		this.location.href = "/inventory/purchase-order/new?warehouseId="+warehouseId;
85
	} else {
86
		$('#warehouse-selection-error').html("<span>Please select warehouse</span>");
87
	}
88
}
89
 
90
function showOpenPOpage() {
91
	$.colorbox.close();
92
	warehouseId = $("#warehouse-selector-po-recieve input[name='warehouse']:checked").val();
93
	if(warehouseId != 'undefined') {
94
		this.location.href = "/inventory/purchase-order?warehouseId="+warehouseId;
95
	} else {
96
		$('#warehouse-selection-error').html("<span>Please select warehouse</span>");
97
	}
98
}