Subversion Repositories SmartDukaan

Rev

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

Rev 5145 Rev 5420
Line 222... Line 222...
222
                      data: "productid=[" + seldata +  "]",
222
                      data: "productid=[" + seldata +  "]",
223
                      success: function(msg){
223
                      success: function(msg){
224
                           var postSuccessDOMProcessing = function(objValue)	{
224
                           var postSuccessDOMProcessing = function(objValue)	{
225
                        	   trackEventWithGA('Research', 'Add to Research', objValue);
225
                        	   trackEventWithGA('Research', 'Add to Research', objValue);
226
                        	   add_to_storage_set("resitems", objValue);
226
                        	   add_to_storage_set("resitems", objValue);
227
                        	   var tblid = "#pane1 #" + objValue + " td";
-
 
228
                        	   $(tblid + " div a.truncate").truncate({addtitle: true});
-
 
229
                        	   $(tblid + " div div.price").truncate({addtitle: true});
-
 
230
                        	   $(tblid + " div div.text").truncate({addtitle: true});
-
 
231
                        	   $(tblid).animate({ backgroundColor: "#fcffb3" }, 'slow');
-
 
232
                        	   $(tblid).animate({ backgroundColor: "#F5F5F5" }, 'slow');
-
 
233
                        	   //Updating the count
227
                        	   //Updating the count
-
 
228
                        	   var truncFields=function(){
-
 
229
                        		   var msgDom = $(msg);
-
 
230
                        		   $("#pane1").prepend(msgDom);
-
 
231
                        		   $(msgDom).find("a.truncate").truncate({addtitle: true});
-
 
232
                            	   $(msgDom).find("div.price").truncate({addtitle: true});
-
 
233
                            	   $(msgDom).find("div.text").truncate({addtitle: true});
-
 
234
                            	   $(msgDom).animate({ backgroundColor: "#fcffb3" }, 'slow');
-
 
235
                            	   $(msgDom).animate({ backgroundColor: "transparent" }, 'slow');
234
                        	   $('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length);
236
                            	   $('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length);
235
                        	   
237
                        	   };
236
                        	   if($('#myresearch input[type="checkbox"]').length == 1)	{
238
                        	   if($('.common-widget-top-bar').data('is_colapsed')){
237
                        		   $("#myresearch").children(".common-widget-top-bar").trigger('click');
239
                        		   $("#myresearch").children(".common-widget-top-bar").trigger('click',[truncFields]);
-
 
240
                        	   }else {
-
 
241
                        		   truncFields();
238
                        	   }
242
                        	   }
239
                           };
243
                           };
240
                           
244
                           
241
                           if(msg == 0){
245
                           if(msg == 0){
242
                                alert( "Product is already in compare list" );
246
                                alert( "Product is already in compare list" );
Line 244... Line 248...
244
                                var t = (research_tot * 1) + (tot * 1);
248
                                var t = (research_tot * 1) + (tot * 1);
245
                                $("#research_total").val(t);
249
                                $("#research_total").val(t);
246
                                if(t > 0)	{
250
                                if(t > 0)	{
247
                                     $("#research_default").css("display","none");
251
                                     $("#research_default").css("display","none");
248
                                }     
252
                                }     
249
                                $("#pane1").prepend(msg);
-
 
250
                                
-
 
251
                                if(reqtype == "multi")	{
253
                                if(reqtype == "multi")	{
252
                                     jQuery.each(seldata,function(intIndex, objValue)	{
254
                                     jQuery.each(seldata,function(intIndex, objValue)	{
253
                                    	 postSuccessDOMProcessing(objValue);
255
                                    	 postSuccessDOMProcessing(objValue);
254
                                     });
256
                                     });
255
                                     
257