Subversion Repositories SmartDukaan

Rev

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

Rev 27596 Rev 27618
Line 9... Line 9...
9
			delete pendingPO;
9
			delete pendingPO;
10
			delete pendingPOCustomer;
10
			delete pendingPOCustomer;
11
		}
11
		}
12
		loadCatalog("main-content", "");
12
		loadCatalog("main-content", "");
13
	});
13
	});
-
 
14
	var accesories = false;
-
 
15
	$('.accesoriesClass').live('click', function() {
-
 
16
		accesories = true;
-
 
17
 
-
 
18
		doGetAjaxRequestHandler(context + "/getCatalog?accesories=" + true,
-
 
19
			function(response) {
-
 
20
				$('#main-content').html(response);
-
 
21
			});
-
 
22
 
-
 
23
 
-
 
24
	});
-
 
25
 
14
	var brand = null;
26
	var brand = null;
15
	$('.cover').live('click', function() {
27
	$('.cover').live('click', function() {
16
		console.log('hello');
28
		console.log('hello');
17
 
29
 
18
		brand = $(this).data('stockbrand');
30
		brand = $(this).data('stockbrand');
Line 211... Line 223...
211
 
223
 
212
			if (searchItem) {
224
			if (searchItem) {
213
				params['itemId'] = currentItem.itemId;
225
				params['itemId'] = currentItem.itemId;
214
			}
226
			}
215
			console.log(brand);
227
			console.log(brand);
216
			if(brand)
228
			if (brand != null) {
217
			{
-
 
218
			params['brand'] =brand;
229
				params['brand'] = brand;
219
			}
230
			}
-
 
231
 
-
 
232
			if (accesories == true) {
-
 
233
				params['accesories'] = accesories;
-
 
234
			}
-
 
235
 
-
 
236
 
220
			params['searchTerm'] = searchText;
237
			params['searchTerm'] = searchText;
-
 
238
			console.log(params)
221
			loadPaginatedNextItems('/getPaginatedCatalog', params,
239
			loadPaginatedCatalogNextItems('/getPaginatedCatalog', params,
222
				'catalog-paginated', 'catalog-table', null);
240
				'catalog-paginated', 'catalog-table', null);
223
			$(this).blur();
241
			$(this).blur();
224
		});
242
		});
225
 
243
 
226
	$("#catalog-paginated .previous").live(
244
	$("#catalog-paginated .previous").live(
Line 236... Line 254...
236
 
254
 
237
			if (searchItem) {
255
			if (searchItem) {
238
				params['itemId'] = currentItem.itemId;
256
				params['itemId'] = currentItem.itemId;
239
			}
257
			}
240
			console.log(brand);
258
			console.log(brand);
241
			if(brand)
259
			if (brand != null) {
-
 
260
				params['brand'] = brand;
242
			{
261
			}
-
 
262
 
-
 
263
			if (accesories == true) {
243
			params['brand'] =brand;
264
				params['accesories'] = accesories;
244
			}
265
			}
245
			params['searchTerm'] = searchText;
266
			params['searchTerm'] = searchText;
-
 
267
			console.log(params)
-
 
268
 
246
			loadPaginatedPreviousItems('/getPaginatedCatalog', params,
269
			loadPaginatedCatalogPreviousItem('/getPaginatedCatalog', params,
247
				'catalog-paginated', 'catalog-table', null);
270
				'catalog-paginated', 'catalog-table', null);
248
			$(this).blur();
271
			$(this).blur();
249
		});
272
		});
250
 
273
 
251
	$("#catalog-search-button").live('click', function() {
274
	$("#catalog-search-button").live('click', function() {