mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-28 14:04:45 -04:00
Fixes event stack.
This commit is contained in:
parent
e956a49680
commit
3814558ca1
3 changed files with 24 additions and 25 deletions
|
@ -76,10 +76,12 @@ modulejs.define('core/location', ['_', 'modernizr', 'core/settings', 'core/event
|
||||||
newAbsHref = encodedHref(newAbsHref);
|
newAbsHref = encodedHref(newAbsHref);
|
||||||
if (absHref !== newAbsHref) {
|
if (absHref !== newAbsHref) {
|
||||||
absHref = newAbsHref;
|
absHref = newAbsHref;
|
||||||
event.pub('location.changed', getItem());
|
|
||||||
|
|
||||||
notify.set('loading...');
|
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 (history) {
|
||||||
if (keepBrowserUrl) {
|
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) {
|
var parseJson = function (entry, json) {
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,6 @@ modulejs.define('ext/thumbnails', ['_', 'core/settings', 'core/event', 'core/ser
|
||||||
|
|
||||||
checkEntry = function (entry) {
|
checkEntry = function (entry) {
|
||||||
|
|
||||||
if (entry.$extended) {
|
|
||||||
|
|
||||||
var type = null;
|
var type = null;
|
||||||
|
|
||||||
if (_.indexOf(settings.img, entry.type) >= 0) {
|
if (_.indexOf(settings.img, entry.type) >= 0) {
|
||||||
|
@ -42,18 +40,17 @@ modulejs.define('ext/thumbnails', ['_', 'core/settings', 'core/event', 'core/ser
|
||||||
if (type) {
|
if (type) {
|
||||||
requestThumbSmall(type, entry.absHref, function (src) {
|
requestThumbSmall(type, entry.absHref, function (src) {
|
||||||
|
|
||||||
if (src) {
|
if (src && entry.$extended) {
|
||||||
entry.$extended.find('.icon.small img').addClass('thumb').attr('src', src);
|
entry.$extended.find('.icon.small img').addClass('thumb').attr('src', src);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
requestThumbBig(type, entry.absHref, function (src) {
|
requestThumbBig(type, entry.absHref, function (src) {
|
||||||
|
|
||||||
if (src) {
|
if (src && entry.$extended) {
|
||||||
entry.$extended.find('.icon.big img').addClass('thumb').attr('src', src);
|
entry.$extended.find('.icon.big img').addClass('thumb').attr('src', src);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onLocationChanged = function (item) {
|
onLocationChanged = function (item) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue