mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-27 13:34:30 -04:00
Adds folderstatus extension for aai mode. Updates default options for upcoming release.
This commit is contained in:
parent
57d6ef9520
commit
138fc4d43c
6 changed files with 84 additions and 59 deletions
|
@ -2,11 +2,8 @@
|
|||
modulejs.define('view/extended', ['_', '$', 'core/settings', 'core/resource', 'core/format', 'core/event', 'core/entry'], function (_, $, allsettings, resource, format, event, entry) {
|
||||
|
||||
var settings = _.extend({
|
||||
modes: ['details', 'icons'],
|
||||
setParentFolderLabels: false,
|
||||
binaryPrefix: false,
|
||||
maxFolders: 16,
|
||||
delay: 2000
|
||||
binaryPrefix: false
|
||||
}, allsettings.view),
|
||||
|
||||
template = '<li class="entry">' +
|
||||
|
@ -153,20 +150,6 @@ modulejs.define('view/extended', ['_', '$', 'core/settings', 'core/resource', 'c
|
|||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// needed by aai
|
||||
if (_.size(entry.content) <= settings.maxFolders) {
|
||||
|
||||
_.each(entry.content, function (e) {
|
||||
|
||||
if (e.isFolder() && e.status === null) {
|
||||
setTimeout(function () {
|
||||
e.fetchStatus(function (e) { update(e); });
|
||||
}, settings.delay);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
init(entry);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue