mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-27 13:34:30 -04:00
More changes from jq.data to pure props.
This commit is contained in:
parent
a3c9bc9db0
commit
131d153cf5
8 changed files with 15 additions and 19 deletions
|
@ -53,9 +53,8 @@ function update(item) {
|
|||
const $img = $html.find('.icon img');
|
||||
const $label = $html.find('.label');
|
||||
|
||||
$html
|
||||
.addClass(item.isFolder() ? 'folder' : 'file')
|
||||
.data('item', item);
|
||||
$html.addClass(item.isFolder() ? 'folder' : 'file');
|
||||
$html[0]._item = item;
|
||||
|
||||
location.setLink($a, item);
|
||||
$img.attr('src', resource.icon('folder'));
|
||||
|
@ -126,7 +125,7 @@ function createOnIndicatorClick() {
|
|||
return ev => {
|
||||
let $indicator = jq(ev.currentTarget);
|
||||
let $item = $indicator.closest('.item');
|
||||
const item = $item.data('item');
|
||||
const item = $item[0]._item;
|
||||
let $content = $item.find('> ul.content');
|
||||
|
||||
if ($indicator.hasClass('unknown')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue