From 5bf0e7f7e76cd3610e0aa692e0c433aca594ee51 Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Thu, 1 Aug 2013 00:27:54 -0400 Subject: [PATCH] Better/fixed jQuery styling and slightly improved js/inline-expanding.js accuracy (when jQuery is enabled) --- js/inline-expanding.js | 3 +++ templates/header.html | 30 ++++++++++++++++++++++-------- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/js/inline-expanding.js b/js/inline-expanding.js index e529a395..61085b0d 100644 --- a/js/inline-expanding.js +++ b/js/inline-expanding.js @@ -17,6 +17,9 @@ onready(function(){ for (var i = 0; i < link.length; i++) { if (typeof link[i] == "object" && link[i].childNodes && typeof link[i].childNodes[0] !== 'undefined' && link[i].childNodes[0].src && link[i].className != 'file') { + if (window.jQuery && !$(link).prev().hasClass('fileinfo')) { + continue; + } link[i].childNodes[0].style.maxWidth = '95%'; link[i].onclick = function(e) { if (this.childNodes[0].className == 'hidden') diff --git a/templates/header.html b/templates/header.html index 3791296f..c1230f0e 100644 --- a/templates/header.html +++ b/templates/header.html @@ -13,17 +13,31 @@ {% endif %} {% endif %} {% if config.recaptcha %}{% endif %} \ No newline at end of file