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 2012/07/10 15:04:41 UTC
[3/3] git commit: WICKET-4649 Add an additional Ajax call listener
point - before the call
WICKET-4649 Add an additional Ajax call listener point - before the call
Update the tests with the new names of the beforeSend handler
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/9699e356
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/9699e356
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/9699e356
Branch: refs/heads/master
Commit: 9699e356ca49421b9cc53d97eaf99d9e2b4109d7
Parents: 9f8af18
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Tue Jul 10 15:48:50 2012 +0300
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Tue Jul 10 15:48:50 2012 +0300
----------------------------------------------------------------------
wicket-core/src/test/js/ajax.js | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/9699e356/wicket-core/src/test/js/ajax.js
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/js/ajax.js b/wicket-core/src/test/js/ajax.js
index b12ae17..66453d4 100644
--- a/wicket-core/src/test/js/ajax.js
+++ b/wicket-core/src/test/js/ajax.js
@@ -317,7 +317,7 @@ jQuery(document).ready(function() {
ok(false, 'Should not be called');
}
],
- bh: [
+ bsh: [
function(attributes, jqXHR, settings) {
deepEqual(attrs, attributes, 'Before: attributes deep equal');
ok(jQuery.isFunction(jqXHR.getResponseHeader), 'Before: Assert that jqXHR is a XMLHttpRequest');
@@ -365,7 +365,7 @@ jQuery(document).ready(function() {
deepEqual(attrs, attributes);
}
],
- bh: [
+ bsh: [
function(attributes, jqXHR, settings) {
deepEqual(attrs, attributes);
ok(jQuery.isFunction(jqXHR.getResponseHeader), 'Assert that jqXHR is a XMLHttpRequest');
@@ -465,7 +465,7 @@ jQuery(document).ready(function() {
ok(false, 'Failure handler should not be called');
});
- Wicket.Event.subscribe('/ajax/call/before', function(jqEvent, attributes, jqXHR, settings) {
+ Wicket.Event.subscribe('/ajax/call/beforeSend', function(jqEvent, attributes, jqXHR, settings) {
deepEqual(attrs, attributes, 'Before: attrs');
ok(jQuery.isFunction(jqXHR.getResponseHeader), 'Before: Assert that jqXHR is a XMLHttpRequest');
ok(jQuery.isFunction(settings.beforeSend), 'Before: Assert that settings is the object passed to jQuery.ajax()');
@@ -514,7 +514,7 @@ jQuery(document).ready(function() {
deepEqual(attrs, attributes, 'Failure: attrs');
});
- Wicket.Event.subscribe('/ajax/call/before', function(jqEvent, attributes, jqXHR, settings) {
+ Wicket.Event.subscribe('/ajax/call/beforeSend', function(jqEvent, attributes, jqXHR, settings) {
deepEqual(attrs, attributes, 'Before: attrs');
ok(jQuery.isFunction(jqXHR.getResponseHeader), 'Before: Assert that jqXHR is a XMLHttpRequest');
ok(jQuery.isFunction(settings.beforeSend), 'Before: Assert that settings is the object passed to jQuery.ajax()');
@@ -638,7 +638,7 @@ jQuery(document).ready(function() {
dep: [ function() {return { "one": 1, "two": 2 } } ]
};
- Wicket.Event.subscribe('/ajax/call/before', function(jqEvent, attributes, jqXHR, settings) {
+ Wicket.Event.subscribe('/ajax/call/beforeSend', function(jqEvent, attributes, jqXHR, settings) {
deepEqual(attrs, attributes, 'Before: attrs');
ok(jQuery.isFunction(jqXHR.getResponseHeader), 'Before: Assert that jqXHR is a XMLHttpRequest');
ok(jQuery.isFunction(settings.beforeSend), 'Before: Assert that settings is the object passed to jQuery.ajax()');
@@ -672,7 +672,7 @@ jQuery(document).ready(function() {
dep: [ function() {return [ {name: "one", value: 'dynamic1'}, {name: "one", value: 'dynamic2'} ] } ]
};
- Wicket.Event.subscribe('/ajax/call/before', function(jqEvent, attributes, jqXHR, settings) {
+ Wicket.Event.subscribe('/ajax/call/beforeSend', function(jqEvent, attributes, jqXHR, settings) {
deepEqual(attrs, attributes, 'Before: attrs');
ok(jQuery.isFunction(jqXHR.getResponseHeader), 'Before: Assert that jqXHR is a XMLHttpRequest');
ok(jQuery.isFunction(settings.beforeSend), 'Before: Assert that settings is the object passed to jQuery.ajax()');