Cleans code.

This commit is contained in:
Lars Jung 2012-10-17 01:54:05 +02:00
parent 885ce9e9e9
commit 910312f7ce
5 changed files with 35 additions and 104 deletions

View file

@ -1,30 +0,0 @@
modulejs.define('ext/folderstatus', ['_', '$', 'core/settings', 'core/event', 'core/entry'], function (_, $, allsettings, event, entry) {
var settings = _.extend({
enabled: false,
maxChecks: 16,
delay: 2000
}, allsettings.folderstatus),
init = function () {
if (!settings.enabled) {
return;
}
event.sub('ready', function () {
var count = 0;
_.each(entry.content, function (e) {
if (e.isFolder() && e.status === null && count <= settings.maxChecks) {
count += 1;
setTimeout(function () { e.fetchStatus(); }, settings.delay);
}
});
});
};
init();
});