diff options
author | Simon | 2011-04-15 15:52:26 +0200 |
---|---|---|
committer | Simon | 2011-04-15 15:52:26 +0200 |
commit | 086ca1b2dd43e036820e46485a4caf72f04533ea (patch) | |
tree | a5c53f4b3edbe58b7baedcd67aaadd55504412fa /application/modules/fbgui | |
parent | Downloadstatus der Dateien in der FBGui (diff) | |
download | pbs2-086ca1b2dd43e036820e46485a4caf72f04533ea.tar.gz pbs2-086ca1b2dd43e036820e46485a4caf72f04533ea.tar.xz pbs2-086ca1b2dd43e036820e46485a4caf72f04533ea.zip |
FBGui Downloads fertig
Diffstat (limited to 'application/modules/fbgui')
-rw-r--r-- | application/modules/fbgui/views/scripts/index/start.phtml | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/application/modules/fbgui/views/scripts/index/start.phtml b/application/modules/fbgui/views/scripts/index/start.phtml index e6a7936..30f89f5 100644 --- a/application/modules/fbgui/views/scripts/index/start.phtml +++ b/application/modules/fbgui/views/scripts/index/start.phtml @@ -76,12 +76,13 @@ #downloadinfo .downloadelement .label{ float:left; padding:5px; - width:200px; + width:120px; } #downloadinfo .downloadelement .status{ - margin-left:205px; - padding:5px; + margin-left:125px; + padding:3px 5px 5px 5px; } +.progressbar{margin-left:125px !important;margin-top:5px;} </style> <script type="text/javascript"> @@ -108,22 +109,27 @@ function bytesToSize(bytes) { } function updateProgress(p, s, u){ + $("#progressbar").progressbar({ value: ((actFile-1)*33+(p/3))}); + if (p >= 0 && p <= 100){ $(".progressbar:last").progressbar({ value: p }); - $(".downloadelement .status:last").html("Downloading...<br>"+p+"% - "+s+" "+u); + $(".downloadelement .status:last").html("Downloading... "+p+"% - "+s+" "+u); }else{ $(".progressbar:last").progressbar({ value: 0 }); } } +var fileCount = 3; +var actFile = 0; function downloadInfo(filename, filesize){ + actFile = actFile+1; $(".downloadelement .status").html("Complete"); $(".progressbar:last").progressbar({ value: 100}); $("#downloadinfo").append("<div class='downloadelement'>"+ - '<div class="progressbar" style="height: 15px;"></div>'+ "<div class='label'>"+ "<div><b>File: </b>"+filename+"</div>"+ "<div><b>Filesize:</b> "+bytesToSize(filesize)+"</div>"+ - "</div>"+ + "</div>"+ + '<div class="progressbar" style="height: 10px;"></div>'+ "<div class='status'>Downloading...</div>"+ "</div>"); $(".progressbar:last").progressbar({ value: 0 }); @@ -134,6 +140,7 @@ function allComplete(){ } $(document).ready(function() { + $("#progressbar").progressbar({ value: 0 }); }); </script> @@ -149,19 +156,22 @@ function allComplete(){ <div class="bar8"></div> </div> +<div id="progressbar" style="height: 30px;"></div> <h1>Downloading</h1> + <div id='downloadinfo'> </div> <script type="text/javascript"> +/* fbgui.setCallbackOnFinished('foo();'); fbgui.startDownload('http://<?php echo $this->host; ?>/resource/getkernel/alpha/<?php echo $this->alphasessionID; ?>/file/kernel'); fbgui.startDownload('http://<?php echo $this->host; ?>/resource/getinitramfs/alpha/<?php echo $this->alphasessionID; ?>/file/initramfs'); fbgui.startDownload('http://<?php echo $this->host; ?>/resource/getkcl/alpha/<?php echo $this->alphasessionID; ?>/file/kcl'); function foo(){ allComplete(); - fbgui.quit(); - + fbgui.quit(); } +*/ </script> |