Subversion Repositories SmartDukaan

Rev

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

Rev 24083 Rev 24168
Line 271... Line 271...
271
	  				}
271
	  				}
272
	});
272
	});
273
 
273
 
274
  newCustomItems = $newCustomItems;
274
  newCustomItems = $newCustomItems;
275
  itemAhead1 = $("#typeaheaditem1").typeahead({
275
  itemAhead1 = $("#typeaheaditem1").typeahead({
276
	  source: newCustomItems,
276
	  source: function(q, process) {
-
 
277
	  	if(q.length <= 2) {
-
 
278
	  		console.log("Query is empty");
-
 
279
	  		return;
-
 
280
	  	} else {
-
 
281
		  	return $.get(context+"/item", {query : q}, function(data){
-
 
282
		  		console.log(data);
-
 
283
		  		process(JSON.parse(data));
-
 
284
		  	});
-
 
285
		}
-
 
286
	  },
-
 
287
	  delay: 400,
-
 
288
	  items: 20,
-
 
289
	  displayText: function(item){return item.itemDescription;},
277
	  autoSelect: false,
290
	  autoSelect: false,
278
	  displayText:function(item){return item.itemDescription;},
-
 
279
	  afterSelect:	function(selectedItem){
291
	  afterSelect:	function(selectedItem){
280
	  					currentItem1 = selectedItem;
292
	  					currentItem1 = selectedItem;
281
	  					doGetAjaxRequestHandler(context+"/item-pricing/"+currentItem1.itemId, function(response){
293
	  					doGetAjaxRequestHandler(context+"/item-pricing/"+currentItem1.itemId, function(response){
282
	  						response = JSON.parse(response);
294
	  						response = JSON.parse(response);
283
	  						
295