";
});
if ( tempObj.showLink && showLinkMessage )
- ajaxAdd.myResponseElement.update("");
+ Element.update(ajaxAdd.myResponseElement,"");
}
if ( tempObj.addComplete && typeof tempObj.addComplete == 'function' )
tempObj.addComplete( what, where, update, transport );
@@ -82,7 +82,7 @@ Object.extend(listMan.prototype, {
var action = 'delete-' + what + '&id=' + id;
var idName = what.replace('-as-spam','') + '-' + id;
ajaxDel.addOnComplete( function(transport) {
- ajaxDel.myResponseElement.update('');
+ Element.update(ajaxDel.myResponseElement,'');
tempObj.destore(action);
if( tempObj.delComplete && typeof tempObj.delComplete == 'function' )
tempObj.delComplete( what, id, transport );
@@ -105,7 +105,7 @@ Object.extend(listMan.prototype, {
var action = 'dim-' + what + '&id=' + id;
var idName = what + '-' + id;
ajaxDim.addOnComplete( function(transport) {
- ajaxDim.myResponseElement.update('');
+ Element.update(ajaxDim.myResponseElement,'');
tempObj.destore(action);
if ( tempObj.dimComplete && typeof tempObj.dimComplete == 'function' )
tempObj.dimComplete( what, id, dimClass, transport );
@@ -120,11 +120,11 @@ Object.extend(listMan.prototype, {
addListItem: function( h ) {
new Insertion[this.topAdder ? 'Top' : 'Bottom'](this.theList,h);
- this.theList.cleanWhitespace();
+ Element.cleanWhitespace(this.theList);
var id = this.topAdder ? this.theList.firstChild.id : this.theList.lastChild.id;
if ( this.alt )
if ( this.theList.childNodes.length % 2 )
- $(id).addClassName(this.alt);
+ Element.addClassName($(id),this.alt);
Fat.fade_element(id);
},
@@ -145,7 +145,7 @@ Object.extend(listMan.prototype, {
replaceListItem: function( id, h, update ) {
id = $(id);
if ( !update ) {
- id.remove();
+ Element.remove(id);
this.addListItem( h );
return;
}
@@ -156,14 +156,14 @@ Object.extend(listMan.prototype, {
// toggles class
dimItem: function( id, dimClass, noFade ) {
id = $(id);
- if ( id.hasClassName(dimClass) ) {
+ if ( Element.hasClassName(id,dimClass) ) {
if ( !noFade )
Fat.fade_element(id.id,null,700,null);
- id.removeClassName(dimClass);
+ Element.removeClassName(id,dimClass);
} else {
if ( !noFade )
Fat.fade_element(id.id,null,700,'#FF3333');
- id.addClassName(dimClass);
+ Element.addClassName(id,dimClass);
}
},
@@ -183,7 +183,7 @@ Object.extend(listMan.prototype, {
this.theList.replaceChild(this.dataStore[action], $(id));
delete(this.dataStore[action]);
if ( error ) {
- func = function() { $(id).setStyle( { 'background-color': '#FF3333' } ); }
+ func = function() { Element.setStyle($(id),{backgroundColor:'#FF3333'}); }
func(); setTimeout(func, 705); // Hit it twice in case it's still fading.
}
},
@@ -246,12 +246,12 @@ Object.extend(listMan.prototype, {
return;
var alt = this.alt;
var offset = this.altOffset;
- var listItems = $A(this.theList.childNodes).findAll( function(i) { return i.visible() } );
+ var listItems = $A(this.theList.childNodes).findAll( function(i) { return Element.visible(i) } );
listItems.each( function(i,n) {
if ( ( n + offset ) % 2 )
- i.removeClassName(alt);
+ Element.removeClassName(i,alt);
else
- i.addClassName(alt);
+ Element.addClassName(i,alt);
});
}
});
diff --git a/wp-includes/js/wp-ajax-js.php b/wp-includes/js/wp-ajax-js.php
index 3bb32ce94..eada4ee8f 100644
--- a/wp-includes/js/wp-ajax-js.php
+++ b/wp-includes/js/wp-ajax-js.php
@@ -38,26 +38,26 @@ Object.extend(WPAjax.prototype, {
this.myResponseElement = p;
},
parseAjaxResponse: function() { // 1 = good, 0 = strange (bad data?), -1 = you lack permission
- if ( this.transport.responseXML && typeof this.transport.responseXML == 'object' ) {
+ if ( this.transport.responseXML && typeof this.transport.responseXML == 'object' && ( this.transport.responseXML.xml || 'undefined' == typeof this.transport.responseXML.xml ) ) {
var err = this.transport.responseXML.getElementsByTagName('wp_error');
if ( err[0] ) {
var msg = $A(err).inject( '', function(a, b) { return a + '' + b.firstChild.nodeValue + '
'; } );
- this.myResponseElement.update('' + msg + '
');
+ Element.update(this.myResponseElement,'' + msg + '
');
return false;
}
return true;
}
var r = this.transport.responseText;
if ( isNaN(r) ) {
- this.myResponseElement.update('');
+ Element.update(this.myResponseElement,'');
return false;
}
var r = parseInt(r,10);
if ( -1 == r ) {
- this.myResponseElement.update("");
+ Element.update(this.myResponseElement,"");
return false;
} else if ( 0 == r ) {
- this.myResponseElement.update("");
+ Element.update(this.myResponseElement,"");
return false;
}
return true;
diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php
index 63af673b3..759545b32 100644
--- a/wp-includes/script-loader.php
+++ b/wp-includes/script-loader.php
@@ -20,8 +20,8 @@ class WP_Scripts {
$this->add( 'wp_tiny_mce', $mce_config, array('tiny_mce'), '20061113' );
$this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.5.0');
$this->add( 'autosave', '/wp-includes/js/autosave-js.php', array('prototype', 'sack'), '20070116');
- $this->add( 'wp-ajax', '/wp-includes/js/wp-ajax-js.php', array('prototype'), '4459');
- $this->add( 'listman', '/wp-includes/js/list-manipulation-js.php', array('wp-ajax', 'fat'), '4583');
+ $this->add( 'wp-ajax', '/wp-includes/js/wp-ajax-js.php', array('prototype'), '20070118');
+ $this->add( 'listman', '/wp-includes/js/list-manipulation-js.php', array('wp-ajax', 'fat'), '20070118');
$this->add( 'scriptaculous-root', '/wp-includes/js/scriptaculous/wp-scriptaculous.js', array('prototype'), '1.6.1');
$this->add( 'scriptaculous-builder', '/wp-includes/js/scriptaculous/builder.js', array('scriptaculous-root'), '1.6.1');
$this->add( 'scriptaculous-dragdrop', '/wp-includes/js/scriptaculous/dragdrop.js', array('scriptaculous-builder'), '1.6.1');
@@ -29,16 +29,16 @@ class WP_Scripts {
$this->add( 'scriptaculous-slider', '/wp-includes/js/scriptaculous/slider.js', array('scriptaculous-effects'), '1.6.1');
$this->add( 'scriptaculous-controls', '/wp-includes/js/scriptaculous/controls.js', array('scriptaculous-root'), '1.6.1');
$this->add( 'scriptaculous', '', array('scriptaculous-dragdrop', 'scriptaculous-slider', 'scriptaculous-controls'), '1.6.1');
- $this->add( 'cropper', '/wp-includes/js/crop/cropper.js', array('scriptaculous-dragdrop'), '1');
+ $this->add( 'cropper', '/wp-includes/js/crop/cropper.js', array('scriptaculous-dragdrop'), '20070118');
if ( is_admin() ) {
$this->add( 'dbx-admin-key', '/wp-admin/dbx-admin-key-js.php', array('dbx'), '3651' );
- $this->add( 'ajaxcat', '/wp-admin/cat-js.php', array('listman'), '3684' );
+ $this->add( 'ajaxcat', '/wp-admin/cat-js.php', array('listman'), '20070118' );
$this->add( 'admin-categories', '/wp-admin/categories.js', array('listman'), '3684' );
$this->add( 'admin-custom-fields', '/wp-admin/custom-fields.js', array('listman'), '3733' );
$this->add( 'admin-comments', '/wp-admin/edit-comments.js', array('listman'), '3847' );
$this->add( 'admin-users', '/wp-admin/users.js', array('listman'), '4583' );
$this->add( 'xfn', '/wp-admin/xfn.js', false, '3517' );
- $this->add( 'upload', '/wp-admin/upload-js.php', array('prototype'), '20070116' );
+ $this->add( 'upload', '/wp-admin/upload-js.php', array('prototype'), '20070118' );
}
}