aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2012-04-04 10:52:41 +0200
committerJörn Zaefferer <joern.zaefferer@gmail.com>2012-04-04 11:02:08 +0200
commit79f1eea6dc874accae3447891783566337e97736 (patch)
tree7b198bbf9c56e0226bfd18c67f49c874437f15a9 /ui
parenta5051924207365297ec7665df875cfefc39dc858 (diff)
downloadjquery-ui-79f1eea6dc874accae3447891783566337e97736.tar.gz
jquery-ui-79f1eea6dc874accae3447891783566337e97736.zip
Build: Filter filters for linting to exclude some to-be-rewritten ones. Fix lint in those remaining
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.autocomplete.js10
-rw-r--r--ui/jquery.ui.menu.js2
-rw-r--r--ui/jquery.ui.position.js2
-rw-r--r--ui/jquery.ui.tabs.js4
4 files changed, 9 insertions, 9 deletions
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js
index 226d40605..ab4d17584 100644
--- a/ui/jquery.ui.autocomplete.js
+++ b/ui/jquery.ui.autocomplete.js
@@ -107,13 +107,13 @@ $.widget( "ui.autocomplete", {
// which causes forms to submit
suppressKeyPress = true;
event.preventDefault();
+ self.menu.select( event );
}
- //passthrough - ENTER and TAB both select the current element
+ break;
case keyCode.TAB:
- if ( !self.menu.active ) {
- return;
+ if ( self.menu.active ) {
+ self.menu.select( event );
}
- self.menu.select( event );
break;
case keyCode.ESCAPE:
if ( self.menu.element.is(":visible") ) {
@@ -524,7 +524,7 @@ $.widget( "ui.autocomplete", {
$.extend( $.ui.autocomplete, {
escapeRegex: function( value ) {
- return value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
+ return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
},
filter: function(array, term) {
var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );
diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js
index af22c19b0..526789e9e 100644
--- a/ui/jquery.ui.menu.js
+++ b/ui/jquery.ui.menu.js
@@ -189,7 +189,7 @@ $.widget( "ui.menu", {
character = prev + character;
}
function escape( value ) {
- return value.replace( /[-[\]{}()*+?.,\\^$|#\s]/g , "\\$&" );
+ return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
}
match = this.activeMenu.children( ".ui-menu-item" ).filter( function() {
return new RegExp("^" + escape(character), "i")
diff --git a/ui/jquery.ui.position.js b/ui/jquery.ui.position.js
index 7fe31626d..d751e9374 100644
--- a/ui/jquery.ui.position.js
+++ b/ui/jquery.ui.position.js
@@ -13,7 +13,7 @@ $.ui = $.ui || {};
var rhorizontal = /left|center|right/,
rvertical = /top|center|bottom/,
- roffset = /[+-]\d+%?/,
+ roffset = /[\+\-]\d+%?/,
rposition = /^\w+/,
rpercent = /%$/,
center = "center",
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js
index 95113fc57..fb384e563 100644
--- a/ui/jquery.ui.tabs.js
+++ b/ui/jquery.ui.tabs.js
@@ -162,7 +162,7 @@ $.widget( "ui.tabs", {
},
_sanitizeSelector: function( hash ) {
- return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@[\]^`{|}~]/g, "\\$&" ) : "";
+ return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";
},
refresh: function() {
@@ -841,7 +841,7 @@ if ( $.uiBackCompat !== false ) {
_tabId: function( a ) {
return $( a ).attr( "aria-controls" ) ||
- a.title && a.title.replace( /\s/g, "_" ).replace( /[^\w\u00c0-\uFFFF-]/g, "" ) ||
+ a.title && a.title.replace( /\s/g, "_" ).replace( /[^\w\u00c0-\uFFFF\-]/g, "" ) ||
this.options.idPrefix + getNextTabId();
}
});