basic ui refinement

This commit is contained in:
Hamza Zia 2012-06-05 22:12:01 +08:00
parent 53971cf220
commit c7c1ccd4c4
2 changed files with 10 additions and 8 deletions

View File

@ -28,11 +28,10 @@
<h3>{{name}}</h3>
</div>
<div class="span6">
<span class="badge badge-success">Status: {{status}}</span>
<b style='display:inline; float:right;'>
Size: {{size}} |
Progress: {{percentage}}% |
down: {{down}}
<span class="label label-success">Size: {{size}}</span> |
<span class="label label-success">Progress: {{percentage}}%</span> |
<span class="label label-success">Speed: {{down}}</span>
</b>
</div>
<div class="span2">
@ -55,8 +54,8 @@
<div class="span6">
<span class="badge badge-warning">Status: {{status}}</span>
<b style='display:inline; float:right;'>
Size: {{size}} |
Progress: {{percentage}}%
<span class="label label-warning">Size: {{size}}</span> |
<span class="label label-warning">Progress: {{percentage}}%</span>
</b>
</div>
<div class="span2">
@ -79,8 +78,8 @@
<div class="span6">
<span class="badge badge-important">Status: {{status}}</span>
<b style='display:inline; float:right;'>
Size: {{size}} |
Progress: {{percentage}}%
<span class="label label-important">Size: {{size}}</span> |
<span class="label label-important">Progress: {{percentage}}%</span>
</b>
</div>
<div class="span2">

View File

@ -99,6 +99,7 @@ function updateActiveDownloads(data) {
for(var i = 0; i < data.length; i++) {
var percentage =(data[i].completedLength / data[i].totalLength)*100;
percentage = Math.round(percentage*1000)/1000;
if(!percentage) percentage = 0;
ctx = {
name: data[i].files[0].uris[0].uri.replace(/^.*[\\\/]/, ''),
status: data[i].status,
@ -148,6 +149,7 @@ function updateWaitingDownloads(data) {
for(var i = 0; i < data.length; i++) {
var percentage =(data[i].completedLength / data[i].totalLength)*100;
percentage = Math.round(percentage*1000)/1000;
if(!percentage) percentage = 0;
ctx = {
name: data[i].files[0].uris[0].uri.replace(/^.*[\\\/]/, ''),
status: data[i].status,
@ -198,6 +200,7 @@ function updateStoppedDownloads(data) {
for(var i = 0; i < data.length; i++) {
var percentage =(data[i].completedLength / data[i].totalLength)*100;
percentage = Math.round(percentage*1000)/1000;
if(!percentage) percentage = 0;
ctx = {
name: data[i].files[0].uris[0].uri.replace(/^.*[\\\/]/, ''),
status: data[i].status,