Dev: make sure all files can pass JSHint!

This commit is contained in:
Mike Sherov 2012-11-09 17:30:43 -05:00
parent 00e92e16b4
commit d6c6b7dc33
2 changed files with 8 additions and 11 deletions

View File

@ -285,10 +285,7 @@ grunt.initConfig({
}) })
}, },
lint: { lint: {
ui: grunt.file.expandFiles( "ui/*.js" ).filter(function( file ) { ui: "ui/*.js",
// TODO remove items from this list once rewritten
return !( /(mouse)\.js$/ ).test( file );
}),
grunt: [ "grunt.js", "build/**/*.js" ], grunt: [ "grunt.js", "build/**/*.js" ],
tests: "tests/unit/**/*.js" tests: "tests/unit/**/*.js"
}, },

14
ui/jquery.ui.mouse.js vendored
View File

@ -14,7 +14,7 @@
(function( $, undefined ) { (function( $, undefined ) {
var mouseHandled = false; var mouseHandled = false;
$( document ).mouseup( function( e ) { $( document ).mouseup( function() {
mouseHandled = false; mouseHandled = false;
}); });
@ -111,7 +111,7 @@ $.widget("ui.mouse", {
_mouseMove: function(event) { _mouseMove: function(event) {
// IE mouseup check - mouseup happened when mouse was out of window // IE mouseup check - mouseup happened when mouse was out of window
if ($.ui.ie && !(document.documentMode >= 9) && !event.button) { if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
return this._mouseUp(event); return this._mouseUp(event);
} }
@ -155,15 +155,15 @@ $.widget("ui.mouse", {
); );
}, },
_mouseDelayMet: function(event) { _mouseDelayMet: function(/* event */) {
return this.mouseDelayMet; return this.mouseDelayMet;
}, },
// These are placeholder methods, to be overriden by extending plugin // These are placeholder methods, to be overriden by extending plugin
_mouseStart: function(event) {}, _mouseStart: function(/* event */) {},
_mouseDrag: function(event) {}, _mouseDrag: function(/* event */) {},
_mouseStop: function(event) {}, _mouseStop: function(/* event */) {},
_mouseCapture: function(event) { return true; } _mouseCapture: function(/* event */) { return true; }
}); });
})(jQuery); })(jQuery);