Ticket #26011: 26011.diff
| File 26011.diff, 1.7 KB (added by , 13 years ago) |
|---|
-
src/wp-includes/js/wp-auth-check.js
1 /* global adminpage:false */ 1 2 // Interim login dialog 2 3 (function($){ 3 var wrap, check,next;4 var wrap, next; 4 5 5 6 function show() { 6 7 var parent = $('#wp-auth-check'), form = $('#wp-auth-check-form'), noframe = wrap.find('.wp-auth-fallback-expired'), frame, loaded = false; … … 12 13 }); 13 14 14 15 frame = $('<iframe id="wp-auth-check-frame" frameborder="0">').attr( 'title', noframe.text() ); 15 frame.load( function( e) {16 frame.load( function() { 16 17 var height, body; 17 18 18 19 loaded = true; … … 20 21 try { 21 22 body = $(this).contents().find('body'); 22 23 height = body.height(); 23 } catch(e ) {24 } catch(exc) { 24 25 wrap.addClass('fallback'); 25 26 parent.css( 'max-height', '' ); 26 27 form.remove(); … … 67 68 $(window).off( 'beforeunload.wp-auth-check' ); 68 69 69 70 // When on the Edit Post screen, speed up heartbeat after the user logs in to quickly refresh nonces 70 if ( typeof adminpage != 'undefined' && ( adminpage == 'post-php' || adminpage == 'post-new-php' ) 71 &&typeof wp != 'undefined' && wp.heartbeat ) {71 if ( typeof adminpage != 'undefined' && ( adminpage == 'post-php' || adminpage == 'post-new-php' ) && 72 typeof wp != 'undefined' && wp.heartbeat ) { 72 73 73 74 wp.heartbeat.interval( 'fast', 1 ); 74 75 } … … 98 99 }).ready( function() { 99 100 schedule(); 100 101 wrap = $('#wp-auth-check-wrap'); 101 wrap.find('.wp-auth-check-close').on( 'click', function( e) {102 wrap.find('.wp-auth-check-close').on( 'click', function() { 102 103 hide(); 103 104 }); 104 105 });