tazpanel diff lib/libtazpanel @ rev 501

*.cgi: Implement TazPanel title and sub-title; hardware.cgi: fix and improve modules search; index.cgi: complex code using awk was prevented 'make pot' to collect all messages, fix terminal history removing; tazpanel.js: disable buttons when no packages selected (pkgs.cgi: up / search / category lists); network.cgi: complex comment was prevented 'make pot' to collect all messages; powersaving.cgi: starting development; *.po: rebuild; tazpanel.ttf: add messages icons, so remove all the style/png images and change libtazpanel; *.css: title and sub-title, messages icons; test.cgi: add new icons.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Jun 08 04:32:19 2015 +0300 (2015-06-08)
parents f8ff472846c2
children 0e464ccf165e
line diff
     1.1 --- a/lib/libtazpanel	Sat Jun 06 12:38:24 2015 +0200
     1.2 +++ b/lib/libtazpanel	Mon Jun 08 04:32:19 2015 +0300
     1.3 @@ -248,12 +248,11 @@
     1.4  
     1.5  
     1.6  xhtml_header() {
     1.7 +	SUBTITLE="$1"
     1.8  	. ${PANEL}$HEADER
     1.9 -	if [ $DEBUG == "1" ]; then
    1.10 -		local i
    1.11 -		local j
    1.12 -		local x
    1.13 -		args=""
    1.14 +	if [ "$DEBUG" -eq 1 ]; then
    1.15 +		local i j x
    1.16 +		args=''
    1.17  		for x in GET POST COOKIE; do
    1.18  			for i in $($x); do
    1.19  				if [ $($x $i count) -gt 1 ]; then
    1.20 @@ -284,14 +283,8 @@
    1.21  }
    1.22  
    1.23  
    1.24 -table_start() {
    1.25 -	echo '<table>'
    1.26 -}
    1.27 -
    1.28 -
    1.29 -table_end() {
    1.30 -	echo '</table>'
    1.31 -}
    1.32 +table_start() { echo '<table>';  }
    1.33 +table_end()   { echo '</table>'; }
    1.34  
    1.35  
    1.36  df_thead() {
    1.37 @@ -315,16 +308,14 @@
    1.38  msg() {
    1.39  	msgtype="$1"; shift
    1.40  	case "$msgtype" in
    1.41 -		tip)			MSG_ICON="$IMAGES/msg-tip.png" ;;
    1.42 -		warn|warning)	MSG_ICON="$IMAGES/msg-warn.png" ;;
    1.43 -		err|error)		MSG_ICON="$IMAGES/msg-err.png" ;;
    1.44 -		up)				MSG_ICON="$IMAGES/msg-up.png" ;;
    1.45 -		*)				MSG_ICON="$IMAGES/msg.png" ;;
    1.46 +		tip)			MSG_ICON='msgtip';;
    1.47 +		warn|warning)	MSG_ICON='msgwarn';;
    1.48 +		err|error)		MSG_ICON='msgerr';;
    1.49 +		up)				MSG_ICON='msgup';;
    1.50 +		*)				MSG_ICON='msg';;
    1.51  	esac
    1.52  	cat <<EOT
    1.53 -	<section class="box"><img src="$MSG_ICON" alt="$msgtype"/>
    1.54 -		$@
    1.55 -	</section>
    1.56 +	<section class="box"><span data-icon="$MSG_ICON"></span>$@</section>
    1.57  EOT
    1.58  }
    1.59