1 2// sarga dobozok js-ei athozva ide 3 4 5// TOROL 6// Eaten_foods_at_page_load-ban jonnek embedded adatok peldaul 7// json_encode pont olyat allit elo, ami beteheto js kodba 8 9 10// legfelul main-rightcol.tpl-bol athozott reszek 11 12// $(function () { vmi }); DOM betolt utan hivodik 13 14//$(function () { 15function Yel_mrc010_slides() { 16 17 if( Glb_mobile_browser ) 18 return; 19 20 // csak desktop eseten jon ide 21 $('#slides').slides({ 22 generateNextPrev: true, 23 play: 10000, 24 hoverPause: true 25 }); 26} 27 28// Yel_mrc020_boxshow_a bent maradt php-ban 29 30function Yel_mrc030_boxshow_b () { 31 for (var boxn = 1; boxn <= 9; boxn++) { 32 if (boxn == 8) 33 continue; 34 35 //if (boxn == 3 || boxn == 5 || boxn == 6) { 36 if( true ) { 37 //$('#linkbox_' + boxn).click(function (n) { 38 var link = $('#linkbox_' + boxn); 39 link.parent().click(function (n) { 40 return function () { 41 if (!$('#box_' + n).is(':visible')) { 42 // Csak nyitasnal: 43 /*if (n == 5) { // grafikon 44 refreshweight(); 45 46 // kiirjuk, hogy ez lassithatja mukodest 47 mbt_tiptiphez_dialog(__('DIAL_figyelmeztetes'), 48 __('MAIN_graf_box_opening_warning') ); 49 }*/ 50 if (n == 6) { 51 refreshpie(); 52 } 53 } 54 55 // Hogy mar az animacio elejen valtozzon nyil: 56 var isVisible = $('#box_' + n).is(':visible'); 57 isVisible = ! isVisible; 58 modBoxOpen_setArrow( 59 '' + n, isVisible, 'imagebox_' + n); 60 61 $('#box_' + n).slideToggle( Glt_anim_time_yellow, 62 Anim_easing, 63 function () { 64 if ($('#box_' + n).is(':visible')) { 65 // adatbazisba menti 66 modBoxOpen('' + n, '1', 'imagebox_' + n); 67 //if (n == 5) 68 // refreshweight(); 69 //if (n == 6) 70 // refreshpie(); 71 } 72 else { 73 // adatbazisba menti 74 modBoxOpen('' + n, '0', 'imagebox_' + n); 75 } 76 }); 77 }; 78 }(boxn)); 79 } 80 else { 81 $('#linkbox_' + boxn).click(function (n) { 82 return function () { 83 if (!$('#box_' + n).is(':visible')) { 84 // Csak nyitasnal: 85 if (n == 5) 86 refreshweight(); 87 if (n == 6) 88 refreshpie(); 89 } 90 $('#box_' + n).toggle(400, 'swing', function () { 91 if ($('#box_' + n).is(':visible')) { 92 modBoxOpen('' + n, '1', 'imagebox_' + n); 93 //if (n == 5) 94 // refreshweight(); 95 //if (n == 6) 96 // refreshpie(); 97 } 98 else { 99 modBoxOpen('' + n, '0', 'imagebox_' + n); 100 } 101 }); 102 }; 103 }(boxn)); 104 } 105 } 106 107 /* 108 $('#linkbox_1').click(function(){ 109 110 $('#box_1').toggle(); 111 112 if( $('#box_1').is(':visible') ) 113 modBoxOpen('1', '1', 'imagebox_1'); 114 else 115 modBoxOpen('1', '0', 'imagebox_1'); 116 117 return false; 118 }); 119 120 $('#linkbox_2').click(function(){ 121 122 // Ha itt adok sebesseget, akkor becsukasnal meg mindig 123 // visible-nek latszodik 124 //$('#box_2').toggle(); 125 126 var vis = $('#box_2').is(':visible'); 127 128 $('#box_2').slideToggle(600); 129 130 131 132 if( ! vis ) 133 modBoxOpen('2', '1', 'imagebox_2'); 134 else 135 modBoxOpen('2', '0', 'imagebox_2'); 136 137 return false; 138 }); 139 140 $('#linkbox_3').click(function(){ 141 142 $('#box_3').toggle(); 143 144 if( $('#box_3').is(':visible') ) 145 modBoxOpen('3', '1', 'imagebox_3'); 146 else 147 modBoxOpen('3', '0', 'imagebox_3'); 148 149 return false; 150 }); 151 152 $('#linkbox_4').click(function(){ 153 154 $('#box_4').toggle(); 155 156 if( $('#box_4').is(':visible') ) 157 modBoxOpen('4', '1', 'imagebox_4'); 158 else 159 modBoxOpen('4', '0', 'imagebox_4'); 160 161 return false; 162 }); 163 164 $('#linkbox_5').click(function(){ 165 166 $('#box_5').toggle(); 167 168 if( $('#box_5').is(':visible') ) { 169 modBoxOpen('5', '1', 'imagebox_5'); 170 refreshweight(); 171 } else 172 modBoxOpen('5', '0', 'imagebox_5'); 173 174 return false; 175 }); 176 177 $('#linkbox_6').click(function(){ 178 179 $('#box_6').toggle(); 180 181 if( $('#box_6').is(':visible') ) { 182 modBoxOpen('6', '1', 'imagebox_6'); 183 refreshpie(); 184 } else 185 modBoxOpen('6', '0', 'imagebox_6'); 186 187 return false; 188 }); 189 190 $('#linkbox_7').click(function(){ 191 192 $('#box_7').toggle(); 193 194 if( $('#box_7').is(':visible') ) 195 modBoxOpen('7', '1', 'imagebox_7'); 196 else 197 modBoxOpen('7', '0', 'imagebox_7'); 198 199 return false; 200 }); 201 202 $('#linkbox_9').click(function(){ 203 204 $('#box_9').toggle(); 205 206 if( $('#box_9').is(':visible') ) 207 modBoxOpen('9', '1', 'imagebox_9'); 208 else 209 modBoxOpen('9', '0', 'imagebox_9'); 210 211 return false; 212 }); 213 */ 214} 215 216// $(function () { // ilyen volt 217function Yel_mrc050_weight() { 218 219 //$("#addweightForm").validationEngine(); 220
221 $('#btnaddweight').click(function () { 222 //if ($('#addweightForm').validationEngine('validate')) { 223 //$('#addweightForm').validationEngine('validate'); 224 addweight(); 225 //} 226 }); 227 228 $('#txtweight').bind('keypress', function (e) { 229 var code = (e.keyCode ? e.keyCode : e.which); 230 if (code == 13) { //Enter keycode 231 //if ($('#addweightForm').validationEngine('validate')) { 232 //$('#addweightForm').validationEngine('validate'); 233 addweight(); 234 //} 235 return false; 236 } 237 }); 238} 239 240// $(function () { // ilyen volt 241function Yel_mrc070_water() { 242 $('#btnaddwater').click(function () { 243 addwater(); 244 }); 245 246 $('#btnresetwater').click(function () { 247 resetwater(); 248 }); 249} 250 251 252 253 254 255// ez az osszefoglalo fv, amit kesleltetve vagy nem kell hivni 256// - ha site nem kesleltetve tolti be main-rightcol.tpl belsejet, akkor 257// ez a js fv site betoltodesekor fut 258// - ha site kesleltetve tolti be main-rightcol.tpl belsejet, akkor ez 259// a js fv csak a yellow_ajax.php-bol valo kesleltetett kod betoltes 260// megerkezesekor hivodik 261function Yel_mrc_call_all() { 262 Yel_mrc010_slides(); 263 264 Yel_mrc020_boxshow_a(); 265 Yel_mrc030_boxshow_b(); 266 267 // ennek a belseje valahol mashol is fut, 268 // mert ha kiszedem, akkor is kitoltodnek 269 // adatok (bar akkor dialogus nincs meg) 270 Yel_mrc040_napiajan(); 271 272 Yel_mrc050_weight(); 273 274 if( typeof Yel_mrc060_size == 'function' ) 275 Yel_mrc060_size(); 276 277 // ez egyedul volt egy helyen (ref_weuighwuih) 278 refreshpie(); 279 280 // ez egyedul volt egy helyen (ref_vhqergvcwaew) 281 refreshweight(); 282 283 Yel_mrc070_water(); 284 285 Yel_mrc070_water_b(); 286 287 // eddig main-rightcol.tpl reszek voltak 288 // ez mar main-rightcol-dailyContent.tpl resz 289 Yel_mrcDC010_all(); 290 291 const only_yellow_boxes = true; 292 mbt_tiptip_setup( only_yellow_boxes ); 293} 294 295function load_yellow_boxes_with_delay() { 296 297 // sarga dobozok nem toltodtek be a site kezdeti 298 // toltodessel egyutt (yellow_active mukodes) 299 // hanem csak itt kesobb toltodnek 300 301 // return; 302 303 304 // majd refreshpie megmutatja 305 $("#yellow_boxes_yellow").hide().addClass('hide_iwefyru'); 306 307 308 309 setTimeout( function () { 310 311 $("#yellow_boxes_yellow").load($url + '/yellow_ajax.php', { 312 313 }, function (response, status, xhr) { 314 if (status == "error") { 315 } 316 else { 317 //alert('megjott!'); 318 319 // par dolgot mbs_update_subox vegen hivunk normal mukodes 320 // eseten, de yellow_active mukodeskor ott nem hivjuk 321 // oket ott, hanem csak itt 322 323 // lehet itt nem kene timeout 324 325 let no_calcdailyframe_call = true; 326 setTimeout(refreshPCCpie(no_calcdailyframe_call), 10); 327 328 setTimeout(refreshPropNutrient(), 10); 329 330 // sarga dobozok tpl-jeiben levo js-eket is futtatjuk 331 Yel_mrc_call_all(); 332 333 // hÃrek szekció vágása 334 textCutter(14, 'mainNewsTitle1'); 335 textCutter(14, 'mainNewsTitle2'); 336 textCutter(15, 'mainNewsSubTitle1'); 337 textCutter(15, 'mainNewsSubTitle2'); 338 339 } 340 }); 341 342 }, 50 ); 343} 344
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.