tazpanel rev 498
Use bottom panel as status bar; settings: data picker, lock icon for locked users; font: add 'calendar', 'modem', and 'vpn' icons; etc...
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon May 18 17:13:57 2015 +0300 (2015-05-18) |
parents | 5f5f6496a115 |
children | 2a891cb47520 |
files | Makefile lib/libtazpanel lib/tazpanel.js locale.cgi network.cgi settings.cgi styles/default/base.css styles/default/footer.html styles/default/header.html styles/default/tazpanel.ttf styles/default/tweaks.css |
line diff
1.1 --- a/Makefile Fri May 15 09:25:00 2015 +0200 1.2 +++ b/Makefile Mon May 18 17:13:57 2015 +0300 1.3 @@ -46,7 +46,6 @@ 1.4 cp -a tazpanel $(DESTDIR)$(PREFIX)/bin 1.5 -[ "$(VERSION)" ] && sed -i 's/^VERSION=[0-9].*/VERSION=$(VERSION)/' $(DESTDIR)$(PREFIX)/bin/tazpanel 1.6 cp -a *.cgi lib/ styles/ doc/ README* $(DESTDIR)$(PANEL) 1.7 - rm -f $(DESTDIR)$(PANEL)/test.cgi 1.8 if [ -e $(DESTDIR)$(PANEL)/user ] ; then rm -rf $(DESTDIR)$(PANEL)/user; fi 1.9 ln -s . $(DESTDIR)$(PANEL)/user 1.10 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
2.1 --- a/lib/libtazpanel Fri May 15 09:25:00 2015 +0200 2.2 +++ b/lib/libtazpanel Mon May 18 17:13:57 2015 +0300 2.3 @@ -202,8 +202,7 @@ 2.4 # Get the list of panel styles 2.5 2.6 list_styles() { 2.7 - for style in $PANEL/styles/* 2.8 - do 2.9 + for style in $PANEL/styles/*; do 2.10 style=$(basename $style) 2.11 echo "<option value='$style'>$style</option>" 2.12 done 2.13 @@ -239,8 +238,9 @@ 2.14 2.15 loading_msg() { 2.16 local MSG=${1:-$LOADING_MSG} 2.17 + [ -z "$MSG" ] && MSG="$(_ 'Please wait')" 2.18 cat <<EOT 2.19 -<div id="loading"><img src="/styles/default/images/loader.gif"/>$MSG</div> 2.20 +<script type="text/javascript">statusbar("$MSG", 1)</script> 2.21 EOT 2.22 } 2.23
3.1 --- a/lib/tazpanel.js Fri May 15 09:25:00 2015 +0200 3.2 +++ b/lib/tazpanel.js Mon May 18 17:13:57 2015 +0300 3.3 @@ -351,7 +351,12 @@ 3.4 3.5 if (req.readyState == XMLHttpRequest.DONE) { 3.6 // if request done 3.7 - statusElem.innerHTML = req.statusText // show status (Not Found, ОК..) 3.8 + if (req.statusText == 'OK') { 3.9 + statusElem.innerHTML = "<span data-icon='ok'></span>" 3.10 + } else { 3.11 + statusElem.innerHTML = "<span data-icon='delete'>" + 3.12 + req.statusText + "</span>" // show status (Not Found, ...) 3.13 + } 3.14 3.15 // if status 200 (ОК) - show answer to user 3.16 if (req.status == 200) 3.17 @@ -367,7 +372,7 @@ 3.18 req.send(command); // send request 3.19 3.20 // (5) 3.21 - statusElem.innerHTML = '<img src="/styles/default/images/loader.gif" />' 3.22 + statusElem.innerHTML = '<span data-img="clock"></span>' 3.23 } 3.24 3.25 3.26 @@ -514,3 +519,27 @@ 3.27 evt.preventDefault(); 3.28 } 3.29 } 3.30 + 3.31 + 3.32 +// 3.33 +// Show info in the status bar 3.34 +// 3.35 + 3.36 +function statusbar(status, ticker) { 3.37 + var ds = document.getElementById('defaultStatus'); 3.38 + var sb = document.getElementById('statusBar'); 3.39 + var as = document.getElementById('ajaxStatus'); 3.40 + 3.41 + if (status == '') { 3.42 + // show default status (SliTaz copyright and license) 3.43 + sb.style.display = 'none'; ds.style.display = ''; as.innerHTML = ''; 3.44 + } else { 3.45 + // show requested status (rich HTML supported) 3.46 + ds.style.display = 'none'; sb.innerHTML = status; sb.style.display = ''; 3.47 + // show optional ticker 3.48 + if (ticker != '') { 3.49 + as.innerHTML = '<img src="/styles/default/images/loader.gif"/>'; 3.50 + } 3.51 + } 3.52 +} 3.53 +
4.1 --- a/locale.cgi Fri May 15 09:25:00 2015 +0200 4.2 +++ b/locale.cgi Mon May 18 17:13:57 2015 +0300 4.3 @@ -164,7 +164,7 @@ 4.4 iso*|translit*) ;; 4.5 *) 4.6 #echo -e "$LOC:\t$(parse_date $LOC $(get_locale_info_date_time $LOC c | sed 's|&|\\\&|g'))";; 4.7 - FMT="$(get_locale_info_date_time $LOC c)" 4.8 + FMT="$(get_locale_info_date_time $LOC x)" 4.9 echo "<tr><td>$LOC</td><td>$FMT</td><td>" 4.10 parse_date $LOC "$FMT" 4.11 echo "</td><td>"
5.1 --- a/network.cgi Fri May 15 09:25:00 2015 +0200 5.2 +++ b/network.cgi Mon May 18 17:13:57 2015 +0300 5.3 @@ -206,7 +206,7 @@ 5.4 # Scan open ports 5.5 scan=$(GET scan); back=$(GET back) 5.6 xhtml_header 5.7 - LOADING_MSG=$(_ 'Scanning open ports...'); loading_msg 5.8 + loading_msg "$(_ 'Scanning open ports...')" 5.9 5.10 cat <<EOT 5.11 <section> 5.12 @@ -463,7 +463,7 @@ 5.13 if [ -n "$start_disabled" ]; then 5.14 cat <<EOT 5.15 <section id="wifiList"> 5.16 - <div style="text-align: center;"><span id="ajaxStatus"></span>$(_ 'Scanning wireless interface...')</div> 5.17 + <div style="text-align: center;"><span data-icon="clock">$(_ 'Scanning wireless interface...')</span></div> 5.18 </section> 5.19 5.20 <script type="text/javascript">
6.1 --- a/settings.cgi Fri May 15 09:25:00 2015 +0200 6.2 +++ b/settings.cgi Mon May 18 17:13:57 2015 +0300 6.3 @@ -22,12 +22,14 @@ 6.4 getent $1 2>/dev/null || cat /etc/$1 6.5 } 6.6 6.7 + 6.8 listdb() { 6.9 - for item in $(getdb $1 | cut -d ":" -f 1); do 6.10 + for item in $(getdb $1 | cut -d: -f1); do 6.11 echo "<option>$item</option>\n" 6.12 done 6.13 } 6.14 6.15 + 6.16 restart_lxpanel() { 6.17 # `lxpanelctl restart` exists, but it breaks often leaving us without any panel 6.18 lxpanel_pid="$(ps -o comm,pid | fgrep lxpanel | awk '{print $2}')" 6.19 @@ -36,7 +38,7 @@ 6.20 6.21 if [ "$USER" == "$lxpanel_user" ]; then 6.22 kill $lxpanel_pid 6.23 - DISPLAY=':0.0' XAUTHORITY='/var/run/slim.auth' $lxpanel_comm 1>/tmp/debug1 2>/tmp/debug2 & 6.24 + DISPLAY=':0.0' XAUTHORITY='/var/run/slim.auth' $lxpanel_comm & 6.25 fi 6.26 } 6.27 6.28 @@ -54,50 +56,65 @@ 6.29 case $(GET do) in 6.30 6.31 # Groups page 6.32 - delgroups) 6.33 - for i in $groups; do delgroup $i; done ;; 6.34 - addgroup) 6.35 - addgroup $groups ;; 6.36 - addmember) 6.37 - addgroup $(GET member) $groups ;; 6.38 - delmember) 6.39 - delgroup $(GET member) $groups ;; 6.40 + delgroups) for i in $groups; do delgroup $i; done ;; 6.41 + addgroup) addgroup $groups ;; 6.42 + addmember) addgroup $(GET member) $groups ;; 6.43 + delmember) delgroup $(GET member) $groups ;; 6.44 6.45 # Users page 6.46 - delusers) 6.47 - for i in $users; do deluser $i; done ;; 6.48 - lockusers) 6.49 - for i in $users; do passwd -l $i | log; done ;; 6.50 - unlockusers) 6.51 - for i in $users; do passwd -u $i | log; done ;; 6.52 - chpasswd) 6.53 - echo "$users:$(GET password)" | chpasswd -m | log ;; 6.54 + delusers) for i in $users; do deluser $i; done ;; 6.55 + lockusers) for i in $users; do passwd -l $i | log; done ;; 6.56 + unlockusers) for i in $users; do passwd -u $i | log; done ;; 6.57 + chpasswd) echo "$users:$(GET password)" | chpasswd -m | log ;; 6.58 adduser) 6.59 if [ -n "$users" ]; then 6.60 - name=$(GET name); name=${name:-SliTaz User} 6.61 - adduser -D -s /bin/sh -g "$name" -G users -h /home/$users $users 6.62 + name="$(GET name)" 6.63 + adduser -D -s /bin/sh -g "${name:-SliTaz User}" -G users -h /home/$users $users 6.64 echo "$user:$(GET passwd)" | chpasswd -m | log 6.65 for i in audio cdrom floppy video tty; do addgroup $users $i; done 6.66 + passwd -u $users | log 6.67 fi ;; 6.68 6.69 # System time 6.70 - settz) 6.71 - GET tz > /etc/TZ;; 6.72 - date) # normalize to two digits 6.73 - date $(printf '%02d%02d%02d%02d%d.%02d' "$(GET month)" "$(GET day)" "$(GET hour)" "$(GET min)" "$(GET year)" "$(GET sec)") >/dev/null;; 6.74 - rdate) 6.75 + calendar) # display Yad date picker (AJAX) 6.76 + new_date="$(DISPLAY=':0.0' XAUTHORITY='/var/run/slim.auth' \ 6.77 + yad --calendar --on-top --mouse --undecorated \ 6.78 + --window-icon=config-date --title="$(_ 'Set date')" \ 6.79 + --date-format='%x<span style="display:none">%F</span>')" 6.80 + header 6.81 + echo "$new_date"; exit 0;; 6.82 + 6.83 + settz) # set timezone 6.84 + GET tz > /etc/TZ ;; 6.85 + 6.86 + date) # only accepted format is MMDDhhmm[[YY]YY][.ss] 6.87 + if [ -n "$(GET dateFull)" ]; then 6.88 + dateFull="$(GET dateFull)" # %F = YYYY-MM-DD 6.89 + date $(printf '%02d%02d%02d%02d%d.%02d' "${dateFull:5:2}" \ 6.90 + "${dateFull:8:2}" "$(GET hour)" "$(GET min)" \ 6.91 + "${dateFull:0:4}" "$(GET sec)") >/dev/null 6.92 + else 6.93 + date $(printf '%02d%02d%02d%02d%d.%02d' "$(GET month)" \ 6.94 + "$(GET day)" "$(GET hour)" "$(GET min)" "$(GET year)" \ 6.95 + "$(GET sec)") >/dev/null 6.96 + fi;; 6.97 + 6.98 + rdate) # get and possibly set the system date/time from a remote host 6.99 rdate -s tick.greyware.com ;; 6.100 - hwclock) 6.101 + 6.102 + hwclock) # query and set hardware clock (RTC) 6.103 hwclock -w -u ;; 6.104 6.105 + gethwclock) # get date/time from hardware clock (AJAX) 6.106 + header; hwclock -ur | sed 's|0.000000 seconds||'; exit 0;; 6.107 + 6.108 esac 6.109 ;; 6.110 6.111 6.112 - *\ gen_locale\ *) 6.113 - new_locale=$(GET gen_locale) ;; 6.114 - *\ gen_keymap\ *) 6.115 - new_keymap=$(GET gen_keymap) ;; 6.116 + *\ gen_locale\ *) new_locale=$(GET gen_locale) ;; 6.117 + *\ gen_keymap\ *) new_keymap=$(GET gen_keymap) ;; 6.118 + 6.119 *\ apply_xorg_kbd\ *) 6.120 sed -i "s/XkbLayout.*/XkbLayout \" \"$(GET apply_xorg_kbd)\"/" \ 6.121 /etc/X11/xorg.conf.d/40-Keyboard.conf ;; 6.122 @@ -112,9 +129,9 @@ 6.123 6.124 dd="$HOME/.local/share/desktop-directories"; sd="$dd/SliTazMenu.directory" 6.125 6.126 - case $REMOTE_USER in 6.127 - root) color=31; ind='#';; 6.128 - *) color=32; ind='$';; 6.129 + case "$REMOTE_USER" in 6.130 + root) color='31'; ind='#';; 6.131 + *) color='32'; ind='$';; 6.132 esac 6.133 6.134 case $(GET tweak) in 6.135 @@ -166,7 +183,7 @@ 6.136 ;; 6.137 6.138 6.139 - *\ menuIcon\ *) 6.140 + *\ menuIcon\ *) # return specified image (AJAX) 6.141 icon="/usr/share/pixmaps/$(GET menuIcon).png" 6.142 [ ! -r $icon ] && exit 0 6.143 header "Content-Type: image/png"; cat $icon; exit 0 6.144 @@ -214,18 +231,16 @@ 6.145 </thead> 6.146 <tbody> 6.147 EOT 6.148 - for group in $(getdb group | cut -d ":" -f 1); do 6.149 + for group in $(getdb group | cut -d: -f1); do 6.150 IFS=':' 6.151 set -- $(getdb group | grep "^$group:") 6.152 unset IFS 6.153 - gid=$3 6.154 - members=$4 6.155 cat <<EOT 6.156 <tr> 6.157 <td><input type="checkbox" name="group" value="$group" id="$group"/> 6.158 <label for="$group" data-icon="group">$group</label></td> 6.159 - <td>$gid</td> 6.160 - <td>${members//,/, }</td> 6.161 + <td>$3</td> 6.162 + <td>${4//,/, }</td> 6.163 </tr> 6.164 EOT 6.165 done 6.166 @@ -239,40 +254,27 @@ 6.167 6.168 <section> 6.169 <header>$(_ 'Add a new group')</header> 6.170 - <form> 6.171 + <form class="wide"> 6.172 <input type="hidden" name="groups"/> 6.173 - <table> 6.174 - <tr><td>$(_ 'Group name:')</td> 6.175 - <td><input type="text" name="group"/></td> 6.176 - </tr> 6.177 - <tr><td colspan="2"> 6.178 - <button type="submit" name="do" value="addgroup" data-icon="add">$(_ 'Create group')</button> 6.179 - </td></tr> 6.180 - </table> 6.181 + <footer>$(_ 'Group name:') <input type="text" name="group"/> 6.182 + <button type="submit" name="do" value="addgroup" data-icon="add">$(_ 'Create group')</button> 6.183 + </footer> 6.184 </form> 6.185 </section> 6.186 6.187 6.188 <section> 6.189 <header>$(_ 'Manage group membership')</header> 6.190 - <form> 6.191 + <form class="wide"> 6.192 <input type="hidden" name="groups"/> 6.193 - <table> 6.194 - <tr> 6.195 - <td>$(_ 'Group name:')</td> 6.196 - <td><select name="group">$(listdb group)</select></td> 6.197 - <td>$(_ 'User name:')</td> 6.198 - <td><select name="member">$(listdb passwd)</select></td> 6.199 - </tr> 6.200 - <tr> 6.201 - <td colspan="2"> 6.202 - <button name="do" value="addmember" data-icon="add">$(_ 'Add user')</button> 6.203 - </td> 6.204 - <td colspan="2"> 6.205 - <button name="do" value="delmember" data-icon="delete">$(_ 'Remove user')</button> 6.206 - </td> 6.207 - </tr> 6.208 - </table> 6.209 + <div> 6.210 + $(_ 'Group name:') <select name="group">$(listdb group)</select> 6.211 + $(_ 'User name:') <select name="member">$(listdb passwd)</select> 6.212 + </div> 6.213 + <footer> 6.214 + <button name="do" value="addmember" data-icon="add">$(_ 'Add user')</button> 6.215 + <button name="do" value="delmember" data-icon="delete">$(_ 'Remove user')</button> 6.216 + </footer> 6.217 </form> 6.218 </section> 6.219 6.220 @@ -303,18 +305,20 @@ 6.221 <tr> 6.222 <td>$(_ 'Login')</td> 6.223 <td>$(_ 'User ID')</td> 6.224 - <td>$(_ 'Name')</td> 6.225 + <td>$(_ 'User Name')</td> 6.226 <td>$(_ 'Home')</td> 6.227 <td>$(_ 'Shell')</td> 6.228 </tr> 6.229 </thead> 6.230 </tbody> 6.231 EOT 6.232 - for login in $(getdb passwd | cut -d ":" -f 1); do 6.233 - if [ -d /home/$login ]; then 6.234 - colorlogin=$login 6.235 - grep -qs "^$login:!" /etc/shadow && 6.236 - colorlogin="<span style='color: red;'>$login</span>" 6.237 + for login in $(getdb passwd | cut -d: -f1); do 6.238 + if [ -d "/home/$login" ]; then 6.239 + blocked=''; usericon='user' 6.240 + if grep -qs "^$login:!" /etc/shadow; then 6.241 + blocked='class="color31"' 6.242 + usericon="lock" 6.243 + fi 6.244 IFS=':' 6.245 set -- $(getdb passwd | grep "^$login:") 6.246 unset IFS 6.247 @@ -322,7 +326,7 @@ 6.248 <tr> 6.249 <td style="white-space: nowrap"> 6.250 <input type="checkbox" name="user" value="$login" id="$login"/> 6.251 - <label for="$login" data-icon="user">$colorlogin</label></td> 6.252 + <label for="$login" data-icon="$usericon" $blocked>$login</label></td> 6.253 <td>$3:$4</td> 6.254 <td>$(echo $5 | sed s/,.*//)</td> 6.255 <td>$6</td> 6.256 @@ -337,11 +341,9 @@ 6.257 EOT 6.258 cat <<EOT 6.259 <footer> 6.260 - <div> 6.261 - $(_ 'Password:') 6.262 - <input type="password" name="password"/> 6.263 - <button type="submit" name="do" value="chpasswd" data-icon="ok">$(_ 'Change password')</button> 6.264 - </div> 6.265 + $(_ 'Password:') 6.266 + <input type="password" name="password"/> 6.267 + <button type="submit" name="do" value="chpasswd" data-icon="ok">$(_ 'Change password')</button> 6.268 </footer> 6.269 </form> 6.270 </section> 6.271 @@ -368,7 +370,7 @@ 6.272 </section> 6.273 EOT 6.274 6.275 - # `who` output is empty in the Live mode 6.276 + # `who` output is empty in the SLiM sessions 6.277 if [ -n "$(who)" ]; then 6.278 cat <<EOT 6.279 <section> 6.280 @@ -396,10 +398,12 @@ 6.281 # 6.282 check_root_tazpanel 6.283 6.284 - LOADING_MSG="$(_ 'Please wait...')"; loading_msg 6.285 + loading_msg "$(_ 'Please wait...')" 6.286 6.287 cur_loc=$(locale | grep LANG | cut -d= -f2) 6.288 cat <<EOT 6.289 + 6.290 + 6.291 <h2 id="locale">$(_ 'Choose locale')</h2> 6.292 6.293 <section> 6.294 @@ -498,6 +502,7 @@ 6.295 <section> 6.296 <header>$(_ 'Small quick tweaks for user %s' "$user")</header> 6.297 6.298 + <div> 6.299 <fieldset><legend>$(_ 'Terminal prompt')</legend> 6.300 <table class="wide"> 6.301 <tr> 6.302 @@ -577,6 +582,7 @@ 6.303 '{ printf "<a data-icon=\"conf\" href=\"index.cgi?file=%s\">%s</a> ", $1, gensub(h, "~", "")}' 6.304 )")</p> 6.305 </fieldset> 6.306 + </div> 6.307 </section> 6.308 EOT 6.309 ;; 6.310 @@ -601,7 +607,7 @@ 6.311 <section> 6.312 <header>$(_ 'System time')</header> 6.313 <div> 6.314 - <form class="wide"> 6.315 + <form class="wide" id="sysTimeForm"> 6.316 <fieldset><legend>$(_ 'Time zone:')</legend> 6.317 <select name="tz"> 6.318 $(cd /usr/share/zoneinfo; find * -type f ! -name '*.tab' | sort | \ 6.319 @@ -617,11 +623,14 @@ 6.320 </fieldset> 6.321 6.322 <fieldset id="hwclock1"><legend>$(_ 'Hardware clock:')</legend> 6.323 - $(hwclock -ur | sed 's|0.000000 seconds||') 6.324 + <span id="hwclocks">$(hwclock -ur | sed 's|0.000000 seconds||')</span> 6.325 <button name="do" value="hwclock" id="hwclock" data-icon="clock">$(_ 'Set hardware clock')</button> 6.326 </fieldset> 6.327 6.328 <fieldset><legend>$(_ 'Set date')</legend> 6.329 +EOT 6.330 + if [ -z "$(which yad)" ]; then 6.331 + cat <<EOT 6.332 <input type="number" name="day" value="$(date +%d)" min="1" max="31" size="4" required/> 6.333 <select name="month" value="$(date +%m)"> 6.334 $(for i in $(seq 12); do 6.335 @@ -630,10 +639,30 @@ 6.336 done) 6.337 </select> 6.338 <input type="number" name="year" value="$(date +%Y)" min="2015" max="2030" size="6" required/> 6.339 +EOT 6.340 + else 6.341 + cat <<EOT 6.342 + <button onclick="datePicker(); return false"> 6.343 + <span id="dateTime" data-icon="calendar">$(date +%x)<span style="display:none">$(date +%F)</span></span> 6.344 + </button> 6.345 +EOT 6.346 + fi 6.347 + cat <<EOT 6.348 - <input type="number" name="hour" value="$(date +%H)" min="0" max="23" size="4" required/><!-- 6.349 -->:<input type="number" name="min" value="$(date +%M)" min="0" max="59" size="4" required/><!-- 6.350 -->:<input type="number" name="sec" value="00" min="0" max="59" size="4" required/> 6.351 +EOT 6.352 + if [ -z "$(which yad)" ]; then 6.353 + cat <<EOT 6.354 <button name="do" value="date" data-icon="ok">$(_ 'Set date')</button> 6.355 +EOT 6.356 + else 6.357 + cat <<EOT 6.358 + 6.359 + <button data-icon="ok" onclick="submitSysTimeForm()">$(_ 'Set date')</button> 6.360 +EOT 6.361 + fi 6.362 + cat <<EOT 6.363 </fieldset> 6.364 </form> 6.365 </div> 6.366 @@ -643,9 +672,34 @@ 6.367 Date.prototype.timeNow = function() { 6.368 return ((this.getHours() < 10)?"0":"") + this.getHours() + ":" + ((this.getMinutes() < 10)?"0":"") + this.getMinutes() + ":" + ((this.getSeconds() < 10)?"0":"") + this.getSeconds(); 6.369 } 6.370 -setInterval(function(){document.getElementById('time').innerText = new Date().timeNow()}, 1000); 6.371 +setInterval(function(){ 6.372 + document.getElementById('time').innerText = new Date().timeNow(); 6.373 + ajax('settings.cgi?do=gethwclock', '1', 'hwclocks'); 6.374 +}, 1000); 6.375 6.376 -//document.getElementById('hwclock').disabled = 'disabled'; 6.377 + 6.378 +// Run date picker and return value to the 'dateTime' element 6.379 +function datePicker() { 6.380 + ajax('settings.cgi?do=calendar', '1', 'dateTime'); 6.381 +} 6.382 + 6.383 +// Actions to do before form submit and submit 6.384 +function submitSysTimeForm() { 6.385 + sysTimeForm = document.getElementById('sysTimeForm'); 6.386 + 6.387 + var dateFull = document.createElement('INPUT'); 6.388 + dateFull.name = 'dateFull'; 6.389 + dateFull.value = document.getElementById('dateTime').childNodes[1].innerText; 6.390 + dateFull.type = 'hidden'; 6.391 + sysTimeForm.appendChild(dateFull); 6.392 + 6.393 + var submitDo = document.createElement('INPUT'); 6.394 + submitDo.name = 'do'; submitDo.value = 'date'; 6.395 + submitDo.type = 'hidden'; 6.396 + sysTimeForm.appendChild(submitDo); 6.397 + 6.398 + sysTimeForm.submit(); 6.399 +} 6.400 </script> 6.401 </section> 6.402 EOT
7.1 --- a/styles/default/base.css Fri May 15 09:25:00 2015 +0200 7.2 +++ b/styles/default/base.css Mon May 18 17:13:57 2015 +0300 7.3 @@ -30,7 +30,6 @@ 7.4 } 7.5 7.6 7.7 - 7.8 /** 7.9 * Toolbar with menu 7.10 */ 7.11 @@ -368,10 +367,21 @@ 7.12 body > footer { 7.13 border-top: 1px solid; 7.14 text-align: center; 7.15 - height: 1rem; 7.16 - font-size: smaller; 7.17 + height: 19px; margin: 0; padding: 0; 7.18 + line-height: 16px; vertical-align: middle; 7.19 + z-index: 10; 7.20 } 7.21 +#defaultStatus, #statusBar { font-size: smaller; } 7.22 7.23 +#content { z-index: 5; } 7.24 + 7.25 +#ajaxStatus { 7.26 + position: absolute; right: 0; 7.27 + display: inline-block; 7.28 + line-height: 16px; vertical-align: middle; 7.29 + padding: 0; margin: 0; 7.30 + height: 16px; 7.31 +} 7.32 7.33 /*************** 7.34 * HTML5 Meter * 7.35 @@ -539,7 +549,7 @@ 7.36 7.37 [data-icon="tazpanel"]::before { 7.38 display: inline-block; 7.39 - content: '\f13d'; 7.40 + content: '\f151'; 7.41 color: #EBEBEB; 7.42 border: 1pt solid hsl(5, 85%, 35%); border-radius: 0.2rem; 7.43 font-size: 32px; line-height: 32px; 7.44 @@ -750,7 +760,7 @@ 7.45 body > header { position: absolute; top: 0; } 7.46 body > footer { position: absolute; bottom: 0; left: 0; right: 0; } 7.47 #content, #content-sidebar { 7.48 - position: absolute; top: 63px; bottom: 1rem; left: 0; right: 0; 7.49 + position: absolute; top: 63px; bottom: 20px; left: 0; right: 0; 7.50 overflow-y: auto; overflow-x: hidden; 7.51 } 7.52
8.1 --- a/styles/default/footer.html Fri May 15 09:25:00 2015 +0200 8.2 +++ b/styles/default/footer.html Mon May 18 17:13:57 2015 +0300 8.3 @@ -3,16 +3,9 @@ 8.4 <!-- End of content--> 8.5 </div> 8.6 8.7 -</td></tr></table> 8.8 - 8.9 -<footer> 8.10 - $(gettext 'Copyright') © $(date +%Y) 8.11 - <a href="http://www.slitaz.org/" target="_blank">SliTaz GNU/Linux</a> 8.12 - - <a href="index.cgi?file=/usr/share/licenses/bsd.txt">$(gettext 'BSD License')</a> 8.13 -</footer> 8.14 - 8.15 <script type="text/javascript"> 8.16 window.onbeforeunload = null; 8.17 + statusbar(''); 8.18 dupTableHead(); 8.19 </script> 8.20 </body>
9.1 --- a/styles/default/header.html Fri May 15 09:25:00 2015 +0200 9.2 +++ b/styles/default/header.html Mon May 18 17:13:57 2015 +0300 9.3 @@ -4,10 +4,10 @@ 9.4 extra_menu() { 9.5 local x 9.6 case "$1" in 9.7 - */*) filter="s/data-icon=\\\"[^\\\"]*\\\"/data-icon=\\\"\\\"/" ;; 9.8 - *) filter= ;; 9.9 + */*) filter="s/data-icon=\\\"[^\\\"]*\\\"/data-icon=\\\"\\\"/" ;; 9.10 + *) filter='' ;; 9.11 esac 9.12 - for x in menu.d/$1/* ; do 9.13 + for x in menu.d/$1/*; do 9.14 [ -f $x ] && sh $x menu $x | sed "$filter" 9.15 [ -d $x ] || continue 9.16 icon="$(sed '/data-icon/!d;s/.*data-icon="\([^"]*\).*/\1/;q' $x/*)" 9.17 @@ -17,7 +17,7 @@ 9.18 done 9.19 } 9.20 9.21 -cat << EOT 9.22 +cat <<EOT 9.23 <!DOCTYPE html> 9.24 <html lang="${LANG%%_*}"> 9.25 <head> 9.26 @@ -62,10 +62,12 @@ 9.27 <menu> 9.28 <li><a data-icon="info" href="boot.cgi">$(_ 'Summary')</a></li> 9.29 EOT 9.30 - [ -w /boot/grub/menu.lst ] && cat <<EOT 9.31 + 9.32 +[ -w /boot/grub/menu.lst ] && cat <<EOT 9.33 <li><a data-icon="grub" href="boot.cgi?grub">$(_ 'Boot loader')</a></li> 9.34 EOT 9.35 -cat << EOT 9.36 + 9.37 +cat <<EOT 9.38 <li><a data-icon="logs" href="boot.cgi?log">$(_ 'Boot logs')</a> 9.39 <menu> 9.40 <li><a data-icon="" href="boot.cgi?log=kernel">$(_ 'Kernel messages')</a></li> 9.41 @@ -102,7 +104,8 @@ 9.42 </menu> 9.43 </li> 9.44 EOT 9.45 -cat << EOT 9.46 + 9.47 +cat <<EOT 9.48 $(for i in menu.d/* ; do [ -f $i ] && sh $i menu $i ; done) 9.49 </menu> 9.50 <span id="icons"> 9.51 @@ -116,15 +119,26 @@ 9.52 toggle_url="http://$RANDOM:*@$HTTP_HOST/user/";; 9.53 esac 9.54 9.55 - cat <<EOT 9.56 +cat <<EOT 9.57 <a data-img="$icon" title="$(_ 'You are logged in to the TazPanel as user %s.' $username) 9.58 $warn$(_ 'Click to re-login.')" href="$toggle_url$(basename $REQUEST_URI)"></a> 9.59 <a data-img="help" href="help.cgi"></a> 9.60 </span> 9.61 </nav> 9.62 + 9.63 <div id="noMenu"></div> 9.64 <script type="text/javascript">addMenuHandlers();</script> 9.65 9.66 +<footer> 9.67 + <span id="defaultStatus"> 9.68 + $(gettext 'Copyright') © $(date +%Y) 9.69 + <a href="http://www.slitaz.org/" target="_blank">SliTaz GNU/Linux</a> 9.70 + - <a href="index.cgi?file=/usr/share/licenses/bsd.txt">$(gettext 'BSD License')</a> 9.71 + </span> 9.72 + <span id="statusBar"></span> 9.73 + <span id="ajaxStatus"></span> 9.74 +</footer> 9.75 + 9.76 <!-- Page content --> 9.77 <div id="content"> 9.78 EOT
10.1 Binary file styles/default/tazpanel.ttf has changed
11.1 --- a/styles/default/tweaks.css Fri May 15 09:25:00 2015 +0200 11.2 +++ b/styles/default/tweaks.css Mon May 18 17:13:57 2015 +0300 11.3 @@ -169,14 +169,14 @@ 11.4 * Page footer * 11.5 ***************/ 11.6 11.7 -.light > footer { border-color: #C1C1C1; background-color: #EBEBEB; color: #888; } 11.8 -.dark > footer { border-color: #313131; background-color: #3C3C3C; color: #666; } 11.9 +.light > footer { border-color: #C1C1C1; background-color: #EBEBEB; color: #444; } 11.10 +.dark > footer { border-color: #313131; background-color: #3C3C3C; color: #CCC; } 11.11 11.12 -.light > footer a { color: #666; } 11.13 -.light > footer a:hover { color: #888; } 11.14 +.light > footer a { color: #555; } 11.15 +.light > footer a:hover { color: #666; } 11.16 11.17 -.dark > footer a { color: #bbb; } 11.18 -.dark > footer a:hover { color: #555; } 11.19 +.dark > footer a { color: #BBB; } 11.20 +.dark > footer a:hover { color: #AAA; } 11.21 11.22 11.23