Subversion Repositories SmartDukaan

Rev

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

Rev 5614 Rev 5716
Line 38... Line 38...
38
			}
38
			}
39
		}
39
		}
40
	});
40
	});
41
});
41
});
42
 
42
 
-
 
43
$(".unselected-tab").live('click', function() {
-
 
44
	var tabToBeSelected = $(this).attr('id');
-
 
45
	if(tabToBeSelected == 'tab-left') {
-
 
46
		$("#tabSelector").val("myLocation");
-
 
47
		$('#tabSelectorForAddAddressForm').val('myLocation');
-
 
48
		$('#newAddressFormHeading').text("Enter the address where you want the items to be delivered");
-
 
49
	} else {
-
 
50
		$("#tabSelector").val("HotSpot");
-
 
51
		$('#tabSelectorForAddAddressForm').val('HotSpot');
-
 
52
		$('#newAddressFormHeading').text("Enter the address which you want printed on the bill");
-
 
53
	}
-
 
54
	$(this).removeClass('unselected-tab').addClass('selected-tab');
-
 
55
	$(this).siblings().removeClass('selected-tab').addClass('unselected-tab');
-
 
56
	var hiddenPane = $(this).parent().siblings('.hidden-div');
-
 
57
	$(this).parent().siblings().addClass('hidden-div');
-
 
58
	$(hiddenPane).removeClass('hidden-div');
-
 
59
});
-
 
60
 
-
 
61
$('.shipping-page-addresses .button-address-select').click(function(){
-
 
62
	var addressId = $(this).attr('id').split('_')[1];
-
 
63
	$('#formChangeAddressTo_' + addressId).submit();
-
 
64
});
-
 
65
 
-
 
66
$('.shipping-page-addresses .store-address-selector-button').click(function(){
-
 
67
	var addressId = $(this).attr('id').split('_')[1];
-
 
68
	$('#formChangeStoreAddressTo_' + addressId).submit();
-
 
69
});
-
 
70
 
-
 
71
$('.shipping-page-addresses .billing-address-selector-button').live('click', function(){
-
 
72
	var addressId = $(this).closest('tr').attr('id').split('_')[1];
-
 
73
	$('#addressid').val(addressId);
-
 
74
	var image = $(this).closest('tr').siblings('.default-address').find('img')[0];
-
 
75
	var previousAddress = $(this).closest('tr').siblings('.default-address').attr('id').split('_')[1];
-
 
76
	$(image).attr('id', 'selectAddress_' + previousAddress);
-
 
77
	$(image).attr('src', '/images/RadioButton_Unselected.png');
-
 
78
	$(image).attr('title', 'Select this Store for Shipment');
-
 
79
	$(image).removeClass('dummy-class');
-
 
80
	$(image).addClass('billing-address-selector-button');
-
 
81
	$(this).closest('tr').siblings('.default-address').removeClass('default-address');
-
 
82
	$('#tr_' + addressId).addClass('default-address');
-
 
83
	$(this).attr('src', '/images/RadioButton_Selected.png');
-
 
84
	$(this).addClass('dummy-class');
-
 
85
	$(this).removeClass('billing-address-selector-button');
-
 
86
});
-
 
87
 
-
 
88
 
-
 
89
 
-
 
90
$(document).ready(function(){
-
 
91
	$('.default-address').focus();
-
 
92
});
-
 
93
 
43
/**
94
/**
44
	Shipping Address page setup
95
	Shipping Address page setup
45
*/
96
*/
46
function shippingAddressSetup(){
97
function shippingAddressSetup(){
47
	
98