mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-25 20:44:53 -04:00
Optionally hide folders in the main view.
This commit is contained in:
parent
fef8e2a254
commit
5c5d050218
2 changed files with 10 additions and 3 deletions
|
@ -4,6 +4,7 @@ modulejs.define('view/items', ['_', '$', 'core/settings', 'core/resource', 'core
|
|||
var settings = _.extend({
|
||||
setParentFolderLabels: false,
|
||||
hideParentFolderLinks: false,
|
||||
hideFolders: false,
|
||||
binaryPrefix: false
|
||||
}, allsettings.view),
|
||||
|
||||
|
@ -106,7 +107,9 @@ modulejs.define('view/items', ['_', '$', 'core/settings', 'core/resource', 'core
|
|||
|
||||
_.each(item.content, function (e) {
|
||||
|
||||
$items.append(update(e, true));
|
||||
if (!(e.isFolder() && settings.hideFolders)) {
|
||||
$items.append(update(e, true));
|
||||
}
|
||||
});
|
||||
|
||||
if (item.isEmpty()) {
|
||||
|
@ -123,7 +126,9 @@ modulejs.define('view/items', ['_', '$', 'core/settings', 'core/resource', 'core
|
|||
|
||||
_.each(added, function (item) {
|
||||
|
||||
update(item, true).hide().appendTo($items).fadeIn(400);
|
||||
if (!(item.isFolder() && settings.hideFolders)) {
|
||||
update(item, true).hide().appendTo($items).fadeIn(400);
|
||||
}
|
||||
});
|
||||
|
||||
_.each(removed, function (item) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue