Subversion Repositories SmartDukaan

Rev

Rev 1582 | Rev 1638 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1582 Rev 1595
Line 23... Line 23...
23
				if (this.lastQueryType == 1 || this.lastQueryType == 2)	{
23
				if (this.lastQueryType == 1 || this.lastQueryType == 2)	{
24
					jQuery.ajax({
24
					jQuery.ajax({
25
						type: "GET",
25
						type: "GET",
26
						url: "/contact-us/all_orders",
26
						url: "/contact-us/all_orders",
27
						success: function(data)	{
27
						success: function(data)	{
28
							console.log('allOrders', data);
-
 
29
							$("#order_id").html(data);
28
							$("#order_id").html(data);
30
						}
29
						}
31
					});
30
					});
32
				}
31
				}
33
			},
32
			},
Line 60... Line 59...
60
		$('#orderComponent, #awbComponent, #productComponent, #subjectComponent, #msgComponent').hide();
59
		$('#orderComponent, #awbComponent, #productComponent, #subjectComponent, #msgComponent').hide();
61
		$('#frmContactUs input[name="submit"]').removeAttr('disabled');
60
		$('#frmContactUs input[name="submit"]').removeAttr('disabled');
62
		utils.resetProductSelector();
61
		utils.resetProductSelector();
63
		utils.activateResetButton();
62
		utils.activateResetButton();
64
		
63
		
65
		console.log(utils.orderIdSelector);
-
 
66
		
-
 
67
		switch(parseInt($(this).val()))	{
64
		switch(parseInt($(this).val()))	{
68
 
65
 
69
			case 1:
66
			case 1:
70
				$('#orderComponent, #productComponent, #subjectComponent, #msgComponent').show();
67
				$('#orderComponent, #productComponent, #subjectComponent, #msgComponent').show();
71
				$('#lblSubject').html('Reason');
68
				$('#lblSubject').html('Reason');
Line 77... Line 74...
77
				
74
				
78
				jQuery.ajax({
75
				jQuery.ajax({
79
					type: "GET",
76
					type: "GET",
80
					url: "/contact-us/to_return",
77
					url: "/contact-us/to_return",
81
					success: function(data)	{
78
					success: function(data)	{
82
						console.log('returnableOrders', data);
-
 
83
						if($.trim(data) == "<option value='-1'>No Orders Found</option>")	{
79
						if($.trim(data) == "<option value='-1'>No Orders Found</option>")	{
84
							alert("You don't hany any completed orders.");
80
							alert("You don't hany any completed orders.");
85
							utils.resetForm();
81
							utils.resetForm();
86
						}
82
						}
87
						else	{
83
						else	{
Line 103... Line 99...
103
				
99
				
104
				jQuery.ajax({
100
				jQuery.ajax({
105
					type: "GET",
101
					type: "GET",
106
					url: "/contact-us/to_cancel",
102
					url: "/contact-us/to_cancel",
107
					success: function(data)	{
103
					success: function(data)	{
108
						console.log('cancellableOrders', data);
-
 
109
						if($.trim(data) == "<option value='-1'>No Orders Found</option>")	{
104
						if($.trim(data) == "<option value='-1'>No Orders Found</option>")	{
110
							alert("You don't hany any completed orders.");
105
							alert("You don't hany any completed orders.");
111
							utils.resetForm();
106
							utils.resetForm();
112
						}
107
						}
113
						else	{
108
						else	{