Adds new events. Adds autoupdate extension.

This commit is contained in:
Lars Jung 2012-08-08 02:44:25 +02:00
parent 4245f2019e
commit da438f2f0b
10 changed files with 195 additions and 12 deletions

View file

@ -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 () {