tazpanel rev 558
Change icons presentation in code - free to use anywhere, simplify icons substitution, minify html, misc
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Dec 10 04:11:45 2015 +0200 (2015-12-10) |
parents | a01cde2b84e4 |
children | fce75c467b45 |
files | Makefile boot.cgi doc/tazpanel.en.html doc/tazpanel.fr.html doc/tazpanel.pt.html doc/tazpanel.ru.html floppy.cgi hardware.cgi hosts.cgi index.cgi lib/libtazpanel lib/tazpanel.js network.cgi powersaving.cgi settings.cgi stripall.sh styles/default/base.css styles/default/header.html styles/default/tweaks.css test.cgi |
line diff
1.1 --- a/Makefile Tue Dec 08 13:38:20 2015 +0200 1.2 +++ b/Makefile Thu Dec 10 04:11:45 2015 +0200 1.3 @@ -15,7 +15,7 @@ 1.4 cp -a *.cgi bootloader tazpanel \ 1.5 lib/libtazpanel lib/*.js \ 1.6 styles/default/*.html styles/default/*.css \ 1.7 - build 1.8 + doc/tazpanel.*.html build 1.9 ./stripall.sh 1.10 1.11 # i18n 1.12 @@ -54,12 +54,15 @@ 1.13 $(DESTDIR)$(PANEL)/menu.d \ 1.14 $(DESTDIR)/var/log \ 1.15 $(DESTDIR)$(PANEL)/lib \ 1.16 - $(DESTDIR)$(PANEL)/styles/default 1.17 + $(DESTDIR)$(PANEL)/styles/default \ 1.18 + $(DESTDIR)$(PANEL)/doc 1.19 1.20 cp -a build/tazpanel $(DESTDIR)$(PREFIX)/bin 1.21 -[ "$(VERSION)" ] && sed -i 's/^VERSION=[0-9].*/VERSION=$(VERSION)/' $(DESTDIR)$(PREFIX)/bin/tazpanel 1.22 1.23 - cp -a doc/ README README.html $(DESTDIR)$(PANEL) 1.24 + cp -a README README.html $(DESTDIR)$(PANEL) 1.25 + cp -a build/tazpanel.*.html $(DESTDIR)$(PANEL)/doc 1.26 + ln -sf tazpanel.en.html $(DESTDIR)$(PANEL)/doc/tazpanel.html 1.27 cp -a build/libtazpanel build/gz/*.js.gz $(DESTDIR)$(PANEL)/lib 1.28 cp -a build/gz/*.css.gz build/*.html styles/default/*.ico styles/default/*.ttf $(DESTDIR)$(PANEL)/styles/default 1.29
2.1 --- a/boot.cgi Tue Dec 08 13:38:20 2015 +0200 2.2 +++ b/boot.cgi Thu Dec 10 04:11:45 2015 +0200 2.3 @@ -24,7 +24,7 @@ 2.4 *) tail -n40;; 2.5 esac 2.6 [ $(wc -l < $1) -gt 40 ] && cat <<EOT 2.7 -<hr/><a data-icon="view" href="index.cgi?file=$1">$(_ 'Show more...')</a> 2.8 +<hr/><a data-icon="@view@" href="index.cgi?file=$1">$(_ 'Show more...')</a> 2.9 EOT 2.10 } 2.11 2.12 @@ -236,18 +236,18 @@ 2.13 case "$1" in 2.14 edit) 2.15 cat <<EOT 2.16 -<a href="index.cgi?file=${3:-/etc/$name.conf}&action=edit" title="${2:-$name configuration} in ${3:-/etc/$name.conf}" data-img="conf"></a> 2.17 +<a href="index.cgi?file=${3:-/etc/$name.conf}&action=edit" title="${2:-$name configuration} in ${3:-/etc/$name.conf}" data-img="@conf@"></a> 2.18 EOT 2.19 ;; 2.20 options) 2.21 key=$(echo -n $name | tr [a-z] [A-Z])_OPTIONS 2.22 cat <<EOT 2.23 -<a href="index.cgi?file=/etc/daemons.conf&action=setvar&var=$key&default=$3" title="${2:-$key}" data-img="opt"></a> 2.24 +<a href="index.cgi?file=/etc/daemons.conf&action=setvar&var=$key&default=$3" title="${2:-$key}" data-img="@opt@"></a> 2.25 EOT 2.26 ;; 2.27 man) 2.28 cat <<EOT 2.29 -<a href="index.cgi?exec=man ${3:-$name}&back=boot.cgi%3Fdaemons" title="${2:-$name Manual}" data-img="man"></a> 2.30 +<a href="index.cgi?exec=man ${3:-$name}&back=boot.cgi%3Fdaemons" title="${2:-$name Manual}" data-img="@man@"></a> 2.31 EOT 2.32 ;; 2.33 help) 2.34 @@ -256,11 +256,11 @@ 2.35 cupsd|dropbear|gpm|slim|wpa_supplicant) help='-h' 2.36 esac 2.37 cat <<EOT 2.38 -<a href="index.cgi?exec=$(which ${3:-$name}) $help&back=boot.cgi%3Fdaemons" title="${2:-$name Help}" data-img="help"></a> 2.39 +<a href="index.cgi?exec=$(which ${3:-$name}) $help&back=boot.cgi%3Fdaemons" title="${2:-$name Help}" data-img="@help@"></a> 2.40 EOT 2.41 ;; 2.42 web) cat <<EOT 2.43 -<a href="${i#$1:$2:}" title="${2:-$name website:} ${i#$1:$2:}" target="_blank" data-img="web"></a> 2.44 +<a href="${i#$1:$2:}" title="${2:-$name website:} ${i#$1:$2:}" target="_blank" data-img="@web@"></a> 2.45 EOT 2.46 ;; 2.47 esac 2.48 @@ -269,8 +269,8 @@ 2.49 echo "</td>" 2.50 if [ "$pid" ]; then 2.51 cat <<EOT 2.52 -<td><span title="$(_ 'Started')" data-img="on"></span></td> 2.53 -<td><a href="?daemons=stop=$name" title="$(_ 'Stop')" data-img="stop"></a></td> 2.54 +<td><span title="$(_ 'Started')" data-img="@on@"></span></td> 2.55 +<td><a href="?daemons=stop=$name" title="$(_ 'Stop')" data-img="@stop@"></a></td> 2.56 <td> 2.57 EOT 2.58 for i in $pid; do 2.59 @@ -280,8 +280,8 @@ 2.60 done 2.61 else 2.62 cat <<EOT 2.63 -<td><span title="$(_ 'Stopped')" data-img="off"></span></td> 2.64 -<td><a href="?daemons=start=$name" title="$(_ 'Start')" data-img="start"></a></td> 2.65 +<td><span title="$(_ 'Stopped')" data-img="@off@"></span></td> 2.66 +<td><a href="?daemons=start=$name" title="$(_ 'Start')" data-img="@start@"></a></td> 2.67 <td>----- 2.68 EOT 2.69 fi 2.70 @@ -324,14 +324,14 @@ 2.71 </table> 2.72 </div> 2.73 <footer> 2.74 - <button type="submit" data-icon="ok">$(_ 'Change')</button> 2.75 + <button type="submit" data-icon="@ok@">$(_ 'Change')</button> 2.76 </footer> 2.77 </section> 2.78 </form> 2.79 2.80 <form action="index.cgi"> 2.81 <input type="hidden" name="file" value="$GRUBMENU"/> 2.82 - <button data-icon="text">$(_ 'View or edit menu.lst')</button> 2.83 + <button data-icon="@text@">$(_ 'View or edit menu.lst')</button> 2.84 </form> 2.85 2.86 2.87 @@ -401,14 +401,14 @@ 2.88 <form method="post" action="?iso" class="wide"> 2.89 <table> 2.90 <tr><td>$(_ 'ISO image file full path') 2.91 - <span data-img="info" title="$(_ 'set /dev/cdrom for a physical CD-ROM')"></span> 2.92 + <span data-img="@info@" title="$(_ 'set /dev/cdrom for a physical CD-ROM')"></span> 2.93 </td> 2.94 <td>$(file_chooser "iso" "$iso")</td></tr> 2.95 <tr><td>$(_ 'Working directory')</td> 2.96 <td>$(dir_chooser "workdir" "$workdir")</td></tr> 2.97 </td></tr> 2.98 <tr><td>$(_ 'Target partition') 2.99 - <span data-img="info" title="$(_ 'For hard disk installation only. Will create /slitaz tree and keep other files. No partitioning and no formatting.')"></span> 2.100 + <span data-img="@info@" title="$(_ 'For hard disk installation only. Will create /slitaz tree and keep other files. No partitioning and no formatting.')"></span> 2.101 </td> 2.102 <td><select name="instdev"> 2.103 <option value="/dev/null">$(_ 'Choose a partition (optional)')</option> 2.104 @@ -423,7 +423,7 @@ 2.105 cat <<EOT 2.106 </select></td></tr> 2.107 <tr><td>$(_ 'USB key device') 2.108 - <span data-img="info" title="$(_ 'For USB boot key only. Will erase the full device.')"></span> 2.109 + <span data-img="@info@" title="$(_ 'For USB boot key only. Will erase the full device.')"></span> 2.110 </td> 2.111 <td><select name="usbkeydev"> 2.112 <option value="/dev/null">$(_ 'Choose a USB key (optional)')</option> 2.113 @@ -460,7 +460,7 @@ 2.114 fi 2.115 2.116 cat <<EOT 2.117 - <button data-icon="cd" name="mine">$(_ 'Mine')</button> 2.118 + <button data-icon="@cd@" name="mine">$(_ 'Mine')</button> 2.119 </footer> 2.120 </form> 2.121 </section> 2.122 @@ -478,15 +478,15 @@ 2.123 <p>$(_ 'Everything that happens before user login')</p> 2.124 2.125 <form> 2.126 - <button name="log" data-icon="logs" >$(_ 'Boot logs')</button> 2.127 - <button name="syslog" data-icon="logs" >$(_ 'System logs')</button> 2.128 - <button name="daemons" data-icon="daemons" data-root>$(_ 'Manage daemons')</button> 2.129 + <button name="log" data-icon="@logs@">$(_ 'Boot logs')</button> 2.130 + <button name="syslog" data-icon="@logs@">$(_ 'System logs')</button> 2.131 + <button name="daemons" data-icon="@daemons@" data-root>$(_ 'Manage daemons')</button> 2.132 EOT 2.133 [ "$REMOTE_USER" == "root" -a -x /usr/bin/taziso ] && cat <<EOT 2.134 - <button name="iso" data-icon="cd" >$(_ 'ISO mine')</button> 2.135 + <button name="iso" data-icon="@cd@">$(_ 'ISO mine')</button> 2.136 EOT 2.137 [ -w /boot/grub/menu.lst ] && cat <<EOT 2.138 - <button name="grub" data-icon="grub" >$(_ 'Boot loader')</button> 2.139 + <button name="grub" data-icon="@grub@">$(_ 'Boot loader')</button> 2.140 EOT 2.141 cat <<EOT 2.142 </form> 2.143 @@ -497,9 +497,9 @@ 2.144 <form action="index.cgi" class="wide"> 2.145 <table> 2.146 <tr><td>$(_ 'Main configuration file:') <b>rcS.conf</b></td> 2.147 - <td><button name="file" value="/etc/rcS.conf" data-icon="view">$(_ 'View')</button></td></tr> 2.148 + <td><button name="file" value="/etc/rcS.conf" data-icon="@view@">$(_ 'View')</button></td></tr> 2.149 <tr><td>$(_ 'Login manager settings:') <b>slim.conf</b></td> 2.150 - <td><button name="file" value="/etc/slim.conf" data-icon="view">$(_ 'View')</button></td></tr> 2.151 + <td><button name="file" value="/etc/slim.conf" data-icon="@view@">$(_ 'View')</button></td></tr> 2.152 </table> 2.153 </form> 2.154 </section>
3.1 --- a/doc/tazpanel.en.html Tue Dec 08 13:38:20 2015 +0200 3.2 +++ b/doc/tazpanel.en.html Thu Dec 10 04:11:45 2015 +0200 3.3 @@ -27,7 +27,7 @@ 3.4 you can change the server configuration file to allow connections from a 3.5 local network or the entire world wide web, but in this last case make sure 3.6 that you set a strong password for the panel. The server configuration file is 3.7 - <a data-icon="text" href="index.cgi?file=/etc/slitaz/httpd.conf">/etc/slitaz/httpd.conf</a>. 3.8 + <a data-icon="@text@" href="index.cgi?file=/etc/slitaz/httpd.conf">/etc/slitaz/httpd.conf</a>. 3.9 </p> 3.10 3.11 3.12 @@ -47,12 +47,12 @@ 3.13 <h3>Get Support</h3> 3.14 3.15 <p> 3.16 - You can get support on the SliTaz <a data-icon="web" href="http://forum.slitaz.org/" target="_blank">forum</a>, 3.17 - the <a data-icon="web" href="http://www.slitaz.org/en/mailing-list.php" 3.18 - target="_blank">mailing list</a> or the <a data-icon="web" href="http://irc.slitaz.org/" 3.19 + You can get support on the SliTaz <a data-icon="@web@" href="http://forum.slitaz.org/" target="_blank">forum</a>, 3.20 + the <a data-icon="@web@" href="http://www.slitaz.org/en/mailing-list.php" 3.21 + target="_blank">mailing list</a> or the <a data-icon="@web@" href="http://irc.slitaz.org/" 3.22 target="_blank">IRC channel</a>. The official SliTaz IRC channel is on 3.23 Freenode (note that you can use LostIRC, Xchat or Pidgin on SliTaz). Freenode also 3.24 - provides a nice IRC <a data-icon="web" href="http://webchat.freenode.net/" target="_blank">web interface</a>. 3.25 + provides a nice IRC <a data-icon="@web@" href="http://webchat.freenode.net/" target="_blank">web interface</a>. 3.26 </p> 3.27 3.28 3.29 @@ -62,7 +62,7 @@ 3.30 If you want to help and get involved in SliTaz, TazPanel maybe for you! 3.31 We need help in translating, styling, documenting and coding. If 3.32 you need more information or want to publish a new graphical style, 3.33 - you can go to the SliTaz <a data-icon="web" href="http://scn.slitaz.org/" target="_blank">Community</a> 3.34 + you can go to the SliTaz <a data-icon="@web@" href="http://scn.slitaz.org/" target="_blank">Community</a> 3.35 and post on the Devel forum or post an update with a PM to a SliTaz 3.36 contributor so that we can get in touch and include your work in TazPanel 3.37 or in an extra styles package. 3.38 @@ -74,9 +74,9 @@ 3.39 <p> 3.40 TazPanel is still a young application which will be improved and polished in 3.41 time. If you find a bug, please post on the SliTaz tracker: 3.42 - <a data-icon="web" href="http://bugs.slitaz.org/" target="_blank">bugs.slitaz.org</a>. Tazpanel has a 3.43 - debug mode that can be enabled in the configuration file <a data-icon="text" href="index.cgi?file=/etc/slitaz/tazpanel.conf">tazpanel.conf</a> 3.44 - and also provides a <a data-icon="info" href="index.cgi?debug">debug page</a>. 3.45 + <a data-icon="@web@" href="http://bugs.slitaz.org/" target="_blank">bugs.slitaz.org</a>. Tazpanel has a 3.46 + debug mode that can be enabled in the configuration file <a data-icon="@text@" href="index.cgi?file=/etc/slitaz/tazpanel.conf">tazpanel.conf</a> 3.47 + and also provides a <a data-icon="@info@" href="index.cgi?debug">debug page</a>. 3.48 </p> 3.49 3.50 </div>
4.1 --- a/doc/tazpanel.fr.html Tue Dec 08 13:38:20 2015 +0200 4.2 +++ b/doc/tazpanel.fr.html Thu Dec 10 04:11:45 2015 +0200 4.3 @@ -25,14 +25,14 @@ 4.4 <h3>Assistance</h3> 4.5 4.6 <p> 4.7 - Pour obtenir de l'aide sur SliTaz rendez-vous sur le <a data-icon="web" 4.8 + Pour obtenir de l'aide sur SliTaz rendez-vous sur le <a data-icon="@web@" 4.9 href="http://forum.slitaz.org/" target="_blank">forum</a>, la 4.10 - <a data-icon="web" href="http://www.slitaz.org/fr/mailing-list.php" 4.11 - target="_blank">liste de diffusion</a> ou le <a data-icon="web" 4.12 + <a data-icon="@web@" href="http://www.slitaz.org/fr/mailing-list.php" 4.13 + target="_blank">liste de diffusion</a> ou le <a data-icon="@web@" 4.14 href="http://irc.slitaz.org/" target="_blank">canal IRC</a>. 4.15 Le canal IRC SliTaz officiel est sur Freenode (vous pouvez utiliser 4.16 LostIRC, Xchat ou Pidgin avec SliTaz). Freenode fournit aussi une 4.17 - <a data-icon="web" href="http://webchat.freenode.net/" 4.18 + <a data-icon="@web@" href="http://webchat.freenode.net/" 4.19 target="_blank">interface Web IRC</a>. 4.20 </p> 4.21 4.22 @@ -44,7 +44,7 @@ 4.23 pour vous ! Nous avons besion d'aide pour la traduction, la mise en page, 4.24 la documentation et le codage. Si vous avez besion de plus d'information 4.25 ou vous voulez publier un nouveau style graphique, vous pouvez aller sur 4.26 - la <a data-icon="web" href="http://scn.slitaz.org/" target="_blank">Communauté</a> 4.27 + la <a data-icon="@web@" href="http://scn.slitaz.org/" target="_blank">Communauté</a> 4.28 SliTaz et poster sur le forum Devel ou poster une mise à jour avec le 4.29 gestionnaire de paquets à destination d'un contributeur SliTaz afin de 4.30 nous tenir au courant et inclure votre travail dans TazPanel ou dans un 4.31 @@ -57,7 +57,7 @@ 4.32 <p> 4.33 Tazpanel est une nouvelle application qui sera améliorée et paufinée avec le temps. 4.34 Si vous trouvez un bug, merci de le signaler sur le système de bugs de SliTaz: 4.35 - <a data-icon="web" href="http://bugs.slitaz.org/" target="_blank">bugs.slitaz.org</a> 4.36 + <a data-icon="@web@" href="http://bugs.slitaz.org/" target="_blank">bugs.slitaz.org</a> 4.37 </p> 4.38 4.39 </div>
5.1 --- a/doc/tazpanel.pt.html Tue Dec 08 13:38:20 2015 +0200 5.2 +++ b/doc/tazpanel.pt.html Thu Dec 10 04:11:45 2015 +0200 5.3 @@ -25,9 +25,9 @@ 5.4 <h3>Suporte</h3> 5.5 5.6 <p> 5.7 - Pode-se obter suporte no <a data-icon="web" href="http://forum.slitaz.org/" target="_blank">fórum</a>, 5.8 - na <a data-icon="web" href="http://www.slitaz.org/pt/mailing-list.php" 5.9 - target="_blank">lista de discussão</a>e no <a data-icon="web" 5.10 + Pode-se obter suporte no <a data-icon="@web@" href="http://forum.slitaz.org/" target="_blank">fórum</a>, 5.11 + na <a data-icon="@web@" href="http://www.slitaz.org/pt/mailing-list.php" 5.12 + target="_blank">lista de discussão</a>e no <a data-icon="@web@" 5.13 href="http://irc.slitaz.org/" target="_blank">canal IRC</a> da distribuição. 5.14 </p> 5.15 5.16 @@ -39,7 +39,7 @@ 5.17 participar do desenvolvimento desta ferramenta. Precisamos de ajuda na 5.18 tradução, documentação, código e criação de estilos. Para maiores 5.19 informaçõe ou enviar um novo estilo, por exemplo, pode-se criar uma conta 5.20 - na <a data-icon="web" href="http://scn.slitaz.org/" target="_blank">Comunidade do SliTaz</a> e postar 5.21 + na <a data-icon="@web@" href="http://scn.slitaz.org/" target="_blank">Comunidade do SliTaz</a> e postar 5.22 seu trabalho ou entrar em contato com um dos desenvolvedores da 5.23 distribuição. Desta forma, podemos incluir seu trabalho numa próxima 5.24 versão do programa. 5.25 @@ -51,7 +51,7 @@ 5.26 <p> 5.27 O TazPanel é um aplicativo ainda novo que será melhorado com o tempo. 5.28 Caso encontre um bug ou queira pedir alguma nova funcionalidade, por 5.29 - favor postar em <a data-icon="web" href="http://bugs.slitaz.org/" target="_blank">bugs.slitaz.org</a>. 5.30 + favor postar em <a data-icon="@web@" href="http://bugs.slitaz.org/" target="_blank">bugs.slitaz.org</a>. 5.31 </p> 5.32 5.33 </div>
6.1 --- a/doc/tazpanel.ru.html Tue Dec 08 13:38:20 2015 +0200 6.2 +++ b/doc/tazpanel.ru.html Thu Dec 10 04:11:45 2015 +0200 6.3 @@ -23,7 +23,7 @@ 6.4 конфигурации сервера, чтобы разрешить соединения из локальной сети, 6.5 или даже из всего интернета, но в последнем случае убедитесь, что вы 6.6 установили надёжный пароль для панели. Файл конфигурации сервера — 6.7 - <a data-icon="text" 6.8 + <a data-icon="@text@" 6.9 href="index.cgi?file=/etc/slitaz/httpd.conf">/etc/slitaz/httpd.conf</a>.</p> 6.10 6.11 6.12 @@ -42,12 +42,12 @@ 6.13 6.14 <h3>Поддержка</h3> 6.15 6.16 - <p>Вы можете получить поддержку на <a data-icon="web" 6.17 + <p>Вы можете получить поддержку на <a data-icon="@web@" 6.18 href="http://forum.slitaz.org/" target="_blank">форуме</a> SliTaz, в 6.19 рассылке или на канале IRC. Официальный IRC-канал SliTaz находится 6.20 на Freenode; вы можете использовать в SliTaz программы LostIRC, 6.21 Xchat или Pidgin. Freenode также поддерживает хороший <a 6.22 - data-icon="web" href="http://webchat.freenode.net/" 6.23 + data-icon="@web@" href="http://webchat.freenode.net/" 6.24 target="_blank">веб-интерфейс</a>.</p> 6.25 6.26 6.27 @@ -56,7 +56,7 @@ 6.28 <p>Если вы хотите помочь и присоединиться к SliTaz, вы можете 6.29 заняться TazPanel! Нам нужна помощь в переводе, дизайне, написании 6.30 документации и кода. Если вам нужна дополнительная информация, или 6.31 - вы хотите опубликовать новый дизайн, заходите в <a data-icon="web" 6.32 + вы хотите опубликовать новый дизайн, заходите в <a data-icon="@web@" 6.33 href="http://scn.slitaz.org/" target="_blank">сообщество</a>, а там 6.34 оставьте сообщение на форуме Devel, или личное сообщение одному из 6.35 разработчиков SliTaz, чтобы мы могли связаться с вами и включить 6.36 @@ -67,13 +67,13 @@ 6.37 6.38 <p>TazPanel — всё ещё молодое приложение, которое со временем будет 6.39 совершенствоваться и отшлифовываться. Если вы нашли ошибку, 6.40 - пожалуйста, сообщите на баг-трекер SliTaz: <a data-icon="web" 6.41 + пожалуйста, сообщите на баг-трекер SliTaz: <a data-icon="@web@" 6.42 href="http://bugs.slitaz.org/" target="_blank">bugs.slitaz.org</a>. 6.43 Tazpanel имеет режим отладки, который можно включить в файле 6.44 - конфигурации <a data-icon="text" 6.45 + конфигурации <a data-icon="@text@" 6.46 href="index.cgi?file=/etc/slitaz/tazpanel.conf">tazpanel.conf</a>; 6.47 - также имеется <a data-icon="info" href="index.cgi?debug">отладочная 6.48 - страница</a>.</p> 6.49 + также имеется <a data-icon="@info@" 6.50 + href="index.cgi?debug">отладочная страница</a>.</p> 6.51 6.52 </div> 6.53 </section>
7.1 --- a/floppy.cgi Tue Dec 08 13:38:20 2015 +0200 7.2 +++ b/floppy.cgi Thu Dec 10 04:11:45 2015 +0200 7.3 @@ -8,6 +8,7 @@ 7.4 # Common functions from libtazpanel 7.5 . lib/libtazpanel 7.6 get_config 7.7 +TITLE=$(_ 'Boot') 7.8 7.9 7.10 case "$1" in 7.11 @@ -17,7 +18,7 @@ 7.12 7.13 #which bootloader > /dev/null && 7.14 cat <<EOT 7.15 -<li><a data-icon="floppy" href="floppy.cgi">$(_ 'Boot floppy')</a></li> 7.16 +<li><a data-icon="@floppy@" href="floppy.cgi">$(_ 'Boot floppy')</a></li> 7.17 EOT 7.18 export TEXTDOMAIN=$TEXTDOMAIN_original 7.19 exit 7.20 @@ -89,259 +90,189 @@ 7.21 echo "</select>" 7.22 } 7.23 7.24 -TITLE="$(_ 'TazPanel - floppy')" 7.25 header 7.26 -xhtml_header 7.27 +xhtml_header "$(_ 'Floppy disk utilities')" 7.28 echo "$error" 7.29 7.30 cat <<EOT 7.31 -<form method="post" enctype="multipart/form-data"> 7.32 +<form method="post" enctype="multipart/form-data" class="wide"> 7.33 EOT 7.34 + 7.35 [ -w /dev/fd0 ] && cat <<EOT 7.36 <section> 7.37 <header> 7.38 $(_ 'Floppy disk format') 7.39 </header> 7.40 - <button type="submit" name="doformat" data-icon="start" >$(_ 'Format disk' )</button> 7.41 - $(listfd fd) filesystem: 7.42 - <select name "fstype"> 7.43 - <option>$(_ 'none')</option> 7.44 - $(ls /sbin/mkfs.* | sed '/dev/d;s|.*/mkfs.\(.*\)|<option>\1</option>|') 7.45 - </select> 7.46 + <div> 7.47 + <button type="submit" name="doformat" data-icon="@start@" >$(_ 'Format disk')</button> 7.48 + $(listfd fd) filesystem: 7.49 + <select name "fstype"> 7.50 + <option>$(_ 'none')</option> 7.51 + $(ls /sbin/mkfs.* | sed '/dev/d;s|.*/mkfs.\(.*\)|<option>\1</option>|') 7.52 + </select> 7.53 + </div> 7.54 </section> 7.55 7.56 <section> 7.57 <header> 7.58 $(_ 'Floppy disk transfer') 7.59 </header> 7.60 -<table> 7.61 - <tbody> 7.62 - <tr> 7.63 - <td> 7.64 - <button type="submit" name="write" data-icon="start" >$(_ 'Write image' )</button> 7.65 - $(listfd tofd) <<< <input name="fromimage" type="file"> 7.66 - </td> 7.67 - </tr> 7.68 - <tr> 7.69 - <td> 7.70 - <button type="submit" name="read" data-icon="start" >$(_ 'Read image' )</button> 7.71 - $(listfd fromfd) >>> <input name="toimage" type="text" value="/tmp/floppy.img"> 7.72 - <td> 7.73 - </tr> 7.74 - </tbody> 7.75 -</table> 7.76 + <table> 7.77 + <tr> 7.78 + <td> 7.79 + <button type="submit" name="write" data-icon="@start@" >$(_ 'Write image')</button> 7.80 + $(listfd tofd) <<< <input name="fromimage" type="file"> 7.81 + </td> 7.82 + </tr> 7.83 + <tr> 7.84 + <td> 7.85 + <button type="submit" name="read" data-icon="@start@" >$(_ 'Read image' )</button> 7.86 + $(listfd fromfd) >>> <input name="toimage" type="text" value="/tmp/floppy.img"> 7.87 + <td> 7.88 + </tr> 7.89 + </table> 7.90 </section> 7.91 EOT 7.92 + 7.93 + 7.94 case "$HOME" in 7.95 -/home/*) OUTPUTDIR=$HOME ;; 7.96 -*) OUTPUTDIR=/tmp ;; 7.97 + /home/*) OUTPUTDIR=$HOME ;; 7.98 + *) OUTPUTDIR=/tmp ;; 7.99 esac 7.100 + 7.101 cat <<EOT 7.102 <section> 7.103 <header> 7.104 $(_ 'Boot floppy set builder') 7.105 </header> 7.106 7.107 -<table> 7.108 - <tbody><tr> 7.109 - <td>$(_ 'Linux kernel:')</td> 7.110 - <td><input name="kernel" size="37" type="file"> <i>$(_ 'required')</i></td> 7.111 - </tr> 7.112 - <tr> 7.113 - <td>$(_ 'Initramfs / Initrd:')</td> 7.114 - <td><input name="initrd[]" size="37" type="file" multiple> <i>$(_ 'optional')</i></td> 7.115 - </tr> 7.116 - <tr> 7.117 - <td>$(_ 'Extra initramfs:')</td> 7.118 - <td><input name="initrd2[]" size="37" type="file" multiple> <i>$(_ 'optional')</i></td> 7.119 - </tr> 7.120 - <tr> 7.121 - <td>$(_ 'Boot message:')</td> 7.122 - <td><input name="info" size="37" type="file"> <i>$(_ 'optional')</i></td> 7.123 - </tr> 7.124 - <tr> 7.125 - <td>$(_ 'Default cmdline:')</td> 7.126 - <td id="cmdline"><input name="cmdline" size="36" type="text" value="$(sed 's/^BOOT_IMAGE[^ ]* //;s/initrd=[^ ]* //' /proc/cmdline)" > <input name="edit" checked="checked" type="checkbox">$(_ 'edit') 7.127 - <i>$(_ 'optional')</i></td> 7.128 - </tr> 7.129 - <tr> 7.130 - <td>$(_ 'Root device:')</td> 7.131 - <td><input name="rdev" size="8" value="/dev/ram0" type="text"> 7.132 - $(_ 'Flags:') <select name="flags"> 7.133 - <option selected="selected" value="1">R/O</option> 7.134 - <option value="0">R/W</option> 7.135 - </select> 7.136 - VESA: <select name="video"> 7.137 - <option value="-3">Ask</option> 7.138 -<option value="-2">Extended</option> 7.139 -<option value="-1" selected="selected">Standard</option> 7.140 -<option value="0">0</option> 7.141 -<option value="1">1</option> 7.142 -<option value="2">2</option> 7.143 -<option value="3">3</option> 7.144 -<option value="4">4</option> 7.145 -<option value="5">5</option> 7.146 -<option value="6">6</option> 7.147 -<option value="7">7</option> 7.148 -<option value="8">8</option> 7.149 -<option value="9">9</option> 7.150 -<option value="10">10</option> 7.151 -<option value="11">11</option> 7.152 -<option value="12">12</option> 7.153 -<option value="13">13</option> 7.154 -<option value="14">14</option> 7.155 -<option value="15">15</option> 7.156 -<option value="3840">80x25</option> 7.157 -<option value="3841">80x50</option> 7.158 -<option value="3842">80x43</option> 7.159 -<option value="3843">80x28</option> 7.160 -<option value="3845">80x30</option> 7.161 -<option value="3846">80x34</option> 7.162 -<option value="3847">80x60</option> 7.163 -<option value="778">132x43</option> 7.164 -<option value="777">132x25</option> 7.165 -<option value="824">320x200x8</option> 7.166 -<option value="781">320x200x15</option> 7.167 -<option value="782">320x200x16</option> 7.168 -<option value="783">320x200x24</option> 7.169 -<option value="800">320x200x32</option> 7.170 -<option value="818">896x672x24</option> 7.171 -<option value="915">320x240x15</option> 7.172 -<option value="821">320x240x16</option> 7.173 -<option value="917">320x240x24</option> 7.174 -<option value="918">320x240x32</option> 7.175 -<option value="819">896x672x32</option> 7.176 -<option value="931">400x300x15</option> 7.177 -<option value="822">400x300x16</option> 7.178 -<option value="933">400x300x24</option> 7.179 -<option value="934">400x300x32</option> 7.180 -<option value="820">512x384x8</option> 7.181 -<option value="947">512x384x15</option> 7.182 -<option value="823">512x384x16</option> 7.183 -<option value="949">512x384x24</option> 7.184 -<option value="950">512x384x32</option> 7.185 -<option value="962">640x350x8</option> 7.186 -<option value="963">640x350x15</option> 7.187 -<option value="964">640x350x16</option> 7.188 -<option value="965">640x350x24</option> 7.189 -<option value="966">640x350x32</option> 7.190 -<option value="768">640x400x8</option> 7.191 -<option value="899">640x400x15</option> 7.192 -<option value="825">640x400x16</option> 7.193 -<option value="901">640x400x24</option> 7.194 -<option value="902">640x400x32</option> 7.195 -<option value="769">640x480x8</option> 7.196 -<option value="784">640x480x15</option> 7.197 -<option value="785">640x480x16</option> 7.198 -<option value="786">640x480x24</option> 7.199 -<option value="826">640x480x32</option> 7.200 -<option value="879">800x500x8</option> 7.201 -<option value="880">800x500x15</option> 7.202 -<option value="881">800x500x16</option> 7.203 -<option value="882">800x500x24</option> 7.204 -<option value="883">800x500x32</option> 7.205 -<option value="771">800x600x8</option> 7.206 -<option value="787">800x600x15</option> 7.207 -<option value="788">800x600x16</option> 7.208 -<option value="789">800x600x24</option> 7.209 -<option value="827">800x600x32</option> 7.210 -<option value="815">896x672x8</option> 7.211 -<option value="816">1600x1200x8</option> 7.212 -<option value="817">1600x1200x16</option> 7.213 -<option value="874">1024x640x8</option> 7.214 -<option value="875">1024x640x15</option> 7.215 -<option value="876">1024x640x16</option> 7.216 -<option value="877">1024x640x24</option> 7.217 -<option value="878">1024x640x32</option> 7.218 -<option value="773">1024x768x8</option> 7.219 -<option value="790">1024x768x15</option> 7.220 -<option value="791">1024x768x16</option> 7.221 -<option value="792">1024x768x24</option> 7.222 -<option value="828">1024x768x32</option> 7.223 -<option value="869">1152x720x8</option> 7.224 -<option value="870">1152x720x15</option> 7.225 -<option value="871">1152x720x16</option> 7.226 -<option value="872">1152x720x24</option> 7.227 -<option value="873">1152x720x32</option> 7.228 -<option value="775">1280x1024x8</option> 7.229 -<option value="793">1280x1024x15</option> 7.230 -<option value="794">1280x1024x16</option> 7.231 -<option value="795">1280x1024x24</option> 7.232 -<option value="829">1280x1024x32</option> 7.233 -<option value="835">1400x1050x8</option> 7.234 -<option value="837">1400x1050x16</option> 7.235 -<option value="838">1400x1040x24</option> 7.236 -<option value="864">1440x900x15</option> 7.237 -<option value="866">1440x900x16</option> 7.238 -<option value="867">1440x900x24</option> 7.239 -<option value="868">1440x900x32</option> 7.240 -<option value="893">1920x1200x8</option> 7.241 - </select> 7.242 - </td> 7.243 - </tr> 7.244 - <tr> 7.245 - <td>$(_ 'Output directory:')</td> 7.246 - <td id="workdir"><input name="workdir" size="36" type="text" value="$OUTPUTDIR"></td> 7.247 - </tr> 7.248 - <tr> 7.249 - <td>$(_ 'Floppy size:')</td> 7.250 - <td><select name="format"> 7.251 - <optgroup label="5¼ SD"> 7.252 - <option value="360">360 KB</option> 7.253 - </optgroup> 7.254 - <optgroup label="3½ SD"> 7.255 - <option value="720">720 KB</option> 7.256 - </optgroup> 7.257 - <optgroup label="5¼ HD"> 7.258 - <option value="1200">1.20 MB</option> 7.259 - </optgroup> 7.260 - <optgroup label="3½ HD"> 7.261 - <option value="1440" selected="selected">1.44 MB</option> 7.262 - <option value="1600">1.60 MB</option> 7.263 - <option value="1680">1.68 MB</option> 7.264 - <option value="1722">1.72 MB</option> 7.265 - <option value="1743">1.74 MB</option> 7.266 - <option value="1760">1.76 MB</option> 7.267 - <option value="1840">1.84 MB</option> 7.268 - <option value="1920">1.92 MB</option> 7.269 - <option value="1968">1.96 MB</option> 7.270 - </optgroup> 7.271 - <optgroup label="3½ ED"> 7.272 - <option value="2880">2.88 MB</option> 7.273 - <option value="3360">3.36 MB</option> 7.274 - <option value="3444">3.44 MB</option> 7.275 - <option value="3840">3.84 MB</option> 7.276 - <option value="3936">3.92 MB</option> 7.277 - </optgroup> 7.278 - <option value="0">$(_ 'no limit')</option> 7.279 - </select> 7.280 - $(_ 'RAM used') <select name="mem"> 7.281 - <option selected="selected" value="16">16 MB</option> 7.282 - <option value="15">15 MB</option> 7.283 - <option value="14">14 MB</option> 7.284 - <option value="13">13 MB</option> 7.285 - <option value="12">12 MB</option> 7.286 - <option value="11">11 MB</option> 7.287 - <option value="10">10 MB</option> 7.288 - <option value="9">9 MB</option> 7.289 - <option value="8">8 MB</option> 7.290 - <option value="7">7 MB</option> 7.291 - <option value="6">6 MB</option> 7.292 - <option value="5">5 MB</option> 7.293 - <option value="4">4 MB</option> 7.294 - </select> 7.295 - <button type="submit" name="build" data-icon="start" >$(_ 'Build floppy set' )</button> 7.296 - </td> 7.297 - </tr> 7.298 -</tbody></table> 7.299 -<footer> 7.300 -<p> 7.301 -$(_ 'Note') 1: $(_ 'the extra initramfs may be useful to add your own configuration files.') 7.302 -</p> 7.303 -<p> 7.304 -$(_ 'Note') 2: $(_ 'the keyboard is read for ESC or ENTER on every form feed (ASCII 12) in the boot message.') 7.305 -</p> 7.306 -</footer> 7.307 + <table> 7.308 + <tr> 7.309 + <td>$(_ 'Linux kernel:')</td> 7.310 + <td><input name="kernel" size="37" type="file"> <i>$(_ 'required')</i></td> 7.311 + </tr> 7.312 + <tr> 7.313 + <td>$(_ 'Initramfs / Initrd:')</td> 7.314 + <td><input name="initrd[]" size="37" type="file" multiple> <i>$(_ 'optional')</i></td> 7.315 + </tr> 7.316 + <tr> 7.317 + <td>$(_ 'Extra initramfs:')</td> 7.318 + <td><input name="initrd2[]" size="37" type="file" multiple> <i>$(_ 'optional')</i></td> 7.319 + </tr> 7.320 + <tr> 7.321 + <td>$(_ 'Boot message:')</td> 7.322 + <td><input name="info" size="37" type="file"> <i>$(_ 'optional')</i></td> 7.323 + </tr> 7.324 + <tr> 7.325 + <td>$(_ 'Default cmdline:')</td> 7.326 + <td id="cmdline"><input name="cmdline" size="36" type="text" value="$(sed 's/^BOOT_IMAGE[^ ]* //;s/initrd=[^ ]* //' /proc/cmdline)" > <input name="edit" checked="checked" type="checkbox">$(_ 'edit') 7.327 + <i>$(_ 'optional')</i></td> 7.328 + </tr> 7.329 + <tr> 7.330 + <td>$(_ 'Root device:')</td> 7.331 + <td><input name="rdev" size="8" value="/dev/ram0" type="text"> 7.332 + $(_ 'Flags:') 7.333 + <select name="flags"> 7.334 + <option selected="selected" value="1">R/O</option> 7.335 + <option value="0">R/W</option> 7.336 + </select> 7.337 + VESA: 7.338 + <select name="video"> 7.339 + <option value="-3">Ask</option> 7.340 + <option value="-2">Extended</option> 7.341 + <option value="-1" selected="selected">Standard</option> 7.342 +EOT 7.343 + 7.344 +echo "0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7 8:8 9:9 10:10 11:11 12:12 13:13 14:14 15:15 \ 7.345 +3840:80x25 3843:80x28 3845:80x30 3846:80x34 3842:80x43 3841:80x50 3847:80x60 777:132x25 778:132x43 \ 7.346 +824:320x200x8 781:320x200x15 782:320x200x16 783:320x200x24 800:320x200x32 \ 7.347 + 915:320x240x15 821:320x240x16 917:320x240x24 918:320x240x32 \ 7.348 + 931:400x300x15 822:400x300x16 933:400x300x24 934:400x300x32 \ 7.349 +820:512x384x8 947:512x384x15 823:512x384x16 949:512x384x24 950:512x384x32 \ 7.350 +962:640x350x8 963:640x350x15 964:640x350x16 965:640x350x24 966:640x350x32 \ 7.351 +768:640x400x8 899:640x400x15 825:640x400x16 901:640x400x24 902:640x400x32 \ 7.352 +769:640x480x8 784:640x480x15 785:640x480x16 786:640x480x24 826:640x480x32 \ 7.353 +879:800x500x8 880:800x500x15 881:800x500x16 882:800x500x24 883:800x500x32 \ 7.354 +771:800x600x8 787:800x600x15 788:800x600x16 789:800x600x24 827:800x600x32 \ 7.355 +815:896x672x8 818:896x672x24 819:896x672x32 \ 7.356 +874:1024x640x8 875:1024x640x15 876:1024x640x16 877:1024x640x24 878:1024x640x32 \ 7.357 +773:1024x768x8 790:1024x768x15 791:1024x768x16 792:1024x768x24 828:1024x768x32 \ 7.358 +869:1152x720x8 870:1152x720x15 871:1152x720x16 872:1152x720x24 873:1152x720x32 \ 7.359 +775:1280x1024x8 793:1280x1024x15 794:1280x1024x16 795:1280x1024x24 829:1280x1024x32 \ 7.360 +835:1400x1050x8 837:1400x1050x16 838:1400x1040x24 \ 7.361 + 864:1440x900x15 866:1440x900x16 867:1440x900x24 868:1440x900x32 \ 7.362 +816:1600x1200x8 817:1600x1200x16 \ 7.363 +893:1920x1200x8" | sed 's| *| |g' |\ 7.364 +awk 'BEGIN{RS=" "; FS=":"} { 7.365 + printf "<option value=\"%s\">%s</option>\n", $1, $2; 7.366 +}' 7.367 +cat <<EOT 7.368 + </select> 7.369 + </td> 7.370 + </tr> 7.371 + <tr> 7.372 + <td>$(_ 'Output directory:')</td> 7.373 + <td id="workdir"><input name="workdir" size="36" type="text" value="$OUTPUTDIR"></td> 7.374 + </tr> 7.375 + <tr> 7.376 + <td>$(_ 'Floppy size:')</td> 7.377 + <td><select name="format"> 7.378 + <optgroup label="5¼ SD"> 7.379 + <option value="360">360 KB</option> 7.380 + </optgroup> 7.381 + <optgroup label="3½ SD"> 7.382 + <option value="720">720 KB</option> 7.383 + </optgroup> 7.384 + <optgroup label="5¼ HD"> 7.385 + <option value="1200">1.20 MB</option> 7.386 + </optgroup> 7.387 + <optgroup label="3½ HD"> 7.388 + <option value="1440" selected="selected">1.44 MB</option> 7.389 + <option value="1600">1.60 MB</option> 7.390 + <option value="1680">1.68 MB</option> 7.391 + <option value="1722">1.72 MB</option> 7.392 + <option value="1743">1.74 MB</option> 7.393 + <option value="1760">1.76 MB</option> 7.394 + <option value="1840">1.84 MB</option> 7.395 + <option value="1920">1.92 MB</option> 7.396 + <option value="1968">1.96 MB</option> 7.397 + </optgroup> 7.398 + <optgroup label="3½ ED"> 7.399 + <option value="2880">2.88 MB</option> 7.400 + <option value="3360">3.36 MB</option> 7.401 + <option value="3444">3.44 MB</option> 7.402 + <option value="3840">3.84 MB</option> 7.403 + <option value="3936">3.92 MB</option> 7.404 + </optgroup> 7.405 + <option value="0">$(_ 'no limit')</option> 7.406 + </select> 7.407 + $(_ 'RAM used') <select name="mem"> 7.408 + <option selected="selected" value="16">16 MB</option> 7.409 + <option value="15">15 MB</option> 7.410 + <option value="14">14 MB</option> 7.411 + <option value="13">13 MB</option> 7.412 + <option value="12">12 MB</option> 7.413 + <option value="11">11 MB</option> 7.414 + <option value="10">10 MB</option> 7.415 + <option value="9">9 MB</option> 7.416 + <option value="8">8 MB</option> 7.417 + <option value="7">7 MB</option> 7.418 + <option value="6">6 MB</option> 7.419 + <option value="5">5 MB</option> 7.420 + <option value="4">4 MB</option> 7.421 + </select> 7.422 + <button type="submit" name="build" data-icon="@start@" >$(_ 'Build floppy set' )</button> 7.423 + </td> 7.424 + </tr> 7.425 + </table> 7.426 + <footer> 7.427 + <p> 7.428 + $(_ 'Note') 1: $(_ 'the extra initramfs may be useful to add your own configuration files.') 7.429 + </p> 7.430 + <p> 7.431 + $(_ 'Note') 2: $(_ 'the keyboard is read for ESC or ENTER on every form feed (ASCII 12) in the boot message.') 7.432 + </p> 7.433 + </footer> 7.434 </section> 7.435 </form> 7.436 EOT
8.1 --- a/hardware.cgi Tue Dec 08 13:38:20 2015 +0200 8.2 +++ b/hardware.cgi Thu Dec 10 04:11:45 2015 +0200 8.3 @@ -167,7 +167,7 @@ 8.4 do 8.5 name=$(basename $line) 8.6 mod=${name%.ko.xz} 8.7 - echo "<span data-icon=\"modules\">$(_ 'Module:')</span> <a href='?modinfo=$mod'>$mod</a>" 8.8 + echo "<span data-icon=\"@modules@\">$(_ 'Module:')</span> <a href='?modinfo=$mod'>$mod</a>" 8.9 done 8.10 echo '</pre></section>' 8.11 fi 8.12 @@ -249,9 +249,9 @@ 8.13 <p>$(_ 'Manage your computer hardware')</p> 8.14 8.15 <form><!-- 8.16 - --><button name="modules" data-icon="modules">$(_ 'Kernel modules')</button><!-- 8.17 - --><button name="detect" data-icon="detect" data-root>$(_ 'Detect PCI/USB')</button><!-- 8.18 - --><button name="tazx" data-icon="tazx" data-root>$(_ 'Auto-install Xorg video driver')</button><!-- 8.19 + --><button name="modules" data-icon="@modules@">$(_ 'Kernel modules')</button><!-- 8.20 + --><button name="detect" data-icon="@detect@" data-root>$(_ 'Detect PCI/USB')</button><!-- 8.21 + --><button name="tazx" data-icon="@tazx@" data-root>$(_ 'Auto-install Xorg video driver')</button><!-- 8.22 --></form> 8.23 8.24 EOT 8.25 @@ -278,7 +278,7 @@ 8.26 rempct=$(( $remain * 100 / $full )) 8.27 cat <<EOT 8.28 <tr> 8.29 - <td><span data-icon="battery">$(_ 'Battery')</span> 8.30 + <td><span data-icon="@battery@">$(_ 'Battery')</span> 8.31 $(grep "^battery type" $dev/info | sed 's/.*: *//') 8.32 $(grep "^design capacity:" $dev/info | sed 's/.*: *//') </td> 8.33 <td>$(_ 'health') $(( (100*$full)/$design))%</td> 8.34 @@ -315,7 +315,7 @@ 8.35 8.36 # Thermal sensors 8.37 if [ -n "$(ls /sys/devices/virtual/thermal/*/temp 2>/dev/null)" ]; then 8.38 - echo "<p><span data-icon=\"temperature\">$(_ 'Temperature:')</span>" 8.39 + echo "<p><span data-icon=\"@temperature@\">$(_ 'Temperature:')</span>" 8.40 for temp in /sys/devices/virtual/thermal/*/temp; do 8.41 awk '{ print $1/1000 "℃" }' < $temp 8.42 done 8.43 @@ -330,7 +330,7 @@ 8.44 name=$(echo $dev | sed 's|.*/backlight/\([^/]*\).*|\1|') 8.45 cat <<EOT 8.46 <input type="hidden" name="dev" value="$name"/> 8.47 -<span data-icon="brightness">$(_ 'Brightness')</span> \ 8.48 +<span data-icon="@brightness@">$(_ 'Brightness')</span> \ 8.49 $(sed 's/.*\.//;s/_*$//' < /sys/devices/virtual/backlight/$name/device/path): 8.50 <select name="brightness" onchange="submit();"> 8.51 EOT 8.52 @@ -424,14 +424,14 @@ 8.53 size="$(blk2h $(cat /sys/block/${fs#/dev/}/size /sys/block/*/${fs#/dev/}/size))" 8.54 8.55 # image 8.56 - disktype="hdd" 8.57 + disktype="@hdd@" 8.58 case "$(cat /sys/block/${fs#/dev/}/removable 2>/dev/null || 8.59 cat /sys/block/${fs:5:3}/removable 2>/dev/null)" in 8.60 - 1) disktype="removable" ;; 8.61 + 1) disktype="@removable@" ;; 8.62 esac 8.63 case "$(cat /sys/block/${fs#/dev/}/ro 2>/dev/null || 8.64 cat /sys/block/${fs:5:3}/ro 2>/dev/null)" in 8.65 - 1) disktype="cd" ;; 8.66 + 1) disktype="@cd@" ;; 8.67 esac 8.68 8.69 radio="<input type=\"radio\" name=\"device\" value=\"$action $fs\" id=\"${fs#/dev/}\"/>" 8.70 @@ -551,7 +551,7 @@ 8.71 set -- "${3:-$(cat $dir/loop/backing_file)}" "${2:-$(cat $dir/loop/offset)}" ${ro// / } 8.72 cat <<EOT 8.73 <tr><td><input type="radio" name="loopdev" value="$devloop" id="$loop"/><!-- 8.74 - --><label for="$loop" data-icon="loopback">$loop</label></td> 8.75 + --><label for="$loop" data-icon="@loopback@">$loop</label></td> 8.76 <td>$1</td><td>$size</td><td align="center">$3</td><td align="right">$2</td> 8.77 </tr> 8.78 EOT 8.79 @@ -564,7 +564,7 @@ 8.80 $(lib crypto input) 8.81 8.82 <footer> 8.83 - <button type="submit" data-icon="ok">$(_ 'Setup')</button> - 8.84 + <button type="submit" data-icon="@ok@">$(_ 'Setup')</button> - 8.85 $(_ 'new backing file:') <input type="text" name="backingfile"/> - 8.86 $(_ 'offset in bytes:') <input type="text" name="offset" value="0" size="8"/> - 8.87 <input type="checkbox" name="readonly" id="ro"/><label for="ro">$(_ 'read only')</label>
9.1 --- a/hosts.cgi Tue Dec 08 13:38:20 2015 +0200 9.2 +++ b/hosts.cgi Thu Dec 10 04:11:45 2015 +0200 9.3 @@ -103,7 +103,7 @@ 9.4 host="$(GET add)" 9.5 9.6 echo "0.0.0.0 $host #U" >> /etc/hosts 9.7 - echo -n '<p><span data-img="info"></span>' 9.8 + echo -n '<p><span data-img="@info@"></span>' 9.9 _ 'Host "%s" added to /etc/hosts.' "$host" 9.10 echo '</p>' 9.11 ;; 9.12 @@ -116,7 +116,7 @@ 9.13 sed -i "s|^0.0.0.0[ \t][ \t]*$host .*|#\0|" /etc/hosts 9.14 done 9.15 r=$(echo "$hosts" | tr ' ' '\n' | wc -l) 9.16 - echo -n '<p><span data-img="info"></span>' 9.17 + echo -n '<p><span data-img="@info@"></span>' 9.18 _p '%d record disabled' \ 9.19 '%d records disabled' "$r" "$r" 9.20 echo '</p>' 9.21 @@ -183,13 +183,13 @@ 9.22 if [ -z "$term" ]; then 9.23 getdb hosts | fgrep 0.0.0.0 > "$found" 9.24 r=$(wc -l < "$found") 9.25 - echo -n '<p><span data-img="info"></span>' 9.26 + echo -n '<p><span data-img="@info@"></span>' 9.27 _p '%d record used for Ad blocking' \ 9.28 '%d records used for Ad blocking' "$r" "$r" 9.29 else 9.30 getdb hosts | fgrep 0.0.0.0 | fgrep "$term" > "$found" 9.31 r=$(wc -l < "$found") 9.32 - echo -n '<p><span data-img="info"></span>' 9.33 + echo -n '<p><span data-img="@info@"></span>' 9.34 _p '%d record found for "%s"' \ 9.35 '%d records found for "%s"' "$r" "$r" "$term" 9.36 fi 9.37 @@ -200,7 +200,7 @@ 9.38 cat <<EOT 9.39 <section> 9.40 <header> 9.41 - <span data-icon="list">$(_ 'Hosts')</span> 9.42 + <span data-icon="@list@">$(_ 'Hosts')</span> 9.43 <form> 9.44 <input type="search" name="term" value="$(GET term)" results="5" autosave="hosts" autocomplete="on"/> 9.45 </form> 9.46 @@ -215,26 +215,26 @@ 9.47 cat <<EOT 9.48 </pre> 9.49 <footer> 9.50 - <button type="submit" name="disable" data-icon="delete" data-root>$(_ 'Disable selected')</button> 9.51 + <button type="submit" name="disable" data-icon="@delete@" data-root>$(_ 'Disable selected')</button> 9.52 </footer> 9.53 </form> 9.54 </section> 9.55 9.56 <section> 9.57 - <header><span data-icon="add">$(_ 'Add')</span></header> 9.58 + <header><span data-icon="@add@">$(_ 'Add')</span></header> 9.59 <form class="wide"> 9.60 <div> 9.61 $(_ 'Host:') 9.62 <input type="text" name="add"/> 9.63 </div> 9.64 <footer> 9.65 - <button type="submit" data-icon="add" data-root>$(_ 'Add')</button> 9.66 + <button type="submit" data-icon="@add@" data-root>$(_ 'Add')</button> 9.67 </footer> 9.68 </form> 9.69 </section> 9.70 9.71 <section> 9.72 - <header><span data-icon="admin">$(_ 'Manage lists')</span></header> 9.73 + <header><span data-icon="@admin@">$(_ 'Manage lists')</span></header> 9.74 <div>$(_ 'You can use one or more prepared hosts files to block advertisements, malware and other irritants.')</div> 9.75 <form class="wide"> 9.76 <table class="wide zebra"> 9.77 @@ -256,7 +256,7 @@ 9.78 cat <<EOT 9.79 <tr> 9.80 <td>$name</td> 9.81 - <td><a data-icon="info" target="_blank" href="$info">$(_ 'info')</a></td> 9.82 + <td><a data-icon="@info@" target="_blank" href="$info">$(_ 'info')</a></td> 9.83 <td> 9.84 $([ "$updated" == 'monthly' ] && _ 'Updated monthly') 9.85 $([ "$updated" == 'regularly' ] && _ 'Updated regularly') 9.86 @@ -300,18 +300,18 @@ 9.87 9.88 if [ -f "$HOSTSDIR/$letter.avail" ]; then 9.89 cat <<EOT 9.90 -<button name="uplist" value="$letter" data-icon="upgrade">$(_ 'Upgrade')</button> 9.91 +<button name="uplist" value="$letter" data-icon="@upgrade@">$(_ 'Upgrade')</button> 9.92 EOT 9.93 fi 9.94 9.95 cat <<EOT 9.96 -<button name="remlist" value="$letter" data-icon="remove">$(_ 'Remove')</button> 9.97 +<button name="remlist" value="$letter" data-icon="@remove@">$(_ 'Remove')</button> 9.98 EOT 9.99 9.100 else 9.101 # List not installed 9.102 cat <<EOT 9.103 -<button name="instlist" value="$letter" data-icon="install">$(_ 'Install')</button> 9.104 +<button name="instlist" value="$letter" data-icon="@install@">$(_ 'Install')</button> 9.105 EOT 9.106 fi 9.107 echo '</td></tr>'
10.1 --- a/index.cgi Tue Dec 08 13:38:20 2015 +0200 10.2 +++ b/index.cgi Thu Dec 10 04:11:45 2015 +0200 10.3 @@ -34,7 +34,7 @@ 10.4 diff -abu $tmp$1 $1 | sed "s|$tmp||" 10.5 rm -rf $tmp;; 10.6 button) 10.7 - echo -n '<button name="action" value="diff" data-icon="diff">'$(_ 'Differences')'</button>';; 10.8 + echo -n '<button name="action" value="diff" data-icon="@diff@">'$(_ 'Differences')'</button>';; 10.9 esac 10.10 break 10.11 done 10.12 @@ -44,7 +44,7 @@ 10.13 # OK status in table 10.14 10.15 ok_status_t() { 10.16 - echo '<td><span class="diff-add" data-img="ok"></span></td></tr>' 10.17 + echo '<td><span class="diff-add" data-img="@ok@"></span></td></tr>' 10.18 } 10.19 10.20 10.21 @@ -180,10 +180,10 @@ 10.22 cat <<EOT 10.23 <section> 10.24 <header> 10.25 - <span data-icon="edit">${title:-$file}</span> 10.26 + <span data-icon="@edit@">${title:-$file}</span> 10.27 <form id="editform" method="post" action="?file=$file"> 10.28 - <button data-icon="save">$(_ 'Save')</button> 10.29 - <button name="action" value="diff" data-icon="diff">$(_ 'Differences')</button> 10.30 + <button data-icon="@save@">$(_ 'Save')</button> 10.31 + <button name="action" value="diff" data-icon="@diff@">$(_ 'Differences')</button> 10.32 </form> 10.33 $(back_button) 10.34 </header> 10.35 @@ -202,7 +202,7 @@ 10.36 <form method="post" action="?file=$file" class="nogap"> 10.37 <input type="hidden" name="var" value="$(GET var)"> 10.38 <input type="text" name="content" value="${data:-$(GET default)}"> 10.39 - <button type="submit" data-icon="save">$(_ 'Save')</button> 10.40 + <button type="submit" data-icon="@save@">$(_ 'Save')</button> 10.41 </form> 10.42 </section> 10.43 EOT 10.44 @@ -232,16 +232,16 @@ 10.45 cat <<EOT 10.46 <section class="bigNoScrollable"> 10.47 <header> 10.48 - <span data-icon="text">${title:-$file}</span> 10.49 + <span data-icon="@text@">${title:-$file}</span> 10.50 EOT 10.51 if [ -w "$file" ]; then 10.52 cat <<EOT 10.53 <form> 10.54 <input type="hidden" name="file" value="$file"/> 10.55 <button onclick='editFile(); return false' id="edit_button" 10.56 - data-icon="edit">$(_ 'Edit')</button><!-- 10.57 + data-icon="@edit@">$(_ 'Edit')</button><!-- 10.58 --><button onclick='saveFile("$file", "$title"); return false' id="save_button" 10.59 - data-icon="save" style="display:none">$(_ 'Save')</button><!-- 10.60 + data-icon="@save@" style="display:none">$(_ 'Save')</button><!-- 10.61 -->$(file_is_modified $file button) 10.62 </form> 10.63 EOT 10.64 @@ -312,7 +312,7 @@ 10.65 <section> 10.66 <header> 10.67 $(_ 'History') 10.68 - <form><button name="terminal" data-icon="terminal">$(_ 'Back')</button></form> 10.69 + <form><button name="terminal" data-icon="@terminal@">$(_ 'Back')</button></form> 10.70 </header> 10.71 <form> 10.72 <input type="hidden" name="path" value="$path"/> 10.73 @@ -326,7 +326,7 @@ 10.74 cmd = $0; 10.75 gsub("%", "%25", cmd); gsub("+", "%2B", cmd); gsub(" ", "+", cmd); 10.76 gsub("\"", "%22", cmd); gsub("!", "%21", cmd); gsub(q, "%27", cmd); 10.77 - printf("<a data-icon=\"run\" href=\"?cmd=%s&path=%s\">%s</a> ", cmd, path, run); 10.78 + printf("<a data-icon=\"@run@\" href=\"?cmd=%s&path=%s\">%s</a> ", cmd, path, run); 10.79 printf("<input type=\"checkbox\" name=\"rm\" value=\"%d\" id=\"hist%d\">", num, num); 10.80 printf("<label for=\"hist%d\">%s</label>\n", num, $0); 10.81 num++; 10.82 @@ -335,7 +335,7 @@ 10.83 cat <<EOT 10.84 </pre> 10.85 <footer> 10.86 - <button name="rmhistory" data-icon="remove">$(_ 'Clear')</button> 10.87 + <button name="rmhistory" data-icon="@remove@">$(_ 'Clear')</button> 10.88 </footer> 10.89 </form> 10.90 </section> 10.91 @@ -395,8 +395,8 @@ 10.92 </section> 10.93 10.94 <form> 10.95 - <button name="termsettings" data-icon="settings">$(_ 'Settings')</button> 10.96 - <button name="cmd" value="history" data-icon="history">$(_ 'History')</button> 10.97 + <button name="termsettings" data-icon="@settings@">$(_ 'Settings')</button> 10.98 + <button name="cmd" value="history" data-icon="@history@">$(_ 'History')</button> 10.99 </form> 10.100 10.101 <script type="text/javascript"> 10.102 @@ -467,7 +467,7 @@ 10.103 <header> 10.104 $(_ 'Terminal settings') 10.105 <form> 10.106 - <button name="terminal" data-icon="terminal">$(_ 'Terminal')</button> 10.107 + <button name="terminal" data-icon="@terminal@">$(_ 'Terminal')</button> 10.108 </form> 10.109 </header> 10.110 <pre class="term $pal" style="height: auto; font-family: '$font'"> 10.111 @@ -500,7 +500,7 @@ 10.112 printf("<option value=\"%s\"%s>%s</option>\n", $0, ($0 == pal)?" selected":"", $0) 10.113 }') 10.114 </select> 10.115 - <button name="termsettings" data-icon="ok">$(_ 'Apply')</button> 10.116 + <button name="termsettings" data-icon="@ok@">$(_ 'Apply')</button> 10.117 </form> 10.118 </footer> 10.119 </section> 10.120 @@ -546,7 +546,7 @@ 10.121 $(ps auxww | sed "/^ *$curpid /!d") 10.122 <form> 10.123 <input type="hidden" name="top"/> 10.124 - <button type="submit" data-icon="remove" name="kill" value="$curpid">$(_ 'Kill')</button> 10.125 + <button type="submit" data-icon="@remove@" name="kill" value="$curpid">$(_ 'Kill')</button> 10.126 </form> 10.127 </header> 10.128 <form> 10.129 @@ -788,7 +788,7 @@ 10.130 </tbody> 10.131 </table> 10.132 <footer> 10.133 - <form><button name="file" value="$output" data-icon="view">$(_ 'View')</button></form> 10.134 + <form><button name="file" value="$output" data-icon="@view@">$(_ 'View')</button></form> 10.135 </footer> 10.136 </section> 10.137 10.138 @@ -810,9 +810,9 @@ 10.139 10.140 cat <<EOT 10.141 <form class="nogap"><!-- 10.142 - --><button name="terminal" data-icon="terminal">$(_ 'Terminal')</button><!-- 10.143 - --><button name="top" data-icon="proc" >$(_ 'Process activity')</button><!-- 10.144 - --><button name="report" data-icon="report" data-root>$(_ 'Create a report')</button><!-- 10.145 + --><button name="terminal" data-icon="@terminal@">$(_ 'Terminal')</button><!-- 10.146 + --><button name="top" data-icon="@proc@">$(_ 'Process activity')</button><!-- 10.147 + --><button name="report" data-icon="@report@" data-root>$(_ 'Create a report')</button><!-- 10.148 --></form> 10.149 10.150 <section> 10.151 @@ -839,7 +839,7 @@ 10.152 <header> 10.153 $(_ 'Network status') 10.154 <form action="network.cgi"> 10.155 - <button data-icon="wifi">$(_ 'Network')</button> 10.156 + <button data-icon="@wifi@">$(_ 'Network')</button> 10.157 </form> 10.158 </header> 10.159 $(list_network_interfaces) 10.160 @@ -850,7 +850,7 @@ 10.161 <header> 10.162 $(_ 'Filesystem usage statistics') 10.163 <form action="hardware.cgi"> 10.164 - <button data-icon="hdd">$(_ 'Disks')</button> 10.165 + <button data-icon="@hdd@">$(_ 'Disks')</button> 10.166 </form> 10.167 </header> 10.168 <table class="wide zebra center"> 10.169 @@ -861,7 +861,7 @@ 10.170 df -h | grep ^/dev | while read fs size used av pct mp; do 10.171 cat <<EOT 10.172 <tr> 10.173 - <td><span data-icon="hdd">${fs#/dev/}</span></td> 10.174 + <td><span data-icon="@hdd@">${fs#/dev/}</span></td> 10.175 <td>$(blkid $fs | sed '/LABEL=/!d;s/.*LABEL="\([^"]*\).*/\1/')</td> 10.176 <td>$(blkid $fs | sed '/TYPE=/!d;s/.*TYPE="\([^"]*\).*/\1/')</td> 10.177 <td>$size</td> 10.178 @@ -884,7 +884,7 @@ 10.179 <header> 10.180 $(_ 'Panel Activity') 10.181 <form> 10.182 - <button name="file" value="$LOG_FILE" data-icon="view">$(_ 'View')</button> 10.183 + <button name="file" value="$LOG_FILE" data-icon="@view@">$(_ 'View')</button> 10.184 </form> 10.185 </header> 10.186 <div>
11.1 --- a/lib/libtazpanel Tue Dec 08 13:38:20 2015 +0200 11.2 +++ b/lib/libtazpanel Thu Dec 10 04:11:45 2015 +0200 11.3 @@ -150,7 +150,7 @@ 11.4 if ifconfig | grep -A1 $1 | grep -q inet; then 11.5 ip=$(ifconfig | grep -A1 $1 | grep inet | awk '{ print $2 }' | cut -d: -f2) 11.6 [ "$(cat /sys/class/net/$1/carrier)" == "1" ] && 11.7 - scan='<a data-icon="scan" href="network.cgi?scan='$ip'&back=network.cgi">'$(_ 'Scan')'</a>' 11.8 + scan='<a data-icon="@scan@" href="network.cgi?scan='$ip'&back=network.cgi">'$(_ 'Scan')'</a>' 11.9 fi 11.10 [ "$(cat /sys/class/net/$1/carrier)" == "1" ] && 11.11 status="$(_ 'connected')" && 11.12 @@ -179,19 +179,19 @@ 11.13 for i in $(ls /sys/class/net); do 11.14 case $i in 11.15 eth*) 11.16 - echo '<tr><td><a data-icon="eth" href="network.cgi?eth">'$i'</a></td> 11.17 + echo '<tr><td><a data-icon="@eth@" href="network.cgi?eth">'$i'</a></td> 11.18 <td>Ethernet</td> '$(interface_status $i)'</tr>';; 11.19 wlan*|ath*|ra*) 11.20 - echo '<tr><td><a data-icon="wifi" href="network.cgi?wifi">'$i'</a></td> 11.21 + echo '<tr><td><a data-icon="@wifi@" href="network.cgi?wifi">'$i'</a></td> 11.22 <td>Wireless</td> '$(interface_status $i)'</tr>';; 11.23 ppp*) 11.24 - echo '<tr><td><a data-icon="removable" href="ppp.cgi">'$i'</a></td> 11.25 + echo '<tr><td><a data-icon="@removable@" href="ppp.cgi">'$i'</a></td> 11.26 <td>Point to point</td> '$(interface_status $i)'</tr>';; 11.27 tap[0-9]*|tun[0-9]*) 11.28 - echo '<tr><td><span data-icon="removable">'$i'</span></td> 11.29 + echo '<tr><td><span data-icon="@removable@">'$i'</span></td> 11.30 <td>User space</td> '$(interface_status $i)'</tr>';; 11.31 lo) 11.32 - echo '<tr><td><span data-icon="loopback">'$i'</span></td> 11.33 + echo '<tr><td><span data-icon="@loopback@">'$i'</span></td> 11.34 <td>Loopback</td> '$(interface_status $i)'</tr>';; 11.35 *) 11.36 continue ;; 11.37 @@ -332,13 +332,13 @@ 11.38 msg() { 11.39 msgtype="$1"; shift 11.40 case "$msgtype" in 11.41 - tip) I='data-icon="msgtip"';; 11.42 - warn|warning) I='data-icon="msgwarn"';; 11.43 - err|error) I='data-icon="msgerr"';; 11.44 - up) I='data-icon="msgup"';; 11.45 - *) I='data-icon="msg"';; 11.46 + tip) I='@msgtip@';; 11.47 + warn|warning) I='@msgwarn@';; 11.48 + err|error) I='@msgerr@';; 11.49 + up) I='@msgup@';; 11.50 + *) I='@msg@';; 11.51 esac 11.52 - echo "<section class=\"box\"><span $I></span>$@</section>" 11.53 + echo "<section class=\"box\"><span data-icon=\"$I\"></span>$@</section>" 11.54 } 11.55 11.56 11.57 @@ -367,9 +367,8 @@ 11.58 # Show "Back" button 11.59 11.60 back_button() { 11.61 - #FIXME: can't encode data-icon 11.62 printf '<form action="%s" method="post"><button data-icon="%s">%s</button></form>' \ 11.63 - "${1:-javascript:history.go(-1)}" "${3:-back}" "${2:-$(_ 'Back')}" 11.64 + "${1:-javascript:history.go(-1)}" "${3:-@back@}" "${2:-$(_ 'Back')}" 11.65 } 11.66 11.67 11.68 @@ -379,7 +378,7 @@ 11.69 [ -w "$1" ] && cat <<EOT 11.70 <form action="index.cgi"> 11.71 <input type="hidden" name="file" value="$1"/> 11.72 - <button name="action" value="edit" data-icon="edit">${2:-$(_ 'Edit')}</button> 11.73 + <button name="action" value="edit" data-icon="@edit@">${2:-$(_ 'Edit')}</button> 11.74 </form> 11.75 EOT 11.76 } 11.77 @@ -392,7 +391,7 @@ 11.78 11.79 11.80 check_root_tazpanel() { 11.81 - if [ $(id -u) != '0' ]; then 11.82 + if [ $(id -u) -ne 0 ]; then 11.83 msg err "$(_ 'You must be root to show this page.')" 11.84 xhtml_footer; exit 0 11.85 fi 11.86 @@ -415,7 +414,7 @@ 11.87 id="input$RANDOM" 11.88 cat <<EOT 11.89 <span id="$id"><input type="text" name="$1" ${2:+value="$2" }/></span>\ 11.90 -<button data-icon="${3:-conf}" onclick="ajax('index.cgi?do=file-selection&name=$name&type=$4', '1', '$id'); return false">\ 11.91 +<button data-icon="${3:-@conf@}" onclick="ajax('index.cgi?do=file-selection&name=$name&type=$4', '1', '$id'); return false">\ 11.92 $(_n 'Browse')</button> 11.93 EOT 11.94 } 11.95 @@ -425,7 +424,7 @@ 11.96 id="input$RANDOM" 11.97 cat <<EOT 11.98 <span id="$id"><input type="text" name="$1" ${2:+value="$2" }/></span>\ 11.99 -<button data-icon="${3:-folder}" onclick="ajax('index.cgi?do=dir-selection&name=$1', '1', '$id'); return false">\ 11.100 +<button data-icon="${3:-@folder@}" onclick="ajax('index.cgi?do=dir-selection&name=$1', '1', '$id'); return false">\ 11.101 $(_n 'Browse')</button> 11.102 EOT 11.103 }
12.1 --- a/lib/tazpanel.js Tue Dec 08 13:38:20 2015 +0200 12.2 +++ b/lib/tazpanel.js Thu Dec 10 04:11:45 2015 +0200 12.3 @@ -366,14 +366,14 @@ 12.4 statusbar(''); 12.5 12.6 if (req.statusText == 'OK') { 12.7 - statusElem.innerHTML = '<span data-img="ok"></span>'; 12.8 + statusElem.innerHTML = '<span data-img="@ok@"></span>'; 12.9 } else { 12.10 // show status (Not Found, ...) 12.11 - statusElem.innerHTML = '<span data-img="delete">' + 12.12 + statusElem.innerHTML = '<span data-img="@delete@">' + 12.13 req.statusText + '</span>'; 12.14 } 12.15 } else { 12.16 - statusElem.innerHTML = '<span data-img="clock"></span>'; 12.17 + statusElem.innerHTML = '<span data-img="@clock@"></span>'; 12.18 } 12.19 12.20 // if status 200 (ОК) - show answer to user 12.21 @@ -391,7 +391,7 @@ 12.22 req.send(command); 12.23 12.24 // (5) 12.25 - statusElem.innerHTML = '<span data-img="clock"></span>'; 12.26 + statusElem.innerHTML = '<span data-img="@clock@"></span>'; 12.27 } 12.28 12.29 12.30 @@ -569,7 +569,7 @@ 12.31 ds.style.display = 'none'; sb.innerHTML = status; sb.style.display = ''; 12.32 // show optional ticker 12.33 if (ticker != '') { 12.34 - as.innerHTML = '<span data-img="clock"></span>'; 12.35 + as.innerHTML = '<span data-img="@clock@"></span>'; 12.36 } 12.37 } 12.38 }
13.1 --- a/network.cgi Tue Dec 08 13:38:20 2015 +0200 13.2 +++ b/network.cgi Thu Dec 10 04:11:45 2015 +0200 13.3 @@ -281,21 +281,21 @@ 13.4 </tr> 13.5 <tr id="wk1"><td>$(_ 'MAC address to wake up')</td> 13.6 <td><input type="text" name="macwakup" title="$(_ 'Leave empty for a general wakeup')" $PAR/><!-- 13.7 - --><button form="indexform" name="file" value="/etc/ethers" data-icon="view">$(_ 'List')</button> 13.8 + --><button form="indexform" name="file" value="/etc/ethers" data-icon="@view@">$(_ 'List')</button> 13.9 </td> 13.10 </tr> 13.11 <tr id="wk2"><td>$(_ 'MAC/IP address password')</td> 13.12 <td><input type="text" name="macpass" title="$(_ 'Optional')" $PAR/><!-- 13.13 - --><button form="indexform" name="exec" value="ether-wake --help" data-icon="help">$(_ 'Help')</button> 13.14 + --><button form="indexform" name="exec" value="ether-wake --help" data-icon="@help@">$(_ 'Help')</button> 13.15 </td> 13.16 </tr> 13.17 </table> 13.18 </div> 13.19 </form> 13.20 <footer><!-- 13.21 - --><button form="conf" type="submit" name="start_eth" data-icon="start" $start_disabled>$(_ 'Start' )</button><!-- 13.22 - --><button form="conf" type="submit" name="stop" data-icon="stop" $stop_disabled >$(_ 'Stop' )</button><!-- 13.23 - --><button id="wk3" form="conf" type="submit" name="dowakeup" data-icon="clock" $stop_disabled >$(_ 'Wake up')</button><!-- 13.24 + --><button form="conf" type="submit" name="start_eth" data-icon="@start@" $start_disabled>$(_ 'Start' )</button><!-- 13.25 + --><button form="conf" type="submit" name="stop" data-icon="@stop@" $stop_disabled >$(_ 'Stop' )</button><!-- 13.26 + --><button id="wk3" form="conf" type="submit" name="dowakeup" data-icon="@clock@" $stop_disabled >$(_ 'Wake up')</button><!-- 13.27 --></footer> 13.28 </section> 13.29 13.30 @@ -363,6 +363,13 @@ 13.31 13.32 QUALITY=$(echo "$SCAN" | sed -n 's|.*Quality[:=]\([^ ]*\).*|\1|p') 13.33 QUALITY_ICON="lvl$(( 5*${QUALITY:-0} ))" # lvl0 .. lvl4, lvl5 13.34 + case $QUALITY_ICON in 13.35 + lvl0) QUALITY_ICON='@lvl0@';; 13.36 + lvl1) QUALITY_ICON='@lvl1@';; 13.37 + lvl2) QUALITY_ICON='@lvl2@';; 13.38 + lvl3) QUALITY_ICON='@lvl3@';; 13.39 + lvl4|lvl5) QUALITY_ICON='@lvl4@';; 13.40 + esac 13.41 LEVEL=$(echo "$SCAN" | sed -n 's|.*Signal level[:=]\([^ ]*\).*|\1|p; s|-|−|') 13.42 13.43 ENCRYPTION=$(echo "$SCAN" | sed -n 's|.*Encryption key[:=]\([^ ]*\).*|\1|p') # on/off 13.44 @@ -390,14 +397,14 @@ 13.45 # "WPA" or "WPA2" or "WPA/WPA2" (maybe also "WPA2/WPA") 13.46 ENC_SIMPLE=$(echo "$SCAN" | sed -n '/.*WPA.*/ s|.*\(WPA[^ ]*\).*|\1|p') 13.47 ENC_SIMPLE=$(echo $ENC_SIMPLE | sed 's| |/|') 13.48 - ENC_ICON='sechi' # high 13.49 + ENC_ICON='@sechi@' # high 13.50 if [ -z "$ENC_SIMPLE" ]; then 13.51 WIFI_KEY_TYPE='WEP' 13.52 - ENC_SIMPLE='WEP'; ENC_ICON='secmi' # middle 13.53 + ENC_SIMPLE='WEP'; ENC_ICON='@secmi@' # middle 13.54 fi 13.55 else 13.56 WIFI_KEY_TYPE='NONE' 13.57 - ENC_SIMPLE="$(_ 'None')"; ENC_ICON='seclo' # low 13.58 + ENC_SIMPLE="$(_ 'None')"; ENC_ICON='@seclo@' # low 13.59 fi 13.60 13.61 # Connected or not connected... 13.62 @@ -410,7 +417,7 @@ 13.63 13.64 cat <<EOT 13.65 <tr> 13.66 - <td><a data-icon="wifi" onclick="loadcfg('$ESSID', '$BSSID', '$WIFI_KEY_TYPE')">${ESSID:-$HIDDEN}</a></td> 13.67 + <td><a data-icon="@wifi@" onclick="loadcfg('$ESSID', '$BSSID', '$WIFI_KEY_TYPE')">${ESSID:-$HIDDEN}</a></td> 13.68 <td><span data-icon="$QUALITY_ICON" title="Quality: $QUALITY"> $LEVEL dBm</span></td> 13.69 <td>$CHANNEL</td> 13.70 <td><span data-icon="$ENC_ICON">$ENC_SIMPLE</span></td> 13.71 @@ -443,9 +450,9 @@ 13.72 [ -w /etc/network.conf ] && cat <<EOT 13.73 <form> 13.74 <input type="hidden" name="wifi"/> 13.75 - <button name="start_wifi" data-icon="start" $start_disabled>$(_ 'Start')</button><!-- 13.76 - --><button name="stop" data-icon="stop" $stop_disabled >$(_ 'Stop' )</button><!-- 13.77 - --><button type="submit" data-icon="refresh" $stop_disabled >$(_ 'Scan' )</button> 13.78 + <button name="start_wifi" data-icon="@start@" $start_disabled>$(_ 'Start')</button><!-- 13.79 + --><button name="stop" data-icon="@stop@" $stop_disabled >$(_ 'Stop' )</button><!-- 13.80 + --><button type="submit" data-icon="@refresh@" $stop_disabled >$(_ 'Scan' )</button> 13.81 </form> 13.82 EOT 13.83 13.84 @@ -453,7 +460,7 @@ 13.85 if [ -n "$start_disabled" ]; then 13.86 cat <<EOT 13.87 <section id="wifiList"> 13.88 - <div style="text-align: center;"><span data-icon="clock">$(_ 'Scanning wireless interface...')</span></div> 13.89 + <div style="text-align: center;"><span data-icon="@clock@">$(_ 'Scanning wireless interface...')</span></div> 13.90 </section> 13.91 13.92 <script type="text/javascript"> 13.93 @@ -534,7 +541,7 @@ 13.94 <td><div>$(_ 'Password')</div></td> 13.95 <td><div> 13.96 <input type="password" name="password" value="$WIFI_KEY_ESCAPED" id="password"/> 13.97 - <span data-img="view" title="$(_ 'Show password')" 13.98 + <span data-img="@view@" title="$(_ 'Show password')" 13.99 onmousedown="document.getElementById('password').type='text'; return false" 13.100 onmouseup="document.getElementById('password').type='password'" 13.101 onmouseout="document.getElementById('password').type='password'" 13.102 @@ -546,8 +553,8 @@ 13.103 </form> 13.104 </div> 13.105 <footer> 13.106 - <button form="connection" type="submit" name="wifi" data-icon="ok">$(_ 'Configure')</button> 13.107 - <button data-icon="user" onclick="shareWiFi(); popup('popup_qr', 'show');">$(_ 'Share')</button> 13.108 + <button form="connection" type="submit" name="wifi" data-icon="@ok@">$(_ 'Configure')</button> 13.109 + <button data-icon="@user@" onclick="shareWiFi(); popup('popup_qr', 'show');">$(_ 'Share')</button> 13.110 </footer> 13.111 </section> 13.112 13.113 @@ -636,16 +643,16 @@ 13.114 <form action="index.cgi" id="indexform"></form> 13.115 13.116 <form id="mainform"><!-- 13.117 - --><button name="start" data-icon="start" $start_disabled>$(_ 'Start' )</button><!-- 13.118 - --><button name="stop" data-icon="stop" $stop_disabled >$(_ 'Stop' )</button><!-- 13.119 - --><button name="restart" data-icon="restart" $stop_disabled >$(_ 'Restart')</button> 13.120 + --><button name="start" data-icon="@start@" $start_disabled>$(_ 'Start' )</button><!-- 13.121 + --><button name="stop" data-icon="@stop@" $stop_disabled >$(_ 'Stop' )</button><!-- 13.122 + --><button name="restart" data-icon="@restart@" $stop_disabled >$(_ 'Restart')</button> 13.123 </form> 13.124 13.125 <div class="float-right"><!-- 13.126 -->$(_ 'Configuration:')<!-- 13.127 - --><button form="indexform" name="file" value="/etc/network.conf" data-icon="conf">network.conf</button><!-- 13.128 - --><button form="mainform" name="eth" data-icon="eth">Ethernet</button><!-- 13.129 - --><button form="mainform" name="wifi" data-icon="wifi">Wireless</button> 13.130 + --><button form="indexform" name="file" value="/etc/network.conf" data-icon="@conf@">network.conf</button><!-- 13.131 + --><button form="mainform" name="eth" data-icon="@eth@">Ethernet</button><!-- 13.132 + --><button form="mainform" name="wifi" data-icon="@wifi@">Wireless</button> 13.133 </div> 13.134 13.135 13.136 @@ -659,7 +666,7 @@ 13.137 EOT 13.138 _ 'forward packets between interfaces' 13.139 [ "$REMOTE_USER" == 'root' ] && cat <<EOT 13.140 - <button form="mainform" name="toggleipforward" data-icon="ok">$(_ 'Change')</button> 13.141 + <button form="mainform" name="toggleipforward" data-icon="@ok@">$(_ 'Change')</button> 13.142 EOT 13.143 cat <<EOT 13.144 </footer> 13.145 @@ -668,14 +675,14 @@ 13.146 13.147 <section> 13.148 <header id="hosts">$(_ 'Hosts'; edit_button /etc/hosts)</header> 13.149 - <span data-icon="info">$(r=$(getdb hosts | wc -l); 13.150 + <span data-icon="@info@">$(r=$(getdb hosts | wc -l); 13.151 _p '%d record in the hosts DB' \ 13.152 '%d records in the hosts DB' "$r" \ 13.153 "$r")</span> 13.154 <pre class="scroll">$(getdb hosts | fgrep -v 0.0.0.0)</pre> 13.155 <footer> 13.156 <form action="hosts.cgi"> 13.157 - <button data-icon="admin" data-root>$(_ 'Configure')</button> 13.158 + <button data-icon="@admin@" data-root>$(_ 'Configure')</button> 13.159 $(_ 'Use hosts file as Ad blocker') 13.160 </form> 13.161 </footer> 13.162 @@ -690,7 +697,7 @@ 13.163 cat <<EOT 13.164 <form> 13.165 <input type="text" name="hostname" value="$(hostname)"/><!-- 13.166 - --><button type="submit" data-icon="ok">$(_ 'Change')</button> 13.167 + --><button type="submit" data-icon="@ok@">$(_ 'Change')</button> 13.168 </form> 13.169 EOT 13.170 else 13.171 @@ -730,7 +737,7 @@ 13.172 <tr><td> 13.173 <input type="hidden" name="entry" value="$(urlencode "$(echo $line | \ 13.174 sed 's/) .* on/ -i/;s/.*(//')")"> 13.175 - <button type="submit" data-icon="remove" name="rmarp"></button> 13.176 + <button type="submit" data-icon="@remove@" name="rmarp"></button> 13.177 </td><td><pre>$line</pre></td></tr> 13.178 </form> 13.179 EOT 13.180 @@ -740,8 +747,8 @@ 13.181 <footer> 13.182 <form> 13.183 IP <input type="text" name="ip" value="10.20.30.40" size="12" /> on $(select_if)<!-- 13.184 - --><button type="submit" data-icon="upgrade" name="proxyarp">$(_ 'Proxy')</button> 13.185 - or <button type="submit" data-icon="add" name="addarp">$(_ 'Add')</button> 13.186 + --><button type="submit" data-icon="@upgrade@" name="proxyarp">$(_ 'Proxy')</button> 13.187 + or <button type="submit" data-icon="@add@" name="addarp">$(_ 'Add')</button> 13.188 MAC <input type="text" name="mac" value="11:22:33:44:55:66" size="16" /> 13.189 </form> 13.190 EOT
14.1 --- a/powersaving.cgi Tue Dec 08 13:38:20 2015 +0200 14.2 +++ b/powersaving.cgi Thu Dec 10 04:11:45 2015 +0200 14.3 @@ -12,7 +12,7 @@ 14.4 case "$1" in 14.5 menu) 14.6 cat <<EOT 14.7 -<li><a data-icon="display" href="powersaving.cgi" data-root>$(_ 'Power saving')</a></li> 14.8 +<li><a data-icon="@display@" href="powersaving.cgi" data-root>$(_ 'Power saving')</a></li> 14.9 EOT 14.10 exit 14.11 esac 14.12 @@ -27,7 +27,7 @@ 14.13 cat <<EOT 14.14 <section> 14.15 <header> 14.16 - <span data-icon="display">DPMS (Display Power Management Signaling)</span> 14.17 + <span data-icon="@display@">DPMS (Display Power Management Signaling)</span> 14.18 </header> 14.19 14.20 <div>$(_ "DPMS enables power saving behaviour of monitors when the computer is not in use.")</div> 14.21 @@ -67,7 +67,7 @@ 14.22 if ($1 ~ /Option/ && $2 ~ /DPMS/) { D = $4; } 14.23 if ($1 ~ /EndSection/) { 14.24 if (D == "false") { D = ""; } else { D = "checked"; } 14.25 - printf "<tr><td data-icon=\"display\">%s</td><td>%s</td><td>%s</td><td>", I, V, M; 14.26 + printf "<tr><td data-icon=\"@display@\">%s</td><td>%s</td><td>%s</td><td>", I, V, M; 14.27 printf "<label><input type=\"checkbox\" name=\"%s\" %s/>DPMS</label>", I, D; 14.28 printf "</td></tr>\n"; 14.29 } 14.30 @@ -97,15 +97,15 @@ 14.31 <td style="vertical-align: top"> 14.32 <fieldset> 14.33 <legend>$(_ 'Manual edit')</legend> 14.34 - <a data-icon="conf" href="index.cgi?file=$monitor_conf">$(basename $monitor_conf)</a><br/> 14.35 - <a data-icon="conf" href="index.cgi?file=$layout_conf">$(basename $layout_conf)</a> 14.36 + <a data-icon="@conf@" href="index.cgi?file=$monitor_conf">$(basename $monitor_conf)</a><br/> 14.37 + <a data-icon="@conf@" href="index.cgi?file=$layout_conf">$(basename $layout_conf)</a> 14.38 </fieldset> 14.39 <pre>$(for i in $(POST); do echo "$i: " $(POST $i); done)</pre> 14.40 </td> 14.41 </tr> 14.42 </table> 14.43 <footer> 14.44 - <button type="submit" data-icon="ok">$(_ 'Change')</button> 14.45 + <button type="submit" data-icon="@ok@">$(_ 'Change')</button> 14.46 </footer> 14.47 </form> 14.48 </section> 14.49 @@ -117,7 +117,7 @@ 14.50 cpu=$(awk -F: '$1 ~ "model name" { 14.51 gsub(/\(TM\)/,"™",$2); gsub(/\(R\)/,"®",$2); 14.52 split($2,c,"@"); 14.53 - print "<span data-icon=\"cpu\">" c[1] "</span>"; 14.54 + print "<span data-icon=\"@cpu@\">" c[1] "</span>"; 14.55 }' /proc/cpuinfo) 14.56 multiplier=$(echo "$cpu" | wc -l) 14.57 [ "$multiplier" -ne 1 ] && cpu="$multiplier × $(echo "$cpu" | head -n1)" 14.58 @@ -126,7 +126,7 @@ 14.59 14.60 cat <<EOT 14.61 <section> 14.62 - <header><span data-icon="cpu">$(_ 'CPU')</span></header> 14.63 + <header><span data-icon="@cpu@">$(_ 'CPU')</span></header> 14.64 14.65 <div>$(_ "CPU frequency scaling enables the operating system to scale the \ 14.66 CPU frequency up or down in order to save power. CPU frequencies can be scaled \ 14.67 @@ -159,7 +159,7 @@ 14.68 14.69 for module in $(ls | grep -v 'mperf\|speedstep-lib'); do 14.70 module="${module%.ko.xz}"; module="${module//-/_}" 14.71 - if echo $lsmod | grep -q " $module "; then icon='ok'; else icon='cancel'; fi 14.72 + if echo $lsmod | grep -q " $module "; then icon='@ok@'; else icon='@cancel@'; fi 14.73 echo "<tr><td><span data-icon=\"$icon\">$module</span></td><td>" 14.74 modinfo $module | awk -F: '$1=="description"{ 14.75 gsub(/\(TM\)/,"™",$2); gsub(/\(R\)/,"®",$2);
15.1 --- a/settings.cgi Tue Dec 08 13:38:20 2015 +0200 15.2 +++ b/settings.cgi Thu Dec 10 04:11:45 2015 +0200 15.3 @@ -94,7 +94,8 @@ 15.4 fi ;; 15.5 15.6 # System time 15.7 - calendar) # display Yad date picker (AJAX) 15.8 + calendar) 15.9 + # display Yad date picker (AJAX) 15.10 new_date="$(DISPLAY=':0.0' XAUTHORITY='/var/run/slim.auth' \ 15.11 yad --calendar --on-top --mouse --undecorated \ 15.12 --window-icon=config-date --title="$(_ 'Set date')" \ 15.13 @@ -102,10 +103,12 @@ 15.14 header 15.15 echo "$new_date"; exit 0;; 15.16 15.17 - settz) # set timezone 15.18 + settz) 15.19 + # set timezone 15.20 GET tz > /etc/TZ ;; 15.21 15.22 - date) # only accepted format is MMDDhhmm[[YY]YY][.ss] 15.23 + date) 15.24 + # only accepted format is MMDDhhmm[[YY]YY][.ss] 15.25 if [ -n "$(GET dateFull)" ]; then 15.26 dateFull="$(GET dateFull)" # %F = YYYY-MM-DD 15.27 date $(printf '%02d%02d%02d%02d%d.%02d' "${dateFull:5:2}" \ 15.28 @@ -117,13 +120,16 @@ 15.29 "$(GET sec)") >/dev/null 15.30 fi;; 15.31 15.32 - rdate) # get and possibly set the system date/time from a remote host 15.33 + rdate) 15.34 + # get and possibly set the system date/time from a remote host 15.35 rdate -s tick.greyware.com ;; 15.36 15.37 - hwclock) # query and set hardware clock (RTC) 15.38 + hwclock) 15.39 + # query and set hardware clock (RTC) 15.40 hwclock -w -u ;; 15.41 15.42 - gethwclock) # get date/time from hardware clock (AJAX) 15.43 + gethwclock) 15.44 + # get date/time from hardware clock (AJAX) 15.45 header; hwclock -ur | sed 's|0.000000 seconds||'; exit 0;; 15.46 15.47 esac 15.48 @@ -201,7 +207,8 @@ 15.49 ;; 15.50 15.51 15.52 - *\ menuIcon\ *) # return specified image (AJAX) 15.53 + *\ menuIcon\ *) 15.54 + # return specified image (AJAX) 15.55 icon="/usr/share/pixmaps/$(GET menuIcon).png" 15.56 [ ! -r $icon ] && exit 0 15.57 header "Content-Type: image/png"; cat $icon; exit 0 15.58 @@ -232,7 +239,7 @@ 15.59 <header> 15.60 <input type="hidden" name="groups"/> 15.61 <!-- $(_ 'Selection:') --> 15.62 - <button name="do" value="delgroups" data-icon="delete">$(_ 'Delete group')</button> 15.63 + <button name="do" value="delgroups" data-icon="@delete@">$(_ 'Delete group')</button> 15.64 </header> 15.65 15.66 <div class="scroll"> 15.67 @@ -253,7 +260,7 @@ 15.68 cat <<EOT 15.69 <tr> 15.70 <td><input type="checkbox" name="group" value="$group" id="$group"/> 15.71 - <label for="$group" data-icon="group">$group</label></td> 15.72 + <label for="$group" data-icon="@group@">$group</label></td> 15.73 <td>$3</td> 15.74 <td>${4//,/, }</td> 15.75 </tr> 15.76 @@ -272,7 +279,7 @@ 15.77 <form class="wide"> 15.78 <input type="hidden" name="groups"/> 15.79 <footer>$(_ 'Group name:') <input type="text" name="group"/> 15.80 - <button type="submit" name="do" value="addgroup" data-icon="add">$(_ 'Create group')</button> 15.81 + <button type="submit" name="do" value="addgroup" data-icon="@add@">$(_ 'Create group')</button> 15.82 </footer> 15.83 </form> 15.84 </section> 15.85 @@ -287,8 +294,8 @@ 15.86 $(_ 'User login:') <select name="member">$(listdb passwd)</select> 15.87 </div> 15.88 <footer> 15.89 - <button name="do" value="addmember" data-icon="add">$(_ 'Add user')</button> 15.90 - <button name="do" value="delmember" data-icon="delete">$(_ 'Remove user')</button> 15.91 + <button name="do" value="addmember" data-icon="@add@">$(_ 'Add user')</button> 15.92 + <button name="do" value="delmember" data-icon="@delete@">$(_ 'Remove user')</button> 15.93 </footer> 15.94 </form> 15.95 </section> 15.96 @@ -309,9 +316,9 @@ 15.97 <form class="wide"> 15.98 <header> 15.99 <!--$(_ 'Selection:')--> 15.100 - <button name="do" value="delusers" data-icon="delete">$(_ 'Delete user')</button> 15.101 - <button name="do" value="lockusers" data-icon="lock" >$(_ 'Lock user' )</button> 15.102 - <button name="do" value="unlockusers" data-icon="unlock">$(_ 'Unlock user')</button> 15.103 + <button name="do" value="delusers" data-icon="@delete@">$(_ 'Delete user')</button> 15.104 + <button name="do" value="lockusers" data-icon="@lock@" >$(_ 'Lock user' )</button> 15.105 + <button name="do" value="unlockusers" data-icon="@unlock@">$(_ 'Unlock user')</button> 15.106 </header> 15.107 15.108 <table class="wide zebra center"> 15.109 @@ -328,10 +335,10 @@ 15.110 EOT 15.111 for login in $(getdb passwd | cut -d: -f1); do 15.112 if [ -d "/home/$login" ]; then 15.113 - blocked=''; usericon='user' 15.114 + blocked=''; usericon='@user@' 15.115 if getdb shadow | grep -qs "^$login:!"; then 15.116 blocked='class="color31"' 15.117 - usericon="lock" 15.118 + usericon='@lock@' 15.119 fi 15.120 IFS=':' 15.121 set -- $(getdb passwd | grep "^$login:") 15.122 @@ -357,7 +364,7 @@ 15.123 <footer> 15.124 $(_ 'Password:') 15.125 <input type="password" name="password" placeholder="$(_ 'New password')"/> 15.126 - <button type="submit" name="do" value="chpasswd" data-icon="ok">$(_ 'Change password')</button> 15.127 + <button type="submit" name="do" value="chpasswd" data-icon="@ok@">$(_ 'Change password')</button> 15.128 </footer> 15.129 </form> 15.130 </section> 15.131 @@ -378,7 +385,7 @@ 15.132 </table> 15.133 15.134 <footer> 15.135 - <button type="submit" name="do" value="adduser" data-icon="add">$(_ 'Create user')</button> 15.136 + <button type="submit" name="do" value="adduser" data-icon="@add@">$(_ 'Create user')</button> 15.137 </footer> 15.138 </form> 15.139 </section> 15.140 @@ -477,7 +484,7 @@ 15.141 </table> 15.142 15.143 <footer> 15.144 - <button type="submit" data-icon="ok">$(_ 'Activate')</button> 15.145 + <button type="submit" data-icon="@ok@">$(_ 'Activate')</button> 15.146 </footer> 15.147 </form> 15.148 </section> 15.149 @@ -539,7 +546,7 @@ 15.150 </tr> 15.151 </table> 15.152 15.153 - <p>$(_ 'Manual edit: %s' "<a data-icon=\"conf\" href="index.cgi?file=$HOME/.profile">~/.profile</a>")<br/> 15.154 + <p>$(_ 'Manual edit: %s' "<a data-icon=\"@conf@\" href="index.cgi?file=$HOME/.profile">~/.profile</a>")<br/> 15.155 $(_ 'To take effect: log out and log in to system or execute command in the terminal:')</p> 15.156 15.157 <pre>. ~/.profile</pre> 15.158 @@ -588,10 +595,10 @@ 15.159 </tr> 15.160 </table> 15.161 <p>$(_ 'Manual edit: %s' \ 15.162 - "<a data-icon=\"conf\" href=\"index.cgi?file=$HOME/.local/share/desktop-directories/SliTazMenu.directory\">~/.local/share/desktop-directories/SliTazMenu.directory</a> 15.163 + "<a data-icon=\"@conf@\" href=\"index.cgi?file=$HOME/.local/share/desktop-directories/SliTazMenu.directory\">~/.local/share/desktop-directories/SliTazMenu.directory</a> 15.164 $( 15.165 find $HOME/.config/lxpanel -type f -name panel | awk -vh="$HOME" \ 15.166 - '{ printf "<a data-icon=\"conf\" href=\"index.cgi?file=%s\">%s</a> ", $1, gensub(h, "~", "")}' 15.167 + '{ printf "<a data-icon=\"@conf@\" href=\"index.cgi?file=%s\">%s</a> ", $1, gensub(h, "~", "")}' 15.168 )")</p> 15.169 </fieldset> 15.170 </div> 15.171 @@ -609,8 +616,8 @@ 15.172 15.173 cat <<EOT 15.174 <form><!-- 15.175 - --><button name="users" data-icon="user" >$(_ 'Manage users' )</button><!-- 15.176 - --><button name="groups" data-icon="group">$(_ 'Manage groups')</button> 15.177 + --><button name="users" data-icon="@user@" >$(_ 'Manage users' )</button><!-- 15.178 + --><button name="groups" data-icon="@group@">$(_ 'Manage groups')</button> 15.179 </form> 15.180 15.181 <section> 15.182 @@ -623,17 +630,17 @@ 15.183 awk -vtz="$(cat /etc/TZ)" \ 15.184 '{printf("<option%s>%s</option>", ($1 == tz)?" selected":"", $1)}') 15.185 </select> 15.186 - <button name="do" value="settz" data-icon="ok">$(_ 'Change')</button> 15.187 + <button name="do" value="settz" data-icon="@ok@">$(_ 'Change')</button> 15.188 </fieldset> 15.189 15.190 <fieldset><legend>$(_ 'System time:')</legend> 15.191 $(date | sed 's|[0-9][0-9]:[0-9:]*|<span id="time">&</span>|') 15.192 - <button name="do" value="rdate" data-icon="sync">$(_ 'Sync online')</button> 15.193 + <button name="do" value="rdate" data-icon="@sync@">$(_ 'Sync online')</button> 15.194 </fieldset> 15.195 15.196 <fieldset id="hwclock1"><legend>$(_ 'Hardware clock:')</legend> 15.197 <span id="hwclocks">$(hwclock -ur | sed 's|0.000000 seconds||')</span> 15.198 - <button name="do" value="hwclock" id="hwclock" data-icon="clock">$(_ 'Set hardware clock')</button> 15.199 + <button name="do" value="hwclock" id="hwclock" data-icon="@clock@">$(_ 'Set hardware clock')</button> 15.200 </fieldset> 15.201 15.202 <fieldset><legend>$(_ 'Set date')</legend> 15.203 @@ -652,7 +659,7 @@ 15.204 else 15.205 cat <<EOT 15.206 <button onclick="datePicker(); return false"> 15.207 - <span id="dateTime" data-icon="calendar">$(date +%x)<span style="display:none">$(date +%F)</span></span> 15.208 + <span id="dateTime" data-icon="@calendar@">$(date +%x)<span style="display:none">$(date +%F)</span></span> 15.209 </button> 15.210 EOT 15.211 fi 15.212 @@ -663,12 +670,12 @@ 15.213 EOT 15.214 if [ -z "$(which yad)" ]; then 15.215 cat <<EOT 15.216 - <button name="do" value="date" data-icon="ok">$(_ 'Set date')</button> 15.217 + <button name="do" value="date" data-icon="@ok@">$(_ 'Set date')</button> 15.218 EOT 15.219 else 15.220 cat <<EOT 15.221 15.222 - <button data-icon="ok" onclick="submitSysTimeForm()">$(_ 'Set date')</button> 15.223 + <button data-icon="@ok@" onclick="submitSysTimeForm()">$(_ 'Set date')</button> 15.224 EOT 15.225 fi 15.226 cat <<EOT 15.227 @@ -737,7 +744,7 @@ 15.228 cat <<EOT 15.229 $(_ 'Current system locale:') 15.230 <strong>$(locale | grep LANG | cut -d= -f2)</strong> 15.231 - <button name="locale" data-icon="locale">$(_ 'Change')</button> 15.232 + <button name="locale" data-icon="@locale@">$(_ 'Change')</button> 15.233 EOT 15.234 fi 15.235 cat <<EOT 15.236 @@ -780,8 +787,8 @@ 15.237 <form id="index" action="index.cgi"></form> 15.238 <br/> 15.239 $(_ 'Suggested keymap for Xorg:') $keymap 15.240 - <button form="settings" name="apply_xorg_kbd" value="$keymap" data-icon="ok">$(_ 'Activate')</button> 15.241 - <button form="index" name="file" value="$keyboard_config" data-icon="edit">$(_ 'Edit')</button> 15.242 + <button form="settings" name="apply_xorg_kbd" value="$keymap" data-icon="@ok@">$(_ 'Activate')</button> 15.243 + <button form="index" name="file" value="$keyboard_config" data-icon="@edit@">$(_ 'Edit')</button> 15.244 <input form="index" type="hidden" name="action" value="edit" /> 15.245 <br/> 15.246 EOT 15.247 @@ -792,7 +799,7 @@ 15.248 <select name="gen_keymap"> 15.249 $(list_keymaps) 15.250 </select> 15.251 - <button type="submit" data-icon="ok">$(_ 'Activate')</button> 15.252 + <button type="submit" data-icon="@ok@">$(_ 'Activate')</button> 15.253 </form> 15.254 </div> 15.255 </section> 15.256 @@ -804,13 +811,13 @@ 15.257 <form class="wide"> 15.258 <fieldset><legend>$(_ 'Style:')</legend> 15.259 <select name="style">$(list_styles)</select> 15.260 - <button data-icon="ok">$(_ 'Activate')</button> 15.261 + <button data-icon="@ok@">$(_ 'Activate')</button> 15.262 </fieldset> 15.263 </form> 15.264 15.265 <fieldset><legend>$(_ 'Configuration files:')</legend> 15.266 - <button form="index" name="file" value="$CONFIG" data-icon="edit">$(_ 'Panel')</button> 15.267 - <button form="index" name="file" value="$HTTPD_CONF" data-icon="edit">$(_ 'Server')</button> 15.268 + <button form="index" name="file" value="$CONFIG" data-icon="@edit@">$(_ 'Panel')</button> 15.269 + <button form="index" name="file" value="$HTTPD_CONF" data-icon="@edit@">$(_ 'Server')</button> 15.270 </fieldset> 15.271 15.272 <p>$(_ 'TazPanel provides a debugging mode and page:')
16.1 --- a/stripall.sh Tue Dec 08 13:38:20 2015 +0200 16.2 +++ b/stripall.sh Thu Dec 10 04:11:45 2015 +0200 16.3 @@ -5,8 +5,6 @@ 16.4 16.5 16.6 substitute_icons() { 16.7 - grep -q 'data-icon="\|data-img"' $1 || return 16.8 - 16.9 # Customize sed script 16.10 cp "$sed_script" "$sed_script.do" 16.11 sed -i "s|@@@|$1|" "$sed_script.do" 16.12 @@ -44,8 +42,7 @@ 16.13 msg \n msgerr \n msgwarn \n msgup 16.14 msgtip \n vpn \n floppy \n folder " | \ 16.15 while read icon symbol; do 16.16 - echo -n "s|data-icon=\"$icon\"|data-icon=\"$symbol\"|g; " >> "$sed_script" 16.17 - echo -n "s|data-img=\"$icon\"|data-img=\"$symbol\"|g; " >> "$sed_script" 16.18 + echo -n "s|@$icon@|$symbol|g; " >> "$sed_script" 16.19 done 16.20 echo "' @@@" >> "$sed_script" 16.21 16.22 @@ -56,20 +53,33 @@ 16.23 for CGI in *.cgi tazpanel libtazpanel bootloader *.html; do 16.24 echo "Processing $CGI" 16.25 16.26 - mv $CGI $CGI.old 16.27 - # Copy initial comment (down to empty line) 16.28 - sed '1,/^$/!d' $CGI.old > $CGI 16.29 - # Remove initial tabs, other comments and empty lines 16.30 - sed 's|^[\t ]*||;/^#/d;/^$/d' $CGI.old >> $CGI 16.31 - rm $CGI.old 16.32 + case $CGI in 16.33 + tazpanel.*.html) 16.34 + # doc/tazpanel.*.html 16.35 + substitute_icons $CGI 16.36 + if [ -n "$(which tidy)" ]; then 16.37 + tidy -m -q -w 0 -utf8 --show-body-only y --quote-nbsp n $CGI 16.38 + else 16.39 + sed -i 's|[ ][ ]*| |g; s|^ ||' $CGI 16.40 + fi 16.41 + ;; 16.42 + *) 16.43 + mv $CGI $CGI.old 16.44 + # Copy initial comment (down to empty line) 16.45 + sed '1,/^$/!d' $CGI.old > $CGI 16.46 + # Remove initial tabs, other comments and empty lines 16.47 + sed 's|^[\t ]*||;/^#/d;/^$/d' $CGI.old >> $CGI 16.48 + rm $CGI.old 16.49 16.50 - substitute_icons $CGI 16.51 + substitute_icons $CGI 16.52 16.53 - sed -i 's|" *>|">|g' $CGI 16.54 - sed -i "s|' *)|')|g" $CGI 16.55 - sed -i 's| *;;|;;|g' $CGI 16.56 + sed -i 's|" *>|">|g' $CGI 16.57 + sed -i "s|' *)|')|g" $CGI 16.58 + sed -i 's| *;;|;;|g' $CGI 16.59 16.60 - chmod a+x $CGI 16.61 + chmod a+x $CGI 16.62 + ;; 16.63 + esac 16.64 16.65 done 16.66 16.67 @@ -96,6 +106,7 @@ 16.68 for JS in *.js; do 16.69 echo -en "\nProcessing $JS" 16.70 16.71 + substitute_icons $JS 16.72 sed -i 's|^[\t ]*||; /^$/d; /^\/\//d; /console\./d' $JS 16.73 16.74 # Try "jsmin"
17.1 --- a/styles/default/base.css Tue Dec 08 13:38:20 2015 +0200 17.2 +++ b/styles/default/base.css Thu Dec 10 04:11:45 2015 +0200 17.3 @@ -573,7 +573,9 @@ 17.4 vertical-align: top; 17.5 } 17.6 17.7 -[data-icon^=msg]::before { height: 32px; width: 32px; font-size: 32px; line-height: 32px; } 17.8 +[data-icon="@msg@"]::before, [data-icon="@msgerr@"]::before, 17.9 +[data-icon="@msgwarn@"]::before, [data-icon="@msgup@"]::before, 17.10 +[data-icon="@msgtip@"]::before { height: 32px; width: 32px; font-size: 32px; line-height: 32px; } 17.11 17.12 17.13 /*******************
18.1 --- a/styles/default/header.html Tue Dec 08 13:38:20 2015 +0200 18.2 +++ b/styles/default/header.html Thu Dec 10 04:11:45 2015 +0200 18.3 @@ -14,7 +14,7 @@ 18.4 [ -f $x ] && sh $x menu $x | sed "$filter" 18.5 [ -d $x ] || continue 18.6 icon="$(sed '/data-icon/!d;s/.*data-icon="\([^"]*\).*/\1/;q' $x/*)" 18.7 - echo -e "<li><a data-icon=\"${icon:-add}\">$(_ "$(basename $x)")</a>\n<menu>" 18.8 + echo -e "<li><a data-icon=\"${icon:-@add@}\">$(_ "$(basename $x)")</a>\n<menu>" 18.9 extra_menu ${x#menu.d/} 18.10 echo -e "</menu>\n</li>" 18.11 done 18.12 @@ -44,35 +44,35 @@ 18.13 <li tabindex="1"> 18.14 <span>$(_ 'Panel')</span> 18.15 <menu> 18.16 - <li><a data-icon="info" href="index.cgi">$(_ 'Summary')</a></li> 18.17 - <li><a data-icon="proc" href="index.cgi?top">$(_ 'Processes')</a></li> 18.18 - <li><a data-icon="terminal" href="index.cgi?cmd=help">$(_ 'Terminal')</a></li> 18.19 - <li><a data-icon="report" href="index.cgi?report" data-root>$(_ 'Create Report')</a></li> 18.20 + <li><a data-icon="@info@" href="index.cgi">$(_ 'Summary')</a></li> 18.21 + <li><a data-icon="@proc@" href="index.cgi?top">$(_ 'Processes')</a></li> 18.22 + <li><a data-icon="@terminal@" href="index.cgi?cmd=help">$(_ 'Terminal')</a></li> 18.23 + <li><a data-icon="@report@" href="index.cgi?report" data-root>$(_ 'Create Report')</a></li> 18.24 $(extra_menu panel) 18.25 </menu> 18.26 </li> 18.27 <li tabindex="2"> 18.28 <span>$(_ 'Network')</span> 18.29 <menu> 18.30 - <li><a data-icon="info" href="network.cgi">$(_ 'Summary')</a></li> 18.31 - <li><a data-icon="conf" href="index.cgi?file=/etc/network.conf&action=edit">$(_ 'Config file')</a></li> 18.32 - <li><a data-icon="eth" href="network.cgi?eth">$(_ 'Ethernet')</a></li> 18.33 - <li><a data-icon="wifi" href="network.cgi?wifi">$(_ 'Wireless')</a></li> 18.34 + <li><a data-icon="@info@" href="network.cgi">$(_ 'Summary')</a></li> 18.35 + <li><a data-icon="@conf@" href="index.cgi?file=/etc/network.conf&action=edit">$(_ 'Config file')</a></li> 18.36 + <li><a data-icon="@eth@" href="network.cgi?eth">$(_ 'Ethernet')</a></li> 18.37 + <li><a data-icon="@wifi@" href="network.cgi?wifi">$(_ 'Wireless')</a></li> 18.38 $(extra_menu network) 18.39 </menu> 18.40 </li> 18.41 <li tabindex="3"> 18.42 <span>$(_ 'Boot')</span> 18.43 <menu> 18.44 - <li><a data-icon="info" href="boot.cgi">$(_ 'Summary')</a></li> 18.45 + <li><a data-icon="@info@" href="boot.cgi">$(_ 'Summary')</a></li> 18.46 EOT 18.47 18.48 [ -w /boot/grub/menu.lst ] && cat <<EOT 18.49 - <li><a data-icon="grub" href="boot.cgi?grub">$(_ 'Boot loader')</a></li> 18.50 + <li><a data-icon="@grub@" href="boot.cgi?grub">$(_ 'Boot loader')</a></li> 18.51 EOT 18.52 18.53 cat <<EOT 18.54 - <li><a data-icon="logs" href="boot.cgi?log">$(_ 'Boot logs')</a> 18.55 + <li><a data-icon="@logs@" href="boot.cgi?log">$(_ 'Boot logs')</a> 18.56 <menu> 18.57 <li><a data-icon="" href="boot.cgi?log=kernel">$(_ 'Kernel messages')</a></li> 18.58 <li><a data-icon="" href="boot.cgi?log=boot">$(_ 'Boot scripts')</a></li> 18.59 @@ -80,30 +80,30 @@ 18.60 <li><a data-icon="" href="boot.cgi?log=slim">$(_ 'X session')</a></li> 18.61 </menu> 18.62 </li> 18.63 - <li><a data-icon="logs" href="boot.cgi?syslog">$(_ 'System logs')</a> 18.64 - <li><a data-icon="daemons" href="boot.cgi?daemons" data-root>$(_ 'Manage daemons')</a></li> 18.65 + <li><a data-icon="@logs@" href="boot.cgi?syslog">$(_ 'System logs')</a> 18.66 + <li><a data-icon="@daemons@" href="boot.cgi?daemons" data-root>$(_ 'Manage daemons')</a></li> 18.67 $([ -x /usr/bin/taziso ] && 18.68 - echo "<li><a data-icon=\"cd\" href=\"boot.cgi?iso\" data-root>$(_ 'ISO mine')</a>") 18.69 + echo "<li><a data-icon=\"@cd@\" href=\"boot.cgi?iso\" data-root>$(_ 'ISO mine')</a>") 18.70 $(extra_menu boot) 18.71 </menu> 18.72 </li> 18.73 <li tabindex="4"> 18.74 <span>$(_ 'Hardware')</span> 18.75 <menu> 18.76 - <li><a data-icon="info" href="hardware.cgi">$(_ 'Summary')</a></li> 18.77 - <li><a data-icon="modules" href="hardware.cgi?modules">$(_ 'Kernel modules')</a></li> 18.78 - <li><a data-icon="detect" href="hardware.cgi?detect" data-root>$(_ 'Detect PCI/USB')</a></li> 18.79 - <li><a data-icon="hdd" href="hardware.cgi#disk">$(_ 'Disks')</a></li> 18.80 + <li><a data-icon="@info@" href="hardware.cgi">$(_ 'Summary')</a></li> 18.81 + <li><a data-icon="@modules@" href="hardware.cgi?modules">$(_ 'Kernel modules')</a></li> 18.82 + <li><a data-icon="@detect@" href="hardware.cgi?detect" data-root>$(_ 'Detect PCI/USB')</a></li> 18.83 + <li><a data-icon="@hdd@" href="hardware.cgi#disk">$(_ 'Disks')</a></li> 18.84 $(extra_menu hardware) 18.85 </menu> 18.86 </li> 18.87 <li tabindex="5"> 18.88 <span>$(_ 'Settings')</span> 18.89 <menu> 18.90 - <li><a data-icon="info" href="settings.cgi" data-root>$(_ 'Summary')</a></li> 18.91 - <li><a data-icon="user" href="settings.cgi?users" data-root>$(_ 'Users')</a></li> 18.92 - <li><a data-icon="group" href="settings.cgi?groups" data-root>$(_ 'Groups')</a></li> 18.93 - <li><a data-icon="settings" href="settings.cgi?tweaks">$(_ 'Tweaks')</a></li> 18.94 + <li><a data-icon="@info@" href="settings.cgi" data-root>$(_ 'Summary')</a></li> 18.95 + <li><a data-icon="@user@" href="settings.cgi?users" data-root>$(_ 'Users')</a></li> 18.96 + <li><a data-icon="@group@" href="settings.cgi?groups" data-root>$(_ 'Groups')</a></li> 18.97 + <li><a data-icon="@settings@" href="settings.cgi?tweaks">$(_ 'Tweaks')</a></li> 18.98 $(extra_menu settings) 18.99 </menu> 18.100 </li> 18.101 @@ -117,16 +117,16 @@ 18.102 18.103 username="${REMOTE_USER:-root}" 18.104 case "$username" in 18.105 - root) icon='data-img="slitaz"'; warn='' 18.106 + root) icon='data-img="@slitaz@"'; warn='' 18.107 toggle_url="http://$HTTP_HOST/";; 18.108 - *) icon='data-img="user"'; warn="$(_ 'Some features are disabled.')"$'\n' 18.109 + *) icon='data-img="@user@"'; warn="$(_ 'Some features are disabled.')"$'\n' 18.110 toggle_url="http://$RANDOM:*@$HTTP_HOST/user/";; 18.111 esac 18.112 18.113 cat <<EOT 18.114 <a $icon title="$(_ 'You are logged in to the TazPanel as user %s.' $username) 18.115 $warn$(_ 'Click to re-login.')" href="$toggle_url$(basename $REQUEST_URI)"></a> 18.116 - <a data-img="help" href="help.cgi"></a> 18.117 + <a data-img="@help@" href="help.cgi"></a> 18.118 </span> 18.119 </nav> 18.120
19.1 --- a/styles/default/tweaks.css Tue Dec 08 13:38:20 2015 +0200 19.2 +++ b/styles/default/tweaks.css Thu Dec 10 04:11:45 2015 +0200 19.3 @@ -200,26 +200,26 @@ 19.4 19.5 a[data-icon] { white-space: pre-line; } 19.6 19.7 -[data-icon="cancel"]::before, [data-icon="delete"]::before, 19.8 -[data-icon="remove"]::before, [data-icon="stop"]:not([disabled])::before, 19.9 -[data-img="help"]::before, [data-img="man"]::before, 19.10 -[data-img="off"]::before, [data-img="remove"]::before, 19.11 -[data-img="stop"]::before, [data-icon="pkgib"]::before, 19.12 -[data-icon="msgerr"]::before, [data-icon="msgwarn"]::before 19.13 +[data-icon="@cancel@"]::before, [data-icon="@delete@"]::before, 19.14 +[data-icon="@remove@"]::before, [data-icon="@stop@"]:not([disabled])::before, 19.15 +[data-img="@help@"]::before, [data-img="@man@"]::before, 19.16 +[data-img="@off@"]::before, [data-img="@remove@"]::before, 19.17 +[data-img="@stop@"]::before, [data-icon="@pkgib@"]::before, 19.18 +[data-icon="@msgerr@"]::before, [data-icon="@msgwarn@"]::before 19.19 {color:#dc322f!important} /*red*/ 19.20 19.21 -[data-icon="restart"]:not([disabled])::before, [data-img="conf"]::before, 19.22 -[data-img="slitaz"]::before, [data-icon="msgup"]::before 19.23 +[data-icon="@restart@"]:not([disabled])::before, [data-img="@conf@"]::before, 19.24 +[data-img="@slitaz@"]::before, [data-icon="@msgup@"]::before 19.25 {color:#cb4b16!important} /*orange*/ 19.26 19.27 -[data-icon="ok"]::before, [data-icon="run"]::before, 19.28 -[data-icon="start"]:not([disabled])::before, [data-img="on"]::before, 19.29 -[data-img="opt"]::before, [data-img="run"]::before, [data-icon="pkgi"]::before, 19.30 -[data-img="user"]::before, [data-icon="msgtip"]::before 19.31 +[data-icon="@ok@"]::before, [data-icon="@run@"]::before, 19.32 +[data-icon="@start@"]:not([disabled])::before, [data-img="@on@"]::before, 19.33 +[data-img="@opt@"]::before, [data-img="@run@"]::before, [data-icon="@pkgi@"]::before, 19.34 +[data-img="@user@"]::before, [data-icon="@msgtip@"]::before 19.35 {color:#859900!important} /*green*/ 19.36 19.37 -[data-img="web"]::before, [data-icon="pkg"]::before, 19.38 -[data-icon="msg"]::before 19.39 +[data-img="@web@"]::before, [data-icon="@pkg@"]::before, 19.40 +[data-icon="@msg@"]::before 19.41 {color:#268bd2!important} /*blue*/ 19.42 19.43 /* disabled buttons with gray icons */
20.1 --- a/test.cgi Tue Dec 08 13:38:20 2015 +0200 20.2 +++ b/test.cgi Thu Dec 10 04:11:45 2015 +0200 20.3 @@ -17,104 +17,76 @@ 20.4 cat <<EOT 20.5 20.6 <section> 20.7 - <header><span data-img="info"></span>Buttons with font icons</header> 20.8 -<!-- 20.9 ---><button data-icon="add" >Add </button><button data-icon="admin" >Admin </button><!-- 20.10 ---><button data-icon="back" >Back </button><button data-icon="battery" >Battery </button><!-- 20.11 ---><button data-icon="brightness" >Brightness </button><button data-icon="cancel" >Cancel </button><!-- 20.12 ---><button data-icon="cd" >CD </button><button data-icon="check" >Check </button><!-- 20.13 ---><button data-icon="clock" >Clock </button><button data-icon="conf" >Conf </button><!-- 20.14 ---><button data-icon="daemons" >Daemons </button><button data-icon="delete" >Delete </button><!-- 20.15 ---><button data-icon="detect" >Detect </button><button data-icon="diff" >Diff </button><!-- 20.16 ---><button data-icon="download" >Download </button><button data-icon="edit" >Edit </button><!-- 20.17 ---><button data-icon="eth" >Eth </button><button data-icon="group" >Group </button><!-- 20.18 ---><button data-icon="grub" >GRUB </button><button data-icon="hdd" >HDD </button><!-- 20.19 ---><button data-icon="help" >Help </button><button data-icon="history" >History </button><!-- 20.20 ---><button data-icon="info" >Info </button><button data-icon="install" >Install </button><!-- 20.21 ---><button data-icon="link" >Link </button><button data-icon="list" >List </button><!-- 20.22 ---><button data-icon="locale" >Locale </button><button data-icon="lock" >Lock </button><!-- 20.23 ---><button data-icon="logs" >Logs </button><button data-icon="loopback">Loopback</button><!-- 20.24 ---><button data-icon="man" >Man </button><button data-icon="modules" >Modules </button><!-- 20.25 ---><button data-icon="off" >Off </button><button data-icon="ok" >OK </button><!-- 20.26 ---><button data-icon="on" >On </button><button data-icon="opt" >Opt </button><!-- 20.27 ---><button data-icon="proc" >Proc </button><button data-icon="refresh" >Refresh </button><!-- 20.28 ---><button data-icon="removable" >Removable </button><button data-icon="remove" >Remove </button><!-- 20.29 ---><button data-icon="repack" >Repack </button><button data-icon="report" >Report </button><!-- 20.30 ---><button data-icon="restart" >Restart </button><button data-icon="run" >Run </button><!-- 20.31 ---><button data-icon="save" >Save </button><button data-icon="scan" >Scan </button><!-- 20.32 ---><button data-icon="settings" >Settings </button><button data-icon="slitaz" >SliTaz </button><!-- 20.33 ---><button data-icon="start" >Start </button><button data-icon="stop" >Stop </button><!-- 20.34 ---><button data-icon="sync" >Sync </button><button data-icon="tags" >Tags </button><!-- 20.35 ---><button data-icon="tag" >Tag </button><button data-icon="tazx" >TazX </button><!-- 20.36 ---><button data-icon="temperature">Temperature</button><button data-icon="terminal">Terminal</button><!-- 20.37 ---><button data-icon="text" >Text </button><button data-icon="unlink" >Unlink </button><!-- 20.38 ---><button data-icon="unlock" >Unlock </button><button data-icon="upgrade" >Upgrade </button><!-- 20.39 ---><button data-icon="user" >User </button><button data-icon="view" >View </button><!-- 20.40 ---><button data-icon="web" >Web </button><button data-icon="wifi" >Wi-Fi </button><!-- 20.41 ---><button data-icon="toggle" >Toggle </button><button data-icon="chlock" >ChLock </button><!-- 20.42 ---><button data-icon="calendar" >Calendar </button><button data-icon="modem" >Modem </button><!-- 20.43 ---><button data-icon="vpn" >VPN </button><button data-icon="display" >Display </button><!-- 20.44 ---><button data-icon="cpu" >CPU </button><button data-icon="floppy" >Floppy </button><!-- 20.45 ---><button data-icon="folder" >Folder </button> 20.46 + <header><span data-img="@info@"></span>Buttons with font icons</header> 20.47 +EOT 20.48 + 20.49 +icons="@add@:add @admin@:admin @back@:back @battery@:battery @brightness@:brightness \ 20.50 +@cancel@:cancel @cd@:cd @check@:check @clock@:clock @conf@:conf @daemons@:daemons @delete@:delete \ 20.51 +@detect@:detect @diff@:diff @download@:download @edit@:edit @eth@:eth @group@:group @grub@:grub \ 20.52 +@hdd@:hdd @help@:help @history@:history @info@:info @install@:install @link@:link @list@:list \ 20.53 +@locale@:locale @lock@:lock @logs@:logs @loopback@:loopback @man@:man @modules@:modules @off@:off \ 20.54 +@ok@:ok @on@:on @opt@:opt @proc@:proc @refresh@:refresh @removable@:removable @remove@:remove \ 20.55 +@repack@:repack @report@:report @restart@:restart @run@:run @save@:save @scan@:scan \ 20.56 +@settings@:settings @slitaz@:slitaz @start@:start @stop@:stop @sync@:sync @tags@:tags @tag@:tag \ 20.57 +@tazx@:tazx @temperature@:temperature @terminal@:terminal @text@:text @unlink@:unlink \ 20.58 +@unlock@:unlock @upgrade@:upgrade @user@:user @view@:view @web@:web @wifi@:wifi @toggle@:toggle \ 20.59 +@chlock@:chlock @calendar@:calendar @modem@:modem @vpn@:vpn @display@:display @cpu@:cpu \ 20.60 +@floppy@:floppy @folder@:folder" 20.61 + 20.62 +echo "$icons" | \ 20.63 +awk 'BEGIN{RS=" "; FS=":"} { 20.64 + printf "<button data-icon=\"%s\">%s</button>", $1, $2; 20.65 +}' 20.66 + 20.67 +cat <<EOT 20.68 </section> 20.69 20.70 20.71 <section> 20.72 - <header><span data-img="link"></span>Links with font icons</header> 20.73 + <header><span data-img="@link@"></span>Links with font icons</header> 20.74 <div> 20.75 <p> 20.76 -<a data-icon="add" >Add </a> <a data-icon="admin" >Admin </a> <a data-icon="back" >Back </a> 20.77 -<a data-icon="battery" >Battery </a> <a data-icon="brightness">Brightness</a> <a data-icon="cancel" >Cancel </a> 20.78 -<a data-icon="cd" >CD </a> <a data-icon="check" >Check </a> <a data-icon="clock" >Clock </a> 20.79 -<a data-icon="conf" >Conf </a> <a data-icon="daemons" >Daemons </a> <a data-icon="delete" >Delete </a> 20.80 -<a data-icon="detect" >Detect </a> <a data-icon="diff" >Diff </a> <a data-icon="download" >Download </a> 20.81 -<a data-icon="edit" >Edit </a> <a data-icon="eth" >Eth </a> <a data-icon="group" >Group </a> 20.82 -<a data-icon="grub" >GRUB </a> <a data-icon="hdd" >HDD </a> <a data-icon="help" >Help </a> 20.83 -<a data-icon="history" >History </a> <a data-icon="info" >Info </a> <a data-icon="install" >Install </a> 20.84 -<a data-icon="link" >Link </a> <a data-icon="list" >List </a> <a data-icon="locale" >Locale </a> 20.85 -<a data-icon="lock" >Lock </a> <a data-icon="logs" >Logs </a> <a data-icon="loopback" >Loopback </a> 20.86 -<a data-icon="man" >Man </a> <a data-icon="modules" >Modules </a> <a data-icon="off" >Off </a> 20.87 -<a data-icon="ok" >OK </a> <a data-icon="on" >On </a> <a data-icon="opt" >Opt </a> 20.88 -<a data-icon="proc" >Proc </a> <a data-icon="refresh" >Refresh </a> <a data-icon="removable">Removable</a> 20.89 -<a data-icon="remove" >Remove </a> <a data-icon="repack" >Repack </a> <a data-icon="report" >Report </a> 20.90 -<a data-icon="restart" >Restart </a> <a data-icon="run" >Run </a> <a data-icon="save" >Save </a> 20.91 -<a data-icon="scan" >Scan </a> <a data-icon="settings" >Settings </a> <a data-icon="slitaz" >SliTaz </a> 20.92 -<a data-icon="start" >Start </a> <a data-icon="stop" >Stop </a> <a data-icon="sync" >Sync </a> 20.93 -<a data-icon="tags" >Tags </a> <a data-icon="tag" >Tag </a> <a data-icon="tazx" >TazX </a> 20.94 -<a data-icon="temperature">Temperature</a> <a data-icon="terminal" >Terminal </a> <a data-icon="text" >Text </a> 20.95 -<a data-icon="unlink" >Unlink </a> <a data-icon="unlock" >Unlock </a> <a data-icon="upgrade" >Upgrade </a> 20.96 -<a data-icon="user" >User </a> <a data-icon="view" >View </a> <a data-icon="web" >Web </a> 20.97 -<a data-icon="wifi" >Wi-Fi </a> <a data-icon="floppy" >Floppy </a> <a data-icon="folder" >Folder </a> 20.98 +EOT 20.99 + 20.100 +echo "$icons" | \ 20.101 +awk 'BEGIN{RS=" "; FS=":"} { 20.102 + printf "<a data-icon=\"%s\" href=\"#\">%s</a> ", $1, $2; 20.103 +}' 20.104 + 20.105 +cat <<EOT 20.106 </p> 20.107 </div> 20.108 </section> 20.109 20.110 20.111 <section> 20.112 - <header><span data-img="view"></span>Links with font icons only (small buttons)</header> 20.113 + <header><span data-img="@view@"></span>Links with font icons only (small buttons)</header> 20.114 <p> 20.115 -<a data-img="conf" href="#"></a>Conf <a data-img="help" href="#"></a>Help <a data-img="man" href="#"></a>Man 20.116 -<a data-img="off" href="#"></a>Off <a data-img="on" href="#"></a>On <a data-img="opt" href="#"></a>Opt 20.117 -<a data-img="remove" href="#"></a>Remove <a data-img="run" href="#"></a>Run <a data-img="stop" href="#"></a>Stop 20.118 -<a data-img="web" href="#"></a>Web <a data-img="slitaz" href="#"></a>SliTaz <a data-img="user" href="#"></a>User 20.119 -<a data-img="floppy" href="#"></a>Floppy <a data-img="folder" href="#"></a>Folder 20.120 +EOT 20.121 + 20.122 +echo "$icons" | \ 20.123 +awk 'BEGIN{RS=" "; FS=":"} { 20.124 + printf "<a data-img=\"%s\" href=\"#\"></a>%s ", $1, $2; 20.125 +}' 20.126 + 20.127 +cat <<EOT 20.128 </p> 20.129 </section> 20.130 20.131 20.132 <section> 20.133 - <header><span data-img="sechi"></span>Status icons</header> 20.134 + <header><span data-img="@sechi@"></span>Status icons</header> 20.135 <div> 20.136 -<span data-icon="lvl0">lvl0</span> <span data-icon="lvl1">lvl1</span> <span data-icon="lvl2">lvl2</span> 20.137 -<span data-icon="lvl3">lvl3</span> <span data-icon="lvl4">lvl4, lvl5</span> 20.138 -<span data-icon="online">online</span> <span data-icon="offline">offline</span> 20.139 -<span data-icon="sechi">sechi</span> <span data-icon="secmi">secmi</span> <span data-icon="seclo">seclo</span> 20.140 -<span data-icon="pkg">pkg</span> <span data-icon="pkgi">pkgi</span> <span data-icon="pkgib">pkgib</span> 20.141 +<span data-icon="@lvl0@">lvl0</span> <span data-icon="@lvl1@">lvl1</span> <span data-icon="@lvl2@">lvl2</span> 20.142 +<span data-icon="@lvl3@">lvl3</span> <span data-icon="@lvl4@">lvl4, lvl5</span> 20.143 +<span data-icon="@online@">online</span> <span data-icon="@offline@">offline</span> 20.144 +<span data-icon="@sechi@">sechi</span> <span data-icon="@secmi@">secmi</span> <span data-icon="@seclo@">seclo</span> 20.145 +<span data-icon="@pkg@">pkg</span> <span data-icon="@pkgi@">pkgi</span> <span data-icon="@pkgib@">pkgib</span> 20.146 </div> 20.147 <div> 20.148 -<span data-icon="msg">msg</span> <span data-icon="msgerr">msgerr</span> 20.149 -<span data-icon="msgwarn">msgwarn</span> <span data-icon="msgup">msgup</span> 20.150 -<span data-icon="msgtip">msgtip</span> 20.151 +<span data-icon="@msg@">msg</span> <span data-icon="@msgerr@">msgerr</span> 20.152 +<span data-icon="@msgwarn@">msgwarn</span> <span data-icon="@msgup@">msgup</span> 20.153 +<span data-icon="@msgtip@">msgtip</span> 20.154 </div> 20.155 </section> 20.156 20.157 @@ -144,7 +116,7 @@ 20.158 20.159 20.160 <section> 20.161 - <header><span data-img="check"></span>User input elements</header> 20.162 + <header><span data-img="@check@"></span>User input elements</header> 20.163 <div><form> 20.164 <table> 20.165 <tr><td>Text:</td> 20.166 @@ -154,7 +126,7 @@ 20.167 <td><input type="password" placeholder="Password"/></td> 20.168 </tr> 20.169 <tr><td>Button:</td> 20.170 - <td><input type="button" value="Button" data-icon="ok"/></td> 20.171 + <td><input type="button" value="Button" data-icon="@ok@"/></td> 20.172 </tr> 20.173 <tr><td>Checkbox:</td> 20.174 <td><input type="checkbox" id="chk"/><label for="chk">Check it</label></td> 20.175 @@ -175,7 +147,7 @@ 20.176 <tr><td>Reset:</td><td><input type="reset"/></td></tr> 20.177 <tr><td>Submit:</td><td><input type="submit"/></td></tr> 20.178 <tr><td>Select:</td> 20.179 - <td><select><option data-icon="user">Option 1<option>Option 2<option>Option 3</select></td> 20.180 + <td><select><option data-icon="@user@">Option 1<option>Option 2<option>Option 3</select></td> 20.181 </tr> 20.182 <tr><td colspan="2"><b>HTML 5 inputs:</b></td></tr> 20.183 <tr><td>Search:</td><td><input type="search" results="5" autosave="pkgsearch" autocomplete="on"/></td></tr>