diff --git a/library/Class/ScriptLoader.php b/library/Class/ScriptLoader.php index b20a1f608a09fef4510e0d4f9ab17b2157401ca8..ebdcd37b911e5d98e2dad705be9b90137883edb2 100644 --- a/library/Class/ScriptLoader.php +++ b/library/Class/ScriptLoader.php @@ -768,9 +768,8 @@ class Class_ScriptLoader { public function loadButterflyLightbox() { return $this->addOPACScript('butterfly/jquery.resize-events') ->addOPACScript('butterfly/jquery.history') - ->addOPACScript('butterfly/jquery.butterfly.min') - ->addOPACScriptStyleSheet('butterfly/butterfly') - ->addOPACScriptStyleSheet('butterfly/butterfly-ie', ['ie_version' => 6]); + ->addOPACScript('butterfly/jquery.butterfly') + ->addOPACScriptStyleSheet('butterfly/butterfly'); } diff --git a/public/opac/js/butterfly/jquery.butterfly.js b/public/opac/js/butterfly/jquery.butterfly.js index 191e5cdcce8690d78e52c741eda9ca657dcdb32f..6c27354e3be8e742feab8d0cc1e10b73fd05cebe 100644 --- a/public/opac/js/butterfly/jquery.butterfly.js +++ b/public/opac/js/butterfly/jquery.butterfly.js @@ -899,12 +899,12 @@ jQuery.butterfly.linkCount = 0; '<img src="'+href+'" alt="" style="max-width: 100%; max-height: 100%; float: left;" />'+caption ); $('#jb-window-content img') - .error(function(){ + .on('error', function(){ checkForContent.apply(this, [options.linkType, href, callback]); }) .data('full-width', '') .data('full-height', '') - .load(callback) + .on('load', callback) ; break; @@ -925,10 +925,10 @@ jQuery.butterfly.linkCount = 0; $('#jb-window-content > iframe') .width(contentDefaultWidth) .height(contentDefaultHeight) - .error(function(){ + .on('error', function(){ checkForContent.apply(this, [options.linkType, href, callback]); }) - .load(callback) + .on('load', callback) ; break; @@ -1054,28 +1054,13 @@ jQuery.butterfly.linkCount = 0; fullWidth ; - // relax size for measurement - if ( - $.browser.msie && - $.browser.version === 7 && - isImageType && - isImageMedia && - this.find('img').outerWidth(true) === 0 // IE7 width === 0 on initial load - ) { // only works with '100%' for IE7 on initial load - jbWindowInner.css({ - width: '100%', - height: '100%', - left:0, - top:0 - }); - } else { // must use 'auto' for all other situations - jbWindowInner.css({ + jbWindowInner.css({ width: 'auto', height: 'auto', left:0, top:0 }); - } + // if element is hidden, unhide it, then measure @@ -1133,23 +1118,11 @@ jQuery.butterfly.linkCount = 0; relaxWidth = typeof relaxWidth !== 'undefined' ? relaxWidth : true; // relax size for measurement - if ( - $.browser.msie && - $.browser.version === 7 && - isImageType && - isImageMedia && - this.find('img').outerWidth(true) === 0 // IE7 width === 0 on initial load - ) { // only works with '100%' for IE7 on initial load - $('#jb-window-inner').height('100%'); - if (relaxWidth) { - $('#jb-window-inner').width('100%').css({left:0,top:0}); - } - } else { // must use 'auto' for all other situations + // must use 'auto' for all other situations $('#jb-window-inner').height('auto'); if (relaxWidth) { $('#jb-window-inner').width('auto').css({left:0,top:0}); } - } // if element is hidden, unhide it, then measure if ( this.css('display') === 'none' ) { diff --git a/public/opac/js/butterfly/jquery.history.js b/public/opac/js/butterfly/jquery.history.js index 7f91079d4a96886cd50a78032310561c9c1cefda..7a60d4e8f7e1ccc0cec8b195811b640755a71725 100644 --- a/public/opac/js/butterfly/jquery.history.js +++ b/public/opac/js/butterfly/jquery.history.js @@ -33,7 +33,7 @@ get: function(win) { var hash = ((win || window).location.hash).replace(/^#/, ''); try { - return $.browser.mozilla ? hash : decodeURIComponent(hash); + return hash; } catch (error) { return hash; @@ -181,9 +181,7 @@ var self = $.extend({}, implementations.base); - if($.browser.msie && ($.browser.version < 8 || document.documentMode < 8)) { - self.type = 'iframeTimer'; - } else if("onhashchange" in window) { + if("onhashchange" in window) { self.type = 'hashchangeEvent'; } else { self.type = 'timer';