Subversion Repositories SmartDukaan

Rev

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