mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-06-06 17:51:15 -04:00
Adds new events. Adds autoupdate extension.
This commit is contained in:
parent
4245f2019e
commit
da438f2f0b
10 changed files with 195 additions and 12 deletions
|
@ -186,6 +186,15 @@ modulejs.define('ext/tree', ['_', '$', 'core/settings', 'core/resource', 'core/e
|
|||
$tree.scrollpanel('update');
|
||||
},
|
||||
|
||||
onContentChanged = function (entry) {
|
||||
|
||||
while (entry.parent) {
|
||||
entry = entry.parent;
|
||||
}
|
||||
|
||||
update(entry);
|
||||
},
|
||||
|
||||
// creates the complete tree from entry down to the root
|
||||
init = function (entry, parser) {
|
||||
|
||||
|
@ -217,6 +226,9 @@ modulejs.define('ext/tree', ['_', '$', 'core/settings', 'core/resource', 'core/e
|
|||
});
|
||||
|
||||
event.sub('ready', adjustSpacing);
|
||||
event.sub('entry.changed', onContentChanged);
|
||||
event.sub('entry.created', onContentChanged);
|
||||
event.sub('entry.removed', onContentChanged);
|
||||
|
||||
$(window).on('resize', function () {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue