| 1 | Index: src/wp-admin/js/common.js
|
|---|
| 2 | ===================================================================
|
|---|
| 3 | --- src/wp-admin/js/common.js (revision 34954 (working copy)
|
|---|
| 4 | @@ -492,10 +492,10 @@
|
|---|
| 5 | $( this ).closest( 'tr' ).toggleClass( 'is-expanded' );
|
|---|
| 6 | });
|
|---|
| 7 |
|
|---|
| 8 | - $('#default-password-nag-no').click( function() {
|
|---|
| 9 | + $('#default-password-nag-no').click( function( e ) {
|
|---|
| 10 | + e.preventDefault();
|
|---|
| 11 | setUserSetting('default_password_nag', 'hide');
|
|---|
| 12 | $('div.default-password-nag').hide();
|
|---|
| 13 | - return false;
|
|---|
| 14 | });
|
|---|
| 15 |
|
|---|
| 16 | // tab in textareas
|
|---|
| 17 | Index: src/wp-admin/js/dashboard.js
|
|---|
| 18 | ===================================================================
|
|---|
| 19 | --- src/wp-admin/js/dashboard.js (revision 34954)
|
|---|
| 20 | +++ src/wp-admin/js/dashboard.js (working copy)
|
|---|
| 21 | @@ -67,7 +67,8 @@
|
|---|
| 22 |
|
|---|
| 23 | $( '#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]' ).prop( 'disabled' , false );
|
|---|
| 24 |
|
|---|
| 25 | - t = $('#quick-press').submit( function() {
|
|---|
| 26 | + t = $('#quick-press').submit( function( e ) {
|
|---|
| 27 | + e.preventDefault();
|
|---|
| 28 | $('#dashboard_quick_press #publishing-action .spinner').show();
|
|---|
| 29 | $('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop('disabled', true);
|
|---|
| 30 |
|
|---|
| 31 | @@ -87,8 +88,6 @@
|
|---|
| 32 | latestPost.css('background', 'none');
|
|---|
| 33 | }, 1000);
|
|---|
| 34 | }
|
|---|
| 35 | -
|
|---|
| 36 | - return false;
|
|---|
| 37 | } );
|
|---|
| 38 |
|
|---|
| 39 | $('#publish').click( function() { act.val( 'post-quickpress-publish' ); } );
|
|---|
| 40 | Index: src/wp-admin/js/edit-comments.js
|
|---|
| 41 | ===================================================================
|
|---|
| 42 | --- src/wp-admin/js/edit-comments.js (revision 34954)
|
|---|
| 43 | +++ src/wp-admin/js/edit-comments.js (working copy)
|
|---|
| 44 | @@ -284,13 +284,13 @@
|
|---|
| 45 | a.attr('class', 'vim-z vim-destructive');
|
|---|
| 46 | $('.avatar', el).first().clone().prependTo('#undo-' + id + ' .' + action + '-undo-inside');
|
|---|
| 47 |
|
|---|
| 48 | - a.click(function(){
|
|---|
| 49 | + a.click(function( e ){
|
|---|
| 50 | + e.preventDefault();
|
|---|
| 51 | list.wpList.del(this);
|
|---|
| 52 | $('#undo-' + id).css( {backgroundColor:'#ceb'} ).fadeOut(350, function(){
|
|---|
| 53 | $(this).remove();
|
|---|
| 54 | $('#comment-' + id).css('backgroundColor', '').fadeIn(300, function(){ $(this).show(); });
|
|---|
| 55 | });
|
|---|
| 56 | - return false;
|
|---|
| 57 | });
|
|---|
| 58 | }
|
|---|
| 59 |
|
|---|
| 60 | @@ -854,7 +854,7 @@
|
|---|
| 61 |
|
|---|
| 62 | setCommentsList();
|
|---|
| 63 | commentReply.init();
|
|---|
| 64 | - $(document).delegate('span.delete a.delete', 'click', function(){return false;});
|
|---|
| 65 | + $(document).delegate('span.delete a.delete', 'click', function( e ){ e.preventDefault(); });
|
|---|
| 66 |
|
|---|
| 67 | if ( typeof $.table_hotkeys != 'undefined' ) {
|
|---|
| 68 | make_hotkeys_redirect = function(which) {
|
|---|
| 69 | Index: src/wp-admin/js/gallery.js
|
|---|
| 70 | ===================================================================
|
|---|
| 71 | --- src/wp-admin/js/gallery.js (revision 34954)
|
|---|
| 72 | +++ src/wp-admin/js/gallery.js (working copy)
|
|---|
| 73 | @@ -38,33 +38,33 @@
|
|---|
| 74 | });
|
|---|
| 75 | };
|
|---|
| 76 |
|
|---|
| 77 | - $('#asc').click( function() {
|
|---|
| 78 | + $('#asc').click( function( e ) {
|
|---|
| 79 | + e.preventDefault();
|
|---|
| 80 | desc = false;
|
|---|
| 81 | sortIt();
|
|---|
| 82 | - return false;
|
|---|
| 83 | });
|
|---|
| 84 | - $('#desc').click( function() {
|
|---|
| 85 | + $('#desc').click( function( e ) {
|
|---|
| 86 | + e.preventDefault();
|
|---|
| 87 | desc = true;
|
|---|
| 88 | sortIt();
|
|---|
| 89 | - return false;
|
|---|
| 90 | });
|
|---|
| 91 | - $('#clear').click( function() {
|
|---|
| 92 | + $('#clear').click( function( e ) {
|
|---|
| 93 | + e.preventDefault();
|
|---|
| 94 | clearAll(1);
|
|---|
| 95 | - return false;
|
|---|
| 96 | });
|
|---|
| 97 | - $('#showall').click( function() {
|
|---|
| 98 | + $('#showall').click( function( e ) {
|
|---|
| 99 | + e.preventDefault();
|
|---|
| 100 | $('#sort-buttons span a').toggle();
|
|---|
| 101 | $('a.describe-toggle-on').hide();
|
|---|
| 102 | $('a.describe-toggle-off, table.slidetoggle').show();
|
|---|
| 103 | $('img.pinkynail').toggle(false);
|
|---|
| 104 | - return false;
|
|---|
| 105 | });
|
|---|
| 106 | - $('#hideall').click( function() {
|
|---|
| 107 | + $('#hideall').click( function( e ) {
|
|---|
| 108 | + e.preventDefault();
|
|---|
| 109 | $('#sort-buttons span a').toggle();
|
|---|
| 110 | $('a.describe-toggle-on').show();
|
|---|
| 111 | $('a.describe-toggle-off, table.slidetoggle').hide();
|
|---|
| 112 | $('img.pinkynail').toggle(true);
|
|---|
| 113 | - return false;
|
|---|
| 114 | });
|
|---|
| 115 |
|
|---|
| 116 | // initialize sortable
|
|---|
| 117 | Index: src/wp-admin/js/inline-edit-post.js
|
|---|
| 118 | ===================================================================
|
|---|
| 119 | --- src/wp-admin/js/inline-edit-post.js (revision 34954)
|
|---|
| 120 | +++ src/wp-admin/js/inline-edit-post.js (working copy)
|
|---|
| 121 | @@ -48,9 +48,9 @@
|
|---|
| 122 | });
|
|---|
| 123 |
|
|---|
| 124 | // add events
|
|---|
| 125 | - $('#the-list').on('click', 'a.editinline', function(){
|
|---|
| 126 | + $('#the-list').on('click', 'a.editinline', function( e ){
|
|---|
| 127 | + e.preventDefault();
|
|---|
| 128 | inlineEditPost.edit(this);
|
|---|
| 129 | - return false;
|
|---|
| 130 | });
|
|---|
| 131 |
|
|---|
| 132 | $('#bulk-edit').find('fieldset:first').after(
|
|---|
| 133 | Index: src/wp-admin/js/plugin-install.js
|
|---|
| 134 | ===================================================================
|
|---|
| 135 | --- src/wp-admin/js/plugin-install.js (revision 34954)
|
|---|
| 136 | +++ src/wp-admin/js/plugin-install.js (working copy)
|
|---|
| 137 | @@ -38,7 +38,8 @@
|
|---|
| 138 | tb_position();
|
|---|
| 139 | });
|
|---|
| 140 |
|
|---|
| 141 | - $( '.plugin-card, .plugins .plugin-version-author-uri' ).on( 'click', 'a.thickbox', function() {
|
|---|
| 142 | + $( '.plugin-card, .plugins .plugin-version-author-uri' ).on( 'click', 'a.thickbox', function( e ) {
|
|---|
| 143 | + e.preventDefault();
|
|---|
| 144 | tb_click.call(this);
|
|---|
| 145 |
|
|---|
| 146 | $('#TB_title').css({'background-color':'#23282d','color':'#cfcfcf'});
|
|---|
| 147 | @@ -45,8 +46,6 @@
|
|---|
| 148 | $('#TB_ajaxWindowTitle').html( '<strong>' + plugininstallL10n.plugin_information + '</strong> ' + $(this).data( 'title' ) );
|
|---|
| 149 | $('#TB_iframeContent').attr( 'title', plugininstallL10n.plugin_information + ' ' + $(this).data( 'title' ) );
|
|---|
| 150 | $('#TB_closeWindowButton').focus();
|
|---|
| 151 | -
|
|---|
| 152 | - return false;
|
|---|
| 153 | });
|
|---|
| 154 |
|
|---|
| 155 | /* Plugin install related JS */
|
|---|
| 156 | Index: src/wp-admin/js/post.js
|
|---|
| 157 | ===================================================================
|
|---|
| 158 | --- src/wp-admin/js/post.js (revision 34954)
|
|---|
| 159 | +++ src/wp-admin/js/post.js (working copy)
|
|---|
| 160 | @@ -432,7 +432,8 @@
|
|---|
| 161 | settingName = 'cats';
|
|---|
| 162 |
|
|---|
| 163 | // TODO: move to jQuery 1.3+, support for multiple hierarchical taxonomies, see wp-lists.js
|
|---|
| 164 | - $('a', '#' + taxonomy + '-tabs').click( function(){
|
|---|
| 165 | + $('a', '#' + taxonomy + '-tabs').click( function( e ){
|
|---|
| 166 | + e.preventDefault();
|
|---|
| 167 | var t = $(this).attr('href');
|
|---|
| 168 | $(this).parent().addClass('tabs').siblings('li').removeClass('tabs');
|
|---|
| 169 | $('#' + taxonomy + '-tabs').siblings('.tabs-panel').hide();
|
|---|
| 170 | @@ -441,7 +442,6 @@
|
|---|
| 171 | deleteUserSetting( settingName );
|
|---|
| 172 | else
|
|---|
| 173 | setUserSetting( settingName, 'pop' );
|
|---|
| 174 | - return false;
|
|---|
| 175 | });
|
|---|
| 176 |
|
|---|
| 177 | if ( getUserSetting( settingName ) )
|
|---|
| 178 | @@ -483,11 +483,11 @@
|
|---|
| 179 | addAfter: catAddAfter
|
|---|
| 180 | });
|
|---|
| 181 |
|
|---|
| 182 | - $('#' + taxonomy + '-add-toggle').click( function() {
|
|---|
| 183 | + $('#' + taxonomy + '-add-toggle').click( function( e ) {
|
|---|
| 184 | + e.preventDefault();
|
|---|
| 185 | $('#' + taxonomy + '-adder').toggleClass( 'wp-hidden-children' );
|
|---|
| 186 | $('a[href="#' + taxonomy + '-all"]', '#' + taxonomy + '-tabs').click();
|
|---|
| 187 | $('#new'+taxonomy).focus();
|
|---|
| 188 | - return false;
|
|---|
| 189 | });
|
|---|
| 190 |
|
|---|
| 191 | $('#' + taxonomy + 'checklist, #' + taxonomy + 'checklist-pop').on( 'click', 'li.popular-category > label input[type="checkbox"]', function() {
|
|---|
| 192 | @@ -608,7 +608,8 @@
|
|---|
| 193 | return true;
|
|---|
| 194 | };
|
|---|
| 195 |
|
|---|
| 196 | - $( '#visibility .edit-visibility').click( function () {
|
|---|
| 197 | + $( '#visibility .edit-visibility').click( function ( e ) {
|
|---|
| 198 | + e.preventDefault();
|
|---|
| 199 | if ( $postVisibilitySelect.is(':hidden') ) {
|
|---|
| 200 | updateVisibility();
|
|---|
| 201 | $postVisibilitySelect.slideDown( 'fast', function() {
|
|---|
| 202 | @@ -616,7 +617,6 @@
|
|---|
| 203 | } );
|
|---|
| 204 | $(this).hide();
|
|---|
| 205 | }
|
|---|
| 206 | - return false;
|
|---|
| 207 | });
|
|---|
| 208 |
|
|---|
| 209 | $postVisibilitySelect.find('.cancel-post-visibility').click( function( event ) {
|
|---|
| 210 | @@ -742,11 +742,12 @@
|
|---|
| 211 | revert_e = e.html();
|
|---|
| 212 |
|
|---|
| 213 | buttons.html('<button type="button" class="save button button-small">'+postL10n.ok+'</button> <a class="cancel" href="#">'+postL10n.cancel+'</a>');
|
|---|
| 214 | - buttons.children('.save').click(function() {
|
|---|
| 215 | + buttons.children('.save').click(function( e ) {
|
|---|
| 216 | var new_slug = e.children('input').val();
|
|---|
| 217 | + e.preventDefault();
|
|---|
| 218 | if ( new_slug == $('#editable-post-name-full').text() ) {
|
|---|
| 219 | buttons.children('.cancel').click();
|
|---|
| 220 | - return false;
|
|---|
| 221 | + return;
|
|---|
| 222 | }
|
|---|
| 223 | $.post(ajaxurl, {
|
|---|
| 224 | action: 'sample-permalink',
|
|---|
| 225 | @@ -768,10 +769,10 @@
|
|---|
| 226 | real_slug.val(new_slug);
|
|---|
| 227 | $( '.edit-slug' ).focus();
|
|---|
| 228 | });
|
|---|
| 229 | - return false;
|
|---|
| 230 | });
|
|---|
| 231 |
|
|---|
| 232 | - buttons.children('.cancel').click(function() {
|
|---|
| 233 | + buttons.children('.cancel').click(function( e ) {
|
|---|
| 234 | + e.preventDefault();
|
|---|
| 235 | $('#view-post-btn').show();
|
|---|
| 236 | e.html(revert_e);
|
|---|
| 237 | buttons.html(buttonsOrig);
|
|---|
| 238 | @@ -778,7 +779,6 @@
|
|---|
| 239 | permalink.html(permalinkOrig);
|
|---|
| 240 | real_slug.val(revert_slug);
|
|---|
| 241 | $( '.edit-slug' ).focus();
|
|---|
| 242 | - return false;
|
|---|
| 243 | });
|
|---|
| 244 |
|
|---|
| 245 | for ( i = 0; i < full.length; ++i ) {
|
|---|
| 246 | Index: src/wp-admin/js/postbox.js
|
|---|
| 247 | ===================================================================
|
|---|
| 248 | --- src/wp-admin/js/postbox.js (revision 34954)
|
|---|
| 249 | +++ src/wp-admin/js/postbox.js (working copy)
|
|---|
| 250 | @@ -56,10 +56,10 @@
|
|---|
| 251 | e.stopPropagation();
|
|---|
| 252 | });
|
|---|
| 253 |
|
|---|
| 254 | - $( '.postbox a.dismiss' ).bind( 'click.postboxes', function() {
|
|---|
| 255 | + $( '.postbox a.dismiss' ).bind( 'click.postboxes', function( e ) {
|
|---|
| 256 | var hide_id = $(this).parents('.postbox').attr('id') + '-hide';
|
|---|
| 257 | + e.preventDefault();
|
|---|
| 258 | $( '#' + hide_id ).prop('checked', false).triggerHandler('click');
|
|---|
| 259 | - return false;
|
|---|
| 260 | });
|
|---|
| 261 |
|
|---|
| 262 | $('.hide-postbox-tog').bind('click.postboxes', function() {
|
|---|