app/assets/javascripts/typeahead.js
File typeahead.js
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* =============================================================
* bootstrap-typeahead.js v2.0.3
* http://twitter.github.com/bootstrap/javascript.html#typeahead
* =============================================================
* Copyright 2012 Twitter, Inc.
Consider simplifying this complex logical expression. Open
Open
if (this.options.ajax) {
var ajax = this.options.ajax;
if (typeof ajax == "string") {
ajax = { url:ajax };
}
Function Typeahead
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Typeahead = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, $.fn.typeahead.defaults, options)
this.matcher = this.options.matcher || this.matcher
this.sorter = this.options.sorter || this.sorter
Function ajaxLookup
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ajaxLookup: function () {
var query = this.$element.val();
if (query == this.query) {