diff --git a/Gruntfile.js b/Gruntfile.js index 828da36..9560f52 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,4 +1,5 @@ module.exports = function(grunt) { + var components = ""; var files = [ "./lib/**/*.js", "./client/js/shout.js" @@ -14,7 +15,10 @@ module.exports = function(grunt) { uglify: { js: { files: { - "client/js/components.min.js": ["client/components/*.js"] + "client/js/components.min.js": [ + "client/components/*.js", + "client/components/jquery/*.js" + ] } } } diff --git a/client/components/jquery/tabcomplete.js b/client/components/jquery/tabcomplete.js new file mode 100644 index 0000000..af03b9d --- /dev/null +++ b/client/components/jquery/tabcomplete.js @@ -0,0 +1,256 @@ +/*! + * tabcomplete + * http://github.com/erming/tabcomplete + * v1.3.1 + */ +(function($) { + var keys = { + backspace: 8, + tab: 9, + up: 38, + down: 40 + }; + + $.tabcomplete = {}; + $.tabcomplete.defaultOptions = { + after: "", + arrowKeys: false, + caseSensitive: false, + hint: "placeholder", + minLength: 1 + }; + + $.fn.tab = // Alias + $.fn.tabcomplete = function(args, options) { + if (this.length > 1) { + return this.each(function() { + $(this).tabcomplete(args, options); + }); + } + + // Only enable the plugin on and