slitaz-pizza rev 25
Some improvment to rootfs step
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Mar 27 00:21:09 2012 +0200 (2012-03-27) |
parents | 823238a1a570 |
children | 1e64ab64b782 |
files | web/pkgs.cgi web/rootfs.cgi web/style.css |
line diff
1.1 --- a/web/pkgs.cgi Mon Mar 26 23:26:45 2012 +0200 1.2 +++ b/web/pkgs.cgi Tue Mar 27 00:21:09 2012 +0200 1.3 @@ -145,16 +145,8 @@ 1.4 </div> 1.5 </form> 1.6 1.7 - 1.8 -<div class="next"> 1.9 - <form method="get" action="rootfs.cgi"> 1.10 - <input type="hidden" name="id" value="$id" /> 1.11 - <input type="submit" value="$(gettext "Continue")"> 1.12 - </form> 1.13 -</div> 1.14 - 1.15 <form method="get" action="pkgs.cgi"> 1.16 -<p style="margin-right: 100px;"> 1.17 +<p> 1.18 1.19 $(gettext "Here you can add or remove some packages from your flavor. You 1.20 can also search for packages name and description to find a package name") 1.21 @@ -173,6 +165,14 @@ 1.22 Flavor : $FLAVOR 1.23 Short desc : $SHORT_DESC 1.24 </pre> 1.25 + 1.26 +<div class="next"> 1.27 + <form method="get" action="rootfs.cgi"> 1.28 + <input type="hidden" name="id" value="$id" /> 1.29 + <input type="submit" value="$(gettext "Continue")"> 1.30 + </form> 1.31 +</div> 1.32 + 1.33 EOT 1.34 1.35 # HTML footer.
2.1 --- a/web/rootfs.cgi Mon Mar 26 23:26:45 2012 +0200 2.2 +++ b/web/rootfs.cgi Tue Mar 27 00:21:09 2012 +0200 2.3 @@ -82,10 +82,25 @@ 2.4 mkdir -p $images 2.5 mv $tmpname $images/slitaz-background.jpg 2.6 chmod a+r $images/*.jpg 2.7 - notify "$(gettext "Added image:") $wallpaper ($size Bytes)" "info" 2.8 + notify "$(gettext "Added image:") $wallpaper ($size Bytes)" 2.9 else 2.10 notify "$(gettext "Unsupported image format")" "error" 2.11 fi ;; 2.12 + *\ desktop-file\ *) 2.13 + id="$(POST id)" 2.14 + tmpname="$(FILE desktop-file tmpname)" 2.15 + file="$(FILE desktop-file name)" 2.16 + size="$(FILE desktop-file size)" 2.17 + path="$tmpdir/slitaz-$id/rootfs/etc/skel/Desktop" 2.18 + mkdir -p $path 2.19 + case "$file" in 2.20 + *README*|*.desktop|*.html|*.png|*.jpg) 2.21 + mv $tmpname $path/$file 2.22 + notify "$(gettext "Added file:") $file ($size Bytes)" ;; 2.23 + *) 2.24 + notify "$(gettext "Unsupported file type")" "error" ;; 2.25 + esac 2.26 + ;; 2.27 *\ tarball\ *) 2.28 id="$(POST id)" 2.29 tmpname="$(FILE tarball tmpname)" 2.30 @@ -110,9 +125,33 @@ 2.31 2.32 <h3>$(gettext "Easy customization")</h3> 2.33 2.34 - $(gettext "Desktop Wallpaper"): 2.35 - <input type="file" name="wallpaper" size="40" /> 2.36 - <input type="submit" value="Upload" /> 2.37 +<p> 2.38 +$(gettext "Desktop Wallpaper in JPG format"): 2.39 +<p> 2.40 + 2.41 +<div class="inputfile"> 2.42 + <div class="inputhide"> 2.43 + <input type="file" name="wallpaper" size="48" /> 2.44 + </div> 2.45 +</div> 2.46 +<input type="submit" value="Upload Image" /> 2.47 + 2.48 +<!-- Buggy case action 2.49 + 2.50 +<p> 2.51 +$(gettext "Files on user desktop such as README, desktop file or documenatation. 2.52 +Allowed file and extentions are:") README .desktop .html .png .jpg: 2.53 +/etc/skel/Desktop: 2.54 +<p> 2.55 + 2.56 +<div class="inputfile"> 2.57 + <div class="inputhide"> 2.58 + <input type="file" name="desktop-file" size="48" /> 2.59 + </div> 2.60 +</div> 2.61 +<input type="submit" value="Upload File" /> 2.62 + 2.63 +--> 2.64 2.65 <h3>$(gettext "Rootfs tarball")</h3> 2.66 <p> 2.67 @@ -124,10 +163,13 @@ 2.68 hierachy such as: /usr/bin /etc /var/www 2.69 </p> 2.70 2.71 - Rootfs tarball: 2.72 - <input type="file" name="tarball" size="40" /> 2.73 + <div class="inputfile"> 2.74 + <div class="inputhide"> 2.75 + <input type="file" name="tarball" size="48" /> 2.76 + </div> 2.77 + </div> 2.78 <input type="hidden" name="id" value="$id" /> 2.79 - <input type="submit" value="Upload" /> 2.80 + <input type="submit" value="Upload rootfs" /> 2.81 </form> 2.82 2.83 $([ "$tarball" ] && tarball_handler)
3.1 --- a/web/style.css Mon Mar 26 23:26:45 2012 +0200 3.2 +++ b/web/style.css Tue Mar 27 00:21:09 2012 +0200 3.3 @@ -178,10 +178,33 @@ 3.4 background-repeat: no-repeat; 3.5 } 3.6 3.7 +input[type="file"] { 3.8 + width: 576px; 3.9 + z-index: -1; 3.10 + vertical-align: middle; 3.11 + cursor: pointer; 3.12 + margin: 0; 3.13 +} 3.14 + 3.15 +.inputhide { overflow: hidden; width: 420px; } 3.16 + 3.17 +.inputfile { 3.18 + width: 462px; 3.19 + background: #f8f8f8 url(images/open.png) no-repeat center right; 3.20 + z-index: 2; 3.21 + border: 1px solid #ccc; 3.22 + padding: 2px 0px 0px 2px; 3.23 + height: 24px; 3.24 +} 3.25 + 3.26 +input[type="file"]::-webkit-file-upload-button { 3.27 + float: right; 3.28 +} 3.29 + 3.30 /* Round corner */ 3.31 3.32 img, pre, table, input, textarea, select, .note, .box, #notify, 3.33 -#packages, #pkgs-search { 3.34 +#packages, #pkgs-search, .inputfile { 3.35 -moz-border-radius: 4px; 3.36 -webkit-border-radius: 4px; 3.37 border-radius: 4px; 3.38 @@ -198,5 +221,3 @@ 3.39 } 3.40 3.41 #footer a { padding: 0 2px; } 3.42 - 3.43 -::-webkit-scrollbar-track { color: #fefefe; }