Subversion Repositories SmartDukaan

Rev

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

Rev 1035 Rev 1048
Line 7... Line 7...
7
 
7
 
8
$(document).ready(function(){
8
$(document).ready(function(){
9
	
9
	
10
	// Variables for pagination result of browse, other tab content and search result
10
	// Variables for pagination result of browse, other tab content and search result
11
	x = y = z = 0;
11
	x = y = z = 0;
12
	arrBrowsePaginationResult = new Array();
12
	var arrBrowsePaginationResult = [];
13
	arrBrowsePaginationResult.push([0, 0]);
13
	arrBrowsePaginationResult.push([0, 0]);
14
	
14
	
15
	arrOtherPaginationResult = new Array();
15
	var arrOtherPaginationResult = [];
16
	arrOtherPaginationResult.push([0, 0]);
16
	arrOtherPaginationResult.push([0, 0]);
17
	
17
	
18
	arrSearchPaginationResult = new Array();
18
	var arrSearchPaginationResult = [];
19
	arrSearchPaginationResult.push([0, 0]);
19
	arrSearchPaginationResult.push([0, 0]);
20
	
20
	
21
	
21
	
22
	// Setting tab button id attr to empty
22
	// Setting tab button id attr to empty
23
	$('#tabButton div').each(function(){
23
	$('#tabButton div').each(function(){
Line 29... Line 29...
29
	
29
	
30
	// Hide other tab common content for best deals, latest arrivals, best sellers
30
	// Hide other tab common content for best deals, latest arrivals, best sellers
31
	hideShowTabContent("otherTabContent", "hide");
31
	hideShowTabContent("otherTabContent", "hide");
32
	
32
	
33
	// Adjust current filters section css
33
	// Adjust current filters section css
34
	if($("#currentFilters:visible").length == 0){
34
	if($("#currentFilters:visible").length === 0){
35
		$("#filterBy h2").css("margin-top", "0");
35
		$("#filterBy h2").css("margin-top", "0");
36
		$("#currentFilters").css("padding-bototom", "0");
36
		$("#currentFilters").css("padding-bototom", "0");
37
	}
37
	}
38
	
38
	
39
	// Browse tab pagination
39
	// Browse tab pagination
Line 87... Line 87...
87
*/
87
*/
88
function filterByValues(){
88
function filterByValues(){
89
	
89
	
90
	// Talk time
90
	// Talk time
91
	$("#filterByTalkTime .filterOption a").click(function(){
91
	$("#filterByTalkTime .filterOption a").click(function(){
92
		id = $(this).attr("id");
92
		var id = $(this).attr("id");
93
		v = $("#" + id).text();
93
		var v = $("#" + id).text();
94
		
94
		
95
		//alert("Selected id:  " + id + "\nValue: " + v);
95
		//alert("Selected id:  " + id + "\nValue: " + v);
96
	});
96
	});
97
	
97
	
98
	// Data Connectivity
98
	// Data Connectivity
99
	$("#filterByDataConnectivity .filterOption a").click(function(){
99
	$("#filterByDataConnectivity .filterOption a").click(function(){
100
		v =  $(this).text()
100
		var v =  $(this).text();
101
		//alert("Value: " + v);
101
		//alert("Value: " + v);
102
	});
102
	});
103
	
103
	
104
	// Note for price slider value see priceSlider.js
104
	// Note for price slider value see priceSlider.js
105
}
105
}
Line 190... Line 190...
190
			$("#searchResult #searchResultContent .pagination1").pagination(totalPages, {
190
			$("#searchResult #searchResultContent .pagination1").pagination(totalPages, {
191
				num_display_entries : numOfPageDisplay,
191
				num_display_entries : numOfPageDisplay,
192
				num_edge_entries	: edgePaginationLen,
192
				num_edge_entries	: edgePaginationLen,
193
				current_page 		: curPageSelection,
193
				current_page 		: curPageSelection,
194
				items_per_page		: 1,
194
				items_per_page		: 1,
195
				callback			: searchContentCallback,
195
				callback		: searchContentCallback,
196
				link_to				: 'javascript: void(0);'
196
				link_to			: 'javascript: void(0);'
197
			});
197
			});
198
			
198
			
199
			// Show result no
199
			// Show result no
200
			curPageItemNo = $('#searchResult #searchResultContent div.page:eq(0) .productItem').length;
200
			curPageItemNo = $('#searchResult #searchResultContent div.page:eq(0) .productItem').length;
201
			
201