| 452 |
rajveer |
1 |
<script>
|
|
|
2 |
<!--
|
|
|
3 |
$(document).ready(function() {
|
|
|
4 |
// Research "delete" Item
|
|
|
5 |
$("#research_delete").click(function(){
|
|
|
6 |
var research_tot=$("#research_total").val();
|
|
|
7 |
|
|
|
8 |
var seldata="";
|
|
|
9 |
var tot=0;
|
| 456 |
rajveer |
10 |
var saprt="";
|
|
|
11 |
var containerdiv = "#pane1";
|
|
|
12 |
var par= containerdiv + " input[type=checkbox]:checked";
|
|
|
13 |
$(par).each(function(){
|
| 452 |
rajveer |
14 |
saprt = (tot>0)? "_":"";
|
|
|
15 |
seldata += saprt+$(this).val();
|
|
|
16 |
tot++
|
|
|
17 |
});
|
|
|
18 |
if(tot>0){
|
|
|
19 |
var t=(research_tot*1)-(tot*1);
|
|
|
20 |
$("#research_total").val(t);
|
|
|
21 |
|
|
|
22 |
alert("AJAX request to delete products in research. Product ID: "+seldata+" and total: "+tot);
|
|
|
23 |
jQuery.ajax({
|
|
|
24 |
type: "GET",
|
|
|
25 |
url: "../myresearch/" + seldata + "?_method=delete",
|
|
|
26 |
data: "productid="+seldata,
|
|
|
27 |
success: function(msg){
|
|
|
28 |
alert( "Data Saved: " + msg );
|
|
|
29 |
}
|
|
|
30 |
});
|
|
|
31 |
var arrayprod_id=seldata.split("_");
|
|
|
32 |
jQuery.each(arrayprod_id,function(intIndex, objValue){
|
|
|
33 |
var tableref="#"+objValue;
|
|
|
34 |
var tblid="#"+objValue+ " td";
|
|
|
35 |
$(tblid).animate({ backgroundColor: "#fcffb3" }, 'slow');
|
|
|
36 |
$(tblid).animate({ backgroundColor: "#F5F5F5" }, 'slow', function() { $(this).fadeOut('slow', function() { $(this).remove(); if(t === 0){ $("#research_default").css("display","block");} } ) });
|
|
|
37 |
|
|
|
38 |
});
|
|
|
39 |
|
|
|
40 |
|
|
|
41 |
}else{
|
|
|
42 |
alert("Please select atleast one product");
|
|
|
43 |
}
|
|
|
44 |
});
|
|
|
45 |
});
|
|
|
46 |
//-->
|
|
|
47 |
</script>
|
|
|
48 |
|
|
|
49 |
|
|
|
50 |
<!-- Widget My Research start -->
|
|
|
51 |
<DIV class="lightbox">
|
|
|
52 |
<DIV class="hdr" id="hdr0">
|
|
|
53 |
<A href="javascript:void(0);">My Research</A>
|
|
|
54 |
</DIV>
|
|
|
55 |
<DIV class="holder osX" style="margin:0;width:100%;" id="winker0">
|
|
|
56 |
<DIV class="tools">
|
|
|
57 |
<A style="cursor:pointer;" id="research_delete">Delete</A>
|
|
|
58 |
<A href="#">Compare</A>
|
| 456 |
rajveer |
59 |
<A onclick="javascript:addToCart('pane1', 'multi')">Add to Cart</A>
|
| 452 |
rajveer |
60 |
</DIV>
|
| 456 |
rajveer |
61 |
#set($totalitems = 0)
|
|
|
62 |
#if($itemDetails)
|
|
|
63 |
#set($totalitems = $itemDetails.size())
|
|
|
64 |
#end
|
|
|
65 |
<input type="hidden" name="research_total" id="research_total" value="$totalitems">
|
| 452 |
rajveer |
66 |
<DIV id="pane1" class="scroll-pane tabwrap makeScroll" style="width:245px;" >
|
| 456 |
rajveer |
67 |
<TABLE cellspacing="1" cellpadding="0" border="0" width="100%" id="research_default" #if($totalitems != 0 ) style="display:none;" #end >
|
| 452 |
rajveer |
68 |
<TBODY>
|
|
|
69 |
<TR>
|
|
|
70 |
<TD> Please Register/Sign-in to use My Research tool</TD>
|
|
|
71 |
</TR>
|
|
|
72 |
</TBODY>
|
|
|
73 |
</TABLE>
|
|
|
74 |
|
|
|
75 |
#set( $count = 0)
|
|
|
76 |
#foreach( $itemDetail in $itemDetails )
|
|
|
77 |
#set( $count = $count+1)
|
|
|
78 |
#set( $divid = "res" + $count)
|
| 456 |
rajveer |
79 |
$itemDetail.ITEM_SNIPPET
|
|
|
80 |
#end
|
| 452 |
rajveer |
81 |
</DIV>
|
|
|
82 |
<DIV class="quicksign">
|
|
|
83 |
<A href="#">Sign In</A> | <A href="#">Register</A> to save <br />" My Research "
|
|
|
84 |
</DIV>
|
|
|
85 |
</DIV>
|
|
|
86 |
</DIV>
|
|
|
87 |
<!-- Widget My Research end -->
|