1$(document).ready(function() { 2 3 function receiveMessage(event) { 4 if (event.data == 'show') { 5 window.setTimeout(function() { 6 $('.cboxIframe').css('visibility', 'visible'); 7 }, 200); 8 9 } 10 if (event.data.action == "resize") { 11 $.fancybox.update(); 12 } 13 } 14 15 if (typeof window.addEventListener === "function") { 16 window.addEventListener("message", receiveMessage, false); 17 } else if (typeof window.attachEvent === "function") { 18 window.attachEvent("onmessage", receiveMessage, false); 19 } 20 21 22 var parentResize = function() { 23 if ($('#popup').size() > 0) { 24 var h = $('#popup').inenheight() + 70; 25 var w = $('#popup').width() + 42; 26 $.fancybox.update(); 27 } 28 }; 29 30 // HANLDER PROBLEME BEI DER ANMELDUNG / FORMULAR PROBLEM BESCHREIBEN 31 $(document).on("submit", '.ax_form', function(event) { 32 event.preventDefault(); 33 var form = $(this); 34 var formFields = form.find('input'); 35 var submitBtn = form.find('input[type=submit]'); 36 var actionUrl = form.attr('action'); 37 var formContent = form.serializeArray(); 38 formContent.push({ 39 name: submitBtn.attr('name'), 40 value: "" 41 }); 42 $.ajax({ 43 type: 'POST', 44 url: actionUrl, 45 data: formContent, 46 beforeSend: function() { 47 formFields.attr('disabled', 'disabled'); 48 }, 49 success: function(data) { 50 form.closest('.ax_wrap').replaceWith(data); 51 // if form has data-formtype 'abo-article' 52 // redirect to article detail page on succesful submit 53 if (form.data('formtype') != undefined) { 54 var article_url = submitBtn.data('redirect'); 55 console.log(article_url); 56 if ($('#login_mask').find('.msg_err').length == 0) { 57 if (article_url != undefined) { 58 console.log('redirect'); 59 window.location = article_url; 60 } 61 } 62 } 63 } 64 }); 65 }); 66 67 $(document).on('submit', '#ajax_login', function(event) { 68 69 var url = window.location.href 70 var arr = url.split("/"); 71 var result = arr[0] + "//" + arr[2] 72 73 console.log(arr[2]); 74 75 if ($(this).parents('.fancybox-open').length) { 76 event.preventDefault(); 77 var form = $(this); 78 var formFields = form.find('input'); 79 var submitBtn = form.find('input[type=submit]'); 80 var actionUrl = form.attr('action'); 81 var formContent = form.serializeArray(); 82 formContent.push({ 83 name: submitBtn.attr('name'), 84 value: "" 85 }); 86 $.ajax({ 87 type: 'POST', 88 url: actionUrl, 89 data: formContent, 90 beforeSend: function() { 91 formFields.attr('disabled', 'disabled'); 92 }, 93 success: function(data) { 94 form.closest('.ax_wrap').replaceWith(data); 95 // if form has data-formtype 'abo-article' 96 // redirect to article detail page on succesful submit 97 if (form.data('formtype') != undefined) { 98 var article_url = submitBtn.data('redirect'); 99 console.log(article_url); 100 if ($('#login_mask').find('.msg_err').length == 0) { 101 if (article_url != undefined) { 102 console.log('redirect'); 103 window.location = article_url; 104 } 105 } 106 } 107 } 108 }); 109 } else { 110 event.preventDefault(); 111 var form = $(this); 112 var formFields = form.find('input'); 113 var submitBtn = form.find('input[type=submit]'); 114 var actionUrl = form.attr('action'); 115 var formContent = form.serializeArray(); 116 formContent.push({ 117 name: submitBtn.attr('name'), 118 value: "" 119 }); 120 $.ajax({ 121 type: 'POST', 122 url: actionUrl, 123 data: formContent, 124 beforeSend: function() { 125 formFields.attr('disabled', 'disabled'); 126 }, 127 success: function(data) {}, 128 complete: function() { 129 window.location.href = result; 130 } 131 }); 132 } 133 }); 134 135 136 $(document).on('click', '.tgl_opt', function(evt) { 137 if ($(this).attr('type') != 'checkbox') { 138 evt.preventDefault(); 139 } 140 var wrap = $(this).closest('.tgl_wrap'); 141 var box = wrap.find('.tgl_box'); 142 var elem = box.first().children().first().attr('id'); 143 144 if (wrap.hasClass('active')) { 145 // is active 146 wrap.removeClass('active'); 147 box.hide('fast', function() { 148 parentResize(); 149 }); 150 151 } else { 152 // not active 153 wrap.addClass('active'); 154 if (wrap.find('#login_prob_other').size() > 0) { 155 evt.preventDefault(); 156 $.ajax({ 157 url: $(this).attr('href'), 158 success: function(data) { 159 $('#login_prob_other').html(data); 160 parentResize(); 161 } 162 }); 163 } else if (wrap.find('#login_prob_pwd').size() > 0) { 164 evt.preventDefault(); 165 $.ajax({ 166 url: $(this).attr('href'), 167 success: function(data) { 168 $('#login_prob_pwd').html(data); 169 parentResize(); 170 } 171 }); 172 173 } else if (wrap.find('#login_prob_email').size() > 0) { 174 evt.preventDefault(); 175 $.ajax({ 176 url: $(this).attr('href'), 177 success: function(data) { 178 $('#login_prob_email').html(data); 179 parentResize(); 180 } 181 }); 182 183 } else { 184 parentResize(); 185 } 186 box.show(); 187 } 188 189 }); 190 191 $(document).on('click', '.me.sign_up a, .login_now, a.open, a.login-link, .link-login a', function(event) { 192 193 event.preventDefault(); 194 195 var url; 196 var that = $(this); 197 198 if (location.protocol === 'https:') {} 199 if (typeof that.attr('data-url') === 'undefined') { 200 url = that.attr('href'); 201 } else { 202 url = that.attr('data-url'); 203 } 204 if (url == undefined) url = "/ajax/login"; 205 206 $.fancybox({ 207 type: 'iframe', 208 href: url, 209 maxWidth: 400, 210 padding: 0, 211 openEffect: 'drop', 212 closeEffect: 'drop', 213 }); 214 215 216 }); 217 218 219 $('#logout_link').on('click', function(ev) { 220 221 var logouturl = $(this).attr('data-url'); 222 223 if (typeof logouturl !== 'undefined') { 224 225 ev.preventDefault(); 226 227 $.ajax({ 228 url: logouturl, 229 success: function(data) { 230 var redirect = $(data).find('.logout_msg').attr('data-url'); 231 if (typeof redirect !== 'undefined') { 232 window.location.href = redirect; 233 } else { 234 window.location.reload(); 235 } 236 } 237 }); 238 239 } 240 241 }); 242 243 $(document).on('change', '.cb_game', function() { 244 $('.login_panel').find('.game_info').toggle(); 245 $('.login_panel').find('.toggle').toggle(); 246 parentResize(); 247 }); 248 249 if ($('.register').find('#reg_success').length >= 1) { 250 251 var href = $('.register').find('#reg_success'); 252 253 $.fancybox({ 254 type: 'ajax', 255 href: href, 256 maxWidth: 400, 257 padding: 0, 258 openEffect: 'drop', 259 closeEffect: 'drop', 260 }); 261 262 } 263 264 if ($('#popup').size() > 0) { 265 var h = $('.panel').height(); 266 var w = $('.panel').width(); 267 var datas = { 268 action: 'resize', 269 h: h, 270 w: w 271 }; 272 273 function receiveMessages(event) { 274 // if (event.origin !== "*") 275 // return; 276 } 277 278 if (typeof window.addEventListener === "function") { 279 window.addEventListener("message", receiveMessages, false); 280 } else if (typeof window.attachEvent === "function") { 281 window.attachEvent("onmessage", receiveMessage, false); 282 } 283 284 if (typeof postMessage === 'function') { 285 parent.postMessage(datas, '*'); 286 }; 287 288 var popup = $('#popup'); 289 if (popup.find('#success_login').length >= 1) { 290 var dataUrl = popup.find('#success_login').attr('data-url'); 291 if (typeof dataUrl !== 'undefined') { 292 location.href = dataUrl; 293 } else { 294 parent.location.reload(); 295 } 296 } 297 298 } 299 300 301 $('.loggedin').on('click', function() { 302 303 $(this).closest('article').addClass('clickedArticle'); 304 305 var href = $('#login_link').prop('href'); 306 307 $.fancybox({ 308 type: 'ajax', 309 href: href, 310 maxWidth: 400, 311 padding: 0, 312 openEffect: 'drop', 313 closeEffect: 'drop', 314 beforeShow: function() { 315 $('.fancybox-iframe').contents().find('#ajax_login').before('<div class="popup_alert">Dieser Beitrag steht nur registrierten Benutzern mit Berufsverifizierung zur Verfügung. Klicken Sie <a href="/registration">hier</a>.</div>'); 316 // set new fancybox height 317 $('.fancybox-iframe').css('height', $('.fancybox-iframe').contents().find('html').height()); 318 } 319 }); 320 321 return false;
322 }); 323 324 325 $('.loggedindoccheck, .loggedinabo').on('click', function() { 326 327 var article_url = ($(this).closest('article').data('url') != undefined) ? window.location.origin + $(this).closest('article').data('url') : article_url = window.location.href; 328 329 $(this).closest('article').addClass('clickedArticle'); 330 331 if ($(this).hasClass('noAbo')) { 332 333 $.fancybox({ 334 type: 'html', 335 html: '<div class="loggedin_doccheck_popup">Dieser Beitrag steht nur registrierten Benutzern mit Berufsnachweis zur Verfügung.</div>', 336 maxWidth: 400, 337 padding: 0, 338 openEffect: 'drop', 339 closeEffect: 'drop', 340 }); 341 342 } else { 343 344 var href = $('#login_link').prop('href'); 345 346 $.fancybox({ 347 type: 'ajax', 348 href: href, 349 maxWidth: 400, 350 padding: 0, 351 openEffect: 'drop', 352 closeEffect: 'drop', 353 beforeShow: function() { 354 $('.fancybox-iframe').contents().find('#exclusive_subscriber').html(''); 355 $('.fancybox-iframe').contents().find('#ajax_login').before('<div><p>Dieser Beitrag steht nur Ãrztinnen/Ãrzten mit Berufsnachweis zur Verfügung. Um alle Inhalte auf www.kinderaerztliche-praxis.de lesen zu können, benötigen Sie ein Nutzerkonto mit einem entsprechenden Berufsnachweis.</p></div>'); 356 $('.fancybox-iframe').contents().find('#alreadyregistered').html('Sie haben bereits ein Nutzerkonto? Dann melde Sie sich hier an:'); 357 $('.fancybox-iframe').contents().find('#benefit_offer').html('<p>Wenn Sie diesen Artikel und alle weiteren Vorteilsangebote nutzen möchten, bestellen Sie jetzt das Diabetes-Journal oder das Diabetes Eltern Journal.</p>'); 358 $('.fancybox-iframe').contents().find('body#popup').css('overflow', 'auto'); 359 // set new fancybox height 360 $('.fancybox-iframe').css('height', $('.fancybox-iframe').contents().find('html').height()); 361 var form = $('#ajax_login'); 362 var submit = form.find('input[type=submit]'); 363 form.attr('data-formtype', 'abo-article'); 364 submit.attr('data-redirect', article_url); 365 } 366 }); 367 368 } 369 return false; 370 }); 371 372 373 $('.one-journal.grey').on('click', function(a) { 374 375 var $this = $(this); 376 377 $(this).closest('article').addClass('clickedArticle'); 378 379 if ($this.hasClass('noAbo')) { 380 // open login form in fancybox 381 $.fancybox({ 382 type: 'html', 383 data: '<div class="loggedin_doccheck_popup">Dieser Beitrag steht nur Benutzern mit Berufsverifizierung zur Verfügung. Klicken Sie <a href="/profile/settings">hier</a></div>', 384 maxWidth: 400, 385 padding: 0, 386 openEffect: 'drop', 387 closeEffect: 'drop', 388 }); 389 return false; 390 } else { 391 // ausführen des Standardlinks 392 return true; 393 } 394 395 }); 396 397 398 $('.doccheck').on('click', function() { 399 400 var $this = $(this); 401 402 $(this).closest('article').addClass('clickedArticle'); 403 404 $.fancybox({ 405 type: 'html', 406 data: '<div class="loggedin_doccheck_popup">Dieser Beitrag steht nur Benutzern mit Berufsverifizierung zur Verfügung. Klicken Sie <a href="/profile/settings">hier</a>.</div>', 407 maxWidth: 400, 408 padding: 0, 409 openEffect: 'drop', 410 closeEffect: 'drop', 411 }); 412 return false; 413 414 }); 415 416 417 // Login 418 $('#login_link').click(function(e) { 419 420 var href = $('#login_link').prop('href'); 421 422 $.fancybox({ 423 type: 'ajax', 424 href: href, 425 maxWidth: 400, 426 padding: 0, 427 openEffect: 'drop', 428 closeEffect: 'drop', 429 }); 430 return false; 431 432 }) 433 434 435});
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.