[tuxdroid-svn] r4848 - in software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_0
Status: Beta
Brought to you by:
ks156
|
From: remi <c2m...@c2...> - 2009-06-22 14:43:27
|
Author: remi
Date: 2009-06-22 14:31:11 +0200 (Mon, 22 Jun 2009)
New Revision: 4848
Added:
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/empty.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/js/common.js
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/livewithtux.xsl
Log:
* added transparent image for gadget icons pre-loading
* updated css and js to work on IE8
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-22 07:52:28 UTC (rev 4847)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/livewithtux.css 2009-06-22 12:31:11 UTC (rev 4848)
@@ -24,8 +24,8 @@
left:0px;
width:44px;
height:44px;
- margin-left:28px!important;
- /margin-left:14px;
+ margin-left:28px;
+ -margin-left:14px;
margin-top:17px;
display:table;
float:left;
@@ -313,8 +313,8 @@
left:0px;
width:24px;
height:24px;
- margin-left:64px!important;
- /margin-left:32px;
+ margin-left:64px;
+ -margin-left:32px;
margin-top:7px;
display:table;
float:left;
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/empty.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/empty.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/js/common.js
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/js/common.js 2009-06-22 07:52:28 UTC (rev 4847)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/js/common.js 2009-06-22 12:31:11 UTC (rev 4848)
@@ -354,6 +354,7 @@
}
else
{
+ httpRequest.onreadystatechange = stateChangeFunction;
httpRequest.onload = stateChangeFunction;
}
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-22 07:52:28 UTC (rev 4847)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/livewithtux.xsl 2009-06-22 12:31:11 UTC (rev 4848)
@@ -40,6 +40,8 @@
var knowedGadget07Name = null;
var knowedGadget07Icon = null;
var knowedGadget07Uuid = null;
+ var emptyGadgetIcon = "/data/web_interface/user_01/img/empty.png";
+ var emptyGadgetName = " ";
function updateStates()
{
@@ -51,32 +53,71 @@
var states = requestData("/wi_user_01/get_states", {});
if (states != null)
{
+ if (!states.containsKey("data0"))
+ {
+ setTimeout("updateStates();", 500);
+ return;
+ }
dongleState = states.get("data0").get("dongleState");
radioState = states.get("data0").get("radioState");
batteryState = states.get("data0").get("batteryState");
soundState = states.get("data0").get("soundState");
- var gadgets = states.get("gadgets");
- updateCurrentGadget(gadgets.get("gadget_04_uuid"),
- gadgets.get("gadget_04_name"),
- gadgets.get("gadget_04_icon"));
- updateGadgetThumb01(gadgets.get("gadget_01_uuid"),
- gadgets.get("gadget_01_name"),
- gadgets.get("gadget_01_icon"));
- updateGadgetThumb02(gadgets.get("gadget_02_uuid"),
- gadgets.get("gadget_02_name"),
- gadgets.get("gadget_02_icon"));
- updateGadgetThumb03(gadgets.get("gadget_03_uuid"),
- gadgets.get("gadget_03_name"),
- gadgets.get("gadget_03_icon"));
- updateGadgetThumb05(gadgets.get("gadget_05_uuid"),
- gadgets.get("gadget_05_name"),
- gadgets.get("gadget_05_icon"));
- updateGadgetThumb06(gadgets.get("gadget_06_uuid"),
- gadgets.get("gadget_06_name"),
- gadgets.get("gadget_06_icon"));
- updateGadgetThumb07(gadgets.get("gadget_07_uuid"),
- gadgets.get("gadget_07_name"),
- gadgets.get("gadget_07_icon"));
+ var gadgets = null;
+ try
+ {
+ gadgets = states.get("gadgets");
+ }
+ catch (e)
+ {
+ gadgets = null;
+ }
+ if (gadgets != null)
+ {
+ if (gadgets.containsKey("gadget_04_uuid"))
+ {
+ updateCurrentGadget(gadgets.get("gadget_04_uuid"),
+ gadgets.get("gadget_04_name"),
+ gadgets.get("gadget_04_icon"));
+ updateGadgetThumb01(gadgets.get("gadget_01_uuid"),
+ gadgets.get("gadget_01_name"),
+ gadgets.get("gadget_01_icon"));
+ updateGadgetThumb02(gadgets.get("gadget_02_uuid"),
+ gadgets.get("gadget_02_name"),
+ gadgets.get("gadget_02_icon"));
+ updateGadgetThumb03(gadgets.get("gadget_03_uuid"),
+ gadgets.get("gadget_03_name"),
+ gadgets.get("gadget_03_icon"));
+ updateGadgetThumb05(gadgets.get("gadget_05_uuid"),
+ gadgets.get("gadget_05_name"),
+ gadgets.get("gadget_05_icon"));
+ updateGadgetThumb06(gadgets.get("gadget_06_uuid"),
+ gadgets.get("gadget_06_name"),
+ gadgets.get("gadget_06_icon"));
+ updateGadgetThumb07(gadgets.get("gadget_07_uuid"),
+ gadgets.get("gadget_07_name"),
+ gadgets.get("gadget_07_icon"));
+ }
+ else
+ {
+ updateCurrentGadget("0", emptyGadgetName, emptyGadgetIcon);
+ updateGadgetThumb01("0", emptyGadgetName, emptyGadgetIcon);
+ updateGadgetThumb02("0", emptyGadgetName, emptyGadgetIcon);
+ updateGadgetThumb03("0", emptyGadgetName, emptyGadgetIcon);
+ updateGadgetThumb05("0", emptyGadgetName, emptyGadgetIcon);
+ updateGadgetThumb06("0", emptyGadgetName, emptyGadgetIcon);
+ updateGadgetThumb07("0", emptyGadgetName, emptyGadgetIcon);
+ }
+ }
+ else
+ {
+ updateCurrentGadget("0", emptyGadgetName, emptyGadgetIcon);
+ updateGadgetThumb01("0", emptyGadgetName, emptyGadgetIcon);
+ updateGadgetThumb02("0", emptyGadgetName, emptyGadgetIcon);
+ updateGadgetThumb03("0", emptyGadgetName, emptyGadgetIcon);
+ updateGadgetThumb05("0", emptyGadgetName, emptyGadgetIcon);
+ updateGadgetThumb06("0", emptyGadgetName, emptyGadgetIcon);
+ updateGadgetThumb07("0", emptyGadgetName, emptyGadgetIcon);
+ }
}
if (batteryState != knowedBatteryState)
{
@@ -366,7 +407,7 @@
<div class="thumbnailBarGadgetFirstDiv">
<xsl:element name="img">
<xsl:attribute name="id">thumbnailBarGadgetIcon01</xsl:attribute>
- <xsl:attribute name="src">/data/web_interface/user_01/img/notify_pic_tux_idle.png</xsl:attribute>
+ <xsl:attribute name="src">/data/web_interface/user_01/img/empty.png</xsl:attribute>
<xsl:attribute name="height">44</xsl:attribute>
<xsl:attribute name="width">44</xsl:attribute>
</xsl:element>
@@ -375,7 +416,7 @@
<div class="thumbnailBarGadgetDiv">
<xsl:element name="img">
<xsl:attribute name="id">thumbnailBarGadgetIcon02</xsl:attribute>
- <xsl:attribute name="src">/data/web_interface/user_01/img/notify_pic_tux_idle.png</xsl:attribute>
+ <xsl:attribute name="src">/data/web_interface/user_01/img/empty.png</xsl:attribute>
<xsl:attribute name="height">44</xsl:attribute>
<xsl:attribute name="width">44</xsl:attribute>
</xsl:element>
@@ -384,7 +425,7 @@
<div class="thumbnailBarGadgetDiv">
<xsl:element name="img">
<xsl:attribute name="id">thumbnailBarGadgetIcon03</xsl:attribute>
- <xsl:attribute name="src">/data/web_interface/user_01/img/notify_pic_tux_idle.png</xsl:attribute>
+ <xsl:attribute name="src">/data/web_interface/user_01/img/empty.png</xsl:attribute>
<xsl:attribute name="height">44</xsl:attribute>
<xsl:attribute name="width">44</xsl:attribute>
</xsl:element>
@@ -393,7 +434,7 @@
<div class="thumbnailBarGadgetDivCenter">
<xsl:element name="img">
<xsl:attribute name="id">thumbnailBarGadgetIcon04</xsl:attribute>
- <xsl:attribute name="src">/data/web_interface/user_01/img/notify_pic_tux_idle.png</xsl:attribute>
+ <xsl:attribute name="src">/data/web_interface/user_01/img/empty.png</xsl:attribute>
<xsl:attribute name="height">70</xsl:attribute>
<xsl:attribute name="width">70</xsl:attribute>
</xsl:element>
@@ -402,7 +443,7 @@
<div class="thumbnailBarGadgetDivFift">
<xsl:element name="img">
<xsl:attribute name="id">thumbnailBarGadgetIcon05</xsl:attribute>
- <xsl:attribute name="src">/data/web_interface/user_01/img/notify_pic_tux_idle.png</xsl:attribute>
+ <xsl:attribute name="src">/data/web_interface/user_01/img/empty.png</xsl:attribute>
<xsl:attribute name="height">44</xsl:attribute>
<xsl:attribute name="width">44</xsl:attribute>
</xsl:element>
@@ -411,7 +452,7 @@
<div class="thumbnailBarGadgetDiv">
<xsl:element name="img">
<xsl:attribute name="id">thumbnailBarGadgetIcon06</xsl:attribute>
- <xsl:attribute name="src">/data/web_interface/user_01/img/notify_pic_tux_idle.png</xsl:attribute>
+ <xsl:attribute name="src">/data/web_interface/user_01/img/empty.png</xsl:attribute>
<xsl:attribute name="height">44</xsl:attribute>
<xsl:attribute name="width">44</xsl:attribute>
</xsl:element>
@@ -420,17 +461,17 @@
<div class="thumbnailBarGadgetDiv">
<xsl:element name="img">
<xsl:attribute name="id">thumbnailBarGadgetIcon07</xsl:attribute>
- <xsl:attribute name="src">/data/web_interface/user_01/img/notify_pic_tux_idle.png</xsl:attribute>
+ <xsl:attribute name="src">/data/web_interface/user_01/img/empty.png</xsl:attribute>
<xsl:attribute name="height">44</xsl:attribute>
<xsl:attribute name="width">44</xsl:attribute>
</xsl:element>
</div>
- <span class="thumbnailBarGadget01Name" id="thumbnailBarGadgetName01">Gadget</span>
- <span class="thumbnailBarGadget02Name" id="thumbnailBarGadgetName02">Gadget</span>
- <span class="thumbnailBarGadget03Name" id="thumbnailBarGadgetName03">Gadget</span>
- <span class="thumbnailBarGadget05Name" id="thumbnailBarGadgetName05">Gadget</span>
- <span class="thumbnailBarGadget06Name" id="thumbnailBarGadgetName06">Gadget</span>
- <span class="thumbnailBarGadget07Name" id="thumbnailBarGadgetName07">Gadget</span>
+ <span class="thumbnailBarGadget01Name" id="thumbnailBarGadgetName01"> . </span>
+ <span class="thumbnailBarGadget02Name" id="thumbnailBarGadgetName02"> . </span>
+ <span class="thumbnailBarGadget03Name" id="thumbnailBarGadgetName03"> . </span>
+ <span class="thumbnailBarGadget05Name" id="thumbnailBarGadgetName05"> . </span>
+ <span class="thumbnailBarGadget06Name" id="thumbnailBarGadgetName06"> . </span>
+ <span class="thumbnailBarGadget07Name" id="thumbnailBarGadgetName07"> . </span>
</div>
<!-- NEXT BUTTON -->
<xsl:element name="a">
@@ -455,13 +496,13 @@
<div class="notifyHintGadgetDiv">
<xsl:element name="img">
<xsl:attribute name="id">notifyHintGadgetIcon</xsl:attribute>
- <xsl:attribute name="src">/data/web_interface/user_01/img/notify_pic_tux_idle.png</xsl:attribute>
+ <xsl:attribute name="src">/data/web_interface/user_01/img/empty.png</xsl:attribute>
<xsl:attribute name="height">24</xsl:attribute>
<xsl:attribute name="width">24</xsl:attribute>
</xsl:element>
</div>
<!-- GADGET NAME -->
- <span class="notifyHintGadgetName" id="notifyHintGadgetName">My gadget</span>
+ <span class="notifyHintGadgetName" id="notifyHintGadgetName"> . </span>
<!-- CONFIGURE BUTTON -->
<xsl:element name="a">
<xsl:attribute name="class">notifyBtnConfigure</xsl:attribute>
|