From 80f2185d4bfcaa50ef7a27ba0f522579b690b02c Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 19 Dec 2010 13:21:09 -0500 Subject: Only add to total allocated field if the value is above > 0 for the item --- usr/local/www/installer/installer.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'usr') diff --git a/usr/local/www/installer/installer.php b/usr/local/www/installer/installer.php index ea8f0ab..8c51d4e 100644 --- a/usr/local/www/installer/installer.php +++ b/usr/local/www/installer/installer.php @@ -689,12 +689,12 @@ function installer_custom() { function row_helper_dynamic_custom(tr) { var totalsize = 0; for(var x = 0; x<99; x++) { //optimize me better - if($('size' + x)) { - totalsize += parseInt($('size' + x).value); - //alert($('size' + x).value); + if(\$('size' + x)) { + if(parseInt($('size' + x).value) > 0) + totalsize += parseInt($('size' + x).value); } } - $('totalsize').value = totalsize; + \$('totalsize').value = totalsize; } @@ -846,7 +846,7 @@ EOF; \$('contentdiv').appear(); function onfstypeChange() { for(var x = 0; x<99; x++) { //optimize me better - if($('fstype' + x)) { + if(\$('fstype' + x)) { var fstype = \$F('fstype' + x); if(fstype.substring(fstype.length - 4) == ".eli") { \$('encpass' + x).disabled = 0; -- cgit v1.1