PageSourceSearch

https://www.smartscales.com/res/magic/js/quotatio.js

js smartscales.com collected 2026-10-04 01:50:58 UTC 3,141 bytes, 85 lines download raw bytes

1// shoping car product list
2var strCookie = $.cookie('shoppingcar');
3if(strCookie){
4    strCookie = strCookie.substr(0, strCookie.length - 1);
5    var arrCookie = strCookie.split(";");
6    var html = '';
7    for(var i = 0; i < arrCookie.length; i++){
8        var product = arrCookie[i].split("<-@->");
9        var id = product[0].toString();
10        var title = product[1];
11        var img = product[2];
12        var link = product[3];
13        var code = product[4];
14        html += '<div class="quotatio-item" id="product-'+id+'">';
15        html += '   <div class="product-item">'; 
16        html += '       <div class="imgbox"><a href="'+link+'"><img src="'+img+'" /></a></div>';
17        html += '       <div class="text"><a href="'+link+'"><h3>'+title+'</h3></a></div>';
18        html += '   </div>';
19        html += '   <div class="action"><img src="/res/magic/images/error.png" data="'+id+'"/></div>';
20        html += '   <textarea class="d-none">'+title+'&#10;'+link+'&#10;</textarea>';
21        html += '</div>';
22    }
23    $("#quotatio-product-list").html(html);
24}
25var te = $(".page-content .quotatio .quotation-box > div .message-box .from textarea.product").val();
26var strCookie = $.cookie('shoppingcar');
27if(strCookie){
28    strCookie = strCookie.substr(0, strCookie.length - 1);
29    var arrCookie = strCookie.split(";");
30    var t = '';
31    for(var i = 0; i < arrCookie.length; i++){
32        var product = arrCookie[i].split("<-@->");
33        var title = product[1];
34        var link = product[3];
35        var itemp = title+"\r\n"+link+"\r\n";
36        t += itemp;
37    }
38    $(".page-content .quotatio .quotation-box > div .message-box .from textarea.product").val(te+t);
39}
40// clear shopping car product
41$("#clear").click(function(){
42    $("#quotatio-product-list").empty();
43    $.removeCookie('shoppingcar',{ path: '/'});
44    $("#product-number").text(0);
45    $('#quota-num').text(0);
46    // $('#quota-num').hide();
47});
48// del shopping car product
49$(".page-content .quotatio .row #quotatio-product-list .quotatio-item .action img").click(function(){
50    var id = $(this).attr('data');
51    $("#product-"+id).remove();
52    var strCookie = $.cookie('shoppingcar');
53    
54    strCookie = strCookie.substr(0, strCookie.length - 1);
55    var arrCookie = strCookie.split(";");
56    for(var i = 0; i < arrCookie.length; i++){
57        var product = arrCookie[i].split("<-@->");
58        if(product[0] == id){
59            arrCookie.splice(i,1);
60        }
61
62    }
63    var t = '';
64    for(var i = 0; i < arrCookie.length; i++){
65        var product = arrCookie[i].split("<-@->");
66        var title = product[1];
67        var link = product[3];
68        var itemp = title+"\r\n"+link+"\r\n";
69        t += itemp;
70    }
71
72
73
74    $(".page-content .quotatio .quotation-box > div .message-box .from textarea.product").val(te+t);
75    var p = arrCookie.join(";");
76    $.cookie('shoppingcar',p,{ expires: 7, path: '/' });
77    if(arrCookie.length){
78        $('#quota-num').text(arrCookie.length);
79        $("#product-number").text(arrCookie.length);
80    }else{
81         $('#quota-num').text(0);
82         $("#product-number").text(0);
83    }
84});
85// product list number

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.