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 2013/02/06 16:07:40 UTC

[3/8] git commit: Fix jshint problems in ajax.js

Fix jshint problems in ajax.js


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/512f867b
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/512f867b
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/512f867b

Branch: refs/heads/master
Commit: 512f867b56216d8bbdde1addf0415e06b1fbc212
Parents: 5f3cfa1
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Wed Feb 6 14:47:03 2013 +0100
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Wed Feb 6 16:07:29 2013 +0100

----------------------------------------------------------------------
 grunt.js                        |    4 ++++
 wicket-core/src/test/js/ajax.js |   12 ++++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/512f867b/grunt.js
----------------------------------------------------------------------
diff --git a/grunt.js b/grunt.js
index 8dc0fdc..3e3a617 100644
--- a/grunt.js
+++ b/grunt.js
@@ -39,6 +39,9 @@ module.exports = function(grunt) {
 		atmosphereJs = [
 			"wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/jquery.wicketatmosphere.js"
 		],
+		testsJs = [
+			"./wicket-core/src/test/js/ajax.js"
+		],
 		gruntJs = [
 			"grunt.js"
 		];
@@ -51,6 +54,7 @@ module.exports = function(grunt) {
 			datetime: datetimeJs,
 			nativeWebSocket: nativeWebSocketJs,
 			atmosphere: atmosphereJs,
+			testsJs: testsJs,
 			grunt: gruntJs
 		},
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/512f867b/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 acf5b74..cd60258 100644
--- a/wicket-core/src/test/js/ajax.js
+++ b/wicket-core/src/test/js/ajax.js
@@ -35,9 +35,13 @@
 
  */
 
+/*global ok: true, start: true, asyncTest: true, test: true, equal: true, deepEqual: true,
+ QUnit: true, module: true, expect: true */
+
 jQuery(document).ready(function() {
+	"use strict";
 
-	execute = function (attributes) {
+	var execute = function (attributes) {
 
 		var defaults = {
 				fh: [
@@ -623,7 +627,7 @@ jQuery(document).ready(function() {
 				m: 'get',
 				dt: 'json', // datatype
 				wr: false, // not Wicket's <ajax-response>
-				dep: [ function() {return { "one": 1, "two": 2 } } ]
+				dep: [ function() {return { "one": 1, "two": 2 }; } ]
 			};
 
 			Wicket.Event.subscribe('/ajax/call/beforeSend', function(jqEvent, attributes, jqXHR, settings) {
@@ -658,7 +662,7 @@ jQuery(document).ready(function() {
 				ep: [ {name: 'one', value: 'static1'}, {name: 'one', value: 'static2'} ],
 				dt: 'json', // datatype
 				wr: false, // not Wicket's <ajax-response>
-				dep: [ function() {return [ {name: "one", value: 'dynamic1'}, {name: "one", value: 'dynamic2'} ] } ]
+				dep: [ function() {return [ {name: "one", value: 'dynamic1'}, {name: "one", value: 'dynamic2'} ]; } ]
 			};
 
 			Wicket.Event.subscribe('/ajax/call/beforeSend', function(jqEvent, attributes, jqXHR, settings) {
@@ -1008,7 +1012,7 @@ jQuery(document).ready(function() {
 				bsh: [ function(attrs) { ok(true, "BeforeSend handler executed"); } ],
 				ah: [ function(attrs) { ok(true, "After handler executed"); } ],
 				sh: [ function(attrs) { ok(false, "Success handler should not be executed"); } ],
-				fh: [ function(attrs) { ok(true, "Failure handler executed"); start() } ],
+				fh: [ function(attrs) { ok(true, "Failure handler executed"); start(); } ],
 				coh: [ function(attrs) { ok(true, "Complete handler executed"); } ]
 			};