Subversion Repositories SmartDukaan

Rev

Rev 7456 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7456 Rev 12570
Line 47... Line 47...
47
			zone = $(this).attr('zone');
47
			zone = $(this).attr('zone');
48
		}
48
		}
49
	});
49
	});
50
	$('#' + zone).attr('selected', true);
50
	$('#' + zone).attr('selected', true);
51
	$('#zone-selector').val(zone);
51
	$('#zone-selector').val(zone);
52
	showSpecificStores();
52
	showSpecificStores(false);
53
});
53
});
54
 
54
 
55
var showSpecificStores = function() {
55
var showSpecificStores = function(callEvent) {
56
	//var rows = $(this).parents('#hotspot-address-heading').siblings('#store-address-container').find('tr');
56
	//var rows = $(this).parents('#hotspot-address-heading').siblings('#store-address-container').find('tr');
57
	var index = 0;
57
	var index = 0;
58
	var rows = $('#store-address-container').find('tr');
58
	var rows = $('#store-address-container').find('tr');
59
	if($('#zone-selector').val() == 'All') {
59
	if($('#zone-selector').val() == 'All') {
60
		$(rows).show();
60
		$(rows).show();
Line 72... Line 72...
72
	} else if(index == 1) {
72
	} else if(index == 1) {
73
		var count = index + " store";
73
		var count = index + " store";
74
	} else {
74
	} else {
75
		var count= index + " stores";
75
		var count= index + " stores";
76
	}
76
	}
-
 
77
	if(callEvent){
77
	trackEventWithGA("InStore Pickup Region", $('#zone-selector').val());
78
		trackEventWithGA("InStore Pickup Region", $('#zone-selector').val());
-
 
79
	}
78
	$('#store-address-header-text').html("&nbsp;Select a pickup point (<b>" + count + "</b> available)");
80
	$('#store-address-header-text').html("&nbsp;Select a pickup point (<b>" + count + "</b> available)");
79
};
81
};
80
 
82
 
81
$("#zone-selector").change(showSpecificStores);
83
$("#zone-selector").change(showSpecificStores, true);
82
 
84
 
83
$(".unselected-tab").live('click', function() {
85
$(".unselected-tab").live('click', function() {
84
	var tabToBeSelected = $(this).attr('id');
86
	var tabToBeSelected = $(this).attr('id');
85
	var deliveryType = "In-Store Pickup";
87
	var deliveryType = "In-Store Pickup";
86
	if(tabToBeSelected == 'tab-left') {
88
	if(tabToBeSelected == 'tab-left') {