tazpanel diff lib/libtazpanel @ rev 534
index.cgi: add back button in edit & diff
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Aug 30 18:07:27 2015 +0200 (2015-08-30) |
parents | 4f619f973b88 |
children | 082b622cb781 |
line diff
1.1 --- a/lib/libtazpanel Mon Aug 24 01:05:08 2015 +0300 1.2 +++ b/lib/libtazpanel Sun Aug 30 18:07:27 2015 +0200 1.3 @@ -358,14 +358,9 @@ 1.4 # Show "Back" button 1.5 1.6 back_button() { 1.7 - local URL="$1" default_caption="$(_ 'Back')" 1.8 #FIXME: can't encode data-icon 1.9 - local caption="${2:-$default_caption}" icon="${3:-back}" 1.10 - 1.11 - if [ -n "$1" ]; then 1.12 - printf '<form action="%s" method="post"><button data-icon="%s">%s</button></form>' \ 1.13 - "$URL" "$icon" "$caption" 1.14 - fi 1.15 + printf '<form action="%s" method="post"><button data-icon="%s">%s</button></form>' \ 1.16 + "${1:-javascript:history.go(-1)}" "${3:-back}" "${2:-$(_ 'Back')}" 1.17 } 1.18 1.19