diff options
author | Wu Cheng-Han | 2016-07-02 16:16:22 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2016-07-02 16:16:22 +0800 |
commit | e8f59c1df872a143ffd86458729286919f3448f0 (patch) | |
tree | 1653fbdf265fdd6a596fa20c28d270860fbe7c3f /public | |
parent | 4734d0ebe1d12f5cd7cacc8e4578c010e1b5d8a5 (diff) |
Update to add viewAjaxCallback on every parts that use ajax loading
Diffstat (limited to 'public')
-rw-r--r-- | public/js/extra.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/public/js/extra.js b/public/js/extra.js index 46036892..f20d59d8 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -213,6 +213,7 @@ function finishView(view) { var thumbnail_src = data[0].thumbnail_large; var image = '<img src="' + thumbnail_src + '" />'; $(value).prepend(image); + if(viewAjaxCallback) viewAjaxCallback(); } }); }); @@ -334,8 +335,7 @@ function finishView(view) { } var clone = $value.clone(); clone[0].onload = function (e) { - if(viewAjaxCallback) - viewAjaxCallback(); + if(viewAjaxCallback) viewAjaxCallback(); }; a.html(clone); $value.replaceWith(a); @@ -371,6 +371,7 @@ function finishView(view) { var ratio = (height / width) * 100; inner.css('padding-bottom', ratio + '%'); $(value).html(inner).append(caption); + if(viewAjaxCallback) viewAjaxCallback(); } }); }); @@ -402,6 +403,7 @@ function finishView(view) { var ratio = (height / width) * 100; inner.css('padding-bottom', ratio + '%'); $(value).html(inner); + if(viewAjaxCallback) viewAjaxCallback(); } }); }); |