mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 15:22:17 +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
|
* 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) {
|
jQuery.fn.treeListFilter = function(list, timeout, callback) {
|
||||||
var list = jQuery(list);
|
var list = jQuery(list);
|
||||||
var input = this;
|
var input = this;
|
||||||
@@ -20,7 +16,7 @@ jQuery.fn.treeListFilter = function(list, timeout, callback) {
|
|||||||
if (timeout === undefined) {
|
if (timeout === undefined) {
|
||||||
timeout = 200;
|
timeout = 200;
|
||||||
}
|
}
|
||||||
// GLA : Default callback
|
// Default callback
|
||||||
if (callback === undefined) {
|
if (callback === undefined) {
|
||||||
callback = function(){ return null; };
|
callback = function(){ return null; };
|
||||||
}
|
}
|
||||||
@@ -42,9 +38,9 @@ jQuery.fn.treeListFilter = function(list, timeout, callback) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!display) {
|
if (!display) {
|
||||||
// GLA : Modified the search so it looks for each parts of the search and not the entire sentance
|
// 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())
|
// Modified the text to remove accents (latinise())
|
||||||
var text = liObject.find('a.tree-item').text();
|
var text = liObject.find('.tree-item-wrapper').text();
|
||||||
var textLC = text.toLowerCase().latinise();
|
var textLC = text.toLowerCase().latinise();
|
||||||
var filterValues = filterValue.split(' ');
|
var filterValues = filterValue.split(' ');
|
||||||
var display = true;
|
var display = true;
|
||||||
@@ -66,7 +62,7 @@ jQuery.fn.treeListFilter = function(list, timeout, callback) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
input.on('change', function(event) {
|
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 filter = input.val().toLowerCase().trim().latinise();
|
||||||
//var startTime = new Date().getTime();
|
//var startTime = new Date().getTime();
|
||||||
filterList(list, filter);
|
filterList(list, filter);
|
||||||
|
|||||||
Reference in New Issue
Block a user