Start to replace jQuery with dom.

This commit is contained in:
Lars Jung 2016-06-26 01:03:24 +02:00
parent 9234e3f287
commit 7320592dc2
26 changed files with 566 additions and 301 deletions

View file

@ -55,7 +55,6 @@ function update(item) {
const $label = $html.find('.label');
$html.addClass(item.isFolder() ? 'folder' : 'file');
$html[0]._item = item;
location.setLink($a, item);
$img.attr('src', resource.icon('folder'));
@ -108,10 +107,11 @@ function update(item) {
}
}
if (item.elTree) {
jq(item.elTree).replaceWith($html);
if (item.$tree) {
item.$tree.replaceWith($html);
}
item.elTree = $html[0];
item.$tree = $html;
$html[0]._item = item;
return $html;
}