Subversion Repositories SmartDukaan

Rev

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