Участник:BattlePeasant/cattreetable.js: различия между версиями

Содержимое удалено Содержимое добавлено
ещё один параметр же
м попробуем уменьшить моргание
Строка 22:
list.push(str);
}
return list;
}
 
function ExcludeCat(idx, list){
var extext, exlist, exind;
var Table = document.getElementById('cattreeTable' + idx);
if (extext = Table.getAttribute('data-exclude')){
exlist = extext.split('\\');
for (var i = 0; i < exlist.length; i++)
if ((exind = list.indexOf(exlist[i])) >= 0)
list.splice(exind,1);
}
return list;
}
 
Строка 110:
var Cell = Table.rows[row].cells[0];
var Tree = HCell.dataArtlist;
var TreeNode, subTree, a, i;
var list = [];
if (typeof Tree === 'undefined')
return false;
for (var i = 0; TreeNode = Tree[i]; i++)
Clear(Cell);
for (var i=0; TreeNode = Tree[i]; i++)
if (GetText(TreeNode.a).nodeValue == ctTitle){
subTree = TreeNode.subtree;
Строка 131 ⟶ 130 :
if (cat)
a.onclick = clickCat;
Cell.appendChild(a);
if (a.getAttribute('data-loadpage'))
LoadPage(a);
if (i == 0)
Clear(Cell);
Cell.appendChild(a);
if (i < list.length - 1)
Cell.appendChild(document.createTextNode(' • '));