tazpanel rev 556

Add 'floppy' and 'folder' icons
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Dec 07 02:36:31 2015 +0200 (2015-12-07)
parents d0b7025e3e8c
children a01cde2b84e4
files Makefile floppy.cgi index.cgi lib/libtazpanel stripall.sh styles/default/tazpanel.ttf test.cgi
line diff
     1.1 --- a/Makefile	Wed Nov 25 10:29:26 2015 +0100
     1.2 +++ b/Makefile	Mon Dec 07 02:36:31 2015 +0200
     1.3 @@ -6,7 +6,7 @@
     1.4  LINGUAS?=el es fr pl pt_BR ru sv
     1.5  PANEL?=/var/www/tazpanel
     1.6  BASECGI?=boot.cgi hardware.cgi help.cgi index.cgi network.cgi hosts.cgi settings.cgi
     1.7 -EXTRACGI?=floppy.cgi powersaving.cgi
     1.8 +EXTRACGI?=floppy.cgi test.cgi
     1.9  
    1.10  VERSION:=$(shell grep ^VERSION tazpanel | cut -d= -f2)
    1.11  
    1.12 @@ -93,8 +93,8 @@
    1.13  		cp -a build/$$c $(DESTDIR)$(PANEL); \
    1.14  	done;
    1.15  	cp -a build/bootloader $(DESTDIR)/usr/bin
    1.16 -	ln -s ../../floppy.cgi $(DESTDIR)$(PANEL)/menu.d/boot/floppy
    1.17 -	ln -s ../../powersaving.cgi $(DESTDIR)$(PANEL)/menu.d/hardware/powersaving
    1.18 +	ln -sf ../../floppy.cgi $(DESTDIR)$(PANEL)/menu.d/boot/floppy
    1.19 +	ln -sf ../../powersaving.cgi $(DESTDIR)$(PANEL)/menu.d/hardware/powersaving
    1.20  
    1.21  # Clean source
    1.22  
     2.1 --- a/floppy.cgi	Wed Nov 25 10:29:26 2015 +0100
     2.2 +++ b/floppy.cgi	Mon Dec 07 02:36:31 2015 +0200
     2.3 @@ -17,7 +17,7 @@
     2.4  
     2.5  		#which bootloader > /dev/null &&
     2.6  		cat <<EOT
     2.7 -<li><a data-icon="slitaz" href="floppy.cgi">$(_ 'Boot floppy')</a></li>
     2.8 +<li><a data-icon="floppy" href="floppy.cgi">$(_ 'Boot floppy')</a></li>
     2.9  EOT
    2.10  		export TEXTDOMAIN=$TEXTDOMAIN_original
    2.11  		exit
     3.1 --- a/index.cgi	Wed Nov 25 10:29:26 2015 +0100
     3.2 +++ b/index.cgi	Mon Dec 07 02:36:31 2015 +0200
     3.3 @@ -73,11 +73,13 @@
     3.4  		case "$(GET do)" in
     3.5  
     3.6  		*-selection)		# display Yad file/dir picker (AJAX)
     3.7 -			title="$(_ 'Choose file')"
     3.8 -			extra=""
     3.9 -			[ "$(GET do)" == "dir-selection" ] &&
    3.10 -				title="$(_ 'Choose directory')" &&
    3.11 +			if [ "$(GET do)" == "dir-selection" ]; then
    3.12 +				title="$(_ 'Choose directory')"
    3.13  				extra="--directory"
    3.14 +			else
    3.15 +				title="$(_ 'Choose file')"
    3.16 +				extra=""
    3.17 +			fi
    3.18  			while read name arg ; do
    3.19  				case "$(GET do)" in
    3.20  					*$name*)
     4.1 --- a/lib/libtazpanel	Wed Nov 25 10:29:26 2015 +0100
     4.2 +++ b/lib/libtazpanel	Mon Dec 07 02:36:31 2015 +0200
     4.3 @@ -413,13 +413,15 @@
     4.4  file_chooser() {
     4.5  	cat <<EOT
     4.6  <span id="$1"><input type="text" name="$1" ${2:+value="$2" }/></span>
     4.7 -<button data-icon="${3:-conf}" onclick="ajax('index.cgi?do=file-selection&name=$1', '1', '$1'); return false"/>
     4.8 +<button data-icon="${3:-conf}" onclick="ajax('index.cgi?do=file-selection&amp;name=$1', '1', '$1'); return false">
     4.9 +$(_n 'Browse')</button>
    4.10  EOT
    4.11  }
    4.12  
    4.13  dir_chooser() {
    4.14  	cat <<EOT
    4.15  <span id="$1"><input type="text" name="$1" ${2:+value="$2" }/></span>
    4.16 -<button data-icon="${3:-slitaz}" onclick="ajax('index.cgi?do=dir-selection&name=$1', '1', '$1'); return false"/>
    4.17 +<button data-icon="${3:-folder}" onclick="ajax('index.cgi?do=dir-selection&amp;name=$1', '1', '$1'); return false">
    4.18 +$(_n 'Browse')</button>
    4.19  EOT
    4.20  }
     5.1 --- a/stripall.sh	Wed Nov 25 10:29:26 2015 +0100
     5.2 +++ b/stripall.sh	Mon Dec 07 02:36:31 2015 +0200
     5.3 @@ -42,7 +42,7 @@
     5.4  	pkgi			\n	pkgib			\n	toggle			\n	chlock	
     5.5  	calendar		\n	modem			\n	cpu				\n	display	
     5.6  	msg				\n	msgerr			\n	msgwarn			\n	msgup	
     5.7 -	msgtip			\n	vpn			" | \
     5.8 +	msgtip			\n	vpn				\n	floppy			\n	folder	" | \
     5.9  	while read icon symbol; do
    5.10  		echo -n "s|data-icon=\"$icon\"|data-icon=\"$symbol\"|g; " >> "$sed_script"
    5.11  		echo -n "s|data-img=\"$icon\"|data-img=\"$symbol\"|g; " >> "$sed_script"
     6.1 Binary file styles/default/tazpanel.ttf has changed
     7.1 --- a/test.cgi	Wed Nov 25 10:29:26 2015 +0100
     7.2 +++ b/test.cgi	Mon Dec 07 02:36:31 2015 +0200
     7.3 @@ -54,7 +54,8 @@
     7.4  --><button data-icon="toggle"     >Toggle     </button><button data-icon="chlock"  >ChLock  </button><!--
     7.5  --><button data-icon="calendar"   >Calendar   </button><button data-icon="modem"   >Modem   </button><!--
     7.6  --><button data-icon="vpn"        >VPN        </button><button data-icon="display" >Display </button><!--
     7.7 ---><button data-icon="cpu"        >CPU        </button>
     7.8 +--><button data-icon="cpu"        >CPU        </button><button data-icon="floppy"  >Floppy  </button><!--
     7.9 +--><button data-icon="folder"     >Folder     </button>
    7.10  </section>
    7.11  
    7.12  
    7.13 @@ -83,7 +84,7 @@
    7.14  <a data-icon="temperature">Temperature</a> <a data-icon="terminal"  >Terminal  </a> <a data-icon="text"     >Text     </a>
    7.15  <a data-icon="unlink"     >Unlink     </a> <a data-icon="unlock"    >Unlock    </a> <a data-icon="upgrade"  >Upgrade  </a>
    7.16  <a data-icon="user"       >User       </a> <a data-icon="view"      >View      </a> <a data-icon="web"      >Web      </a>
    7.17 -<a data-icon="wifi"       >Wi-Fi      </a>
    7.18 +<a data-icon="wifi"       >Wi-Fi      </a> <a data-icon="floppy"    >Floppy    </a> <a data-icon="folder"   >Folder   </a>
    7.19  </p>
    7.20  	</div>
    7.21  </section>
    7.22 @@ -96,7 +97,8 @@
    7.23  <a data-img="off"    href="#"></a>Off    <a data-img="on"   href="#"></a>On   <a data-img="opt"  href="#"></a>Opt
    7.24  <a data-img="remove" href="#"></a>Remove <a data-img="run"  href="#"></a>Run  <a data-img="stop" href="#"></a>Stop
    7.25  <a data-img="web"    href="#"></a>Web    <a data-img="slitaz" href="#"></a>SliTaz <a data-img="user" href="#"></a>User
    7.26 -</p>
    7.27 +<a data-img="floppy" href="#"></a>Floppy <a data-img="folder" href="#"></a>Folder
    7.28 +	</p>
    7.29  </section>
    7.30  
    7.31