tazpanel 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 |
files | boot.cgi hardware.cgi help.cgi index.cgi network.cgi settings.cgi styles/default/footer.html styles/default/header.html styles/default/style.css |
line diff
1.1 --- a/boot.cgi Wed Dec 31 02:25:01 2014 +0200 1.2 +++ b/boot.cgi Sat Jan 03 17:11:14 2015 +0200 1.3 @@ -173,14 +173,14 @@ 1.4 set -- $i 1.5 case "$1" in 1.6 edit) cat <<EOT 1.7 -<a href="index.cgi?file=${3:-/etc/$name.conf}&action=edit"> 1.8 +<a href="index.cgi?file=${3:-/etc/$name.conf}&action=edit"> 1.9 <img title="${2:-$name Configuration}" src="$IMAGES/edit.png" /></a> 1.10 EOT 1.11 ;; 1.12 options) 1.13 key=$(echo $name | tr [a-z] [A-Z])_OPTIONS 1.14 cat <<EOT 1.15 -<a href="index.cgi?file=/etc/daemons.conf&action=setvar&var=$key&default=$3"> 1.16 +<a href="index.cgi?file=/etc/daemons.conf&action=setvar&var=$key&default=$3"> 1.17 <img title="${2:-$key}" src="$IMAGES/tux.png" /></a> 1.18 EOT 1.19 ;; 1.20 @@ -206,19 +206,19 @@ 1.21 if [ "$pid" ]; then 1.22 cat << EOT 1.23 <td><img src="$IMAGES/started.png" alt="Started" title="$(gettext 'Started')" /></td> 1.24 -<td><a href="$SCRIPT_NAME?daemons=stop=$name"> 1.25 +<td><a href="?daemons=stop=$name"> 1.26 <img src="$IMAGES/stop.png" alt="Stop" title="$(gettext 'Stop')" /></a></td> 1.27 <td> 1.28 EOT 1.29 for i in $pid; do 1.30 cat << EOT 1.31 -<a href="$SCRIPT_NAME?daemons=pid=$i">$i</a> 1.32 +<a href="?daemons=pid=$i">$i</a> 1.33 EOT 1.34 done 1.35 else 1.36 cat << EOT 1.37 <td><img src="$IMAGES/stopped.png" alt="Stopped" title="$(gettext 'Stopped')" /></td> 1.38 -<td><a href="$SCRIPT_NAME?daemons=start=$name"> 1.39 +<td><a href="?daemons=start=$name"> 1.40 <img src="$IMAGES/start.png" alt="Start" title="$(gettext 'Start')" /></a></td> 1.41 <td>----- 1.42 EOT 1.43 @@ -250,7 +250,7 @@ 1.44 <p>$(gettext 'The first application started when the computer powers on')</p> 1.45 </div> 1.46 1.47 -<form method="get" action="$SCRIPT_NAME"> 1.48 +<form method="get" action=""> 1.49 <input type="hidden" name="grub" /> 1.50 <table> 1.51 <tr><td>$(gettext 'Default entry:')</td> 1.52 @@ -301,11 +301,11 @@ 1.53 <p>$(gettext 'Everything that happens before user login')</p> 1.54 </div> 1.55 <div> 1.56 - <a class="button" href="$SCRIPT_NAME?log"> 1.57 + <a class="button" href="?log"> 1.58 <img src="$IMAGES/text.png" />$(gettext 'Boot logs')</a> 1.59 - <a class="button" href="$SCRIPT_NAME?daemons"> 1.60 + <a class="button" href="?daemons"> 1.61 <img src="$IMAGES/recharge.png" />$(gettext 'Manage daemons')</a> 1.62 - <a class="button" href="$SCRIPT_NAME?grub">$(gettext 'Boot loader')</a> 1.63 + <a class="button" href="?grub">$(gettext 'Boot loader')</a> 1.64 </div> 1.65 1.66 <h3>$(gettext 'Configuration files')</h3>
2.1 --- a/hardware.cgi Wed Dec 31 02:25:01 2014 +0200 2.2 +++ b/hardware.cgi Sat Jan 03 17:11:14 2015 +0200 2.3 @@ -78,7 +78,7 @@ 2.4 <div id="wrapper"> 2.5 <h2>$(gettext 'Kernel modules')</h2> 2.6 <div class="float-right"> 2.7 - <form method="get" action="$SCRIPT_NAME"> 2.8 + <form method="get" action=""> 2.9 <input type="hidden" name="modules" /> 2.10 <input type="search" placeholder="$(gettext 'Modules search')" name="search" /> 2.11 </form> 2.12 @@ -110,7 +110,7 @@ 2.13 do 2.14 name=$(basename $line) 2.15 mod=${name%.ko.gz} 2.16 - echo "$(gettext 'Module:') <a href='$SCRIPT_NAME?modinfo=$mod'>$mod</a>" 2.17 + echo "$(gettext 'Module:') <a href='?modinfo=$mod'>$mod</a>" 2.18 done 2.19 echo '</pre>' 2.20 fi 2.21 @@ -128,7 +128,7 @@ 2.22 do 2.23 cat << EOT 2.24 <tr> 2.25 - <td><a href="$SCRIPT_NAME?modinfo=$MOD">$MOD</a></td> 2.26 + <td><a href="?modinfo=$MOD">$MOD</a></td> 2.27 <td>$SIZE</td> 2.28 <td>$USED</td> 2.29 <td>$(echo $BY | sed s/","/" "/g)</td> 2.30 @@ -178,9 +178,9 @@ 2.31 <p>$(gettext 'Manage your computer hardware')</p> 2.32 </div> 2.33 <div> 2.34 - <a class="button" href="$SCRIPT_NAME?modules"> 2.35 + <a class="button" href="?modules"> 2.36 <img src="$IMAGES/tux.png" />$(gettext 'Kernel modules')</a> 2.37 - <a class="button" href="$SCRIPT_NAME?detect"> 2.38 + <a class="button" href="?detect"> 2.39 <img src="$IMAGES/monitor.png" />$(gettext 'Detect PCI/USB')</a> 2.40 </div> 2.41 2.42 @@ -235,7 +235,7 @@ 2.43 2.44 if [ -n "$(ls /sys/devices/virtual/backlight/*/brightness 2> /dev/null)" ]; then 2.45 cat <<EOT 2.46 -<form method="get" action="$SCRIPT_NAME"> 2.47 +<form method="get" action=""> 2.48 EOT 2.49 for dev in /sys/devices/virtual/backlight/*/brightness ; do 2.50 name=$(echo $dev | sed 's|.*/backlight/\([^/]*\).*|\1|') 2.51 @@ -302,7 +302,7 @@ 2.52 $device ;; 2.53 esac 2.54 cat << EOT 2.55 -<form method="get" action="$SCRIPT_NAME#mount"> 2.56 +<form method="get" action="#mount"> 2.57 <table id="mount" class="zebra outbox nowrap"> 2.58 EOT 2.59 df_thead 2.60 @@ -391,7 +391,7 @@ 2.61 END{print "</tbody></table>"}' 2.62 2.63 cat << EOT 2.64 -<a class="button" href="index.cgi?file=/etc/fstab&action=edit"> 2.65 +<a class="button" href="index.cgi?file=/etc/fstab&action=edit"> 2.66 <img src="$IMAGES/edit.png" />$(gettext 'Manual Edit')</a> 2.67 2.68 2.69 @@ -401,7 +401,7 @@ 2.70 # Loop device management gui 2.71 # 2.72 cat << EOT 2.73 -<form method="get" action="$SCRIPT_NAME#loop"> 2.74 +<form method="get" action="#loop"> 2.75 <table id="loop" class="zebra outbox nowrap"> 2.76 <thead> 2.77 <tr><td>Device</td><td>Backing file</td><td>Access</td><td>Offset</td></tr>
3.1 --- a/help.cgi Wed Dec 31 02:25:01 2014 +0200 3.2 +++ b/help.cgi Sat Jan 03 17:11:14 2015 +0200 3.3 @@ -14,7 +14,7 @@ 3.4 search_form() { 3.5 cat << EOT 3.6 <div class="search"> 3.7 - <form method="get" action="$SCRIPT_NAME"> 3.8 + <form method="get" action=""> 3.9 <p> 3.10 <input type="text" name="manual" size="20"> 3.11 <input type="submit" class="radius" value="$(gettext 'Manual')">
4.1 --- a/index.cgi Wed Dec 31 02:25:01 2014 +0200 4.2 +++ b/index.cgi Sat Jan 03 17:11:14 2015 +0200 4.3 @@ -34,7 +34,7 @@ 4.4 rm -rf $tmp ;; 4.5 button) 4.6 cat <<EOT 4.7 - <a class="button" href='$SCRIPT_NAME?file=$1&action=diff'> 4.8 + <a class="button" href="?file=$1&action=diff"> 4.9 <img src="$IMAGES/help.png" />$(gettext 'Differences')</a> 4.10 EOT 4.11 esac 4.12 @@ -88,10 +88,10 @@ 4.13 4.14 if [ "$(GET action)" == "edit" ]; then 4.15 cat <<EOT 4.16 -<form method="post" action="$SCRIPT_NAME?file=$file"> 4.17 +<form method="post" action="?file=$file"> 4.18 <img src="$IMAGES/edit.png" /> 4.19 <input type="submit" value="$(gettext 'Save')"> 4.20 - <a class="button" href='$SCRIPT_NAME?file=$file&action=diff'> 4.21 + <a class="button" href="?file=$file&action=diff"> 4.22 <img src="$IMAGES/help.png" />$(gettext 'Differences')</a> 4.23 <textarea name="content" rows="30" style="width: 100%;"> 4.24 $(cat $file | htmlize) 4.25 @@ -103,7 +103,7 @@ 4.26 elif [ "$(GET action)" == "setvar" ]; then 4.27 data="$(. $(GET file) ;eval echo \$$(GET var))" 4.28 cat <<EOT 4.29 -<form method="post" action="$SCRIPT_NAME?file=$file"> 4.30 +<form method="post" action="?file=$file"> 4.31 <img src="$IMAGES/edit.png" /> 4.32 <input type="submit" value="$(gettext 'Save')"> 4.33 $(GET var) : 4.34 @@ -128,7 +128,7 @@ 4.35 fi 4.36 cat <<EOT 4.37 <div id="actions"> 4.38 - <a class="button" href='$SCRIPT_NAME?file=$file&action=edit'> 4.39 + <a class="button" href="?file=$file&action=edit"> 4.40 <img src="$IMAGES/edit.png" />$(gettext 'Edit')</a> 4.41 EOT 4.42 file_is_modified $file button 4.43 @@ -157,7 +157,7 @@ 4.44 xhtml_header 4.45 cat << EOT 4.46 <section> 4.47 -<form method="get" action="$SCRIPT_NAME"> 4.48 +<form method="get" action=""> 4.49 <div class="box"> 4.50 root@$(hostname):~# <input autofocus type="text" name="cmd" style="width: 80%;" /> 4.51 </div> 4.52 @@ -348,7 +348,7 @@ 4.53 $(ok_status_t) 4.54 </tbody> 4.55 </table> 4.56 -<p><a class="button" href="$SCRIPT_NAME?file=$output"> 4.57 +<p><a class="button" href="?file=$output"> 4.58 <img src="/styles/default/images/browser.png" /> 4.59 $(gettext 'View report')</a> 4.60 $(msg tip "$(gettext 'This report can be attached with a bug report on:') 4.61 @@ -371,11 +371,11 @@ 4.62 <p>$(gettext 'SliTaz administration and configuration Panel')<p> 4.63 </div> 4.64 <div id="actions"> 4.65 - <a class="button" href="$SCRIPT_NAME?terminal"> 4.66 + <a class="button" href="?terminal"> 4.67 <img src="$IMAGES/terminal.png" />$(gettext 'Terminal')</a> 4.68 - <a class="button" href="$SCRIPT_NAME?top"> 4.69 + <a class="button" href="?top"> 4.70 <img src="$IMAGES/monitor.png" />$(gettext 'Process activity')</a> 4.71 - <a class="button" href="$SCRIPT_NAME?report"> 4.72 + <a class="button" href="?report"> 4.73 <img src="$IMAGES/text.png" />$(gettext 'Create a report')</a> 4.74 </div> 4.75
5.1 --- a/network.cgi Wed Dec 31 02:25:01 2014 +0200 5.2 +++ b/network.cgi Sat Jan 03 17:11:14 2015 +0200 5.3 @@ -45,7 +45,7 @@ 5.4 ENCRYPTION="WPA" 5.5 fi 5.6 if echo $SCAN | grep -q 'Mode:Managed'; then 5.7 - AP="&ap=$(echo $SCAN | sed 's/.*Address: \([^ ]*\).*/\1/')" 5.8 + AP="ap=$(echo $SCAN | sed 's/.*Address: \([^ ]*\).*/\1/')" 5.9 else 5.10 AP="" 5.11 fi 5.12 @@ -58,7 +58,7 @@ 5.13 status="---" 5.14 fi 5.15 echo '<tr>' 5.16 - echo "<td><a href=\"$SCRIPT_NAME?wifi&select=$ESSID&keytype=$ENCRYPTION&$AP\"> 5.17 + echo "<td><a href=\"?wifi&select=$ESSID&keytype=$ENCRYPTION&$AP\"> 5.18 <img src='$IMAGES/wireless.png' />$ESSID</a></td>" 5.19 echo "<td>$QUALITY</td><td>$ENCRYPTION</td><td>$status $ip</td>" 5.20 echo '</tr>' 5.21 @@ -152,7 +152,7 @@ 5.22 5.23 <section> 5.24 <h3>$(gettext 'Configuration')</h3> 5.25 -<form method="get" action="$SCRIPT_NAME"> 5.26 +<form method="get" action=""> 5.27 <input type="hidden" name="eth" /> 5.28 <table> 5.29 <thead> 5.30 @@ -198,7 +198,7 @@ 5.31 <pre> 5.32 $(grep ^[A-V] /etc/network.conf | syntax_highlighter conf) 5.33 </pre> 5.34 -<a class="button" href="index.cgi?file=/etc/network.conf&action=edit"> 5.35 +<a class="button" href="index.cgi?file=/etc/network.conf&action=edit"> 5.36 <img src="$IMAGES/edit.png" />$(gettext 'Manual Edit')</a> 5.37 </section> 5.38 EOT 5.39 @@ -212,11 +212,11 @@ 5.40 cat << EOT 5.41 <h2>$(gettext 'Wireless connection')</h2> 5.42 <div id="actions"> 5.43 - <a class="button" href="$SCRIPT_NAME?wifi&start-wifi=start-wifi"> 5.44 + <a class="button" href="?wifi&start-wifi=start-wifi"> 5.45 <img src="$IMAGES/start.png" />$(gettext 'Start')</a> 5.46 - <a class="button" href="$SCRIPT_NAME?wifi&stop=stop"> 5.47 + <a class="button" href="?wifi&stop=stop"> 5.48 <img src="$IMAGES/stop.png" />$(gettext 'Stop')</a> 5.49 - <a class="button" href="$SCRIPT_NAME?wifi=scan"> 5.50 + <a class="button" href="?wifi=scan"> 5.51 <img src="$IMAGES/recharge.png" />$(gettext 'Scan')</a> 5.52 </div> 5.53 $(detect_wifi_networks) 5.54 @@ -248,7 +248,7 @@ 5.55 cat << EOT 5.56 <section> 5.57 <h3>$(gettext 'Connection')</h3> 5.58 -<form method="get" action="$SCRIPT_NAME"> 5.59 +<form method="get" action=""> 5.60 <input type="hidden" name="connect-wifi" /> 5.61 $(table_start) 5.62 <thead> 5.63 @@ -284,9 +284,10 @@ 5.64 <p>$(gettext "These values are the wifi settings in the main /etc/network.conf \ 5.65 configuration file")</p> 5.66 5.67 -<pre>$(grep ^WIFI /etc/network.conf | syntax_highlighter conf)</pre> 5.68 +<pre>$(grep ^WIFI /etc/network.conf | sed '/WIFI_KEY=/s|".*"|"********"|' | \ 5.69 +syntax_highlighter conf)</pre> 5.70 5.71 -<a class="button" href="index.cgi?file=/etc/network.conf&action=edit"> 5.72 +<a class="button" href="index.cgi?file=/etc/network.conf&action=edit"> 5.73 <img src="$IMAGES/edit.png" />$(gettext 'Manual Edit')</a> 5.74 </section> 5.75 5.76 @@ -309,18 +310,18 @@ 5.77 <section> 5.78 <div id="actions"> 5.79 <div class="float-left"> 5.80 - <a class="button" href="$SCRIPT_NAME?start"> 5.81 + <a class="button" href="?start"> 5.82 <img src="$IMAGES/start.png" />$(gettext 'Start')</a> 5.83 - <a class="button" href="$SCRIPT_NAME?stop"> 5.84 + <a class="button" href="?stop"> 5.85 <img src="$IMAGES/stop.png" />$(gettext 'Stop')</a> 5.86 - <a class="button" href="$SCRIPT_NAME?restart"> 5.87 + <a class="button" href="?restart"> 5.88 <img src="$IMAGES/recharge.png" />$(gettext 'Restart')</a> 5.89 </div> 5.90 <div class="float-right"> 5.91 $(gettext 'Configuration:') 5.92 <a class="button" href="index.cgi?file=/etc/network.conf">network.conf</a> 5.93 - <a class="button" href="$SCRIPT_NAME?eth">Ethernet</a> 5.94 - <a class="button" href="$SCRIPT_NAME?wifi">Wireless</a> 5.95 + <a class="button" href="?eth">Ethernet</a> 5.96 + <a class="button" href="?wifi">Wireless</a> 5.97 </div> 5.98 </div> 5.99 5.100 @@ -332,14 +333,14 @@ 5.101 5.102 <pre>$(cat /etc/hosts)</pre> 5.103 5.104 -<a class="button" href="index.cgi?file=/etc/hosts&action=edit"> 5.105 +<a class="button" href="index.cgi?file=/etc/hosts&action=edit"> 5.106 <img src="$IMAGES/edit.png" />$(gettext 'Edit hosts')</a> 5.107 </section> 5.108 5.109 <section> 5.110 <h3>$(gettext 'Hostname')</h3> 5.111 5.112 -<form method="get" name="$SCRIPT_NAME"> 5.113 +<form method="get" name=""> 5.114 <input type="text" name="hostname" value="$hostname" /> 5.115 <input type="submit" value="$(gettext 'Change hostname')" /> 5.116 </form>
6.1 --- a/settings.cgi Wed Dec 31 02:25:01 2014 +0200 6.2 +++ b/settings.cgi Sat Jan 03 17:11:14 2015 +0200 6.3 @@ -119,7 +119,7 @@ 6.4 cat <<EOT 6.5 <h3 id="groups">$(gettext 'Manage groups')</h3> 6.6 6.7 -<form method="get" action="$SCRIPT_NAME"> 6.8 +<form method="get" action=""> 6.9 <input type="hidden" name="groups" /> 6.10 <div id="actions"> 6.11 <div class="float-left"> 6.12 @@ -162,7 +162,7 @@ 6.13 <section> 6.14 <h4>$(gettext 'Add a new group')</h4> 6.15 6.16 -<form method="get" action="$SCRIPT_NAME"> 6.17 +<form method="get" action=""> 6.18 <input type="hidden" name="groups" /> 6.19 <table> 6.20 <tr><td>$(gettext 'Group name:')</td> 6.21 @@ -176,7 +176,7 @@ 6.22 <section> 6.23 <h4>$(gettext 'Manage group membership')</h4> 6.24 6.25 -<form method="get" action="$SCRIPT_NAME"> 6.26 +<form method="get" action=""> 6.27 <input type="hidden" name="groups" /> 6.28 <table> 6.29 <tr><td>$(gettext 'Group name:')</td> 6.30 @@ -203,7 +203,7 @@ 6.31 cat <<EOT 6.32 <h3 id="users">$(gettext 'Manage users')</h3> 6.33 6.34 -<form method="get" action="$SCRIPT_NAME"> 6.35 +<form method="get" action=""> 6.36 <div id="actions"> 6.37 <div class="float-left"> 6.38 $(gettext 'Selection:') 6.39 @@ -266,7 +266,7 @@ 6.40 <section> 6.41 <h4>$(gettext 'Add a new user')</h4> 6.42 6.43 -<form method="get" action="$SCRIPT_NAME"> 6.44 +<form method="get" action=""> 6.45 <input type="hidden" name="user" /> 6.46 <table> 6.47 <tr><td>$(gettext 'User login:')</td> 6.48 @@ -317,11 +317,11 @@ 6.49 [ $? = 1 ] && 6.50 msg tip $(gettext \ 6.51 "Can't see your language?<br/>You can \ 6.52 -<a href='/pkgs.cgi?do=Install&glibc-locale'>install glibc-locale</a> \ 6.53 +<a href='/pkgs.cgi?do=Install&glibc-locale'>install glibc-locale</a> \ 6.54 to see a larger list of available locales.") 6.55 6.56 cat << EOT 6.57 -<form method="get" action="$SCRIPT_NAME"> 6.58 +<form method="get" action=""> 6.59 <div class="outbox"> 6.60 <table class="zebra fixed"> 6.61 <thead> 6.62 @@ -377,16 +377,16 @@ 6.63 <p>$(gettext 'Manage system time, users or language settings')<p> 6.64 </div> 6.65 <div id="actions"> 6.66 - <a class="button" href="$SCRIPT_NAME?users"> 6.67 + <a class="button" href="?users"> 6.68 <img src="$IMAGES/user.png" />$(gettext 'Manage users')</a> 6.69 - <a class="button" href="$SCRIPT_NAME?groups"> 6.70 + <a class="button" href="?groups"> 6.71 <img src="$IMAGES/users.png" />$(gettext 'Manage groups')</a> 6.72 </div> 6.73 6.74 <section> 6.75 <h3>$(gettext 'System time')</h3> 6.76 6.77 -<form method="get" action="$SCRIPT_NAME"> 6.78 +<form method="get" action=""> 6.79 <table> 6.80 <tr><td>$(gettext 'Time zone:')</td><td> 6.81 <select class="button" name="tz"> 6.82 @@ -403,32 +403,23 @@ 6.83 <tr><td>$(gettext 'Hardware clock:')</td><td>$(hwclock -r)</tr> 6.84 </table> 6.85 </form> 6.86 -<form method="get" action="$SCRIPT_NAME"> 6.87 -<input type="submit" name="date" value="$(gettext 'Set date')" /> 6.88 -<select class="button" name="day"> 6.89 -$(for i in $(seq 1 31); do echo "<option>$i</option>"; done) 6.90 -</select> 6.91 -<select class="button" name="month"> 6.92 -$(for i in 01 02 03 04 05 06 07 08 09 10 11 12; do 6.93 - date -d ${i}010101 '+%m %B' | \ 6.94 - sed 's|\(.*\) \(.*\)|<option value="\1">\2</option>|' 6.95 -done) 6.96 -</select> 6.97 -<select class="button" name="year"> 6.98 -$(for i in $(seq 2010 2030); do echo "<option>$i</option>"; done) 6.99 -</select> 6.100 -- <select class="button" name="hour"> 6.101 -$(for i in $(seq 0 23); do printf "<option>%02d</option>" $i; done) 6.102 -</select> 6.103 -: <select class="button" name="min"> 6.104 -$(for i in $(seq 0 59); do printf "<option>%02d</option>" $i; done) 6.105 -</select> 6.106 -: <select class="button" name="sec"> 6.107 -$(for i in $(seq 0 59); do printf "<option>%02d</option>" $i; done) 6.108 -</select> 6.109 + 6.110 +<form method="get" action=""> 6.111 + <input type="submit" name="date" value="$(gettext 'Set date')" /> 6.112 + <select class="button" name="day">$(printf '<option>%d</option>' $(seq 31))</select> 6.113 + <select class="button" name="month"> 6.114 + $(for i in $(seq 12); do 6.115 + printf '<option value="%s">%s</option>' $(date -d $i.01-01:01 '+%m %B') 6.116 + done) 6.117 + </select> 6.118 + <select class="button" name="year">$(printf '<option>%d</option>' $(seq 2010 2030))</select> 6.119 +- <select class="button" name="hour">$(printf '<option>%02d</option>' $(seq 0 23))</select> 6.120 +: <select class="button" name="min">$(printf '<option>%02d</option>' $(seq 0 59))</select> 6.121 +: <select class="button" name="sec">$(printf '<option>%02d</option>' $(seq 0 59))</select> 6.122 </form> 6.123 -<a class="button" href="$SCRIPT_NAME?rdate">$(gettext 'Sync online')</a> 6.124 -<a class="button" href="$SCRIPT_NAME?hwclock">$(gettext 'Set hardware clock')</a> 6.125 + 6.126 +<a class="button" href="?rdate">$(gettext 'Sync online')</a> 6.127 +<a class="button" href="?hwclock">$(gettext 'Set hardware clock')</a> 6.128 </section> 6.129 EOT 6.130 # 6.131 @@ -454,7 +445,7 @@ 6.132 locale | grep LANG | cut -d= -f2 6.133 fi 6.134 cat << EOT 6.135 -</strong> <a class="button" href="$SCRIPT_NAME?locale">$(gettext 'Change')</a></p> 6.136 +</strong> <a class="button" href="?locale">$(gettext 'Change')</a></p> 6.137 </section> 6.138 6.139 <section> 6.140 @@ -487,7 +478,7 @@ 6.141 esac 6.142 keyboard_config=/etc/X11/xorg.conf.d/40-Keyboard.conf 6.143 cat << EOT 6.144 -<form method="get" action="$SCRIPT_NAME"> 6.145 +<form method="get" action=""> 6.146 $(gettext 'Suggested keymap for Xorg:') 6.147 <input type="submit" name "apply_xorg_kbd" value="$keymap" /> 6.148 <a class="button" href="index.cgi?file=$keyboard_config"> 6.149 @@ -496,7 +487,7 @@ 6.150 EOT 6.151 fi 6.152 cat << EOT 6.153 -<form method="get" action="$SCRIPT_NAME"> 6.154 +<form method="get" action=""> 6.155 $(gettext 'Available keymaps:') 6.156 <select class="button" name="gen_keymap"> 6.157 $(list_keymaps) 6.158 @@ -508,7 +499,7 @@ 6.159 <section> 6.160 <h2>$(gettext 'Panel configuration')</h2> 6.161 6.162 -<form method="get" action="$SCRIPT_NAME"> 6.163 +<form method="get" action=""> 6.164 <p> 6.165 $(gettext 'Style:') 6.166 <select class="button" name="style"> 6.167 @@ -517,7 +508,7 @@ 6.168 <input type="submit" value="$(gettext 'Activate')" /> 6.169 </p> 6.170 </form> 6.171 -<form method="get" action="$SCRIPT_NAME"> 6.172 +<form method="get" action=""> 6.173 <p> 6.174 $(gettext 'Panel password:') 6.175 <input type="password" name="panel_pass"/>
7.1 --- a/styles/default/footer.html Wed Dec 31 02:25:01 2014 +0200 7.2 +++ b/styles/default/footer.html Sat Jan 03 17:11:14 2015 +0200 7.3 @@ -1,12 +1,13 @@ 7.4 +export TEXTDOMAIN='tazpanel' 7.5 cat << EOT 7.6 <!-- End of content--> 7.7 </div> 7.8 7.9 -<div id="footer"> 7.10 +<footer> 7.11 $(gettext 'Copyright') © $(date +%Y) 7.12 <a href="http://www.slitaz.org/">SliTaz GNU/Linux</a> 7.13 - <a href="/index.cgi?file=/usr/share/licenses/bsd.txt">$(gettext 'BSD License')</a> 7.14 -</div> 7.15 +</footer> 7.16 7.17 <script type="text/javascript"> 7.18 window.onbeforeunload = null;
8.1 --- a/styles/default/header.html Wed Dec 31 02:25:01 2014 +0200 8.2 +++ b/styles/default/header.html Sat Jan 03 17:11:14 2015 +0200 8.3 @@ -1,36 +1,23 @@ 8.4 cat << EOT 8.5 <!DOCTYPE html> 8.6 -<html xmlns="http://www.w3.org/1999/xhtml" lang="$(echo $LANG | cut -f1 -d_)"> 8.7 +<html lang="${LANG%%_*}"> 8.8 <head> 8.9 <title>$TITLE</title> 8.10 - <meta charset="utf-8" /> 8.11 <link rel="shortcut icon" href="/styles/$STYLE/favicon.ico" /> 8.12 -EOT 8.13 +$(printf '\t<link rel="stylesheet" type="text/css" href="/%s" />\n' \ 8.14 + $(cd /var/www/tazpanel; ls styles/$STYLE/*.css)) 8.15 8.16 -for css in $(cd /var/www/tazpanel; find ./styles/$STYLE -iname '*.css' | sed 's|./|/|'); do 8.17 - echo " <link rel=\"stylesheet\" type=\"text/css\" href=\"$css\" />" 8.18 -done 8.19 - 8.20 -cat << EOT 8.21 - <!-- Function to hide the loading message when page is generated. --> 8.22 <script type="text/javascript"> 8.23 - function showLoading(){ 8.24 - document.getElementById("loading").style.display='none'; 8.25 - } 8.26 - 8.27 - //Ask confirmation on close window during load time 8.28 - window.onbeforeunload = confirmExit; 8.29 - function confirmExit() 8.30 - { 8.31 - return 1; 8.32 - } 8.33 + function hideLoading(){document.getElementById("loading").style.display='none';} 8.34 + window.onbeforeunload = confirmExit; 8.35 + function confirmExit(){return "$(_ 'Confirm break')";} 8.36 </script> 8.37 </head> 8.38 -<body onload="showLoading()"> 8.39 +<body onload="hideLoading()"> 8.40 8.41 -<div id="header"> 8.42 +<header> 8.43 <h1>$TITLE</h1> 8.44 -</div> 8.45 +</header> 8.46 8.47 <div id="toolbar"> 8.48 <div id="icons">
9.1 --- a/styles/default/style.css Wed Dec 31 02:25:01 2014 +0200 9.2 +++ b/styles/default/style.css Sat Jan 03 17:11:14 2015 +0200 9.3 @@ -27,7 +27,7 @@ 9.4 9.5 /* Header and main title */ 9.6 9.7 -#header { 9.8 +header { 9.9 height: 40px; 9.10 /*border-bottom: 4px solid #afafaf;*/ 9.11 background: #222 url(images/logo.png) no-repeat left; 9.12 @@ -36,7 +36,7 @@ 9.13 width: 100%; 9.14 } 9.15 9.16 -#header h1 { 9.17 +header h1 { 9.18 margin: 0; 9.19 padding: 8px 0 0 42px; 9.20 font-style: italic; 9.21 @@ -132,7 +132,7 @@ 9.22 cursor: progress; 9.23 position: fixed; 9.24 top: 76px; 9.25 - right: 120px; 9.26 + right: 140px; 9.27 width: 248px; 9.28 padding: 4px 4px 2px; 9.29 } 9.30 @@ -367,7 +367,7 @@ 9.31 9.32 /* Footer */ 9.33 9.34 -#footer { 9.35 +footer { 9.36 /* border-bottom: 1px solid #c1baad; */ 9.37 height: 25px; 9.38 text-align: center; 9.39 @@ -376,8 +376,8 @@ 9.40 color: #bbb; 9.41 } 9.42 9.43 -#footer a { color: #bbb; } 9.44 -#footer a:hover { color: #555; } 9.45 +footer a { color: #bbb; } 9.46 +footer a:hover { color: #555; } 9.47 9.48 /* HTML5 Meter */ 9.49 .meter {