1var mobileModules = ''; 2(function ($) { 3 4 $(function () { 5 /**/ 6 }); 7 8 mobileModules = { 9 10 xs_functions: function () { 11 12 $("table").each(function (i) { 13 var table = $(this); 14 $(this).find('tbody > *').each(function (c) { 15 $(this).find('>td').each(function (d) { 16 console.log(d); 17 $(this).attr('data-label', table.find('thead>*>th').eq(d).text()); 18 }); 19 }); 20 }); 21 22 mob_elemets_collector = function (selectors) { 23 var value = ''; 24 $.each(selectors, function (i, val) { 25 $(val).each(function (i, val) { 26 if ($(val).html()) { 27 var html_tag = $(val).prop('tagName'); 28 var class_attr = $(val).attr('class'); 29 value = value + "<" + html_tag + " class='" + class_attr + "'>" + $(val).html() + "</" + html_tag + ">"; 30 } 31 }); 32 }); 33 return value; 34 }; 35 36 collect_from_json = function (json) { 37 variable = ''; 38 $.each(json, function (i, val) { 39 variable = variable + '<div class="' + val.class + '">' + val.before_content + mob_elemets_collector(val.content) + val.after_content + '</div>' 40 }); 41 return variable; 42 }; 43 44 mobile_data_json = { 45 46 mob_nav_collection_structure: [ 47 { 48 class: 'mob_nav_header', 49 before_content: '<div class="mob-top-icons">', 50 content: [ 51 '.mob-nav-top-line' 52 ], 53 after_content: '</div>' 54 }, 55 { 56 class: 'mob_nav_menus', 57 before_content: '', 58 content: [ 59 '.main-menu', 60 '.top-menu' 61 ], 62 after_content: '' 63 } 64 ], 65 66 mob_header_structure: [ 67 { 68 class: 'mob-header-items', 69 before_content: '', 70 content: [ 71 '.links-item', 72 '.langs-select', 73 '.mob_search' 74 ], 75 after_content: '' 76 } 77 ], 78 79 mob_search_structure: [ 80 { 81 class: 'mob-search', 82 before_content: '', 83 content: [ 84 '.search-container' 85 ], 86 after_content: '' 87 } 88 ] 89 90 }; 91 92 $('.mob_nav_container, .mob_header_extention, .mob-search-container').remove(); 93 94 mob_nav_collection = collect_from_json(mobile_data_json['mob_nav_collection_structure']); 95 mob_header_collection = collect_from_json(mobile_data_json['mob_header_structure']); 96 mob_search_collection = collect_from_json(mobile_data_json['mob_search_structure']); 97 98 $('#page').before('<div class="mob_nav_container">' + mob_nav_collection + '</div>'); 99 $('#page #header').append('<div class="mob_header_extention hide">' + mob_header_collection + '</div>'); 100 $('#page #header').before('<div class="mob-search-container hide">' + mob_search_collection + '</div>'); 101 102 $('.langs-select select').on('change', function () { 103 var value = $(this).val(); 104 window.location.href = value; 105 }); 106 107 $('.mob_search a').on('touchstart click', function (event) { 108 event.preventDefault(); 109 $('.mob-search-container').toggleClass('opened') 110 }); 111 112 $('div.mob_nav_container ul.main-menu ul').each(function () { 113 $(this).prev('a').append('<i class="fa fa-plus"></i>') 114 }); 115 116 $('div.mob_nav_container ul.main-menu .fa').parent('a').on('touchstart click', function (event) { 117 var obj = $(this).parent('li'); 118 if (!obj.hasClass('no-mob-toggle')) { 119 event.preventDefault(); 120 $(this).parent('li').toggleClass('selected'); 121 } else { 122 //alert('go to link') 123 } 124 }); 125 126 }, 127 sm_functions: function () { 128 129 }, 130 md_functions: function () { 131 132 }, 133 lg_functions: function () { 134 135 }, 136 xlg_functions: function () { 137 138 }, 139 detect_smallest_rez: function () { 140 141 w = $(window).width(); 142 143 if (w <= 567) { 144 status = 'xs'; 145 if (resolution_status != status) { 146 resolution_status = status; 147 if (!$('html').hasClass('no-responsive')) { 148 mobileModules.xs_functions(); 149 } 150 } 151 } else if (w >= 568 && w <= 767) { 152 status = 'sm'; 153 if (resolution_status != status) { 154 resolution_status = status; 155 //sm_functions(); /*Skip SM*/ 156 if (!$('html').hasClass('no-responsive')) { 157 mobileModules.xs_functions(); 158 } 159 } 160 } else if (w >= 768 && w <= 1023) { 161 status = 'md'; 162 if (resolution_status != status) { 163 resolution_status = status; 164 mobileModules.md_functions(); 165 } 166 } else if (w >= 1024 && w <= 1279) { 167 status = 'lg'; 168 if (resolution_status != status) { 169 resolution_status = status; 170 mobileModules.lg_functions(); 171 } 172 } else if (w >= 1280) { 173 status = 'xlg'; 174 if (resolution_status != status) { 175 resolution_status = status; 176 mobileModules.xlg_functions(); 177 } 178 } 179 180 }, 181 desktop_v_switcher: function () { 182 183 if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { 184 } else { 185 $('meta[name="viewport"]').attr('content', 'width=1360') 186 } 187 188 }, 189 smart_vers: function () { 190 191 $(window).on('resize', function () { 192 mobileModules.detect_smallest_rez(); 193 }); 194 195 $('a.logo').after('<a href="#" class="smart_menu_caller" aria-label="mobile"><i class="fa fa-bars"></i><i class="fa fa-times"></i></a>'); 196 197 $('a.smart_menu_caller').on('touchstart click', function (event) { 198 event.preventDefault(); 199 $('body').toggleClass('mob_menu_opened'); 200 }); 201 202 $('.mobile-menu-toggler').on('touchstart click', function (event) { 203 event.preventDefault(); 204 $(this).toggleClass('opened'); 205 $(this).next('ul').toggleClass('opened'); 206 }); 207 208 } 209 210 }; 211 212 var resolution_status; 213 214})(jQuery);
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.