Subversion Repositories SmartDukaan

Rev

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

Rev 5614 Rev 5716
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];
-
 
104
		
101
		
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
	
-
 
115
	function checkIfUserHasAddress()	{
102
	function checkIfUserHasAddress(){
116
		var addressEmpty = parseInt($('#addressEmpty').val());
103
		var addressEmpty = parseInt($('#addressEmpty').val());
117
		
104
		
118
		if (addressEmpty == 1)	{
105
		if (addressEmpty == 1)	{
119
			showAddAddressForm();
106
			showAddAddressForm();
120
		}
107
		}
121
	}
108
	}
122
	
109
	
123
	function showAddAddressForm(){
110
	function showAddAddressForm(){
-
 
111
		//$('#main-right-container').hide();
-
 
112
		$('#shipping-address-div').hide();
124
		$('#addresses').hide();
113
		$('#billing-address-div').hide();
125
		$('#frmShippingAddress').show();
114
		$('#frmShippingAddress').show();
126
	}
115
	}
127
	
116
	
128
	function showAddressList()	{
117
	function showAddressList()	{
129
		$('#frmShippingAddress').hide();
118
		$('#frmShippingAddress').hide();
-
 
119
		//$('#main-right-container').show();
-
 
120
		$('#shipping-address-div').show();
130
		$('#addresses').show();
121
		$('#billing-address-div').show();
131
	}
122
	}
132
});
123
});
133
 
124
 
134
function sumOfColumns(tableID, columnIndex, hasHeader)	{
125
function sumOfColumns(tableID, columnIndex, hasHeader)	{
135
	var tot = 0;
126
	var tot = 0;