Bug #18388 » 7776_filter_ids2.diff
typo3/js/tree.js (working copy) | ||
---|---|---|
*/
|
||
filter: function() {
|
||
var searchString = $F(this.field).toLowerCase();
|
||
var pages = $$('#treeRoot .dragTitle a');
|
||
pages.each(function(el) {
|
||
if (el.innerHTML.toLowerCase().include(searchString)) {
|
||
el.up().removeClassName('not-found');
|
||
} else {
|
||
if (searchString != '' && Math.abs(searchString) == searchString) {
|
||
// search for id
|
||
var idSearch = 'pages'+searchString+'_';
|
||
var pages = $$('#treeRoot .dragTitle a');
|
||
pages.each(function(el) {
|
||
el.up().addClassName('not-found');
|
||
});
|
||
if ($$('li [id^='+idSearch+'] .dragTitle a').length) {
|
||
$$('li [id^='+idSearch+'] .dragTitle a')[0].up().removeClassName('not-found');
|
||
}
|
||
});
|
||
} else {
|
||
var pages = $$('#treeRoot .dragTitle a');
|
||
pages.each(function(el) {
|
||
if (el.innerHTML.toLowerCase().include(searchString)) {
|
||
el.up().removeClassName('not-found');
|
||
} else {
|
||
el.up().addClassName('not-found');
|
||
}
|
||
});
|
||
}
|
||
|
||
this.toggleReset();
|
||
},
|
- « Previous
- 1
- 2
- Next »