tazlito rev 402

live.cgi: add file chooser
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Nov 22 19:00:05 2015 +0100 (2015-11-22)
parents 648f81279b2b
children 639fcd94f19b
files live.cgi tazlito
line diff
     1.1 --- a/live.cgi	Sat Nov 21 11:08:42 2015 +0100
     1.2 +++ b/live.cgi	Sun Nov 22 19:00:05 2015 +0100
     1.3 @@ -270,8 +270,8 @@
     1.4  			<tr><td>
     1.5  				$(_ 'Compression type:')
     1.6  				<select name="write_iso">
     1.7 -					<!-- option value="gzip">gzip</option -->
     1.8  					<option value="lzma">lzma</option>
     1.9 +					<option value="gzip">gzip</option>
    1.10  					<option value="none">$(_ 'none')</option>
    1.11  				</select>
    1.12  			</td></tr>
    1.13 @@ -308,7 +308,8 @@
    1.14  		<table>
    1.15  			<tr><td>
    1.16  				$(_ 'ISO to convert')
    1.17 -				<input type="text" accept=".iso" name="input" value="$inputiso" />
    1.18 +				<span id="input"><input type="text" name="input" value="$inputiso" /></span>
    1.19 +				<button data-icon="cd" onclick="ajax('index.cgi?do=file-selection&name=input', '1', 'input'); return false"/>
    1.20  			</td></tr>
    1.21  			<tr><td>
    1.22  				<input type="radio" name="type" value="ram" id="type1" checked />
    1.23 @@ -365,7 +366,8 @@
    1.24  		<table>
    1.25  			<tr><td>
    1.26  				$(_ 'ISO to convert')
    1.27 -				<input type="text" name="input" value="$([ $(id -u) -eq 0 ] && echo "/root" || echo $HOME)/" />
    1.28 +				<span id="input"><input type="text" name="input" /></span>
    1.29 +				<button data-icon="cd" onclick="ajax('index.cgi?do=file-selection&name=input', '1', 'input'); return false"/>
    1.30  			</td></tr>
    1.31  		</table>
    1.32  
    1.33 @@ -414,7 +416,8 @@
    1.34  			<tr>
    1.35  				<td>
    1.36  					$(_ 'ISO to add')
    1.37 -					<input type="text" name="input" value="/root/" />
    1.38 +					<span id="input"><input type="text" name="input" value="/root/" /></span>
    1.39 +					<button data-icon="cd" onclick="ajax('index.cgi?do=file-selection&name=input', '1', 'input'); return false"/>
    1.40  				</td>
    1.41  				<td>
    1.42  					$(_ 'Minimum RAM:')
     2.1 --- a/tazlito	Sat Nov 21 11:08:42 2015 +0100
     2.2 +++ b/tazlito	Sun Nov 22 19:00:05 2015 +0100
     2.3 @@ -371,6 +371,7 @@
     2.4  	elif [ "$COMPRESSION" = "gzip" ]; then
     2.5  		echo "Creating rootfs.gz with gzip compression... "
     2.6  		cpio -o -H newc | gzip -9 > /rootfs.gz
     2.7 +		[ -x /usr/bin/advdef ] && advdef -z4 /rootfs.gz
     2.8  	else
     2.9  		# align='y'
    2.10  		echo "Creating rootfs.gz without compression... "