mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-03-21 04:49:58 +01:00
Fixes event stack.
This commit is contained in:
parent
e956a49680
commit
3814558ca1
@ -76,10 +76,12 @@ modulejs.define('core/location', ['_', 'modernizr', 'core/settings', 'core/event
|
||||
newAbsHref = encodedHref(newAbsHref);
|
||||
if (absHref !== newAbsHref) {
|
||||
absHref = newAbsHref;
|
||||
event.pub('location.changed', getItem());
|
||||
|
||||
notify.set('loading...');
|
||||
modulejs.require('core/refresh')(function () { notify.set(); });
|
||||
modulejs.require('core/refresh')(function () {
|
||||
notify.set();
|
||||
event.pub('location.changed', getItem());
|
||||
});
|
||||
|
||||
if (history) {
|
||||
if (keepBrowserUrl) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
modulejs.define('core/refresh', ['_', 'config', 'core/server', 'model/entry', 'core/location'], function (_, config, server, Entry, location) {
|
||||
modulejs.define('core/refresh', ['_', 'core/server', 'model/entry', 'core/location'], function (_, server, Entry, location) {
|
||||
|
||||
var parseJson = function (entry, json) {
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user