PageSourceSearch

https://peopleimages.com/js/specific/support/prices.js?2688

js peopleimages.com collected 2026-09-24 09:20:46 UTC 6,701 bytes, 147 lines download raw bytes

1$(document).ready(function() {    
2    sizeHint.init();
3    subscriptionPlan.init();
4    packagePlan.init();
5    Promotion.init();  
6    priceRowChecked.init();
7});
8
9    var priceRowChecked = {
10        selector: '.rb_container input:radio',
11        
12        init: function() {
13            $(priceRowChecked.selector).change(priceRowChecked.setChecked);             
14        },
15        
16        setChecked: function() {
17            $('.price_block_row').removeClass('checked');
18            $(priceRowChecked.selector).filter(':checked').parents('.price_block_row').addClass('checked');             
19        }        
20    }
21
22    var Promotion = {
23        timeout: false,
24        promotion_id: 0,
25        init: function() {
26            Promotion.promotion_id = APPINIT.promotion_id;
27            $('div.promotional [contenteditable="true"]').on('keyup', function() {
28                Promotion.save();
29            })
30            $('div.promotional .start, div.promotional .end').on('click', function() {
31                var $this = $(this);
32                $('#datepicker').data('hand', $this).val($this.text()).datepicker({
33                    changeMonth: true,
34                    changeYear: true,
35                    dateFormat: 'yy-mm-dd',
36                    firstDay: 1,
37                    onSelect: function(dateText, inst) {
38                        $('#datepicker').data('hand').html(dateText);
39                        Promotion.save();
40                    }
41                }).focus();
42            })
43        },
44        save: function() {
45            if (Promotion.timeout) clearTimeout(Promotion.timeout);
46
47            Promotion.timeout = setTimeout(function() {
48                $.post('/support/save_promotion/'+Promotion.promotion_id, {
49                    'title': $.trim($('div.promotional .title').text()),
50                    'price': $('div.promotional .price').text(),
51                    'total': $('div.promotional .total').text(),
52                    'start': $('div.promotional .start').text(),
53                    'end': $('div.promotional .end').text()
54                }, function(resp) {
55                    if (resp.status != 0) {
56                        myJgrowl(resp.msg, 'error');
57                        return false;
58                    }
59
60                    Promotion.promotion_id = resp.promotion_id;
61                    $('div.promotional .amount').html(resp.amount)
62                    $('div.promotional .savings').html('Bonus ' + resp.savings)
63                    myJgrowl('Saved', 'ok');
64                });
65            }, 2000);
66        }
67    };
68
69var subscriptionPlan = {
70    init: function(){
71        $('.price_block_subscription .price_block_button').on('click', subscriptionPlan.onClickBuyPlan)
72    },
73    
74    onClickBuyPlan: function(){
75        var plan_id = $('.price_block_subscription input[type="radio"]:checked').val();
76        $.ajax({
77            url: '/cart_x/add_item',
78            type: 'POST',
79            data: {
80                type : 4,
81                custom : {plan_id : plan_id}
82            },            
83            success: function(data){ 
84                if (data.status != 0){
85                    myJgrowl(data.msg); 
86                    return;
87                }
88                window.location = '/checkout/' + data.cart_id;
89            }
90        });
91        return false;
92    }
93}
94
95var packagePlan = {
96    init: function(){
97        $('.price_block_package .price_block_button').on('click', packagePlan.onClickBuyPlan)
98    },
99    
100    onClickBuyPlan: function(){
101        var package_id = $('.price_block_package input[type="radio"]:checked').val();
102        $.ajax({
103            url: '/cart_x/delete_sub_plan_item',
104            type: 'POST',
105            data: {},            
106            success: function(data){ 
107                if (data.status != 0){
108                    myJgrowl(data.msg); 
109                    return;
110                }
111                window.location = '/checkout?package=' + package_id;
112            }
113        });        
114        return false;
115    }    
116}
117
118var sizeHint = {
119    init: function(){
120        $('#prices_container .prices_text').on('mouseover', sizeHint.show);
121    },
122    
123    show: function(e){
124        var img_src = APPINIT.img_src,
125        id = $(this).attr('id'),
126        height_in = $(this).attr('data-height_in'),
127        html = '<div class="size_hint" style="position:relative;text-align: center;">',
128        sizes = {
129            res_2: {h2:'A4 / Standard Letter', h3:'This is the actual size on print:', img_style:'max-height:'+(height_in*9.88)+'px; top:86px; left:56px;border-right:2px solid #EDF3F5; border-bottom:2px solid #EDF3F5;', top:0, arrow:8},
130            res_3: {h2:'A4 / Standard Letter', h3:'This is the actual size on print:', img_style:'max-height:'+(height_in*9.88)+'px; max-width:71px; top:86px; left:56px;border-right:4px solid #EDF3F5; border-bottom:4px solid #EDF3F5;', top:-35, arrow:43},
131            res_4: {h2:'A4 / Standard Letter', h3:'This is the actual size on print:', img_style:'max-height:'+(height_in*9.88)+'px; max-width:71px; top:86px; left:56px;border-right:4px solid #EDF3F5; border-bottom:4px solid #EDF3F5;', top:-70, arrow:78},
132            res_5: {h2:'A2 / Tabloid / Poster', h3:'This is the actual size on print:', img_style:'max-height:'+(height_in*7.52)+'px; max-width:109px; top:85px; left:39px;border-right:5px solid #F4F4F4; border-bottom:5px solid #F4F4F4;', top:-105, arrow:113},
133            res_6: {h2:'A2 / Tabloid / Poster', h3:'This is the actual size on print:', img_style:'max-height:'+(height_in*7.52)+'px; max-width:109px; top:85px; left:39px;border-right:5px solid #F4F4F4; border-bottom:5px solid #F4F4F4;', top:-140, arrow:148},
134            res_10: {h2:'A2 / Tabloid / Poster', h3:'This is the actual size on print:', img_style:'max-height:'+(height_in*7.52)+'px; max-width:109px; top:85px; left:39px;border-right:5px solid #F4F4F4; border-bottom:5px solid #F4F4F4;', top:-175, arrow:183},
135            custom_res: {h2:'Specify your size:', h3:'Poster, Billboard, Canvas, etc.', img_style:'', top:-210, arrow:218}
136        },
137        size = sizes[id];
138
139        html += '<h2 style="font-size: 16px; margin:0"><strong>' + size.h2 + '</strong></h2>';
140        html += '<h3 style="font-size: 12px; margin:0 0 20px;"><strong>' + size.h3 + '</strong></h3>';
141        html += '<img style="margin-bottom: 20px" src="/images/imageview/hint_' + id + '.jpg" />';
142        html += '<img src="' + img_src + '" style="position:absolute; box-sizing:initial; ' + size.img_style + '" />';
143
144        html += '</div>';
145        Tooltip(this, html, {maxwidth:200, width:184, left_offset:-500, top_offset:size.top, arrow:'right-'+size.arrow, purgatory: 0});
146    }
147}

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.