server/gokbg3/grails-app/assets/javascripts/gokb/text-complete.js
/**
   * Default lookup function that will be used if not 
   */
Default lookup function that will be used if not
Default lookup function that will be used if not
function defaultLookup (term, callback, segments) {
    var type = (segments[2] || "").toLowerCase();
    if (type in components) {
      callback($.map(components[type], function ( component ) {
        var termLc = term.toLowerCase();
        if (typeof term !== 'undefined' && component) {
          return component.title.toLowerCase().indexOf(termLc) === 0 ? component : null;
        }
        return null;
      }));
    }
  }
function defaultLookup ( term , callback , segments ) { var type = ( segments [ 2 ] || "" ) . toLowerCase ( ) ; if ( type in components ) { callback ( $ . map ( components [ type ] , function ( component ) { var termLc = term . toLowerCase ( ) ; if ( typeof term !== 'undefined' && component ) { return component . title . toLowerCase ( ) . indexOf ( termLc ) === 0 ? component : null ; } return null ; } ) ) ; } }
Default lookup function that will be used if not
Default lookup function that will be used if not
// Regex match groups contain or filter and title. // Match against the name. // Return object instead of just a string.