X-Git-Url: http://positon.org/gitweb/?p=bizou.git;a=blobdiff_plain;f=plugins%2F_disabled%2Fbalanced%2Fscripts.js;fp=plugins%2F_disabled%2Fbalanced%2Fscripts.js;h=65ef586f875c880df24f75796ecb5351aca798cb;hp=51eb4c6d4119b37ba08d927697f1c3e2ec7ac35f;hb=90f5657437d2e37c4197b49b34830b1f1bf1a7f1;hpb=1a6d3e0609dbce0277a9d27bcebf9a1e758de3b1 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) {