mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
case insensitivity on content filtering
This commit is contained in:
parent
c3edd2fad9
commit
482284a376
@ -1,4 +1,11 @@
|
||||
$(document).ready(function () {
|
||||
// Override the :contains() selector to make it case-insensitive
|
||||
$.expr[":"].contains = $.expr.createPseudo(function(arg) {
|
||||
return function( elem ) {
|
||||
return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0;
|
||||
};
|
||||
});
|
||||
|
||||
$('#js-content-name-filter').keyup(function (e) {
|
||||
var search_query = $(this).val();
|
||||
var content_list = $('.js-content-cards-list > .js-content-card-container');
|
||||
|
||||
@ -120,7 +120,7 @@
|
||||
|
||||
<div class="input-field inline" style="position: relative; top: 5px;">
|
||||
<input id="js-content-name-filter" type="text">
|
||||
<label for="js-content-name-filter">Filter by name...</label>
|
||||
<label for="js-content-name-filter">Filter <%= content_type.name.downcase.pluralize %> by name...</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user