# HG changeset patch # User Aleksej Bobylev # Date 1431958437 -10800 # Node ID 470ab4241de55a242e9407b271f4ac2468545e6a # Parent 5f5f6496a1151228e3ade511df631d8dd6317cee Use bottom panel as status bar; settings: data picker, lock icon for locked users; font: add 'calendar', 'modem', and 'vpn' icons; etc... diff -r 5f5f6496a115 -r 470ab4241de5 Makefile --- a/Makefile Fri May 15 09:25:00 2015 +0200 +++ b/Makefile Mon May 18 17:13:57 2015 +0300 @@ -46,7 +46,6 @@ cp -a tazpanel $(DESTDIR)$(PREFIX)/bin -[ "$(VERSION)" ] && sed -i 's/^VERSION=[0-9].*/VERSION=$(VERSION)/' $(DESTDIR)$(PREFIX)/bin/tazpanel cp -a *.cgi lib/ styles/ doc/ README* $(DESTDIR)$(PANEL) - rm -f $(DESTDIR)$(PANEL)/test.cgi if [ -e $(DESTDIR)$(PANEL)/user ] ; then rm -rf $(DESTDIR)$(PANEL)/user; fi ln -s . $(DESTDIR)$(PANEL)/user cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale diff -r 5f5f6496a115 -r 470ab4241de5 lib/libtazpanel --- a/lib/libtazpanel Fri May 15 09:25:00 2015 +0200 +++ b/lib/libtazpanel Mon May 18 17:13:57 2015 +0300 @@ -202,8 +202,7 @@ # Get the list of panel styles list_styles() { - for style in $PANEL/styles/* - do + for style in $PANEL/styles/*; do style=$(basename $style) echo "" done @@ -239,8 +238,9 @@ loading_msg() { local MSG=${1:-$LOADING_MSG} + [ -z "$MSG" ] && MSG="$(_ 'Please wait')" cat <$MSG + EOT } diff -r 5f5f6496a115 -r 470ab4241de5 lib/tazpanel.js --- a/lib/tazpanel.js Fri May 15 09:25:00 2015 +0200 +++ b/lib/tazpanel.js Mon May 18 17:13:57 2015 +0300 @@ -351,7 +351,12 @@ if (req.readyState == XMLHttpRequest.DONE) { // if request done - statusElem.innerHTML = req.statusText // show status (Not Found, ОК..) + if (req.statusText == 'OK') { + statusElem.innerHTML = "" + } else { + statusElem.innerHTML = "" + + req.statusText + "" // show status (Not Found, ...) + } // if status 200 (ОК) - show answer to user if (req.status == 200) @@ -367,7 +372,7 @@ req.send(command); // send request // (5) - statusElem.innerHTML = '' + statusElem.innerHTML = '' } @@ -514,3 +519,27 @@ evt.preventDefault(); } } + + +// +// Show info in the status bar +// + +function statusbar(status, ticker) { + var ds = document.getElementById('defaultStatus'); + var sb = document.getElementById('statusBar'); + var as = document.getElementById('ajaxStatus'); + + if (status == '') { + // show default status (SliTaz copyright and license) + sb.style.display = 'none'; ds.style.display = ''; as.innerHTML = ''; + } else { + // show requested status (rich HTML supported) + ds.style.display = 'none'; sb.innerHTML = status; sb.style.display = ''; + // show optional ticker + if (ticker != '') { + as.innerHTML = ''; + } + } +} + diff -r 5f5f6496a115 -r 470ab4241de5 locale.cgi --- a/locale.cgi Fri May 15 09:25:00 2015 +0200 +++ b/locale.cgi Mon May 18 17:13:57 2015 +0300 @@ -164,7 +164,7 @@ iso*|translit*) ;; *) #echo -e "$LOC:\t$(parse_date $LOC $(get_locale_info_date_time $LOC c | sed 's|&|\\\&|g'))";; - FMT="$(get_locale_info_date_time $LOC c)" + FMT="$(get_locale_info_date_time $LOC x)" echo "$LOC$FMT" parse_date $LOC "$FMT" echo "" diff -r 5f5f6496a115 -r 470ab4241de5 network.cgi --- a/network.cgi Fri May 15 09:25:00 2015 +0200 +++ b/network.cgi Mon May 18 17:13:57 2015 +0300 @@ -206,7 +206,7 @@ # Scan open ports scan=$(GET scan); back=$(GET back) xhtml_header - LOADING_MSG=$(_ 'Scanning open ports...'); loading_msg + loading_msg "$(_ 'Scanning open ports...')" cat < @@ -463,7 +463,7 @@ if [ -n "$start_disabled" ]; then cat < -
$(_ 'Scanning wireless interface...')
+
$(_ 'Scanning wireless interface...')
EOT diff -r 5f5f6496a115 -r 470ab4241de5 styles/default/base.css --- a/styles/default/base.css Fri May 15 09:25:00 2015 +0200 +++ b/styles/default/base.css Mon May 18 17:13:57 2015 +0300 @@ -30,7 +30,6 @@ } - /** * Toolbar with menu */ @@ -368,10 +367,21 @@ body > footer { border-top: 1px solid; text-align: center; - height: 1rem; - font-size: smaller; + height: 19px; margin: 0; padding: 0; + line-height: 16px; vertical-align: middle; + z-index: 10; } +#defaultStatus, #statusBar { font-size: smaller; } +#content { z-index: 5; } + +#ajaxStatus { + position: absolute; right: 0; + display: inline-block; + line-height: 16px; vertical-align: middle; + padding: 0; margin: 0; + height: 16px; +} /*************** * HTML5 Meter * @@ -539,7 +549,7 @@ [data-icon="tazpanel"]::before { display: inline-block; - content: '\f13d'; + content: '\f151'; color: #EBEBEB; border: 1pt solid hsl(5, 85%, 35%); border-radius: 0.2rem; font-size: 32px; line-height: 32px; @@ -750,7 +760,7 @@ body > header { position: absolute; top: 0; } body > footer { position: absolute; bottom: 0; left: 0; right: 0; } #content, #content-sidebar { - position: absolute; top: 63px; bottom: 1rem; left: 0; right: 0; + position: absolute; top: 63px; bottom: 20px; left: 0; right: 0; overflow-y: auto; overflow-x: hidden; } diff -r 5f5f6496a115 -r 470ab4241de5 styles/default/footer.html --- a/styles/default/footer.html Fri May 15 09:25:00 2015 +0200 +++ b/styles/default/footer.html Mon May 18 17:13:57 2015 +0300 @@ -3,16 +3,9 @@ - - - - diff -r 5f5f6496a115 -r 470ab4241de5 styles/default/header.html --- a/styles/default/header.html Fri May 15 09:25:00 2015 +0200 +++ b/styles/default/header.html Mon May 18 17:13:57 2015 +0300 @@ -4,10 +4,10 @@ extra_menu() { local x case "$1" in - */*) filter="s/data-icon=\\\"[^\\\"]*\\\"/data-icon=\\\"\\\"/" ;; - *) filter= ;; + */*) filter="s/data-icon=\\\"[^\\\"]*\\\"/data-icon=\\\"\\\"/" ;; + *) filter='' ;; esac - for x in menu.d/$1/* ; do + for x in menu.d/$1/*; do [ -f $x ] && sh $x menu $x | sed "$filter" [ -d $x ] || continue icon="$(sed '/data-icon/!d;s/.*data-icon="\([^"]*\).*/\1/;q' $x/*)" @@ -17,7 +17,7 @@ done } -cat << EOT +cat < @@ -62,10 +62,12 @@
  • $(_ 'Summary')
  • EOT - [ -w /boot/grub/menu.lst ] && cat <$(_ 'Boot loader') EOT -cat << EOT + +cat <$(_ 'Boot logs')
  • $(_ 'Kernel messages')
  • @@ -102,7 +104,8 @@
    EOT -cat << EOT + +cat < @@ -116,15 +119,26 @@ toggle_url="http://$RANDOM:*@$HTTP_HOST/user/";; esac - cat < +
    + +
    EOT diff -r 5f5f6496a115 -r 470ab4241de5 styles/default/tazpanel.ttf Binary file styles/default/tazpanel.ttf has changed diff -r 5f5f6496a115 -r 470ab4241de5 styles/default/tweaks.css --- a/styles/default/tweaks.css Fri May 15 09:25:00 2015 +0200 +++ b/styles/default/tweaks.css Mon May 18 17:13:57 2015 +0300 @@ -169,14 +169,14 @@ * Page footer * ***************/ -.light > footer { border-color: #C1C1C1; background-color: #EBEBEB; color: #888; } -.dark > footer { border-color: #313131; background-color: #3C3C3C; color: #666; } +.light > footer { border-color: #C1C1C1; background-color: #EBEBEB; color: #444; } +.dark > footer { border-color: #313131; background-color: #3C3C3C; color: #CCC; } -.light > footer a { color: #666; } -.light > footer a:hover { color: #888; } +.light > footer a { color: #555; } +.light > footer a:hover { color: #666; } -.dark > footer a { color: #bbb; } -.dark > footer a:hover { color: #555; } +.dark > footer a { color: #BBB; } +.dark > footer a:hover { color: #AAA; }