Skip to content
Snippets Groups Projects
Commit c23fa484 authored by spennythug's avatar spennythug
Browse files

Merge branch 'develop' of git.unl.edu:iim/PlanetRed into develop

parents 80c8d700 1ddcb36d
No related branches found
No related tags found
No related merge requests found
/*
* jQuery UI Autocomplete HTML Extension
*
* Copyright 2010, Scott González (http://scottgonzalez.com)
* Dual licensed under the MIT or GPL Version 2 licenses.
*
* http://github.com/scottgonzalez/jquery-ui-extensions
*/
(function(factory) {
if (typeof define === 'function' && define.amd) {
// AMD
define(['jquery'], factory);
} else if (typeof module === 'object' && module.exports) {
factory(require('jquery'));
} else {
// Browser globals
factory(jQuery);
}
}(function(jQuery) {
(function( $ ) {
var proto = $.ui.autocomplete.prototype,
initSource = proto._initSource;
function filter( array, term ) {
var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );
return $.grep( array, function(value) {
return matcher.test( $( "<div>" ).html( value.label || value.value || value ).text() );
});
}
$.extend( proto, {
_initSource: function() {
if ( this.options.html && $.isArray(this.options.source) ) {
this.source = function( request, response ) {
response( filter( this.options.source, request.term ) );
};
} else {
initSource.call( this );
}
},
_renderItem: function( ul, item) {
return $( "<li></li>" )
.data( "item.autocomplete", item )
.append( $( "<a></a>" )[ this.options.html ? "html" : "text" ]( item.label ) )
.appendTo( ul );
}
});
})( jQuery );
}));
\ No newline at end of file
...@@ -62,10 +62,12 @@ function unl_theme_init() { ...@@ -62,10 +62,12 @@ function unl_theme_init() {
_elgg_services()->amdConfig->removePath('languages/en'); _elgg_services()->amdConfig->removePath('languages/en');
_elgg_services()->amdConfig->addPath('languages/en', $base_url.'js/languages'); _elgg_services()->amdConfig->addPath('languages/en', $base_url.'js/languages');
_elgg_services()->amdConfig->addPath('elgg/reportedcontent', $base_url.'mod/reportedcontent/views/default/elgg/reportedcontent'); _elgg_services()->amdConfig->addPath('elgg/reportedcontent', $base_url.'mod/reportedcontent/views/default/elgg/reportedcontent');
_elgg_services()->amdConfig->addPath('elgg/UserPicker', $base_url.'views/default/elgg/UserPicker');
_elgg_services()->amdConfig->addPath('unl_theme/js', $base_url.'mod/unl_theme/views/default/js/unl_theme/js'); _elgg_services()->amdConfig->addPath('unl_theme/js', $base_url.'mod/unl_theme/views/default/js/unl_theme/js');
_elgg_services()->amdConfig->addPath('unl_theme/jquery.imgareaselect', $base_url.'mod/unl_theme/js/jquery.imgareaselect'); _elgg_services()->amdConfig->addPath('unl_theme/jquery.imgareaselect', $base_url.'mod/unl_theme/js/jquery.imgareaselect');
_elgg_services()->amdConfig->addPath('bootstrap', $base_url.'mod/unl_theme/vendors/bower_components/bootstrap/dist/js/bootstrap'); _elgg_services()->amdConfig->addPath('bootstrap', $base_url.'mod/unl_theme/vendors/bower_components/bootstrap/dist/js/bootstrap');
_elgg_services()->amdConfig->addPath('moment', $base_url.'mod/unl_theme/vendors/bower_components/moment/moment'); _elgg_services()->amdConfig->addPath('moment', $base_url.'mod/unl_theme/vendors/bower_components/moment/moment');
_elgg_services()->amdConfig->addPath('jquery.ui.autocomplete.html', $base_url.'mod/unl_theme/js/jquery.ui.autocomplete.html');
//Tell elgg not to load its own version of require //Tell elgg not to load its own version of require
elgg_unregister_js('require'); elgg_unregister_js('require');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment