From 5340ae11d9b73105a8a831cbdce87303338ca9b1 Mon Sep 17 00:00:00 2001
From: RaNaN <Mast3rRaNaN@hotmail.de>
Date: Thu, 21 Mar 2013 21:30:02 +0100
Subject: subline for global progress

---
 module/remote/wsbackend/AbstractHandler.py |  2 +-
 module/web/static/css/default/style.less   | 18 +++++++++++-------
 module/web/static/js/views/headerView.js   |  8 ++++++--
 module/web/templates/default/base.html     | 12 ++++++++++--
 4 files changed, 28 insertions(+), 12 deletions(-)

diff --git a/module/remote/wsbackend/AbstractHandler.py b/module/remote/wsbackend/AbstractHandler.py
index 45fbb134c..07cc79c74 100644
--- a/module/remote/wsbackend/AbstractHandler.py
+++ b/module/remote/wsbackend/AbstractHandler.py
@@ -50,7 +50,7 @@ class AbstractHandler:
             if s:
                 uid = s.get('uid', None)
                 req.api = self.api.withUserContext(uid)
-                self.log.debug("WS authenticated with cookie: %d" % uid)
+                self.log.debug("WS authenticated user with cookie: %d" % uid)
 
         self.on_open(req)
 
diff --git a/module/web/static/css/default/style.less b/module/web/static/css/default/style.less
index bc53d6b9e..b3020d30f 100644
--- a/module/web/static/css/default/style.less
+++ b/module/web/static/css/default/style.less
@@ -233,11 +233,17 @@ header .logo {
   position: relative;
   float: right;
   width: 26%;
+  margin-top: 12px;
   margin-right: 15px;
   line-height: 16px;
 
   #progress-info {
-    padding-left: 5px;
+    padding-left: 2px;
+  }
+
+  .sub {
+    font-size: small;
+    padding: 0 2px;
   }
 
   .popover { //    display: block;
@@ -254,13 +260,12 @@ header .logo {
 
   .iconf-list {
     cursor: pointer;
-    margin-right: 5px; // same as globalprogress margin
+    margin-right: 2px; // same as globalprogress margin
 
     &:hover {
       color: @yellow;
     }
   }
-
   .close {
     line-height: 14px;
   }
@@ -297,10 +302,9 @@ header .logo {
 #globalprogress {
   background-color: @greyDark;
   background-image: none;
-  height: 12px;
-  line-height: 12px;
-  margin: 8px 0 0;
-  border-radius: 10px;
+  height: 8px;
+  margin: 4px 0;
+  border-radius: 8px;
   border: 2px solid @grey;
 
   .bar {
diff --git a/module/web/static/js/views/headerView.js b/module/web/static/js/views/headerView.js
index 164c6d715..7705b7076 100644
--- a/module/web/static/js/views/headerView.js
+++ b/module/web/static/js/views/headerView.js
@@ -97,11 +97,12 @@ define(['jquery', 'underscore', 'backbone', 'app', 'models/ServerStatus', 'colle
                 // TODO: what should be displayed in the header
                 // queue/processing size?
 
+                var status = this.status.toJSON();
                 this.$('.status-block').html(
-                    this.templateStatus(this.status.toJSON())
+                    this.templateStatus(status)
                 );
 
-                var data = {tasks: 0, downloads: 0, speed: 0, single:false};
+                var data = {tasks: 0, downloads: 0, speed: 0, single: false};
                 this.progressList.each(function(progress) {
                     if (progress.isDownload()) {
                         data.downloads += 1;
@@ -121,6 +122,9 @@ define(['jquery', 'underscore', 'backbone', 'app', 'models/ServerStatus', 'colle
                 }
                 // TODO: better progressbar rendering
 
+                data.etaqueue = status.eta;
+                data.linksqueue = status.linksqueue;
+                data.sizequeue = status.sizequeue;
 
                 this.$('#progress-info').html(
                     this.templateHeader(data)
diff --git a/module/web/templates/default/base.html b/module/web/templates/default/base.html
index 822d7c710..386cb4aa2 100644
--- a/module/web/templates/default/base.html
+++ b/module/web/templates/default/base.html
@@ -52,12 +52,20 @@
 
         <div class="progress" id="globalprogress">
             <%= if single %>
-                <div class="bar" style="width: <% percent %>%"> <% formatTime eta %>
+                <div class="bar" style="width: <% percent %>%">
             <% else %>
                 <div class="bar" style="width: 0%">
             <%/if%>
             </div>
         </div>
+        <div class="sub">
+        <%= if linksqueue %>
+            <% linksqueue %> downloads left (<% formatSize sizequeue %>)
+        <%/if%>
+        <span class="pull-right">
+            <% formatTime etaqueue %>
+        </span>
+        </div>
     </script>
     <script type="text/template" id="template-header-status">
         <span class="pull-right"><% linksqueue %></span><br>
@@ -131,7 +139,7 @@
                     <i class="icon-time icon-white"></i> approx. ETA :<br>
                 </div>
 
-                <div id="progress-area" style="margin-top: 16px">
+                <div id="progress-area">
                     <span id="progress-info">
                     </span>
                     <div class="popover bottom">
-- 
cgit v1.2.3