From 90f5657437d2e37c4197b49b34830b1f1bf1a7f1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Baptiste=20CL=C3=89MENT?= Date: Mon, 19 Aug 2013 21:28:53 +0200 Subject: [PATCH] Removed hidden size element, fix for folder previews --- plugins/_disabled/balanced/before_content.php | 1 - plugins/_disabled/balanced/head.php | 7 ++++--- plugins/_disabled/balanced/scripts.js | 24 ++++++++++++++++++------ 3 files changed, 22 insertions(+), 10 deletions(-) delete mode 100644 plugins/_disabled/balanced/before_content.php diff --git a/plugins/_disabled/balanced/before_content.php b/plugins/_disabled/balanced/before_content.php deleted file mode 100644 index 2abced6..0000000 --- a/plugins/_disabled/balanced/before_content.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/plugins/_disabled/balanced/head.php b/plugins/_disabled/balanced/head.php index 44cca72..f2c2bb9 100644 --- a/plugins/_disabled/balanced/head.php +++ b/plugins/_disabled/balanced/head.php @@ -1,9 +1,10 @@ diff --git a/plugins/_disabled/balanced/scripts.js b/plugins/_disabled/balanced/scripts.js index 51eb4c6..65ef586 100644 --- a/plugins/_disabled/balanced/scripts.js +++ b/plugins/_disabled/balanced/scripts.js @@ -1,12 +1,27 @@ -function applyOptimalImagesSize() +/*Copyright (C) 2013 Baptiste Clement + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +function applyOptimalImagesSize(bestHeight) { - var divimages = document.getElementsByClassName("image"); + var divimages = document.getElementsByClassName("image imagepreview"); var images = new Array(); for(var i = 0 ; i < divimages.length ; ++i) { images.push(divimages[i].children[0].children[0]); } - var bestHeight = parseInt(document.getElementById("thumbsize").textContent); var newHList = getOptimalHeights(images, bestHeight); for( var i = 0 ; i < images.length ; ++i) { @@ -96,9 +111,6 @@ function getAllImageSizesForHeight(images, height) return sizes; } - - - //Renvoi un tableau de tableau, correspondant au découpage du tableau d'entrée découpé par tranche de MAX function splitTab(tab, max) { -- 1.7.10.4