slitaz-dev-tools rev 240

tazwikiss: min & max are redifined
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Apr 13 15:37:06 2015 +0200 (2015-04-13)
parents dbf9d98daf67
children 722ee04ad91e
files tazwikiss/rootfs/var/www/wiki/plugins/wkp_Calc.css tazwikiss/rootfs/var/www/wiki/plugins/wkp_Calc.sh
line diff
     1.1 --- a/tazwikiss/rootfs/var/www/wiki/plugins/wkp_Calc.css	Sun Mar 22 22:19:17 2015 +0100
     1.2 +++ b/tazwikiss/rootfs/var/www/wiki/plugins/wkp_Calc.css	Mon Apr 13 15:37:06 2015 +0200
     1.3 @@ -8,6 +8,7 @@
     1.4  
     1.5  .inputcalc {
     1.6      border: none;
     1.7 +    min-width: 80px;
     1.8      width: 80px;
     1.9      font-size: inherit;
    1.10      padding: 2px;
     2.1 --- a/tazwikiss/rootfs/var/www/wiki/plugins/wkp_Calc.sh	Sun Mar 22 22:19:17 2015 +0100
     2.2 +++ b/tazwikiss/rootfs/var/www/wiki/plugins/wkp_Calc.sh	Mon Apr 13 15:37:06 2015 +0200
     2.3 @@ -43,7 +43,7 @@
     2.4  function buildCalc(id, rows, cols) {
     2.5      DATA[id] = {};
     2.6      var maths = [ "abs", "acos", "asin", "atan", "atan2", "ceil", "cos", "exp",
     2.7 -		  "floor", "log", "max", "min", "pow", "random", "round", "sin",
     2.8 +		  "floor", "log", "pow", "random", "round", "sin",
     2.9  		  "tan", "sqrt", "PI", "E" ];
    2.10      for (var i=0; v = maths[i]; i++)
    2.11  	eval("DATA[id]."+v+" = DATA[id]."+v.toUpperCase()+" = Math."+v);
    2.12 @@ -85,7 +85,8 @@
    2.13  {
    2.14  	var e = document.getElementById("widthcalc");
    2.15  	e.innerHTML = s;
    2.16 -	return (e.offsetWidth < 80 || s.charAt(0) == "=") ? 80 : e.offsetWidth;
    2.17 +	return (e.offsetWidth < e.minWidth || s.charAt(0) == "=") ?
    2.18 +		 e.minWidth : e.offsetWidth;
    2.19  }
    2.20  
    2.21  function setCell(e, v)