wok-current rev 20172
sane-backends: add handles
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Jan 23 17:49:16 2018 +0100 (2018-01-23) |
parents | 294deb0fa681 |
children | 8861cc63f78e |
files | fake-sane/receipt sane-backends/receipt sane-backends/stuff/tazpanel/crop.js sane-backends/stuff/tazpanel/drag.gif sane-backends/stuff/tazpanel/sane.cgi |
line diff
1.1 --- a/fake-sane/receipt Tue Jan 16 15:24:34 2018 +0100 1.2 +++ b/fake-sane/receipt Tue Jan 23 17:49:16 2018 +0100 1.3 @@ -13,6 +13,6 @@ 1.4 # Rules to gen a SliTaz package suitable for Tazpkg. 1.5 genpkg_rules() 1.6 { 1.7 - mkdir -p $fs/var/www/tazpanel 1.8 - cp $stuff/* $fs/var/www/tazpanel/ 1.9 + mkdir -p $fs/var/www/tazpanel/fake-sane 1.10 + cp $stuff/* $fs/var/www/tazpanel/fake-sane 1.11 }
2.1 --- a/sane-backends/receipt Tue Jan 16 15:24:34 2018 +0100 2.2 +++ b/sane-backends/receipt Tue Jan 23 17:49:16 2018 +0100 2.3 @@ -42,7 +42,8 @@ 2.4 $fs/var/lock/sane $fs/etc/sane.d \ 2.5 $fs/var/www/tazpanel/lib \ 2.6 $fs/var/www/tazpanel/report.d \ 2.7 - $fs/var/www/tazpanel/menu.d/hardware 2.8 + $fs/var/www/tazpanel/menu.d/hardware \ 2.9 + $fs/var/www/tazpanel/styles/default/images 2.10 2.11 cp -a $install/etc/sane.d $fs/etc 2.12 cp -a $install/usr/bin $fs/usr 2.13 @@ -53,6 +54,7 @@ 2.14 cp $stuff/tazpanel/sane.cgi $fs/var/www/tazpanel/ 2.15 cp $stuff/tazpanel/sane $fs/var/www/tazpanel/report.d/ 2.16 cp $stuff/tazpanel/crop.js $fs/var/www/tazpanel/lib/ 2.17 + cp $stuff/tazpanel/drag.gif $fs/var/www/tazpanel/styles/default/images/ 2.18 ln -s ../../sane.cgi $fs/var/www/tazpanel/menu.d/hardware/sane 2.19 2.20 # fix groups/permissions on /var/lock/sane ; add it to scanner group
3.1 --- a/sane-backends/stuff/tazpanel/crop.js Tue Jan 16 15:24:34 2018 +0100 3.2 +++ b/sane-backends/stuff/tazpanel/crop.js Tue Jan 23 17:49:16 2018 +0100 3.3 @@ -31,7 +31,7 @@ 3.4 function cropCreateDragImg(id) 3.5 { 3.6 var div = document.createElement('IMG'); 3.7 - div.src = 'drag.gif'; 3.8 + div.src = 'styles/default/images/drag.gif'; 3.9 div.width = 12; 3.10 div.style.position = 'absolute'; 3.11 div.style.cursor = div.id = id;
4.1 Binary file sane-backends/stuff/tazpanel/drag.gif has changed
5.1 --- a/sane-backends/stuff/tazpanel/sane.cgi Tue Jan 16 15:24:34 2018 +0100 5.2 +++ b/sane-backends/stuff/tazpanel/sane.cgi Tue Jan 23 17:49:16 2018 +0100 5.3 @@ -63,7 +63,8 @@ 5.4 esac 5.5 [ -d tmp ] || ln -s /tmp tmp 5.6 case "$device" in 5.7 - fake*) f=/usr/share/images/slitaz-banner.png 5.8 + fake*) f=$(ls fake-sane/*.png | sed q) 5.9 + [ -s "$f" ] || f=/usr/share/images/slitaz-banner.png 5.10 c="$(echo $ARGS $(identify $f | sed \ 5.11 's/.* \([0-9]*\)x.*/\1/') $(GET width) $(POST x_max) | awk ' 5.12 function a(x) { return int(($x * $5)/ $7); } 5.13 @@ -179,7 +180,8 @@ 5.14 [ -n "$error" ] && msg warn "$error" 5.15 [ -n "$info" ] && msg tip "$info" 5.16 if [ -z "$device" ]; then 5.17 - all="$(scanimage -f '%d,%v %m|'|cat - sane-fake.log|sed 's/|/\n/g')" 5.18 + all="$(scanimage -f '%d,%v %m|'|\ 5.19 + cat - sane-fake.log fake-sane/sane-fake.log |sed 's/|/\n/g')" 5.20 case "$(echo "$all" | wc -l)" in 5.21 1) if [ -z "$all" ]; then 5.22 msg warn "$(_ "No scanner found")" 5.23 @@ -224,17 +226,7 @@ 5.24 5.25 cat <<EOT 5.26 <section> 5.27 -<form name="parameters" method="post"> 5.28 -<script language="JavaScript" type="text/javascript"> 5.29 -<!-- 5.30 -function new_width() { 5.31 - document.parameters.action = "?width="+(document.width-30) 5.32 -} 5.33 - 5.34 -window.onresize = new_width 5.35 -new_width() 5.36 ---> 5.37 -</script> 5.38 +<form name="parameters" method="post" style="width:100%"> 5.39 5.40 <header> 5.41 $(echo $device | sed 's/.*,//') 5.42 @@ -245,7 +237,7 @@ 5.43 </div> 5.44 </header> 5.45 5.46 -<table class="wide"> 5.47 +<table style="width:100%"> 5.48 <tr> 5.49 <td> 5.50 <fieldset><legend>$(_ 'Format')</legend>