tazpanel diff hardware.cgi @ rev 406
Small improvements: no need HTML "meta charset" (it's done in HTTP headers); no need "$SCRIPT_NAME" in links; use HTML "&" in links; hide Wi-Fi password in the page; fix month selector in the date settings; use HTML5 plain "header" and "footer"; use "printf"'s loop nature; fix "1" message in page loading break.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Jan 03 17:11:14 2015 +0200 (2015-01-03) |
parents | d9576ab0e512 |
children | 33fd4be42594 |
line diff
1.1 --- a/hardware.cgi Wed Dec 31 02:25:01 2014 +0200 1.2 +++ b/hardware.cgi Sat Jan 03 17:11:14 2015 +0200 1.3 @@ -78,7 +78,7 @@ 1.4 <div id="wrapper"> 1.5 <h2>$(gettext 'Kernel modules')</h2> 1.6 <div class="float-right"> 1.7 - <form method="get" action="$SCRIPT_NAME"> 1.8 + <form method="get" action=""> 1.9 <input type="hidden" name="modules" /> 1.10 <input type="search" placeholder="$(gettext 'Modules search')" name="search" /> 1.11 </form> 1.12 @@ -110,7 +110,7 @@ 1.13 do 1.14 name=$(basename $line) 1.15 mod=${name%.ko.gz} 1.16 - echo "$(gettext 'Module:') <a href='$SCRIPT_NAME?modinfo=$mod'>$mod</a>" 1.17 + echo "$(gettext 'Module:') <a href='?modinfo=$mod'>$mod</a>" 1.18 done 1.19 echo '</pre>' 1.20 fi 1.21 @@ -128,7 +128,7 @@ 1.22 do 1.23 cat << EOT 1.24 <tr> 1.25 - <td><a href="$SCRIPT_NAME?modinfo=$MOD">$MOD</a></td> 1.26 + <td><a href="?modinfo=$MOD">$MOD</a></td> 1.27 <td>$SIZE</td> 1.28 <td>$USED</td> 1.29 <td>$(echo $BY | sed s/","/" "/g)</td> 1.30 @@ -178,9 +178,9 @@ 1.31 <p>$(gettext 'Manage your computer hardware')</p> 1.32 </div> 1.33 <div> 1.34 - <a class="button" href="$SCRIPT_NAME?modules"> 1.35 + <a class="button" href="?modules"> 1.36 <img src="$IMAGES/tux.png" />$(gettext 'Kernel modules')</a> 1.37 - <a class="button" href="$SCRIPT_NAME?detect"> 1.38 + <a class="button" href="?detect"> 1.39 <img src="$IMAGES/monitor.png" />$(gettext 'Detect PCI/USB')</a> 1.40 </div> 1.41 1.42 @@ -235,7 +235,7 @@ 1.43 1.44 if [ -n "$(ls /sys/devices/virtual/backlight/*/brightness 2> /dev/null)" ]; then 1.45 cat <<EOT 1.46 -<form method="get" action="$SCRIPT_NAME"> 1.47 +<form method="get" action=""> 1.48 EOT 1.49 for dev in /sys/devices/virtual/backlight/*/brightness ; do 1.50 name=$(echo $dev | sed 's|.*/backlight/\([^/]*\).*|\1|') 1.51 @@ -302,7 +302,7 @@ 1.52 $device ;; 1.53 esac 1.54 cat << EOT 1.55 -<form method="get" action="$SCRIPT_NAME#mount"> 1.56 +<form method="get" action="#mount"> 1.57 <table id="mount" class="zebra outbox nowrap"> 1.58 EOT 1.59 df_thead 1.60 @@ -391,7 +391,7 @@ 1.61 END{print "</tbody></table>"}' 1.62 1.63 cat << EOT 1.64 -<a class="button" href="index.cgi?file=/etc/fstab&action=edit"> 1.65 +<a class="button" href="index.cgi?file=/etc/fstab&action=edit"> 1.66 <img src="$IMAGES/edit.png" />$(gettext 'Manual Edit')</a> 1.67 1.68 1.69 @@ -401,7 +401,7 @@ 1.70 # Loop device management gui 1.71 # 1.72 cat << EOT 1.73 -<form method="get" action="$SCRIPT_NAME#loop"> 1.74 +<form method="get" action="#loop"> 1.75 <table id="loop" class="zebra outbox nowrap"> 1.76 <thead> 1.77 <tr><td>Device</td><td>Backing file</td><td>Access</td><td>Offset</td></tr>