Fixes event stack.

This commit is contained in:
Lars Jung 2012-10-19 18:40:07 +02:00
parent e956a49680
commit 3814558ca1
3 changed files with 24 additions and 25 deletions

View file

@ -27,32 +27,29 @@ modulejs.define('ext/thumbnails', ['_', 'core/settings', 'core/event', 'core/ser
checkEntry = function (entry) {
if (entry.$extended) {
var type = null;
var type = null;
if (_.indexOf(settings.img, entry.type) >= 0) {
type = 'img';
} else if (_.indexOf(settings.mov, entry.type) >= 0) {
type = 'mov';
} else if (_.indexOf(settings.doc, entry.type) >= 0) {
type = 'doc';
}
if (_.indexOf(settings.img, entry.type) >= 0) {
type = 'img';
} else if (_.indexOf(settings.mov, entry.type) >= 0) {
type = 'mov';
} else if (_.indexOf(settings.doc, entry.type) >= 0) {
type = 'doc';
}
if (type) {
requestThumbSmall(type, entry.absHref, function (src) {
if (type) {
requestThumbSmall(type, entry.absHref, function (src) {
if (src && entry.$extended) {
entry.$extended.find('.icon.small img').addClass('thumb').attr('src', src);
}
});
requestThumbBig(type, entry.absHref, function (src) {
if (src) {
entry.$extended.find('.icon.small img').addClass('thumb').attr('src', src);
}
});
requestThumbBig(type, entry.absHref, function (src) {
if (src) {
entry.$extended.find('.icon.big img').addClass('thumb').attr('src', src);
}
});
}
if (src && entry.$extended) {
entry.$extended.find('.icon.big img').addClass('thumb').attr('src', src);
}
});
}
},