shop/static/shop/selecttoautocomplete.js
Function jquery_ui
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jquery_ui: function( context ) {
// loose matching of search terms
var filter_options = function( term ) {
var split_term = term.split(' ');
var matchers = [];
Function extract_options
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
extract_options: function( $select_field ) {
var options = [];
var $options = $select_field.find('option');
var number_of_options = $options.length;
Function filter_options
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var filter_options = function( term ) {
var split_term = term.split(' ');
var matchers = [];
for (var i=0; i < split_term.length; i++) {
if ( split_term[i].length > 0 ) {
Function insert_text_field
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
insert_text_field: function( context ) {
var $text_field = $( '<input type="text"></input>' );
if ( settings['copy-attributes-to-text-field'] ) {
var attrs = {};
var raw_attrs = context.$select_field[0].attributes;