mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-27 13:34:30 -04:00
Improves event system.
This commit is contained in:
parent
34eed09537
commit
2819fd8496
9 changed files with 75 additions and 50 deletions
|
@ -224,6 +224,11 @@ modulejs.define('ext/preview-img', ['_', '$', 'core/settings', 'core/resource',
|
|||
_.each(item.content, initEntry);
|
||||
},
|
||||
|
||||
onLocationRefreshed = function (item, added, removed) {
|
||||
|
||||
_.each(added, initEntry);
|
||||
},
|
||||
|
||||
init = function () {
|
||||
|
||||
if (!settings.enabled) {
|
||||
|
@ -280,7 +285,7 @@ modulejs.define('ext/preview-img', ['_', '$', 'core/settings', 'core/resource',
|
|||
});
|
||||
|
||||
event.sub('location.changed', onLocationChanged);
|
||||
event.sub('entry.created', initEntry);
|
||||
event.sub('location.refreshed', onLocationRefreshed);
|
||||
|
||||
$(window).on('resize load', adjustSize);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue