Updating minified JavaScript files
authorwoltlab.com <woltlab@woltlab.com>
Mon, 12 Aug 2013 10:00:28 +0000 (12:00 +0200)
committerwoltlab.com <woltlab@woltlab.com>
Mon, 12 Aug 2013 10:00:28 +0000 (12:00 +0200)
wcfsetup/install/files/js/WCF.ImageViewer.min.js

index 68d8cc42f74fdaf76b3844b720cc2c0b2df9bb65..dbf66a18df887a41df5bcf79a5f7968e7ee5ffad 100755 (executable)
@@ -1 +1 @@
-WCF.ImageViewer=Class.extend({init:function(){$('<span class="icon icon16 icon-chevron-left jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.previous")+'" />').appendTo($("#lbPrevLink"));$('<span class="icon icon16 icon-chevron-right jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.next")+'" />').appendTo($("#lbNextLink"));$('<span class="icon icon32 icon-remove jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.close")+'" />').appendTo($("#lbCloseLink"));var a=$('<span class="icon icon32 icon-resize-full jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.enlarge")+'" id="lbEnlarge" />').insertAfter($("#lbCloseLink"));a.click($.proxy(this._enlarge,this));this._initImageViewer();WCF.DOMNodeInsertedHandler.addCallback("WCF.ImageViewer",$.proxy(this._domNodeInserted,this));WCF.DOMNodeInsertedHandler.execute()},_domNodeInserted:function(){this._initImageSizeCheck();this._initImageViewer()},_initImageViewer:function(){var a=$("a.jsImageViewer");if(a.length){a.removeClass("jsImageViewer").slimbox({counterText:WCF.Language.get("wcf.imageViewer.counter"),loop:true})}},_enlarge:function(){var a=$("#lbImage").css("backgroundImage");if(a){a=a.replace(/^url\((["']?)(.*)\1\)$/,"$2");window.location=a}},_initImageSizeCheck:function(){$(".jsResizeImage").on("load",$.proxy(this._checkImageSize,this))},_checkImageSize:function(d){var c=$(d.currentTarget);c.removeClass("jsResizeImage");var b=c.getDimensions();var a=c.parents("div").innerWidth();if(b.width>a){c.css({height:Math.round(b.height*(a/b.width))+"px",width:a+"px"});if(!c.parents("a").length){c.wrap('<a href="'+c.attr("src")+'" />');c.parent().slimbox()}}}});
\ No newline at end of file
+WCF.ImageViewer=Class.extend({init:function(){$('<span class="icon icon16 icon-chevron-left jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.previous")+'" />').appendTo($("#lbPrevLink"));$('<span class="icon icon16 icon-chevron-right jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.next")+'" />').appendTo($("#lbNextLink"));$('<span class="icon icon32 icon-remove jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.close")+'" />').appendTo($("#lbCloseLink"));var a=$('<span class="icon icon32 icon-resize-full jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.enlarge")+'" id="lbEnlarge" />').insertAfter($("#lbCloseLink"));a.click($.proxy(this._enlarge,this));this._initImageViewer();WCF.DOMNodeInsertedHandler.addCallback("WCF.ImageViewer",$.proxy(this._domNodeInserted,this));WCF.DOMNodeInsertedHandler.execute()},_domNodeInserted:function(){this._initImageSizeCheck();this._initImageViewer()},_initImageViewer:function(){var a=$("a.jsImageViewer");if(a.length){a.removeClass("jsImageViewer").slimbox({counterText:WCF.Language.get("wcf.imageViewer.counter"),loop:true})}},_enlarge:function(){var a=$("#lbImage").css("backgroundImage");if(a){a=a.replace(/^url\((["']?)(.*)\1\)$/,"$2");window.location=a}},_initImageSizeCheck:function(){$(".jsResizeImage").each($.proxy(function(a,b){if(b.complete){this._checkImageSize({currentTarget:b})}},this));$(".jsResizeImage").on("load",$.proxy(this._checkImageSize,this))},_checkImageSize:function(d){var c=$(d.currentTarget);c.removeClass("jsResizeImage");var b=c.getDimensions();var a=c.parents("div").innerWidth();if(b.width>a){c.css({height:Math.round(b.height*(a/b.width))+"px",width:a+"px"});if(!c.parents("a").length){c.wrap('<a href="'+c.attr("src")+'" />');c.parent().slimbox()}}}});
\ No newline at end of file