Skip to content

Commit 15ea6cd

Browse files
author
azaozz
committed
Fix select all checkboxes JS function, another .attr() vs .prop() case in jQuery 1.6.1, fixes #17527
git-svn-id: http://core.svn.wordpress.org/trunk@17979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent e2c0fd7 commit 15ea6cd

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

wp-admin/js/common.dev.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -276,30 +276,30 @@ $(document).ready( function() {
276276
});
277277

278278
$('thead, tfoot').find('.check-column :checkbox').click( function(e) {
279-
var c = $(this).attr('checked'),
279+
var c = $(this).prop('checked'),
280280
kbtoggle = 'undefined' == typeof toggleWithKeyboard ? false : toggleWithKeyboard,
281281
toggle = e.shiftKey || kbtoggle;
282282

283283
$(this).closest( 'table' ).children( 'tbody' ).filter(':visible')
284284
.children().children('.check-column').find(':checkbox')
285-
.attr('checked', function() {
285+
.prop('checked', function() {
286286
if ( $(this).closest('tr').is(':hidden') )
287-
return '';
287+
return false;
288288
if ( toggle )
289-
return $(this).attr( 'checked' ) ? '' : 'checked';
289+
return $(this).prop( 'checked' );
290290
else if (c)
291-
return 'checked';
292-
return '';
291+
return true;
292+
return false;
293293
});
294294

295295
$(this).closest('table').children('thead, tfoot').filter(':visible')
296296
.children().children('.check-column').find(':checkbox')
297-
.attr('checked', function() {
297+
.prop('checked', function() {
298298
if ( toggle )
299-
return '';
299+
return false;
300300
else if (c)
301-
return 'checked';
302-
return '';
301+
return true;
302+
return false;
303303
});
304304
});
305305

@@ -310,7 +310,7 @@ $(document).ready( function() {
310310
});
311311

312312
// tab in textareas
313-
$('#newcontent').keydown(function(e) {
313+
$('#newcontent').bind('keydown.wpevent_InsertTab', function(e) {
314314
if ( e.keyCode != 9 )
315315
return true;
316316

@@ -337,10 +337,10 @@ $(document).ready( function() {
337337
e.preventDefault();
338338
});
339339

340-
$('#newcontent').blur(function(e) {
340+
$('#newcontent').bind('blur.wpevent_InsertTab', function(e) {
341341
if ( this.lastKey && 9 == this.lastKey )
342342
this.focus();
343343
});
344344
});
345345

346-
})(jQuery);
346+
})(jQuery);

wp-admin/js/common.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wp-includes/script-loader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function wp_default_scripts( &$scripts ) {
6464

6565
$scripts->add( 'utils', "/wp-admin/js/utils$suffix.js", false, '20101110' );
6666

67-
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20110510' );
67+
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20110520' );
6868
$scripts->add_data( 'common', 'group', 1 );
6969
$scripts->localize( 'common', 'commonL10n', array(
7070
'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete."),

0 commit comments

Comments
 (0)