Ticket #18590: 18590.diff
| File 18590.diff, 9.3 KB (added by , 11 years ago) |
|---|
-
src/wp-admin/js/common.js
492 492 $( this ).closest( 'tr' ).toggleClass( 'is-expanded' ); 493 493 }); 494 494 495 $('#default-password-nag-no').click( function() { 495 $('#default-password-nag-no').click( function( e ) { 496 e.preventDefault(); 496 497 setUserSetting('default_password_nag', 'hide'); 497 498 $('div.default-password-nag').hide(); 498 return false;499 499 }); 500 500 501 501 // tab in textareas -
src/wp-admin/js/dashboard.js
67 67 68 68 $( '#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]' ).prop( 'disabled' , false ); 69 69 70 t = $('#quick-press').submit( function() { 70 t = $('#quick-press').submit( function( e ) { 71 e.preventDefault(); 71 72 $('#dashboard_quick_press #publishing-action .spinner').show(); 72 73 $('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop('disabled', true); 73 74 … … 87 88 latestPost.css('background', 'none'); 88 89 }, 1000); 89 90 } 90 91 return false;92 91 } ); 93 92 94 93 $('#publish').click( function() { act.val( 'post-quickpress-publish' ); } ); -
src/wp-admin/js/edit-comments.js
284 284 a.attr('class', 'vim-z vim-destructive'); 285 285 $('.avatar', el).first().clone().prependTo('#undo-' + id + ' .' + action + '-undo-inside'); 286 286 287 a.click(function(){ 287 a.click(function( e ){ 288 e.preventDefault(); 288 289 list.wpList.del(this); 289 290 $('#undo-' + id).css( {backgroundColor:'#ceb'} ).fadeOut(350, function(){ 290 291 $(this).remove(); 291 292 $('#comment-' + id).css('backgroundColor', '').fadeIn(300, function(){ $(this).show(); }); 292 293 }); 293 return false;294 294 }); 295 295 } 296 296 … … 854 854 855 855 setCommentsList(); 856 856 commentReply.init(); 857 $(document).delegate('span.delete a.delete', 'click', function( ){return false;});857 $(document).delegate('span.delete a.delete', 'click', function( e ){ e.preventDefault(); }); 858 858 859 859 if ( typeof $.table_hotkeys != 'undefined' ) { 860 860 make_hotkeys_redirect = function(which) { -
src/wp-admin/js/gallery.js
38 38 }); 39 39 }; 40 40 41 $('#asc').click( function() { 41 $('#asc').click( function( e ) { 42 e.preventDefault(); 42 43 desc = false; 43 44 sortIt(); 44 return false;45 45 }); 46 $('#desc').click( function() { 46 $('#desc').click( function( e ) { 47 e.preventDefault(); 47 48 desc = true; 48 49 sortIt(); 49 return false;50 50 }); 51 $('#clear').click( function() { 51 $('#clear').click( function( e ) { 52 e.preventDefault(); 52 53 clearAll(1); 53 return false;54 54 }); 55 $('#showall').click( function() { 55 $('#showall').click( function( e ) { 56 e.preventDefault(); 56 57 $('#sort-buttons span a').toggle(); 57 58 $('a.describe-toggle-on').hide(); 58 59 $('a.describe-toggle-off, table.slidetoggle').show(); 59 60 $('img.pinkynail').toggle(false); 60 return false;61 61 }); 62 $('#hideall').click( function() { 62 $('#hideall').click( function( e ) { 63 e.preventDefault(); 63 64 $('#sort-buttons span a').toggle(); 64 65 $('a.describe-toggle-on').show(); 65 66 $('a.describe-toggle-off, table.slidetoggle').hide(); 66 67 $('img.pinkynail').toggle(true); 67 return false;68 68 }); 69 69 70 70 // initialize sortable -
src/wp-admin/js/inline-edit-post.js
48 48 }); 49 49 50 50 // add events 51 $('#the-list').on('click', 'a.editinline', function(){ 51 $('#the-list').on('click', 'a.editinline', function( e ){ 52 e.preventDefault(); 52 53 inlineEditPost.edit(this); 53 return false;54 54 }); 55 55 56 56 $('#bulk-edit').find('fieldset:first').after( -
src/wp-admin/js/plugin-install.js
38 38 tb_position(); 39 39 }); 40 40 41 $( '.plugin-card, .plugins .plugin-version-author-uri' ).on( 'click', 'a.thickbox', function() { 41 $( '.plugin-card, .plugins .plugin-version-author-uri' ).on( 'click', 'a.thickbox', function( e ) { 42 e.preventDefault(); 42 43 tb_click.call(this); 43 44 44 45 $('#TB_title').css({'background-color':'#23282d','color':'#cfcfcf'}); … … 45 46 $('#TB_ajaxWindowTitle').html( '<strong>' + plugininstallL10n.plugin_information + '</strong> ' + $(this).data( 'title' ) ); 46 47 $('#TB_iframeContent').attr( 'title', plugininstallL10n.plugin_information + ' ' + $(this).data( 'title' ) ); 47 48 $('#TB_closeWindowButton').focus(); 48 49 return false;50 49 }); 51 50 52 51 /* Plugin install related JS */ -
src/wp-admin/js/post.js
432 432 settingName = 'cats'; 433 433 434 434 // TODO: move to jQuery 1.3+, support for multiple hierarchical taxonomies, see wp-lists.js 435 $('a', '#' + taxonomy + '-tabs').click( function(){ 435 $('a', '#' + taxonomy + '-tabs').click( function( e ){ 436 e.preventDefault(); 436 437 var t = $(this).attr('href'); 437 438 $(this).parent().addClass('tabs').siblings('li').removeClass('tabs'); 438 439 $('#' + taxonomy + '-tabs').siblings('.tabs-panel').hide(); … … 441 442 deleteUserSetting( settingName ); 442 443 else 443 444 setUserSetting( settingName, 'pop' ); 444 return false;445 445 }); 446 446 447 447 if ( getUserSetting( settingName ) ) … … 483 483 addAfter: catAddAfter 484 484 }); 485 485 486 $('#' + taxonomy + '-add-toggle').click( function() { 486 $('#' + taxonomy + '-add-toggle').click( function( e ) { 487 e.preventDefault(); 487 488 $('#' + taxonomy + '-adder').toggleClass( 'wp-hidden-children' ); 488 489 $('a[href="#' + taxonomy + '-all"]', '#' + taxonomy + '-tabs').click(); 489 490 $('#new'+taxonomy).focus(); 490 return false;491 491 }); 492 492 493 493 $('#' + taxonomy + 'checklist, #' + taxonomy + 'checklist-pop').on( 'click', 'li.popular-category > label input[type="checkbox"]', function() { … … 608 608 return true; 609 609 }; 610 610 611 $( '#visibility .edit-visibility').click( function () { 611 $( '#visibility .edit-visibility').click( function ( e ) { 612 e.preventDefault(); 612 613 if ( $postVisibilitySelect.is(':hidden') ) { 613 614 updateVisibility(); 614 615 $postVisibilitySelect.slideDown( 'fast', function() { … … 616 617 } ); 617 618 $(this).hide(); 618 619 } 619 return false;620 620 }); 621 621 622 622 $postVisibilitySelect.find('.cancel-post-visibility').click( function( event ) { … … 742 742 revert_e = e.html(); 743 743 744 744 buttons.html('<button type="button" class="save button button-small">'+postL10n.ok+'</button> <a class="cancel" href="#">'+postL10n.cancel+'</a>'); 745 buttons.children('.save').click(function( ) {745 buttons.children('.save').click(function( e ) { 746 746 var new_slug = e.children('input').val(); 747 e.preventDefault(); 747 748 if ( new_slug == $('#editable-post-name-full').text() ) { 748 749 buttons.children('.cancel').click(); 749 return false;750 return; 750 751 } 751 752 $.post(ajaxurl, { 752 753 action: 'sample-permalink', … … 768 769 real_slug.val(new_slug); 769 770 $( '.edit-slug' ).focus(); 770 771 }); 771 return false;772 772 }); 773 773 774 buttons.children('.cancel').click(function() { 774 buttons.children('.cancel').click(function( e ) { 775 e.preventDefault(); 775 776 $('#view-post-btn').show(); 776 777 e.html(revert_e); 777 778 buttons.html(buttonsOrig); … … 778 779 permalink.html(permalinkOrig); 779 780 real_slug.val(revert_slug); 780 781 $( '.edit-slug' ).focus(); 781 return false;782 782 }); 783 783 784 784 for ( i = 0; i < full.length; ++i ) { -
src/wp-admin/js/postbox.js
56 56 e.stopPropagation(); 57 57 }); 58 58 59 $( '.postbox a.dismiss' ).bind( 'click.postboxes', function( ) {59 $( '.postbox a.dismiss' ).bind( 'click.postboxes', function( e ) { 60 60 var hide_id = $(this).parents('.postbox').attr('id') + '-hide'; 61 e.preventDefault(); 61 62 $( '#' + hide_id ).prop('checked', false).triggerHandler('click'); 62 return false;63 63 }); 64 64 65 65 $('.hide-postbox-tog').bind('click.postboxes', function() { -
src/wp-includes/js/comment-reply.js
21 21 parent.value = parentId; 22 22 cancel.style.display = ''; 23 23 24 cancel.onclick = function( ) {24 cancel.onclick = function( e ) { 25 25 var t = addComment, temp = t.I('wp-temp-form-div'), respond = t.I(t.respondId); 26 26 e.preventDefault(); 27 27 if ( ! temp || ! respond ) 28 28 return; 29 29 … … 32 32 temp.parentNode.removeChild(temp); 33 33 this.style.display = 'none'; 34 34 this.onclick = null; 35 return false;36 35 }; 37 36 38 37 try { t.I('comment').focus(); }
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)