tazpanel rev 561

lib/libtazpanel: fix file_chooser
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Dec 29 15:51:34 2015 +0100 (2015-12-29)
parents 7a0c9a1949d2
children 6d2f77151dfa
files lib/libtazpanel tazpanel
line diff
     1.1 --- a/lib/libtazpanel	Wed Dec 16 16:17:58 2015 +0100
     1.2 +++ b/lib/libtazpanel	Tue Dec 29 15:51:34 2015 +0100
     1.3 @@ -414,7 +414,7 @@
     1.4  	id="input$RANDOM"
     1.5  	cat <<EOT
     1.6  <span id="$id"><input type="text" name="$1" ${2:+value="$2" }/></span>\
     1.7 -<button data-icon="${3:-@conf@}" onclick="ajax('index.cgi?do=file-selection&amp;name=$name&amp;type=$4', '1', '$id'); return false">\
     1.8 +<button data-icon="${3:-@conf@}" onclick="ajax('index.cgi?do=file-selection&amp;name=$1&amp;type=$4', '1', '$id'); return false">\
     1.9  $(_n 'Browse')</button>
    1.10  EOT
    1.11  }
     2.1 --- a/tazpanel	Wed Dec 16 16:17:58 2015 +0100
     2.2 +++ b/tazpanel	Tue Dec 29 15:51:34 2015 +0100
     2.3 @@ -82,8 +82,8 @@
     2.4  
     2.5  		applet=${1:-index}
     2.6  		case $1 in
     2.7 -			*#*) url="http://127.0.0.1:82/${applet%%#*}.cgi?${applet#*#}&guiuser=$(id -un)";;
     2.8 -			*)   url="http://127.0.0.1:82/$applet.cgi?guiuser=$(id -un)";;
     2.9 +			*#*) url="http://127.0.0.1:$HTTPD_PORT/${applet%%#*}.cgi?${applet#*#}&guiuser=$(id -un)";;
    2.10 +			*)   url="http://127.0.0.1:$HTTPD_PORT/$applet.cgi?guiuser=$(id -un)";;
    2.11  		esac
    2.12  		echo "$url"
    2.13