diff --git a/wp-admin/categories.php b/wp-admin/categories.php
index 945da0c63d..bf6c382a87 100644
--- a/wp-admin/categories.php
+++ b/wp-admin/categories.php
@@ -147,7 +147,7 @@ endif; ?>
- |
+ |
|
|
|
diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php
index 8ed4df5691..7a3635676a 100644
--- a/wp-admin/edit-comments.php
+++ b/wp-admin/edit-comments.php
@@ -185,7 +185,7 @@ if ($comments) {
- |
+ |
|
|
|
diff --git a/wp-admin/edit-link-categories.php b/wp-admin/edit-link-categories.php
index b8dfebcfaa..ab1dc9a22e 100644
--- a/wp-admin/edit-link-categories.php
+++ b/wp-admin/edit-link-categories.php
@@ -101,7 +101,7 @@ if ( $page_links )
- |
+ |
|
|
|
diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php
index b50269be09..340174d2b6 100644
--- a/wp-admin/edit-tags.php
+++ b/wp-admin/edit-tags.php
@@ -172,7 +172,7 @@ if ( $page_links )
- |
+ |
|
|
diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php
index 7ed2d03d9d..fc1b68873f 100644
--- a/wp-admin/includes/template.php
+++ b/wp-admin/includes/template.php
@@ -279,7 +279,7 @@ function tag_rows( $page = 1, $pagesize = 20, $searchterms = '' ) {
// define the columns to display, the syntax is 'internal name' => 'display name'
function wp_manage_posts_columns() {
$posts_columns = array();
- $posts_columns['cb'] = '';
+ $posts_columns['cb'] = '';
if ( 'draft' === $_GET['post_status'] )
$posts_columns['modified'] = __('Modified');
elseif ( 'pending' === $_GET['post_status'] )
@@ -301,7 +301,7 @@ function wp_manage_posts_columns() {
// define the columns to display, the syntax is 'internal name' => 'display name'
function wp_manage_media_columns() {
$posts_columns = array();
- $posts_columns['cb'] = '';
+ $posts_columns['cb'] = '';
$posts_columns['icon'] = '';
$posts_columns['media'] = _c('Media|media column header');
$posts_columns['desc'] = _c('Description|media column header');
@@ -316,7 +316,7 @@ function wp_manage_media_columns() {
function wp_manage_pages_columns() {
$posts_columns = array();
- $posts_columns['cb'] = '';
+ $posts_columns['cb'] = '';
if ( 'draft' === $_GET['post_status'] )
$posts_columns['modified'] = __('Modified');
elseif ( 'pending' === $_GET['post_status'] )
diff --git a/wp-admin/js/forms.js b/wp-admin/js/forms.js
index b1d8ce2729..5d6c35dddb 100644
--- a/wp-admin/js/forms.js
+++ b/wp-admin/js/forms.js
@@ -1,31 +1,26 @@
-function checkAll(form) {
- for (i = 0, n = form.elements.length; i < n; i++) {
- if(form.elements[i].type == "checkbox" && !(form.elements[i].getAttribute('onclick',2))) {
- if(form.elements[i].checked == true)
- form.elements[i].checked = false;
- else
- form.elements[i].checked = true;
- }
- }
+function checkAll(jQ) { // use attr( checked, fn )
+ jQuery(jQ).find( 'tbody :checkbox' ).attr( 'checked', function() {
+ return jQuery(this).attr( 'checked' ) ? '' : 'checked';
+ } );
}
-function getNumChecked(form) {
- var num = 0;
- for (i = 0, n = form.elements.length; i < n; i++) {
- if (form.elements[i].type == "checkbox") {
- if (form.elements[i].checked == true)
- num++;
+jQuery( function($) {
+ var lastClicked = false;
+ $( 'tbody :checkbox' ).click( function(e) {
+ if ( 'undefined' == e.shiftKey ) { return true; }
+ if ( e.shiftKey ) {
+ if ( !lastClicked ) { return true; }
+ var checks = $( lastClicked ).parents( 'form:first' ).find( ':checkbox' );
+ var first = checks.index( lastClicked );
+ var last = checks.index( this );
+ if ( 0 < first && 0 < last && first != last ) {
+ checks.slice( first, last ).attr( 'checked', $( this ).is( ':checked' ) ? 'checked' : '' );
+ }
}
- }
- return num;
-}
-
-function checkAllUsers(role) {
- var checkboxs = document.getElementsByTagName('input');
- for(var i = 0, inp; inp = checkboxs[i]; i++)
- if(inp.type.toLowerCase() == 'checkbox' && inp.className == role)
- if(inp.checked == false)
- inp.checked = true;
- else
- inp.checked = false;
-}
\ No newline at end of file
+ lastClicked = this;
+ return true;
+ } );
+ $( 'thead :checkbox' ).click( function() {
+ checkAll( $(this).parents( 'form:first' ) );
+ } );
+} );
\ No newline at end of file
diff --git a/wp-admin/link-manager.php b/wp-admin/link-manager.php
index 42ec2017cc..0fb7b86362 100644
--- a/wp-admin/link-manager.php
+++ b/wp-admin/link-manager.php
@@ -141,7 +141,7 @@ if ( $links ) {
- |
+ |
diff --git a/wp-admin/users.php b/wp-admin/users.php
index d8089b4cd8..7aa7873d81 100644
--- a/wp-admin/users.php
+++ b/wp-admin/users.php
@@ -330,7 +330,7 @@ unset($role_links);
- |
+ |
|
|
|
diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php
index 11faca2f70..fda1259163 100644
--- a/wp-includes/script-loader.php
+++ b/wp-includes/script-loader.php
@@ -131,7 +131,7 @@ class WP_Scripts {
'pending' => __('%i% pending') // must look like: "# blah blah"
) );
$this->add( 'admin-users', '/wp-admin/js/users.js', array('wp-lists'), '20070823' );
- $this->add( 'admin-forms', '/wp-admin/js/forms.js', false, '20080317' );
+ $this->add( 'admin-forms', '/wp-admin/js/forms.js', false, '20080401');
$this->add( 'xfn', '/wp-admin/js/xfn.js', false, '3517' );
$this->add( 'upload', '/wp-admin/js/upload.js', array('jquery'), '20070518' );
$this->add( 'postbox', '/wp-admin/js/postbox.js', array('jquery'), '20080128' );