PageSourceSearch

https://www.mrmr.ae/core/modules/e09af06241/ext/image/js/html_types/image.js?rnd=65400

js mrmr.ae collected 2026-09-24 14:30:55 UTC 3,545 bytes, 106 lines download raw bytes

1"use strict";
2function woof_init_image() {
3    //http://jsfiddle.net/jtbowden/xP2Ns/
4    jQuery('.woof_image_term').each(function () {
5        var image = jQuery(this).data('image');
6        var styles = jQuery(this).data('styles');
7        if (image.length > 0) {
8            styles += '; background-image: url(' + image + '); ';
9        } else {
10            styles += '; background-color: #ffffff;';
11        }
12
13        var span = jQuery('<span style="' + styles + '" class="' + jQuery(this).attr('type') + ' ' + jQuery(this).attr('class') + '" title=""></span>').on('click',woof_image_do_check).mousedown(woof_image_do_down).mouseup(woof_image_do_up);
14        if (jQuery(this).is(':checked')) {
15            span.addClass('checked');
16        }
17        jQuery(this).wrap(span).hide();
18        jQuery(this).after('<span class="woof_image_checked"></span>');//for checking
19    });
20
21    function woof_image_do_check() {
22        var is_checked = false;
23        var radio=false;
24        if(jQuery(this).parents(".woof_list_image").data("type")=="radio"){
25            radio=true;
26        }
27        if(radio){
28            var elements=jQuery(this).parents(".woof_list_image").find(".woof_image_term");
29            jQuery(elements).removeClass('checked');
30            jQuery(elements).children().prop("checked", false);
31        }
32           
33        if (jQuery(this).hasClass('checked')) {
34            jQuery(this).removeClass('checked');
35            jQuery(this).children().prop("checked", false);
36        } else {
37            jQuery(this).addClass('checked');
38            jQuery(this).children().prop("checked", true);
39            is_checked = true;
40        }
41
42        woof_image_process_data(this, is_checked,radio);
43    }
44
45    function woof_image_do_down() {
46        jQuery(this).addClass('clicked');
47    }
48
49    function woof_image_do_up() {
50        jQuery(this).removeClass('clicked');
51    }
52}
53
54function woof_image_process_data(_this, is_checked,radio) {
55    var tax = jQuery(_this).find('input[type=checkbox]').data('tax');
56    var name = jQuery(_this).find('input[type=checkbox]').attr('name');
57    var term_id = jQuery(_this).find('input[type=checkbox]').data('term-id');
58    woof_image_direct_search(term_id, name, tax, is_checked,radio);
59}
60
61function woof_image_direct_search(term_id, name, tax, is_checked,radio) {
62
63    var values = '';
64    var checked = true;
65    if (is_checked) {
66        if(!radio){
67            if (tax in woof_current_values) {
68                woof_current_values[tax] = woof_current_values[tax] + ',' + name;
69            } else {
70                woof_current_values[tax] = name;
71            }            
72        }else{
73            woof_current_values[tax] = name;
74        }
75
76        checked = true;
77    } else {
78        if(!radio){
79            values = woof_current_values[tax];
80            values = values.split(',');
81            var tmp = [];
82            jQuery.each(values, function (index, value) {
83                if (value != name) {
84                    tmp.push(value);
85                }
86            });
87            values = tmp;
88            if (values.length) {
89                woof_current_values[tax] = values.join(',');
90            } else {
91                delete woof_current_values[tax];
92            }            
93        }else{
94            delete woof_current_values[tax];
95        }
96        
97        checked = false;
98    }
99    jQuery('.woof_image_term_' + term_id).attr('checked', checked);
100    woof_ajax_page_num = 1;
101    if (woof_autosubmit) {
102        woof_submit_link(woof_get_submit_link());
103    }
104}
105
106

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.