Project

General

Profile

Bug #18388 » 7776_filter_ids2.diff

Administrator Admin, 2008-03-06 13:50

View differences:

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();
},
(2-2/2)