diff options
| author | Michael Peter Christen <mc@yacy.net> | 2015-10-24 11:22:35 +0800 |
|---|---|---|
| committer | Michael Peter Christen <mc@yacy.net> | 2015-10-24 11:22:35 +0800 |
| commit | ac034db8bc27ca0d81557fb7c68af51526f39151 (patch) | |
| tree | 2bdf1dd6a3a7d3b50f6c3dfc06dcd16ebd4840a4 /htroot/js | |
| parent | 826f14f37f8129e1e29c80cef767e513a4e5a1b4 (diff) | |
| parent | 8da20718aab6a0129457224d47fe5b83be59faee (diff) | |
Merge branch 'master' of https://github.com/luccioman/yacy_search_server
# Conflicts:
# htroot/js/highslide/highslide.js
# source/net/yacy/document/ImageParser.java
Diffstat (limited to 'htroot/js')
| -rw-r--r-- | htroot/js/highslide/highslide.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/htroot/js/highslide/highslide.js b/htroot/js/highslide/highslide.js index 0dcfd4ce5..f6103e367 100644 --- a/htroot/js/highslide/highslide.js +++ b/htroot/js/highslide/highslide.js @@ -1089,7 +1089,21 @@ imageCreate : function() { this.content = img;
img.onload = function () {
if (hs.expanders[exp.key]) exp.contentLoaded();
+ }; + /* Patch start : manage loading or rendering error to avoid 'loading...' stay indefinitely */
+ img.onerror = function () {
+ /* Set alternative text */
+ img.alt = 'X';
+ /* Set image size to ensure it can be clicked to close popup */
+ if(exp.content) {
+ exp.content.width = 30;
+ exp.content.height = 30;
+ }
+ if (hs.expanders[exp.key]) {
+ exp.contentLoaded();
+ }
};
+ /* Patch end */ if (hs.blockRightClick) img.oncontextmenu = function() { return false; };
img.className = 'highslide-image';
hs.setStyles(img, {
@@ -1099,7 +1113,7 @@ imageCreate : function() { maxWidth: '9999px',
zIndex: 3
});
- img.title = hs.lang.restoreTitle;
+ img.title = hs.lang.restoreTitle; if (hs.safari && hs.uaVersion < 525) hs.container.appendChild(img);
if (hs.ie && hs.flushImgSize) img.src = null;
img.src = this.src;
|
