| 1 | diff --git wp-admin/js/categories.js wp-admin/js/categories.js |
|---|
| 2 | index cc58eb4..9ee67db 100644 |
|---|
| 3 | --- wp-admin/js/categories.js |
|---|
| 4 | +++ wp-admin/js/categories.js |
|---|
| 5 | @@ -30,5 +30,5 @@ jQuery(document).ready(function($) { |
|---|
| 6 | else |
|---|
| 7 | $('#the-list').wpList({ delBefore: delBefore }); |
|---|
| 8 | |
|---|
| 9 | - $('.delete a[class^="delete"]').live('click', function(){return false;}); |
|---|
| 10 | + $('.delete a[class^="delete"]').live('click', function(e) { e.preventDefault(); }); |
|---|
| 11 | }); |
|---|
| 12 | diff --git wp-admin/js/comment.js wp-admin/js/comment.js |
|---|
| 13 | index f9d93bf..e22ea89 100644 |
|---|
| 14 | --- wp-admin/js/comment.js |
|---|
| 15 | +++ wp-admin/js/comment.js |
|---|
| 16 | @@ -3,15 +3,16 @@ jQuery(document).ready( function($) { |
|---|
| 17 | postboxes.add_postbox_toggles('comment'); |
|---|
| 18 | |
|---|
| 19 | var stamp = $('#timestamp').html(); |
|---|
| 20 | - $('.edit-timestamp').click(function () { |
|---|
| 21 | + $('.edit-timestamp').click(function (e) { |
|---|
| 22 | + e.preventDefault(); |
|---|
| 23 | if ($('#timestampdiv').is(":hidden")) { |
|---|
| 24 | $('#timestampdiv').slideDown("normal"); |
|---|
| 25 | $('.edit-timestamp').hide(); |
|---|
| 26 | } |
|---|
| 27 | - return false; |
|---|
| 28 | }); |
|---|
| 29 | |
|---|
| 30 | - $('.cancel-timestamp').click(function() { |
|---|
| 31 | + $('.cancel-timestamp').click(function(e) { |
|---|
| 32 | + e.preventDefault(); |
|---|
| 33 | $('#timestampdiv').slideUp("normal"); |
|---|
| 34 | $('#mm').val($('#hidden_mm').val()); |
|---|
| 35 | $('#jj').val($('#hidden_jj').val()); |
|---|
| 36 | @@ -20,16 +21,16 @@ jQuery(document).ready( function($) { |
|---|
| 37 | $('#mn').val($('#hidden_mn').val()); |
|---|
| 38 | $('#timestamp').html(stamp); |
|---|
| 39 | $('.edit-timestamp').show(); |
|---|
| 40 | - return false; |
|---|
| 41 | }); |
|---|
| 42 | |
|---|
| 43 | - $('.save-timestamp').click(function () { // crazyhorse - multiple ok cancels |
|---|
| 44 | + $('.save-timestamp').click(function (e) { // crazyhorse - multiple ok cancels |
|---|
| 45 | + e.preventDefault(); |
|---|
| 46 | var aa = $('#aa').val(), mm = $('#mm').val(), jj = $('#jj').val(), hh = $('#hh').val(), mn = $('#mn').val(), |
|---|
| 47 | newD = new Date( aa, mm - 1, jj, hh, mn ); |
|---|
| 48 | |
|---|
| 49 | if ( newD.getFullYear() != aa || (1 + newD.getMonth()) != mm || newD.getDate() != jj || newD.getMinutes() != mn ) { |
|---|
| 50 | $('.timestamp-wrap', '#timestampdiv').addClass('form-invalid'); |
|---|
| 51 | - return false; |
|---|
| 52 | + return; |
|---|
| 53 | } else { |
|---|
| 54 | $('.timestamp-wrap', '#timestampdiv').removeClass('form-invalid'); |
|---|
| 55 | } |
|---|
| 56 | @@ -44,6 +45,5 @@ jQuery(document).ready( function($) { |
|---|
| 57 | hh + ':' + |
|---|
| 58 | mn + '</b> ' |
|---|
| 59 | ); |
|---|
| 60 | - return false; |
|---|
| 61 | }); |
|---|
| 62 | }); |
|---|
| 63 | diff --git wp-admin/js/common.js wp-admin/js/common.js |
|---|
| 64 | index 0f6b84d..e6e09ac 100644 |
|---|
| 65 | --- wp-admin/js/common.js |
|---|
| 66 | +++ wp-admin/js/common.js |
|---|
| 67 | @@ -327,10 +327,10 @@ $(document).ready( function() { |
|---|
| 68 | }); |
|---|
| 69 | }); |
|---|
| 70 | |
|---|
| 71 | - $('#default-password-nag-no').click( function() { |
|---|
| 72 | + $('#default-password-nag-no').click( function(e) { |
|---|
| 73 | + e.preventDefault(); |
|---|
| 74 | setUserSetting('default_password_nag', 'hide'); |
|---|
| 75 | $('div.default-password-nag').hide(); |
|---|
| 76 | - return false; |
|---|
| 77 | }); |
|---|
| 78 | |
|---|
| 79 | // tab in textareas |
|---|
| 80 | diff --git wp-admin/js/dashboard.js wp-admin/js/dashboard.js |
|---|
| 81 | index 50a17f8..6b8faf7 100644 |
|---|
| 82 | --- wp-admin/js/dashboard.js |
|---|
| 83 | +++ wp-admin/js/dashboard.js |
|---|
| 84 | @@ -65,7 +65,8 @@ jQuery(document).ready( function($) { |
|---|
| 85 | /* QuickPress */ |
|---|
| 86 | quickPressLoad = function() { |
|---|
| 87 | var act = $('#quickpost-action'), t; |
|---|
| 88 | - t = $('#quick-press').submit( function() { |
|---|
| 89 | + t = $('#quick-press').submit( function(e) { |
|---|
| 90 | + e.preventDefault(); |
|---|
| 91 | $('#dashboard_quick_press #publishing-action .spinner').show(); |
|---|
| 92 | $('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop('disabled', true); |
|---|
| 93 | |
|---|
| 94 | @@ -82,7 +83,6 @@ jQuery(document).ready( function($) { |
|---|
| 95 | } ).end().remove(); |
|---|
| 96 | quickPressLoad(); |
|---|
| 97 | } ); |
|---|
| 98 | - return false; |
|---|
| 99 | } ); |
|---|
| 100 | |
|---|
| 101 | $('#publish').click( function() { act.val( 'post-quickpress-publish' ); } ); |
|---|
| 102 | diff --git wp-admin/js/edit-comments.js wp-admin/js/edit-comments.js |
|---|
| 103 | index 038a1e5..8489a16 100644 |
|---|
| 104 | --- wp-admin/js/edit-comments.js |
|---|
| 105 | +++ wp-admin/js/edit-comments.js |
|---|
| 106 | @@ -76,13 +76,13 @@ setCommentsList = function() { |
|---|
| 107 | a.attr('class', 'vim-z vim-destructive'); |
|---|
| 108 | $('.avatar', el).clone().prependTo('#undo-' + id + ' .' + action + '-undo-inside'); |
|---|
| 109 | |
|---|
| 110 | - a.click(function(){ |
|---|
| 111 | + a.click(function(e){ |
|---|
| 112 | + e.preventDefault(); |
|---|
| 113 | list.wpList.del(this); |
|---|
| 114 | $('#undo-' + id).css( {backgroundColor:'#ceb'} ).fadeOut(350, function(){ |
|---|
| 115 | $(this).remove(); |
|---|
| 116 | $('#comment-' + id).css('backgroundColor', '').fadeIn(300, function(){ $(this).show() }); |
|---|
| 117 | }); |
|---|
| 118 | - return false; |
|---|
| 119 | }); |
|---|
| 120 | } |
|---|
| 121 | |
|---|
| 122 | @@ -560,7 +560,7 @@ $(document).ready(function(){ |
|---|
| 123 | |
|---|
| 124 | setCommentsList(); |
|---|
| 125 | commentReply.init(); |
|---|
| 126 | - $(document).delegate('span.delete a.delete', 'click', function(){return false;}); |
|---|
| 127 | + $(document).delegate('span.delete a.delete', 'click', function(e) { e.preventDefault(); }); |
|---|
| 128 | |
|---|
| 129 | if ( typeof $.table_hotkeys != 'undefined' ) { |
|---|
| 130 | make_hotkeys_redirect = function(which) { |
|---|
| 131 | diff --git wp-admin/js/gallery.js wp-admin/js/gallery.js |
|---|
| 132 | index d7b4bb1..658556a 100644 |
|---|
| 133 | --- wp-admin/js/gallery.js |
|---|
| 134 | +++ wp-admin/js/gallery.js |
|---|
| 135 | @@ -34,22 +34,22 @@ jQuery(document).ready(function($) { |
|---|
| 136 | }); |
|---|
| 137 | } |
|---|
| 138 | |
|---|
| 139 | - $('#asc').click(function(){desc = false; sortIt(); return false;}); |
|---|
| 140 | - $('#desc').click(function(){desc = true; sortIt(); return false;}); |
|---|
| 141 | - $('#clear').click(function(){clearAll(1); return false;}); |
|---|
| 142 | - $('#showall').click(function(){ |
|---|
| 143 | + $('#asc').click(function(e){desc = false; sortIt(); e.preventDefault();}); |
|---|
| 144 | + $('#desc').click(function(e){desc = true; sortIt(); e.preventDefault();}); |
|---|
| 145 | + $('#clear').click(function(e){clearAll(1); e.preventDefault();}); |
|---|
| 146 | + $('#showall').click(function(e){ |
|---|
| 147 | + e.preventDefault(); |
|---|
| 148 | $('#sort-buttons span a').toggle(); |
|---|
| 149 | $('a.describe-toggle-on').hide(); |
|---|
| 150 | $('a.describe-toggle-off, table.slidetoggle').show(); |
|---|
| 151 | $('img.pinkynail').toggle(false); |
|---|
| 152 | - return false; |
|---|
| 153 | }); |
|---|
| 154 | - $('#hideall').click(function(){ |
|---|
| 155 | + $('#hideall').click(function(e){ |
|---|
| 156 | + e.preventDefault(); |
|---|
| 157 | $('#sort-buttons span a').toggle(); |
|---|
| 158 | $('a.describe-toggle-on').show(); |
|---|
| 159 | $('a.describe-toggle-off, table.slidetoggle').hide(); |
|---|
| 160 | $('img.pinkynail').toggle(true); |
|---|
| 161 | - return false; |
|---|
| 162 | }); |
|---|
| 163 | |
|---|
| 164 | // initialize sortable |
|---|
| 165 | diff --git wp-admin/js/inline-edit-post.js wp-admin/js/inline-edit-post.js |
|---|
| 166 | index 9abf478..9883ad0 100644 |
|---|
| 167 | --- wp-admin/js/inline-edit-post.js |
|---|
| 168 | +++ wp-admin/js/inline-edit-post.js |
|---|
| 169 | @@ -42,9 +42,9 @@ inlineEditPost = { |
|---|
| 170 | }); |
|---|
| 171 | |
|---|
| 172 | // add events |
|---|
| 173 | - $('a.editinline').live('click', function(){ |
|---|
| 174 | + $('a.editinline').live('click', function(e){ |
|---|
| 175 | + e.preventDefault(); |
|---|
| 176 | inlineEditPost.edit(this); |
|---|
| 177 | - return false; |
|---|
| 178 | }); |
|---|
| 179 | |
|---|
| 180 | $('#bulk-title-div').parents('fieldset').after( |
|---|
| 181 | diff --git wp-admin/js/link.js wp-admin/js/link.js |
|---|
| 182 | index f8b4583..c38d9ae 100644 |
|---|
| 183 | --- wp-admin/js/link.js |
|---|
| 184 | +++ wp-admin/js/link.js |
|---|
| 185 | @@ -7,7 +7,8 @@ jQuery(document).ready( function($) { |
|---|
| 186 | postboxes.add_postbox_toggles('link'); |
|---|
| 187 | |
|---|
| 188 | // category tabs |
|---|
| 189 | - $('#category-tabs a').click(function(){ |
|---|
| 190 | + $('#category-tabs a').click(function(e){ |
|---|
| 191 | + e.preventDefault(); |
|---|
| 192 | var t = $(this).attr('href'); |
|---|
| 193 | $(this).parent().addClass('tabs').siblings('li').removeClass('tabs'); |
|---|
| 194 | $('.tabs-panel').hide(); |
|---|
| 195 | @@ -16,7 +17,6 @@ jQuery(document).ready( function($) { |
|---|
| 196 | deleteUserSetting('cats'); |
|---|
| 197 | else |
|---|
| 198 | setUserSetting('cats','pop'); |
|---|
| 199 | - return false; |
|---|
| 200 | }); |
|---|
| 201 | if ( getUserSetting('cats') ) |
|---|
| 202 | $('#category-tabs a[href="#categories-pop"]').click(); |
|---|
| 203 | @@ -56,11 +56,11 @@ jQuery(document).ready( function($) { |
|---|
| 204 | if ( 'pop' == getUserSetting('cats') ) |
|---|
| 205 | $('a[href="#categories-pop"]').click(); |
|---|
| 206 | |
|---|
| 207 | - $('#category-add-toggle').click( function() { |
|---|
| 208 | + $('#category-add-toggle').click( function(e) { |
|---|
| 209 | + e.preventDefault(); |
|---|
| 210 | $(this).parents('div:first').toggleClass( 'wp-hidden-children' ); |
|---|
| 211 | $('#category-tabs a[href="#categories-all"]').click(); |
|---|
| 212 | $('#newcategory').focus(); |
|---|
| 213 | - return false; |
|---|
| 214 | } ); |
|---|
| 215 | |
|---|
| 216 | $('.categorychecklist :checkbox').change( syncChecks ).filter( ':checked' ).change(); |
|---|
| 217 | diff --git wp-admin/js/plugin-install.js wp-admin/js/plugin-install.js |
|---|
| 218 | index f32574a..1901f8d 100644 |
|---|
| 219 | --- wp-admin/js/plugin-install.js |
|---|
| 220 | +++ wp-admin/js/plugin-install.js |
|---|
| 221 | @@ -27,16 +27,17 @@ jQuery(document).ready(function($) { |
|---|
| 222 | |
|---|
| 223 | $(window).resize(function(){ tb_position(); }); |
|---|
| 224 | |
|---|
| 225 | - $('#dashboard_plugins a.thickbox, .plugins a.thickbox').click( function() { |
|---|
| 226 | + $('#dashboard_plugins a.thickbox, .plugins a.thickbox').click( function(e) { |
|---|
| 227 | + e.preventDefault(); |
|---|
| 228 | tb_click.call(this); |
|---|
| 229 | |
|---|
| 230 | $('#TB_title').css({'background-color':'#222','color':'#cfcfcf'}); |
|---|
| 231 | $('#TB_ajaxWindowTitle').html('<strong>' + plugininstallL10n.plugin_information + '</strong> ' + $(this).attr('title') ); |
|---|
| 232 | - return false; |
|---|
| 233 | }); |
|---|
| 234 | |
|---|
| 235 | /* Plugin install related JS*/ |
|---|
| 236 | - $('#plugin-information #sidemenu a').click( function() { |
|---|
| 237 | + $('#plugin-information #sidemenu a').click( function(e) { |
|---|
| 238 | + e.preventDefault(); |
|---|
| 239 | var tab = $(this).attr('name'); |
|---|
| 240 | //Flip the tab |
|---|
| 241 | $('#plugin-information-header a.current').removeClass('current'); |
|---|
| 242 | @@ -44,7 +45,6 @@ jQuery(document).ready(function($) { |
|---|
| 243 | //Flip the content. |
|---|
| 244 | $('#section-holder div.section').hide(); //Hide 'em all |
|---|
| 245 | $('#section-' + tab).show(); |
|---|
| 246 | - return false; |
|---|
| 247 | }); |
|---|
| 248 | |
|---|
| 249 | $('a.install-now').click( function() { |
|---|
| 250 | diff --git wp-admin/js/post.js wp-admin/js/post.js |
|---|
| 251 | index d08dc4a..7ef4d92 100644 |
|---|
| 252 | --- wp-admin/js/post.js |
|---|
| 253 | +++ wp-admin/js/post.js |
|---|
| 254 | @@ -164,11 +164,11 @@ tagBox = { |
|---|
| 255 | }); |
|---|
| 256 | |
|---|
| 257 | // tag cloud |
|---|
| 258 | - $('a.tagcloud-link').click(function(){ |
|---|
| 259 | + $('a.tagcloud-link').click(function(e){ |
|---|
| 260 | + e.preventDefault(); |
|---|
| 261 | if ( ! $('.the-tagcloud').length ) |
|---|
| 262 | tagBox.get( $(this).attr('id') ); |
|---|
| 263 | $(this).siblings('.the-tagcloud').toggle(); |
|---|
| 264 | - return false; |
|---|
| 265 | }); |
|---|
| 266 | } |
|---|
| 267 | }; |
|---|
| 268 | @@ -280,7 +280,8 @@ jQuery(document).ready( function($) { |
|---|
| 269 | settingName = 'cats'; |
|---|
| 270 | |
|---|
| 271 | // TODO: move to jQuery 1.3+, support for multiple hierarchical taxonomies, see wp-lists.js |
|---|
| 272 | - $('a', '#' + taxonomy + '-tabs').click( function(){ |
|---|
| 273 | + $('a', '#' + taxonomy + '-tabs').click( function(e){ |
|---|
| 274 | + e.preventDefault(); |
|---|
| 275 | var t = $(this).attr('href'); |
|---|
| 276 | $(this).parent().addClass('tabs').siblings('li').removeClass('tabs'); |
|---|
| 277 | $('#' + taxonomy + '-tabs').siblings('.tabs-panel').hide(); |
|---|
| 278 | @@ -289,7 +290,6 @@ jQuery(document).ready( function($) { |
|---|
| 279 | deleteUserSetting(settingName); |
|---|
| 280 | else |
|---|
| 281 | setUserSetting(settingName, 'pop'); |
|---|
| 282 | - return false; |
|---|
| 283 | }); |
|---|
| 284 | |
|---|
| 285 | if ( getUserSetting(settingName) ) |
|---|
| 286 | @@ -340,11 +340,11 @@ jQuery(document).ready( function($) { |
|---|
| 287 | addAfter: catAddAfter |
|---|
| 288 | }); |
|---|
| 289 | |
|---|
| 290 | - $('#' + taxonomy + '-add-toggle').click( function() { |
|---|
| 291 | + $('#' + taxonomy + '-add-toggle').click( function(e) { |
|---|
| 292 | + e.preventDefault(); |
|---|
| 293 | $('#' + taxonomy + '-adder').toggleClass( 'wp-hidden-children' ); |
|---|
| 294 | $('a[href="#' + taxonomy + '-all"]', '#' + taxonomy + '-tabs').click(); |
|---|
| 295 | $('#new'+taxonomy).focus(); |
|---|
| 296 | - return false; |
|---|
| 297 | }); |
|---|
| 298 | |
|---|
| 299 | $('#' + taxonomy + 'checklist li.popular-category input[type="checkbox"], #' + taxonomy + 'checklist-pop input[type="checkbox"]').live( 'click', function(){ |
|---|
| 300 | @@ -464,16 +464,17 @@ jQuery(document).ready( function($) { |
|---|
| 301 | return true; |
|---|
| 302 | } |
|---|
| 303 | |
|---|
| 304 | - $('.edit-visibility', '#visibility').click(function () { |
|---|
| 305 | + $('.edit-visibility', '#visibility').click(function (e) { |
|---|
| 306 | + e.preventDefault(); |
|---|
| 307 | if ($('#post-visibility-select').is(":hidden")) { |
|---|
| 308 | updateVisibility(); |
|---|
| 309 | $('#post-visibility-select').slideDown('fast'); |
|---|
| 310 | $(this).hide(); |
|---|
| 311 | } |
|---|
| 312 | - return false; |
|---|
| 313 | }); |
|---|
| 314 | |
|---|
| 315 | - $('.cancel-post-visibility', '#post-visibility-select').click(function () { |
|---|
| 316 | + $('.cancel-post-visibility', '#post-visibility-select').click(function (e) { |
|---|
| 317 | + e.preventDefault(); |
|---|
| 318 | $('#post-visibility-select').slideUp('fast'); |
|---|
| 319 | $('#visibility-radio-' + $('#hidden-post-visibility').val()).prop('checked', true); |
|---|
| 320 | $('#post_password').val($('#hidden_post_password').val()); |
|---|
| 321 | @@ -481,10 +482,10 @@ jQuery(document).ready( function($) { |
|---|
| 322 | $('#post-visibility-display').html(visibility); |
|---|
| 323 | $('.edit-visibility', '#visibility').show(); |
|---|
| 324 | updateText(); |
|---|
| 325 | - return false; |
|---|
| 326 | }); |
|---|
| 327 | |
|---|
| 328 | - $('.save-post-visibility', '#post-visibility-select').click(function () { // crazyhorse - multiple ok cancels |
|---|
| 329 | + $('.save-post-visibility', '#post-visibility-select').click(function (e) { // crazyhorse - multiple ok cancels |
|---|
| 330 | + e.preventDefault(); |
|---|
| 331 | var pvSelect = $('#post-visibility-select'); |
|---|
| 332 | |
|---|
| 333 | pvSelect.slideUp('fast'); |
|---|
| 334 | @@ -502,23 +503,23 @@ jQuery(document).ready( function($) { |
|---|
| 335 | } |
|---|
| 336 | |
|---|
| 337 | $('#post-visibility-display').html( postL10n[$('input:radio:checked', pvSelect).val() + sticky] ); |
|---|
| 338 | - return false; |
|---|
| 339 | }); |
|---|
| 340 | |
|---|
| 341 | $('input:radio', '#post-visibility-select').change(function() { |
|---|
| 342 | updateVisibility(); |
|---|
| 343 | }); |
|---|
| 344 | |
|---|
| 345 | - $('#timestampdiv').siblings('a.edit-timestamp').click(function() { |
|---|
| 346 | + $('#timestampdiv').siblings('a.edit-timestamp').click(function(e) { |
|---|
| 347 | + e.preventDefault(); |
|---|
| 348 | if ($('#timestampdiv').is(":hidden")) { |
|---|
| 349 | $('#timestampdiv').slideDown('fast'); |
|---|
| 350 | $('#mm').focus(); |
|---|
| 351 | $(this).hide(); |
|---|
| 352 | } |
|---|
| 353 | - return false; |
|---|
| 354 | }); |
|---|
| 355 | |
|---|
| 356 | - $('.cancel-timestamp', '#timestampdiv').click(function() { |
|---|
| 357 | + $('.cancel-timestamp', '#timestampdiv').click(function(e) { |
|---|
| 358 | + e.preventDefault(); |
|---|
| 359 | $('#timestampdiv').slideUp('fast'); |
|---|
| 360 | $('#mm').val($('#hidden_mm').val()); |
|---|
| 361 | $('#jj').val($('#hidden_jj').val()); |
|---|
| 362 | @@ -527,15 +528,14 @@ jQuery(document).ready( function($) { |
|---|
| 363 | $('#mn').val($('#hidden_mn').val()); |
|---|
| 364 | $('#timestampdiv').siblings('a.edit-timestamp').show(); |
|---|
| 365 | updateText(); |
|---|
| 366 | - return false; |
|---|
| 367 | }); |
|---|
| 368 | |
|---|
| 369 | - $('.save-timestamp', '#timestampdiv').click(function () { // crazyhorse - multiple ok cancels |
|---|
| 370 | + $('.save-timestamp', '#timestampdiv').click(function (e) { // crazyhorse - multiple ok cancels |
|---|
| 371 | + e.preventDefault(); |
|---|
| 372 | if ( updateText() ) { |
|---|
| 373 | $('#timestampdiv').slideUp('fast'); |
|---|
| 374 | $('#timestampdiv').siblings('a.edit-timestamp').show(); |
|---|
| 375 | } |
|---|
| 376 | - return false; |
|---|
| 377 | }); |
|---|
| 378 | |
|---|
| 379 | $('#post').on( 'submit', function(e){ |
|---|
| 380 | @@ -548,27 +548,27 @@ jQuery(document).ready( function($) { |
|---|
| 381 | } |
|---|
| 382 | }); |
|---|
| 383 | |
|---|
| 384 | - $('#post-status-select').siblings('a.edit-post-status').click(function() { |
|---|
| 385 | + $('#post-status-select').siblings('a.edit-post-status').click(function(e) { |
|---|
| 386 | + e.preventDefault(); |
|---|
| 387 | if ($('#post-status-select').is(":hidden")) { |
|---|
| 388 | $('#post-status-select').slideDown('fast'); |
|---|
| 389 | $(this).hide(); |
|---|
| 390 | } |
|---|
| 391 | - return false; |
|---|
| 392 | }); |
|---|
| 393 | |
|---|
| 394 | - $('.save-post-status', '#post-status-select').click(function() { |
|---|
| 395 | + $('.save-post-status', '#post-status-select').click(function(e) { |
|---|
| 396 | + e.preventDefault(); |
|---|
| 397 | $('#post-status-select').slideUp('fast'); |
|---|
| 398 | $('#post-status-select').siblings('a.edit-post-status').show(); |
|---|
| 399 | updateText(); |
|---|
| 400 | - return false; |
|---|
| 401 | }); |
|---|
| 402 | |
|---|
| 403 | - $('.cancel-post-status', '#post-status-select').click(function() { |
|---|
| 404 | + $('.cancel-post-status', '#post-status-select').click(function(e) { |
|---|
| 405 | + e.preventDefault(); |
|---|
| 406 | $('#post-status-select').slideUp('fast'); |
|---|
| 407 | $('#post_status').val($('#hidden_post_status').val()); |
|---|
| 408 | $('#post-status-select').siblings('a.edit-post-status').show(); |
|---|
| 409 | updateText(); |
|---|
| 410 | - return false; |
|---|
| 411 | }); |
|---|
| 412 | } // end submitdiv |
|---|
| 413 | |
|---|
| 414 | @@ -579,7 +579,8 @@ jQuery(document).ready( function($) { |
|---|
| 415 | |
|---|
| 416 | $('#view-post-btn').hide(); |
|---|
| 417 | b.html('<a href="#" class="save button button-small">'+postL10n.ok+'</a> <a class="cancel" href="#">'+postL10n.cancel+'</a>'); |
|---|
| 418 | - b.children('.save').click(function() { |
|---|
| 419 | + b.children('.save').click(function(e) { |
|---|
| 420 | + e.preventDefault(); |
|---|
| 421 | var new_slug = e.children('input').val(); |
|---|
| 422 | if ( new_slug == $('#editable-post-name-full').text() ) { |
|---|
| 423 | return $('.cancel', '#edit-slug-buttons').click(); |
|---|
| 424 | @@ -597,15 +598,14 @@ jQuery(document).ready( function($) { |
|---|
| 425 | makeSlugeditClickable(); |
|---|
| 426 | $('#view-post-btn').show(); |
|---|
| 427 | }); |
|---|
| 428 | - return false; |
|---|
| 429 | }); |
|---|
| 430 | |
|---|
| 431 | - $('.cancel', '#edit-slug-buttons').click(function() { |
|---|
| 432 | + $('.cancel', '#edit-slug-buttons').click(function(e) { |
|---|
| 433 | + e.preventDefault(); |
|---|
| 434 | $('#view-post-btn').show(); |
|---|
| 435 | e.html(revert_e); |
|---|
| 436 | b.html(revert_b); |
|---|
| 437 | real_slug.val(revert_slug); |
|---|
| 438 | - return false; |
|---|
| 439 | }); |
|---|
| 440 | |
|---|
| 441 | for ( i = 0; i < full.length; ++i ) { |
|---|
| 442 | diff --git wp-admin/js/postbox.js wp-admin/js/postbox.js |
|---|
| 443 | index 838db5d..a9b4e89 100644 |
|---|
| 444 | --- wp-admin/js/postbox.js |
|---|
| 445 | +++ wp-admin/js/postbox.js |
|---|
| 446 | @@ -31,9 +31,9 @@ var postboxes; |
|---|
| 447 | }); |
|---|
| 448 | |
|---|
| 449 | $('.postbox a.dismiss').bind('click.postboxes', function(e) { |
|---|
| 450 | + e.preventDefault(); |
|---|
| 451 | var hide_id = $(this).parents('.postbox').attr('id') + '-hide'; |
|---|
| 452 | $( '#' + hide_id ).prop('checked', false).triggerHandler('click'); |
|---|
| 453 | - return false; |
|---|
| 454 | }); |
|---|
| 455 | |
|---|
| 456 | $('.hide-postbox-tog').bind('click.postboxes', function() { |
|---|
| 457 | diff --git wp-admin/js/theme-preview.js wp-admin/js/theme-preview.js |
|---|
| 458 | index b7959c5..5521476 100644 |
|---|
| 459 | --- wp-admin/js/theme-preview.js |
|---|
| 460 | +++ wp-admin/js/theme-preview.js |
|---|
| 461 | @@ -20,7 +20,8 @@ jQuery(document).ready(function($) { |
|---|
| 462 | thickDims(); |
|---|
| 463 | $(window).resize( function() { thickDims() } ); |
|---|
| 464 | |
|---|
| 465 | - $('a.thickbox-preview').click( function() { |
|---|
| 466 | + $('a.thickbox-preview').click( function(e) { |
|---|
| 467 | + e.preventDefault(); |
|---|
| 468 | tb_click.call(this); |
|---|
| 469 | |
|---|
| 470 | var alink = $(this).parents('.available-theme').find('.activatelink'), link = '', href = $(this).attr('href'), url, text; |
|---|
| 471 | @@ -50,7 +51,5 @@ jQuery(document).ready(function($) { |
|---|
| 472 | |
|---|
| 473 | $('#TB_iframeContent').width('100%'); |
|---|
| 474 | thickDims(); |
|---|
| 475 | - |
|---|
| 476 | - return false; |
|---|
| 477 | } ); |
|---|
| 478 | }); |
|---|
| 479 | diff --git wp-admin/js/theme.js wp-admin/js/theme.js |
|---|
| 480 | index 079c73b..7dda4df 100644 |
|---|
| 481 | --- wp-admin/js/theme.js |
|---|
| 482 | +++ wp-admin/js/theme.js |
|---|
| 483 | @@ -64,11 +64,11 @@ var ThemeViewer; |
|---|
| 484 | ThemeViewer = function( args ) { |
|---|
| 485 | |
|---|
| 486 | function init() { |
|---|
| 487 | - $( '#filter-click, #mini-filter-click' ).unbind( 'click' ).click( function() { |
|---|
| 488 | + $( '#filter-click, #mini-filter-click' ).unbind( 'click' ).click( function(e) { |
|---|
| 489 | + e.preventDefault(); |
|---|
| 490 | $( '#filter-click' ).toggleClass( 'current' ); |
|---|
| 491 | $( '#filter-box' ).slideToggle(); |
|---|
| 492 | $( '#current-theme' ).slideToggle( 300 ); |
|---|
| 493 | - return false; |
|---|
| 494 | }); |
|---|
| 495 | |
|---|
| 496 | $( '#filter-box :checkbox' ).unbind( 'click' ).click( function() { |
|---|
| 497 | diff --git wp-includes/js/comment-reply.js wp-includes/js/comment-reply.js |
|---|
| 498 | index 2015425..e9d8d52 100644 |
|---|
| 499 | --- wp-includes/js/comment-reply.js |
|---|
| 500 | +++ wp-includes/js/comment-reply.js |
|---|
| 501 | @@ -22,7 +22,8 @@ addComment = { |
|---|
| 502 | parent.value = parentId; |
|---|
| 503 | cancel.style.display = ''; |
|---|
| 504 | |
|---|
| 505 | - cancel.onclick = function() { |
|---|
| 506 | + cancel.onclick = function(e) { |
|---|
| 507 | + e.preventDefault(); |
|---|
| 508 | var t = addComment, temp = t.I('wp-temp-form-div'), respond = t.I(t.respondId); |
|---|
| 509 | |
|---|
| 510 | if ( ! temp || ! respond ) |
|---|
| 511 | @@ -33,7 +34,6 @@ addComment = { |
|---|
| 512 | temp.parentNode.removeChild(temp); |
|---|
| 513 | this.style.display = 'none'; |
|---|
| 514 | this.onclick = null; |
|---|
| 515 | - return false; |
|---|
| 516 | } |
|---|
| 517 | |
|---|
| 518 | try { t.I('comment').focus(); } |
|---|