Author: remi
Date: 2009-06-23 22:27:29 +0200 (Tue, 23 Jun 2009)
New Revision: 4879

Modified:
   
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/livewithtux.css
   
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/livewithtux.xsl
   
software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
Log:
* updated battery levels
* added tooltip of the focused gadget in the "live with tux" page

Modified: 
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/livewithtux.css
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/livewithtux.css
      2009-06-23 19:18:54 UTC (rev 4878)
+++ 
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/livewithtux.css
      2009-06-23 20:27:29 UTC (rev 4879)
@@ -85,6 +85,23 @@
     overflow:hidden;
 }
 
+.thumbnailBarGadget04Name{
+    position:absolute;
+    top:0px;
+    left:0px;
+       width:172px;
+    height:29px;
+    margin-left:342px;
+    margin-top:125px;
+    line-height:29px;
+    font-size:14px;
+    color:#FFFFFF;
+    text-align:center;
+    text-decoration:none;
+    font-weight:bold;
+    overflow:hidden;
+}
+
 .thumbnailBarGadget05Name{
     position:absolute;
     top:0px;
@@ -254,6 +271,16 @@
     
background-image:url(/data/web_interface/user_01/img/thumbnailbar_btn_next_activate.png);
 }
 
+div.thumbnailBarTooltip{
+    position:absolute;
+    top:0px;
+    left:0px;
+       width:172px;
+    height:50px;
+    margin-left:342px;
+    margin-top:109px;
+}
+
 img.notifyTuxIdle{
     top:0px;
     left:0px;

Modified: 
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/livewithtux.xsl
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/livewithtux.xsl
      2009-06-23 19:18:54 UTC (rev 4878)
+++ 
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/livewithtux.xsl
      2009-06-23 20:27:29 UTC (rev 4879)
@@ -187,6 +187,7 @@
 
             function initialization()
             {
+                setpng(document.getElementById('thumbnailBarTooltip'));
                 updateStates();
             }
 
@@ -293,6 +294,8 @@
                     
document.getElementById('thumbnailBarGadgetIcon04').onclick = function() {
                         startStopGadget();
                     }
+                    if (name.length > 20) {name = name.slice(0, 18) + "...";}
+                    
document.getElementById("thumbnailBarGadgetName04").firstChild.nodeValue = name;
                 }
             }
 
@@ -498,6 +501,16 @@
                 </xsl:element>
             </div>
             <div class="frame01Bottom"></div>
+            <!-- THUMBNAILBAR TOOLTIP -->
+            <div class="thumbnailBarTooltip">
+                <xsl:element name="img">
+                    <xsl:attribute 
name="id">thumbnailBarTooltip</xsl:attribute>
+                    <xsl:attribute 
name="src">/data/web_interface/user_01/img/thumbnailbar_tooltip.png</xsl:attribute>
+                    <xsl:attribute name="height">50</xsl:attribute>
+                    <xsl:attribute name="width">172</xsl:attribute>
+                </xsl:element>
+            </div>
+            <span class="thumbnailBarGadget04Name" 
id="thumbnailBarGadgetName04"> . </span>
             <!-- NOTIFICATION VIEW -->
             <div class="frame01Top"></div>
             <div class="frame01MiddleNotify">

Modified: 
software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
  2009-06-23 19:18:54 UTC (rev 4878)
+++ 
software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
  2009-06-23 20:27:29 UTC (rev 4879)
@@ -41,11 +41,11 @@
             batteryState = "empty"
         else:
             rndVal = int(state[0] / 333) * 333
-            if rndVal <= 4800:
+            if rndVal < 4995:
                 batteryState = "empty"
-            elif rndVal == 5133:
+            elif (rndVal >= 4995) and (rndVal <= 5328):
                 batteryState = "low"
-            elif rndVal == 5466:
+            elif (rndVal > 5328) and (rndVal <= 5994):
                 batteryState = "middle"
             else:
                 batteryState = "high"


------------------------------------------------------------------------------
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to