Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.

Commit

Permalink
feat(js): store list data on init and ajax load
Browse files Browse the repository at this point in the history
  • Loading branch information
hypeJunction committed Jan 24, 2016
1 parent accebd8 commit 438cced
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vendors/hypeJunction/hypeList.js
Expand Up @@ -35,7 +35,8 @@
scrollTopOffset: -100, // Additional offset in pixels for when the page is scrolled to the top of the list
listTime: 0, // Timestamp at which the list was generated, sent with AJAX requests
selectorDelete: '.elgg-menu-item-delete > a', // CSS selector of an anchor that will trigger a delete action
listClasses: 'elgg-list'
listClasses: 'elgg-list',
listData: {}
};

/**
Expand Down Expand Up @@ -132,6 +133,8 @@
}

self.$pagination = self.$list.siblings('.elgg-pagination').show();

self.options.listData = self.$list.data();
},
/**
* Event binding
Expand Down Expand Up @@ -524,6 +527,7 @@
$list = $data.find('[data-list-id="' + self.options.listId + '"]').first();
$list = $list.children('.elgg-list,.elgg-gallery');
}
self.options.listData = $list.data();
return $list.children().filter(function () {
return !(self.$list.children().is('#' + $(this).attr('id')));
});
Expand Down

0 comments on commit 438cced

Please sign in to comment.