mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-21 08:12:26 +02:00
Portal: Filter was not looking in the item description in tree mode.
SVN:trunk[4893]
This commit is contained in:
@@ -6,10 +6,6 @@
|
||||
* Project Website: http://wiki.aiwsolutions.net/dOQKO
|
||||
**/
|
||||
|
||||
// WARNING : GLA 2016-02-19 : We have altered the lib as it was no longer maintained nor flexible enough
|
||||
// - Added callback
|
||||
// - Added latinisation of the search (accents removing)
|
||||
|
||||
jQuery.fn.treeListFilter = function(list, timeout, callback) {
|
||||
var list = jQuery(list);
|
||||
var input = this;
|
||||
@@ -20,7 +16,7 @@ jQuery.fn.treeListFilter = function(list, timeout, callback) {
|
||||
if (timeout === undefined) {
|
||||
timeout = 200;
|
||||
}
|
||||
// GLA : Default callback
|
||||
// Default callback
|
||||
if (callback === undefined) {
|
||||
callback = function(){ return null; };
|
||||
}
|
||||
@@ -42,9 +38,9 @@ jQuery.fn.treeListFilter = function(list, timeout, callback) {
|
||||
}
|
||||
}
|
||||
if (!display) {
|
||||
// GLA : Modified the search so it looks for each parts of the search and not the entire sentance
|
||||
// GLA : Modified the text to remove accents (latinise())
|
||||
var text = liObject.find('a.tree-item').text();
|
||||
// Modified the search so it looks for each parts of the search and not the entire sentance
|
||||
// Modified the text to remove accents (latinise())
|
||||
var text = liObject.find('.tree-item-wrapper').text();
|
||||
var textLC = text.toLowerCase().latinise();
|
||||
var filterValues = filterValue.split(' ');
|
||||
var display = true;
|
||||
@@ -66,7 +62,7 @@ jQuery.fn.treeListFilter = function(list, timeout, callback) {
|
||||
}
|
||||
|
||||
input.on('change', function(event) {
|
||||
// GLA : Modified the search t remove accents (latinise())
|
||||
// Modified the search t remove accents (latinise())
|
||||
var filter = input.val().toLowerCase().trim().latinise();
|
||||
//var startTime = new Date().getTime();
|
||||
filterList(list, filter);
|
||||
|
||||
Reference in New Issue
Block a user