Add search frontend extension, plus refactorings to make it work.

This commit is contained in:
Lars Jung 2015-05-08 22:09:12 +02:00
parent 7f687e0a84
commit c35abad20a
17 changed files with 275 additions and 115 deletions

View file

@ -98,12 +98,7 @@ modulejs.define('ext/preview-audio', ['_', '$', 'core/event', 'core/format', 'co
}
}
function onLocationChanged(item) {
_.each(item.content, initItem);
}
function onLocationRefreshed(item, added) {
function onViewChanged(added) {
_.each(added, initItem);
}
@ -114,8 +109,7 @@ modulejs.define('ext/preview-audio', ['_', '$', 'core/event', 'core/format', 'co
return;
}
event.sub('location.changed', onLocationChanged);
event.sub('location.refreshed', onLocationRefreshed);
event.sub('view.changed', onViewChanged);
}