Subversion Repositories SmartDukaan

Rev

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

Rev 5607 Rev 5614
Line 96... Line 96...
96
	
96
	
97
	$('#addresses .button-address-select').click(function(){
97
	$('#addresses .button-address-select').click(function(){
98
		var addressId = $(this).attr('id').split('_')[1];
98
		var addressId = $(this).attr('id').split('_')[1];
99
		$('#formChangeAddressTo_' + addressId).submit();
99
		$('#formChangeAddressTo_' + addressId).submit();
100
	});
100
	});
-
 
101
	
-
 
102
	$('#addresses .delete-address').click(function(){
-
 
103
		var addressId = $(this).attr('id').split('_')[1];
101
		
104
		
-
 
105
		jQuery.ajax({
-
 
106
			type: "POST",
-
 
107
			url: "/address",
-
 
108
			data: "action=delete&addressid=" + addressId,
-
 
109
			success: function(msg){
-
 
110
				window.location.reload();
-
 
111
			}
-
 
112
		});
-
 
113
	});
-
 
114
	
102
	function checkIfUserHasAddress(){
115
	function checkIfUserHasAddress()	{
103
		var addressEmpty = parseInt($('#addressEmpty').val());
116
		var addressEmpty = parseInt($('#addressEmpty').val());
104
		
117
		
105
		if (addressEmpty == 1)	{
118
		if (addressEmpty == 1)	{
106
			showAddAddressForm();
119
			showAddAddressForm();
107
		}
120
		}
108
	}
121
	}
109
	
122
	
110
	function showAddAddressForm(){
123
	function showAddAddressForm(){
111
		//$('#main-right-container').hide();
-
 
112
		$('#shipping-address-div').hide();
-
 
113
		$('#billing-address-div').hide();
124
		$('#addresses').hide();
114
		$('#frmShippingAddress').show();
125
		$('#frmShippingAddress').show();
115
	}
126
	}
116
	
127
	
117
	function showAddressList()	{
128
	function showAddressList()	{
118
		$('#frmShippingAddress').hide();
129
		$('#frmShippingAddress').hide();
119
		//$('#main-right-container').show();
-
 
120
		$('#shipping-address-div').show();
-
 
121
		$('#billing-address-div').show();
130
		$('#addresses').show();
122
	}
131
	}
123
});
132
});
124
 
133
 
125
function sumOfColumns(tableID, columnIndex, hasHeader)	{
134
function sumOfColumns(tableID, columnIndex, hasHeader)	{
126
	var tot = 0;
135
	var tot = 0;