You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2011/11/27 21:24:48 UTC
svn commit: r1206826 - /wicket/trunk/wicket-core/src/test/js/ajax.js
Author: mgrigorov
Date: Sun Nov 27 20:24:47 2011
New Revision: 1206826
URL: http://svn.apache.org/viewvc?rev=1206826&view=rev
Log:
WICKET-4236
Use JQuery as a backing library for Wicket's JavaScript code
Pass the failure handler to W.Ajax.Request constructor
Replace deprecated QUnit.equals() with .equal()
Modified:
wicket/trunk/wicket-core/src/test/js/ajax.js
Modified: wicket/trunk/wicket-core/src/test/js/ajax.js
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/js/ajax.js?rev=1206826&r1=1206825&r2=1206826&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/js/ajax.js (original)
+++ wicket/trunk/wicket-core/src/test/js/ajax.js Sun Nov 27 20:24:47 2011
@@ -58,7 +58,7 @@ jQuery(document).ready(function() {
};
var opts = jQuery.extend({}, defaults, options);
var call = new Wicket.Ajax.Call(opts.url, opts.successHandler, opts.failureHandler, opts.channel);
- var request = new Wicket.Ajax.Request(opts.url, call.loadedCallback.bind(call), opts.parseResponse, opts.randomUrl, opts.channel, opts.successHandler);
+ var request = new Wicket.Ajax.Request(opts.url, call.loadedCallback.bind(call), opts.parseResponse, opts.randomUrl, opts.failureHandler, opts.channel, opts.successHandler);
request.transport = opts.transport;
@@ -114,7 +114,7 @@ jQuery(document).ready(function() {
Wicket.Log.error = function(msg) {
start();
- equals(msg, 'Wicket.Ajax.Call.processComponent: Component with id [[componentToReplaceDoesNotExist]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update.');
+ equal(msg, 'Wicket.Ajax.Call.processComponent: Component with id [[componentToReplaceDoesNotExist]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update.');
// restore the original method
Wicket.Log.error = oldWicketLogError;
@@ -122,7 +122,7 @@ jQuery(document).ready(function() {
var options = {
successHandler: function() {
- equals(jQuery('#componentToReplaceDoesNotExist').length, 0, 'A component with id \'componentToReplaceDoesNotExist\' must not exist!');
+ equal(jQuery('#componentToReplaceDoesNotExist').length, 0, 'A component with id \'componentToReplaceDoesNotExist\' must not exist!');
}
};
@@ -136,7 +136,7 @@ jQuery(document).ready(function() {
var options = {
successHandler: function() {
start();
- equals(jQuery('#componentToReplace')[0].tagName.toLowerCase(), 'table', 'A component with id \'componentToReplace\' must be a table now!');
+ equal(jQuery('#componentToReplace')[0].tagName.toLowerCase(), 'table', 'A component with id \'componentToReplace\' must be a table now!');
}
};