Subversion Repositories SmartDukaan

Rev

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