Subversion Repositories SmartDukaan

Rev

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

Rev 1464 Rev 1614
Line 187... Line 187...
187
		var t = (research_tot * 1) - (tot * 1);
187
		var t = (research_tot * 1) - (tot * 1);
188
		$("#research_total").val(t);
188
		$("#research_total").val(t);
189
 
189
 
190
		jQuery.ajax({
190
		jQuery.ajax({
191
			type: "GET",
191
			type: "GET",
192
			url: "/myresearch/" + seldata + "?_method=delete",
192
			url: "/deletefromresearch/" + seldata + "?_method=delete",
193
			data: "productid=" + seldata,
193
			data: "productid=" + seldata,
194
			success: function(msg){
194
			success: function(msg){
195
				jQuery.each(seldata.split("_"), function(intIndex, objValue){
195
				jQuery.each(seldata.split("_"), function(intIndex, objValue){
196
					$("#pane1").find("#" + objValue).fadeOut('slow', function() {
196
					$("#pane1").find("#" + objValue).fadeOut('slow', function() {
197
						$(this).remove();
197
						$(this).remove();
Line 205... Line 205...
205
		});
205
		});
206
	} else	{
206
	} else	{
207
		alert("Please select atleast one product");
207
		alert("Please select atleast one product");
208
	}
208
	}
209
  });
209
  });
-
 
210
 
-
 
211
  /*
-
 
212
  if(!($.Storage.get("uid")) && $.cookie("uid")){
-
 
213
	  update_browse_history();
-
 
214
	  $.Storage.remove("historyitems");
-
 
215
  }
-
 
216
  
-
 
217
  if( $.Storage.get("uid") && !($.cookie("uid"))){
-
 
218
	  $.Storage.remove("research");
-
 
219
	  $.Storage.remove("history");
-
 
220
  }
-
 
221
  */
210
  
222
  
211
  if ($.cookie("uid") != $.Storage.get("uid")) {
223
  if ($.cookie("uid") != $.Storage.get("uid")) {
212
	  $.Storage.set("uid", $.cookie("uid"));
224
	  $.Storage.set("uid", $.cookie("uid"));
213
	  $.Storage.remove("research");
225
	  $.Storage.remove("research");
214
	  $.Storage.remove("history");
226
	  $.Storage.remove("history");
-
 
227
	  
-
 
228
	  update_browse_history();
-
 
229
	  $.Storage.remove("historyitems");
215
  }
230
  }
216
 
231
 
-
 
232
  
217
  if ($.Storage.get("research")) {
233
  if ($.Storage.get("research")) {
218
	  $("#myresearch").html($.Storage.get("research"));
234
	  $("#myresearch").html($.Storage.get("research"));
219
  }
235
  }
220
  else {
236
  else {
221
	  load_research_widget();
237
	  load_research_widget();
222
  }
238
  }
223
  if ($.Storage.get("history")) {
239
  if ($.Storage.get("history")) {
224
	  $("#browsehistory").html($.Storage.get("history"));
240
	  $("#browsehistory").html($.Storage.get("history"));
225
  }
241
  }
226
  else {
242
  else {
-
 
243
	  if($.cookie("uid")){
227
	  load_history_widget();
244
		  load_history_widget(true);
-
 
245
	  }else{
-
 
246
		  load_history_widget(false);
-
 
247
	  }
228
  }
248
  }
229
});
249
});
230
250