Subversion Repositories SmartDukaan

Rev

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