Subversion Repositories SmartDukaan

Rev

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