Author: remi
Date: 2009-06-23 20:50:17 +0200 (Tue, 23 Jun 2009)
New Revision: 4877

Added:
   
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/notify_hint_alert.png
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/04_robot_content_interactions/00_resourceRobotContentInteractions.py
   
software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
Log:
* added a hint for alerts 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 16:38:40 UTC (rev 4876)
+++ 
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/livewithtux.css
      2009-06-23 18:50:17 UTC (rev 4877)
@@ -287,6 +287,30 @@
     float:left;
 }
 
+div.notifyHintAlert{
+    position:absolute;
+    top:0px;
+    left:0px;
+       width:99px;
+    height:40px;
+    margin-left:47px;
+    margin-top:155px;
+    display:block;
+    
background-image:url(/data/web_interface/user_01/img/notify_hint_alert.png);
+}
+
+div.notifyAlertGadgetIcon{
+    top:0px;
+    left:0px;
+       width:26px;
+    height:26px;
+    margin-left:19px;
+    -margin-left:10px;
+    margin-top:9px;
+    display:table;
+    float:left;
+}
+
 div.statusFrame{
     margin-top:0px;
     font-family:Verdana, Bitstream Vera Sans;

Added: 
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/notify_hint_alert.png
===================================================================
(Binary files differ)


Property changes on: 
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/notify_hint_alert.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

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 16:38:40 UTC (rev 4876)
+++ 
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/livewithtux.xsl
      2009-06-23 18:50:17 UTC (rev 4877)
@@ -40,6 +40,9 @@
             var knowedGadget07Name = null;
             var knowedGadget07Icon = null;
             var knowedGadget07Uuid = null;
+            var knowedAlertGadgetName = null;
+            var knowedAlertGadgetIcon = null;
+            var knowedAlertGadgetUuid = null;
             var emptyGadgetIcon = "/data/web_interface/user_01/img/empty.png";
             var emptyGadgetName = " ";
 
@@ -118,6 +121,25 @@
                         updateGadgetThumb06("0", emptyGadgetName, 
emptyGadgetIcon);
                         updateGadgetThumb07("0", emptyGadgetName, 
emptyGadgetIcon);
                     }
+                    var alertGadget = null;
+                    try
+                    {
+                        alertGadget = states.get("alert");
+                    }
+                    catch (e)
+                    {
+                        alertGadget = null;
+                    }
+                    if (alertGadget != null)
+                    {
+                        updateCurrentAlertGadget(alertGadget.get("uuid"),
+                                alertGadget.get("name"),
+                                alertGadget.get("icon"));
+                    }
+                    else
+                    {
+                        updateCurrentAlertGadget("0", emptyGadgetName, 
emptyGadgetIcon);
+                    }
                 }
                 if (batteryState != knowedBatteryState)
                 {
@@ -357,6 +379,26 @@
                     
document.getElementById("thumbnailBarGadgetName07").firstChild.nodeValue = name;
                 }
             }
+
+            function updateCurrentAlertGadget(uuid, name, icon)
+            {
+                if ((knowedAlertGadgetName != name) || (knowedAlertGadgetUuid 
!= uuid))
+                {
+                    knowedAlertGadgetName = name;
+                    knowedAlertGadgetUuid = uuid;
+                    knowedAlertGadgetIcon = icon;
+                    if (uuid == "0")
+                    {
+                        
document.getElementById("notifyHintAlert").style.display = 'none';
+                    }
+                    else
+                    {
+                        document.getElementById("notifyAlertGadgetIcon").src = 
icon;
+                        
setpng(document.getElementById('notifyAlertGadgetIcon'));
+                        
document.getElementById("notifyHintAlert").style.display = '';
+                    }
+                }
+            }
         ]]>
         </script>
     </head>
@@ -469,6 +511,17 @@
                 </div>
             </div>
             <div class="frame01Bottom"></div>
+            <!-- NOTIFIER HINT ALERT -->
+            <div class="notifyHintAlert" id="notifyHintAlert">
+                <div class="notifyAlertGadgetIcon">
+                    <xsl:element name="img">
+                        <xsl:attribute 
name="id">notifyAlertGadgetIcon</xsl:attribute>
+                        <xsl:attribute 
name="src">/data/web_interface/user_01/img/empty.png</xsl:attribute>
+                        <xsl:attribute name="height">22</xsl:attribute>
+                        <xsl:attribute name="width">22</xsl:attribute>
+                    </xsl:element>
+                </div>
+            </div>
             <!-- STATUS VIEW -->
             <div class="statusFrame">
                 <!-- STATUS VIEW TITLE -->
@@ -499,7 +552,7 @@
                 <xsl:element name="img">
                     <xsl:attribute 
name="class">statusPicBattery</xsl:attribute>
                     <xsl:attribute name="id">statusPicBattery</xsl:attribute>
-                    <xsl:attribute 
name="src">/data/web_interface/user_01/img/status_battery_empty.png</xsl:attribute>
+                    <xsl:attribute 
name="src">/data/web_interface/user_01/img/status_battery_empty.gif</xsl:attribute>
                 </xsl:element>
                 <!-- STATUS BTN SOUND ON -->
                 <xsl:element name="img">

Modified: 
software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py
      2009-06-23 16:38:40 UTC (rev 4876)
+++ 
software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py
      2009-06-23 18:50:17 UTC (rev 4877)
@@ -469,6 +469,18 @@
         self.__onDemandDictForThumbnailBarMutex.release()
         return result
 
+    def getCurrentUgcForegroundScheduled(self):
+        """
+        """
+        result = {}
+        pguContext = self.getForegroundPguContext()
+        if pguContext != None:
+            if pguContext.getContextLayer() == PGU_CONTEXT_LAYER_SCHEDULER:
+                result['icon'] = "/%s/icon.png" % 
pguContext.getPguObject().getParentGadget().getDescription().getUuid()
+                result['name'] = 
pguContext.getPguObject().getDescription().getName()
+                result['uuid'] = 
pguContext.getPguObject().getDescription().getUuid()
+        return result
+
     def __setStarted(self, value):
         """
         """

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 16:38:40 UTC (rev 4876)
+++ 
software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
  2009-06-23 18:50:17 UTC (rev 4877)
@@ -105,7 +105,7 @@
 # Register the service into the resource
 resourceWIUser01.addService(TDSServiceWIUser01Index)
 # Bind the resource index url to this service
-resourcesManager.addBinding("user", "wi_user_01", "index", 
"skin=user_01&language=fr&menu=livewithtux")
+resourcesManager.addBinding("user", "wi_user_01", "index", 
"skin=user_01&language=en&menu=livewithtux")
 resourcesManager.addBinding("user/index", "wi_user_01", "index", 
"skin=user_01&language=en&menu=livewithtux")
 
 # 
------------------------------------------------------------------------------
@@ -160,6 +160,9 @@
         gadgetsData = 
resourceRobotContentInteractions.getPguContextsManager().getOnDemandDictForThumbnailBar()
         if gadgetsData != {}:
             contentStruct['root']['gadgets'] = gadgetsData
+        currentAlertData = 
resourceRobotContentInteractions.getPguContextsManager().getCurrentUgcForegroundScheduled()
+        if currentAlertData != {}:
+            contentStruct['root']['alert'] = currentAlertData
         return headersStruct, contentStruct
 
 # Register the service into the resource


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

Reply via email to