[tuxdroid-svn] r4925 - in software_suite_v3/smart-core/smart-server/trunk: data/web_interface/user
Status: Beta
Brought to you by:
ks156
Author: remi
Date: 2009-06-28 23:18:35 +0200 (Sun, 28 Jun 2009)
New Revision: 4925
Added:
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/gadget-configuration.css
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_content_frame_bottom.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_content_frame_middle.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_content_frame_sep.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_content_frame_top.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_title_bar_bottom_1.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_title_bar_bottom_2.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_title_bar_settings.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_title_bar_uses.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/gadget_configuration.xsl
Modified:
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/window-ie6.css
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/window.css
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/alert.xsl
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/gadgets.xsl
software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/default.pot
software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/en.po
software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/fr.po
Log:
* added "gadget configuration" support in the user interface.
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/gadget-configuration.css
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/gadget-configuration.css (rev 0)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/gadget-configuration.css 2009-06-28 21:18:35 UTC (rev 4925)
@@ -0,0 +1,207 @@
+.gadgetConfTitleBarSettings{
+ height:26px;
+ width:408px;
+ overflow:hidden;
+ display:block;
+ background-image:url(/data/web_interface/user_01/img/gadget_conf_title_bar_settings.png);
+}
+
+.gadgetConfTitleBarUses{
+ height:26px;
+ width:408px;
+ overflow:hidden;
+ display:block;
+ background-image:url(/data/web_interface/user_01/img/gadget_conf_title_bar_uses.png);
+}
+
+.gadgetConfTitleBarLabel{
+ width:357px;
+ height:14px;
+ margin-left:37px;
+ margin-top:6px;
+ display:table;
+ float:left;
+ line-height:14px;
+ font-size:11px;
+ color:#FFF;
+ text-align:left;
+ vertical-align:middle;
+ font-weight:bold;
+ overflow:hidden;
+ text-decoration:none;
+ font-family:Verdana, Bitstream Vera Sans, Arial, Helvetica, sans-serif;
+}
+
+.gadgetConfTitleBarBottom1{
+ height:2px;
+ width:408px;
+ overflow:hidden;
+ display:block;
+ background-image:url(/data/web_interface/user_01/img/gadget_conf_title_bar_bottom_1.png);
+}
+
+.gadgetConfTitleBarBottom2{
+ height:2px;
+ width:408px;
+ overflow:hidden;
+ display:block;
+ background-image:url(/data/web_interface/user_01/img/gadget_conf_title_bar_bottom_2.png);
+}
+
+.gadgetConfContentFrameTop{
+ height:10px;
+ width:408px;
+ overflow:hidden;
+ display:block;
+ background-image:url(/data/web_interface/user_01/img/gadget_conf_content_frame_top.png);
+}
+
+.gadgetConfContentFrameMiddle{
+
+ width:408px;
+ overflow:hidden;
+ display:block;
+ background-image:url(/data/web_interface/user_01/img/gadget_conf_content_frame_middle.png);
+}
+
+.gadgetConfContentFrameSep{
+ height:1px;
+ width:408px;
+ margin-top:2px;
+ overflow:hidden;
+ display:table;
+ background-image:url(/data/web_interface/user_01/img/gadget_conf_content_frame_sep.png);
+}
+
+.gadgetConfContentFrameBottom{
+ height:10px;
+ width:408px;
+ overflow:hidden;
+ display:block;
+ background-image:url(/data/web_interface/user_01/img/gadget_conf_content_frame_bottom.png);
+}
+
+.gadgetConfParamName{
+ width:178px;
+ height:19px;
+ margin-left:21px;
+ margin-top:2px;
+ display:table;
+ float:left;
+ line-height:19px;
+ font-size:10px;
+ color:#000;
+ text-align:right;
+ vertical-align:middle;
+ overflow:hidden;
+ text-decoration:none;
+ font-family:Verdana, Bitstream Vera Sans, Arial, Helvetica, sans-serif;
+}
+
+.gadgetConfParamValue{
+ width:178px;
+ height:19px;
+ margin-left:6px;
+ margin-top:2px;
+ display:table;
+ float:left;
+ overflow:hidden;
+ font-size:10px;
+ color:#000;
+ text-align:left;
+ text-decoration:none;
+ font-family:Verdana, Bitstream Vera Sans, Arial, Helvetica, sans-serif;
+ background-repeat:repeat;
+}
+
+.gadgetConfParamValue2{
+ width:178px;
+ height:19px;
+ margin-left:6px;
+ margin-top:2px;
+ display:table;
+ float:left;
+ overflow:hidden;
+ font-size:10px;
+ line-height:18px;
+ color:#000;
+ text-align:left;
+ vertical-align:middle;
+ text-decoration:none;
+ font-family:Verdana, Bitstream Vera Sans, Arial, Helvetica, sans-serif;
+ background-repeat:repeat;
+}
+
+.gadgetConfMyUseTitle{
+ font-family:Verdana, Bitstream Vera Sans;
+ width:370px;
+ height:20px;
+ font-size:11px;
+ line-height:20px;
+ color:#000;
+ text-align:left;
+ vertical-align:middle;
+ font-weight:bold;
+ text-decoration:underline;
+}
+
+.gadgetConfMyUseDescription{
+ font-family:Verdana, Bitstream Vera Sans;
+ width:370px;
+ height:20px;
+ margin-left:20px;
+ font-size:11px;
+ line-height:20px;
+ color:#000;
+ text-align:left;
+ vertical-align:middle;
+ text-decoration:none;
+ font-style:italic;
+ display:table;
+ float:left;
+}
+
+input.text{
+ font-family:Verdana, Bitstream Vera Sans;
+ font-size:10px;
+ background-color:#FFF;
+ border-color:#3b3b3b;
+ border-style:solid;
+ border-width:1px;
+ width:175px;
+ height:16px;
+ _height:18px;
+ vertical-align:bottom;
+}
+
+select.select{
+ font-family:Verdana, Bitstream Vera Sans;
+ font-size:10px;
+ background-color:#FFF;
+ border-color:#3b3b3b;
+ border-style:solid;
+ border-width:1px;
+ width:175px;
+ height:18px;
+ vertical-align:bottom;
+}
+
+select.selectTime{
+ font-family:Verdana, Bitstream Vera Sans;
+ font-size:10px;
+ background-color:#FFF;
+ border-color:#3b3b3b;
+ border-style:solid;
+ border-width:1px;
+ width:40px;
+}
+
+select.selectYear{
+ font-family:Verdana, Bitstream Vera Sans;
+ font-size:10px;
+ background-color:#FFF;
+ border-color:#3b3b3b;
+ border-style:solid;
+ border-width:1px;
+ width:55px;
+}
Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/window-ie6.css
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/window-ie6.css 2009-06-28 21:15:14 UTC (rev 4924)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/window-ie6.css 2009-06-28 21:18:35 UTC (rev 4925)
@@ -58,10 +58,10 @@
margin-top:8px;
margin-left:12px;
background-color:#EFEFEF;
- border-color:black;
+ border-color:#3b3b3b;
border-style:solid;
border-width:1px;
- overflow-y:auto;
+ overflow-y:hidden;
overflow-x:hidden;
}
Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/window.css
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/window.css 2009-06-28 21:15:14 UTC (rev 4924)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/window.css 2009-06-28 21:18:35 UTC (rev 4925)
@@ -58,10 +58,10 @@
margin-top:8px;
margin-left:12px;
background-color:#EFEFEF;
- border-color:black;
+ border-color:#3b3b3b;
border-style:solid;
border-width:1px;
- overflow-y:auto;
+ overflow-y:hidden;
overflow-x:hidden;
}
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_content_frame_bottom.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_content_frame_bottom.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_content_frame_middle.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_content_frame_middle.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_content_frame_sep.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_content_frame_sep.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_content_frame_top.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_content_frame_top.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_title_bar_bottom_1.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_title_bar_bottom_1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_title_bar_bottom_2.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_title_bar_bottom_2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_title_bar_settings.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_title_bar_settings.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_title_bar_uses.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_title_bar_uses.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/alert.xsl
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/alert.xsl 2009-06-28 21:15:14 UTC (rev 4924)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/alert.xsl 2009-06-28 21:18:35 UTC (rev 4925)
@@ -169,7 +169,7 @@
<xsl:if test="$week_mask/day_0 = 'True'">
<xsl:attribute name="checked">true</xsl:attribute>
</xsl:if>
- </xsl:element> Monday
+ </xsl:element> <xsl:value-of select="../../../translations/monday"/>
<xsl:element name="br"></xsl:element>
<!-- Tuesday -->
<xsl:element name="input">
@@ -179,7 +179,7 @@
<xsl:if test="$week_mask/day_1 = 'True'">
<xsl:attribute name="checked">true</xsl:attribute>
</xsl:if>
- </xsl:element> Tuesday
+ </xsl:element> <xsl:value-of select="../../../translations/tuesday"/>
<xsl:element name="br"></xsl:element>
<!-- Wednesday -->
<xsl:element name="input">
@@ -189,7 +189,7 @@
<xsl:if test="$week_mask/day_2 = 'True'">
<xsl:attribute name="checked">true</xsl:attribute>
</xsl:if>
- </xsl:element> Wednesday
+ </xsl:element> <xsl:value-of select="../../../translations/wednesday"/>
<xsl:element name="br"></xsl:element>
<!-- Thursday -->
<xsl:element name="input">
@@ -199,7 +199,7 @@
<xsl:if test="$week_mask/day_3 = 'True'">
<xsl:attribute name="checked">true</xsl:attribute>
</xsl:if>
- </xsl:element> Thursday
+ </xsl:element> <xsl:value-of select="../../../translations/thursday"/>
<xsl:element name="br"></xsl:element>
<!-- Friday -->
<xsl:element name="input">
@@ -209,7 +209,7 @@
<xsl:if test="$week_mask/day_4 = 'True'">
<xsl:attribute name="checked">true</xsl:attribute>
</xsl:if>
- </xsl:element> Friday
+ </xsl:element> <xsl:value-of select="../../../translations/friday"/>
<xsl:element name="br"></xsl:element>
<!-- Saturday -->
<xsl:element name="input">
@@ -219,7 +219,7 @@
<xsl:if test="$week_mask/day_5 = 'True'">
<xsl:attribute name="checked">true</xsl:attribute>
</xsl:if>
- </xsl:element> Saturday
+ </xsl:element> <xsl:value-of select="../../../translations/saturday"/>
<xsl:element name="br"></xsl:element>
<!-- Sunday -->
<xsl:element name="input">
@@ -229,7 +229,7 @@
<xsl:if test="$week_mask/day_6 = 'True'">
<xsl:attribute name="checked">true</xsl:attribute>
</xsl:if>
- </xsl:element> Sunday
+ </xsl:element> <xsl:value-of select="../../../translations/sunday"/>
</xsl:if>
<!-- Week mask type is 'weekpart' show checkbox -->
<xsl:if test="$type = 'weekpart'">
@@ -240,7 +240,7 @@
<xsl:attribute name="name">week</xsl:attribute>
<xsl:attribute name="value">0</xsl:attribute>
<xsl:attribute name="checked">true</xsl:attribute>
- </xsl:element> All days
+ </xsl:element> <xsl:value-of select="../../../translations/all_days"/>
<xsl:element name="br"></xsl:element>
<xsl:element name="input">
<xsl:attribute name="type">radio</xsl:attribute>
@@ -248,7 +248,7 @@
<xsl:attribute name="id">req_task_<xsl:value-of select="name"/>_weekMask_weekpart</xsl:attribute>
<xsl:attribute name="name">week</xsl:attribute>
<xsl:attribute name="value">1</xsl:attribute>
- </xsl:element> Only weeks
+ </xsl:element> <xsl:value-of select="../../../translations/working_days"/>
<xsl:element name="br"></xsl:element>
<xsl:element name="input">
<xsl:attribute name="type">radio</xsl:attribute>
@@ -256,7 +256,7 @@
<xsl:attribute name="id">req_task_<xsl:value-of select="name"/>_weekMask_weekpart</xsl:attribute>
<xsl:attribute name="name">week</xsl:attribute>
<xsl:attribute name="value">2</xsl:attribute>
- </xsl:element> Only week-end
+ </xsl:element> <xsl:value-of select="../../../translations/weekend"/>
</xsl:if>
<!-- Week mask type is 'exclusive' show selecter -->
<xsl:if test="$type = 'exclusive'">
@@ -266,31 +266,31 @@
<xsl:element name="option">
<xsl:attribute name="value">0</xsl:attribute>
<xsl:attribute name="selected">true</xsl:attribute>
- Monday
+ <xsl:value-of select="../../../translations/monday"/>
</xsl:element>
<xsl:element name="option">
<xsl:attribute name="value">1</xsl:attribute>
- Tuesday
+ <xsl:value-of select="../../../translations/tuesday"/>
</xsl:element>
<xsl:element name="option">
<xsl:attribute name="value">2</xsl:attribute>
- Wednesday
+ <xsl:value-of select="../../../translations/wednesday"/>
</xsl:element>
<xsl:element name="option">
<xsl:attribute name="value">3</xsl:attribute>
- Thursday
+ <xsl:value-of select="../../../translations/thursday"/>
</xsl:element>
<xsl:element name="option">
<xsl:attribute name="value">4</xsl:attribute>
- Friday
+ <xsl:value-of select="../../../translations/friday"/>
</xsl:element>
<xsl:element name="option">
<xsl:attribute name="value">5</xsl:attribute>
- Satuday
+ <xsl:value-of select="../../../translations/saturday"/>
</xsl:element>
<xsl:element name="option">
<xsl:attribute name="value">6</xsl:attribute>
- Sunday
+ <xsl:value-of select="../../../translations/sunday"/>
</xsl:element>
</xsl:element>
</xsl:if>
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/gadget_configuration.xsl
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/gadget_configuration.xsl (rev 0)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/gadget_configuration.xsl 2009-06-28 21:18:35 UTC (rev 4925)
@@ -0,0 +1,251 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+<xsl:include href="plugin_gadget_common.xsl"/>
+
+<xsl:template match="/">
+<html>
+ <head>
+ <LINK href="/data/web_interface/user_01/css/gadget-configuration.css" rel="stylesheet" type="text/css"/>
+ <script src="/data/web_interface/user_01/js/hashtable.js" type="text/javascript"/>
+ <script src="/data/web_interface/user_01/js/common.js" type="text/javascript"/>
+ <script language="javascript">
+ <![CDATA[
+ function initialization()
+ {
+ }
+
+ /**
+ *
+ */
+ function applyGadgetConfiguration()
+ {
+ var uuid = document.getElementById("uuid").value;
+ var language = document.getElementById("language").value;
+ var args = {
+ "uuid" : uuid,
+ "language" : language,
+ "parameters" : computeParameters()
+ }
+ res = postRequest("/wi_user_01/apply_gadget", args);
+ }
+ ]]>
+ </script>
+ </head>
+
+ <body bgcolor="#dcdadb" onLoad="initialization();">
+ <!-- SKIN STORAGE -->
+ <xsl:element name="input">
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">skin</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="root/skin"/>
+ </xsl:attribute>
+ </xsl:element>
+ <!-- LANGUAGE STORAGE -->
+ <xsl:element name="input">
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">language</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="root/language"/>
+ </xsl:attribute>
+ </xsl:element>
+ <!-- UUID STORAGE -->
+ <xsl:element name="input">
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">uuid</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="root/data/description/uuid"/>
+ </xsl:attribute>
+ </xsl:element>
+ <!-- MAIN DIV FRAME -->
+ <div style="position:absolute;
+ left:0px;
+ top:0px;
+ width:423px;
+ height:388px;
+ overflow-y:scroll;
+ overflow-x:hidden;">
+ <!-- SETTINGS BAR -->
+ <div class="gadgetConfTitleBarSettings">
+ <span class="gadgetConfTitleBarLabel"><xsl:value-of select="root/translations/gadget_settings"/></span>
+ </div>
+ <div class="gadgetConfTitleBarBottom1"></div>
+ <!-- SETTINGS CONTENT -->
+ <!-- GADGET NAME -->
+ <div class="gadgetConfContentFrameMiddle" style="height:4px;"></div>
+ <div class="gadgetConfContentFrameMiddle">
+ <span class="gadgetConfParamName"><xsl:value-of select="root/translations/gadget_name"/></span>
+ <span class="gadgetConfParamValue">
+ <xsl:element name="input">
+ <xsl:attribute name="class">text</xsl:attribute>
+ <xsl:attribute name="type">text</xsl:attribute>
+ <xsl:attribute name="id">req_gadget_name</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="root/data/description/name"/>
+ </xsl:attribute>
+ </xsl:element>
+ </span>
+ </div>
+ <!-- GADGET PARAMETERS -->
+ <xsl:for-each select="root/data/parameters/*">
+ <xsl:if test="visible = 'True'">
+ <div class="gadgetConfContentFrameMiddle">
+ <div class="gadgetConfContentFrameSep"></div>
+ <xsl:element name="input">
+ <xsl:attribute name="class">text</xsl:attribute>
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">req_param_<xsl:value-of select="name"/>_visible</xsl:attribute>
+ <xsl:attribute name="value">true</xsl:attribute>
+ </xsl:element>
+ <span class="gadgetConfParamName"><xsl:value-of select="description"/></span>
+ <span class="gadgetConfParamValue">
+ <xsl:call-template name="showParameter"/>
+ </span>
+ </div>
+ </xsl:if>
+ </xsl:for-each>
+ <div class="gadgetConfContentFrameBottom"></div>
+ <xsl:element name="br"></xsl:element>
+ <!-- MY USE OF GADGET BAR -->
+ <div class="gadgetConfTitleBarUses">
+ <span class="gadgetConfTitleBarLabel"><xsl:value-of select="root/translations/my_use_of_the_gadget"/></span>
+ </div>
+ <div class="gadgetConfTitleBarBottom2"></div>
+ <!-- MY USE OF GADGET CONTENT -->
+ <!-- ON DEMAND -->
+ <xsl:choose>
+ <xsl:when test="root/data/description/onDemandIsAble = 'true'">
+ <xsl:element name="input">
+ <xsl:attribute name="class">checkbox</xsl:attribute>
+ <xsl:attribute name="type">checkbox</xsl:attribute>
+ <xsl:attribute name="id">req_gadget_onDemandIsActivated</xsl:attribute>
+ <xsl:if test="root/data/description/onDemandIsActivated = 'true'">
+ <xsl:attribute name="checked">true</xsl:attribute>
+ </xsl:if>
+ </xsl:element>
+ <span class="gadgetConfMyUseTitle"><xsl:value-of select="root/translations/on_demand"/></span>
+ <xsl:element name="br"></xsl:element>
+ <span class="gadgetConfMyUseDescription"><xsl:value-of select="root/translations/on_demand_description"/></span>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:element name="input">
+ <xsl:attribute name="class">text</xsl:attribute>
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">req_gadget_onDemandIsActivated</xsl:attribute>
+ <xsl:attribute name="value">false</xsl:attribute>
+ </xsl:element>
+ </xsl:otherwise>
+ </xsl:choose>
+ <!-- ALERTS -->
+ <xsl:for-each select="root/data/tasks/*">
+ <xsl:element name="input">
+ <xsl:attribute name="class">checkbox</xsl:attribute>
+ <xsl:attribute name="type">checkbox</xsl:attribute>
+ <xsl:attribute name="id">req_task_<xsl:value-of select="name"/>_activated</xsl:attribute>
+ <xsl:if test="activated = 'True'">
+ <xsl:attribute name="checked">true</xsl:attribute>
+ </xsl:if>
+ </xsl:element>
+ <xsl:element name="input">
+ <xsl:attribute name="class">text</xsl:attribute>
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">req_task_<xsl:value-of select="name"/>_visible</xsl:attribute>
+ <xsl:attribute name="value">true</xsl:attribute>
+ </xsl:element>
+ <span class="gadgetConfMyUseTitle">
+ <xsl:value-of select="translatedName"/>
+ </span>
+ <xsl:element name="br"></xsl:element>
+ <span class="gadgetConfMyUseDescription">
+ <xsl:value-of select="description"/>
+ </span>
+ <xsl:if test="dateVisible='True' or hoursBeginVisible='True' or hoursEndVisible='True' or delayVisible='True' or weekMaskVisible='True'">
+ <div class="gadgetConfContentFrameTop"></div>
+ <xsl:if test="dateVisible = 'True'">
+ <div class="gadgetConfContentFrameMiddle">
+ <span class="gadgetConfParamName">
+ <xsl:value-of select="../../../translations/date"/>
+ </span>
+ <span class="gadgetConfParamValue">
+ <xsl:call-template name="dateSelecter">
+ <xsl:with-param name="date" select='date' />
+ </xsl:call-template>
+ </span>
+ <xsl:if test="hoursBeginVisible='True' or hoursEndVisible='True' or delayVisible='True' or weekMaskVisible='True'">
+ <div class="gadgetConfContentFrameSep"></div>
+ </xsl:if>
+ </div>
+ </xsl:if>
+ <xsl:if test="hoursBeginVisible = 'True'">
+ <div class="gadgetConfContentFrameMiddle">
+ <span class="gadgetConfParamName">
+ <xsl:value-of select="../../../translations/starting_at"/>
+ </span>
+ <span class="gadgetConfParamValue">
+ <xsl:call-template name="timeSelecter">
+ <xsl:with-param name="time" select='hoursBegin' />
+ <xsl:with-param name="mask" select='hoursBeginMask' />
+ </xsl:call-template>
+ </span>
+ <xsl:if test="hoursEndVisible='True' or delayVisible='True' or weekMaskVisible='True'">
+ <div class="gadgetConfContentFrameSep"></div>
+ </xsl:if>
+ </div>
+ </xsl:if>
+ <xsl:if test="hoursEndVisible = 'True'">
+ <div class="gadgetConfContentFrameMiddle">
+ <span class="gadgetConfParamName">
+ <xsl:value-of select="../../../translations/stopping_at"/>
+ </span>
+ <span class="gadgetConfParamValue">
+ <xsl:call-template name="timeSelecter">
+ <xsl:with-param name="time" select='hoursEnd' />
+ <xsl:with-param name="mask" select='hoursEndMask' />
+ </xsl:call-template>
+ </span>
+ <xsl:if test="delayVisible='True' or weekMaskVisible='True'">
+ <div class="gadgetConfContentFrameSep"></div>
+ </xsl:if>
+ </div>
+ </xsl:if>
+ <xsl:if test="delayVisible = 'True'">
+ <div class="gadgetConfContentFrameMiddle">
+ <span class="gadgetConfParamName">
+ <xsl:value-of select="../../../translations/delay"/>
+ </span>
+ <span class="gadgetConfParamValue">
+ <xsl:call-template name="timeSelecter">
+ <xsl:with-param name="time" select='delay' />
+ <xsl:with-param name="mask" select='delayMask' />
+ </xsl:call-template>
+ </span>
+ <xsl:if test="weekMaskVisible='True'">
+ <div class="gadgetConfContentFrameSep"></div>
+ </xsl:if>
+ </div>
+ </xsl:if>
+ <xsl:if test="weekMaskVisible = 'True'">
+ <div class="gadgetConfContentFrameMiddle">
+ <span class="gadgetConfParamName">
+ <xsl:value-of select="../../../translations/my_week"/>
+ </span>
+ <span class="gadgetConfParamValue" style="height:0px;">
+ <xsl:call-template name="weekMask">
+ <xsl:with-param name="week_mask" select='weekMask' />
+ <xsl:with-param name="type" select='weekMaskType' />
+ </xsl:call-template>
+ </span>
+ </div>
+ </xsl:if>
+ <div class="gadgetConfContentFrameBottom"></div>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:element name="br"></xsl:element>
+ </div>
+ </body>
+</html>
+</xsl:template>
+</xsl:stylesheet>
Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/gadgets.xsl
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/gadgets.xsl 2009-06-28 21:15:14 UTC (rev 4924)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/gadgets.xsl 2009-06-28 21:18:35 UTC (rev 4925)
@@ -400,7 +400,13 @@
document.getElementById("windowGadgetConfigurationIcon").src = lastGadgetIconInAction;
setpng(document.getElementById("windowGadgetConfigurationIcon"));
document.getElementById("windowGadgetConfigurationTitle").firstChild.nodeValue = lastGadgetNameInAction;
- document.getElementById("windowGadgetConfigurationContentIFrame").src = "http://www.google.fr";
+ var skin = document.getElementById("skin").value;
+ var language = document.getElementById("language").value;
+ var src = "/wi_user_01/gadget_configuration?uuid=" + lastGadgetUuidInAction;
+ src += "&language=" + language;
+ src += "&skin=" + skin;
+ src += "&rndParam=" + Math.random();
+ document.getElementById("windowGadgetConfigurationContentIFrame").src = src;
}
function updatePopupGadgetDeleteContent(uuid)
@@ -443,11 +449,28 @@
lastGadgetUuidInAction = "0";
fillGadgetRows(knowedGadgetsFilter);
}
+
+ function applyUgc()
+ {
+ if (window.frames.windowGadgetConfigurationContentIFrame && window.frames.windowGadgetConfigurationContentIFrame.applyGadgetConfiguration)
+ {
+ window.frames.windowGadgetConfigurationContentIFrame.applyGadgetConfiguration();
+ }
+ fillGadgetRows(knowedGadgetsFilter);
+ }
]]>
</script>
</head>
<body bgcolor="#EFEFEF" onLoad="initialization();">
+ <!-- SKIN STORAGE -->
+ <xsl:element name="input">
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">skin</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="root/skin"/>
+ </xsl:attribute>
+ </xsl:element>
<!-- LANGUAGE STORAGE -->
<xsl:element name="input">
<xsl:attribute name="type">hidden</xsl:attribute>
@@ -611,6 +634,7 @@
<xsl:element name="a">
<xsl:attribute name="class">windowBtn</xsl:attribute>
<xsl:attribute name="name">lbOff</xsl:attribute>
+ <xsl:attribute name="onclick">javascript:applyUgc();</xsl:attribute>
<xsl:attribute name="rel">deactivate</xsl:attribute>
<xsl:attribute name="href">#</xsl:attribute><xsl:value-of select="root/translations/apply"/>
</xsl:element>
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-28 21:15:14 UTC (rev 4924)
+++ software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py 2009-06-28 21:18:35 UTC (rev 4925)
@@ -204,3 +204,84 @@
# Register the service into the resource
resourceWIUser01.addService(TDSServiceWIUser01GetStates)
+
+# ------------------------------------------------------------------------------
+# Declaration of the service "gadget_configuration".
+# ------------------------------------------------------------------------------
+class TDSServiceWIUser01GadgetConfiguration(TDSService):
+
+ def configure(self):
+ self.parametersDict = {
+ 'uuid' : 'string',
+ 'language' : 'string',
+ 'skin' : 'string',
+ }
+ self.minimalUserLevel = TDS_CLIENT_LEVEL_ANONYMOUS
+ self.exclusiveExecution = False
+ self.name = "gadget_configuration"
+ self.comment = "Show the gadget configuration."
+
+ def execute(self, id, parameters):
+ headersStruct = self.getDefaultHeadersStruct()
+ contentStruct = self.getDefaultContentStruct()
+ contentStruct['root']['result'] = getStrError(E_TDREST_SUCCESS)
+ uuid = parameters['uuid']
+ language = parameters['language']
+ skin = parameters['skin']
+ data = resourceUgcServer.getUgcData(uuid, language)
+ if data == None:
+ contentStruct['root']['result'] = getStrError(E_TDREST_FAILED)
+ else:
+ contentStruct['root']['data'] = data
+ contentStruct['root']['skin'] = skin
+ contentStruct['root']['language'] = language
+ contentStruct['root']['translations'] = resourceWIUser01.translations.getTranslations(language)
+ self.haveXsl = True
+ self.xslPath = "/data/web_interface/%s/xsl/gadget_configuration.xsl" % skin
+ return headersStruct, contentStruct
+
+# Register the service into the resource
+resourceWIUser01.addService(TDSServiceWIUser01GadgetConfiguration)
+
+# ------------------------------------------------------------------------------
+# Declaration of the service "apply_gadget".
+# ------------------------------------------------------------------------------
+class TDSServiceWIUser01ApplyGadget(TDSService):
+
+ def configure(self):
+ self.parametersDict = {
+ 'uuid' : 'string',
+ 'language' : 'string',
+ 'parameters' : 'string',
+ }
+ self.minimalUserLevel = TDS_CLIENT_LEVEL_ANONYMOUS
+ self.exclusiveExecution = False
+ self.name = "apply_gadget"
+ self.comment = "Apply the gadget configuration."
+
+ def execute(self, id, parameters):
+ headersStruct = self.getDefaultHeadersStruct()
+ contentStruct = self.getDefaultContentStruct()
+ contentStruct['root']['result'] = getStrError(E_TDREST_SUCCESS)
+ uuid = parameters['uuid']
+ language = parameters['language']
+ params = []
+ splParams = parameters['parameters'].split("|")
+ for paramStruct in splParams:
+ param = paramStruct.split("=")
+ if len(param) == 2:
+ name = param[0]
+ value = param[1]
+ value = value.replace('[RETURN]', '\n')
+ value = value.replace('[EQUAL]', '=')
+ value = value.replace('[PIPE]', '|')
+ value = value.replace('[AMP]', '&')
+ params.append([name, value])
+ tmpUgcUrl, nUuid = GadgetGenerator.updateUgc(
+ resourceUgcServer.getUgcContainer().getUgcByUuid(uuid), params,
+ resourcesManager)
+ resourceUgcServer.insertTemporaryServedUgcInContainer(tmpUgcUrl)
+ return headersStruct, contentStruct
+
+# Register the service into the resource
+resourceWIUser01.addService(TDSServiceWIUser01ApplyGadget)
Modified: software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/default.pot
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/default.pot 2009-06-28 21:15:14 UTC (rev 4924)
+++ software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/default.pot 2009-06-28 21:18:35 UTC (rev 4925)
@@ -60,3 +60,60 @@
msgid "cancel"
msgstr ""
+
+msgid "gadget_settings"
+msgstr ""
+
+msgid "gadget_name"
+msgstr ""
+
+msgid "my_use_of_the_gadget"
+msgstr ""
+
+msgid "on_demand_description"
+msgstr ""
+
+msgid "date"
+msgstr ""
+
+msgid "starting_at"
+msgstr ""
+
+msgid "stopping_at"
+msgstr ""
+
+msgid "delay"
+msgstr ""
+
+msgid "my_week"
+msgstr ""
+
+msgid "all_days"
+msgstr ""
+
+msgid "working_days"
+msgstr ""
+
+msgid "weekend"
+msgstr ""
+
+msgid "monday"
+msgstr ""
+
+msgid "tuesday"
+msgstr ""
+
+msgid "wednesday"
+msgstr ""
+
+msgid "thursday"
+msgstr ""
+
+msgid "friday"
+msgstr ""
+
+msgid "saturday"
+msgstr ""
+
+msgid "sunday"
+msgstr ""
Modified: software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/en.po
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/en.po 2009-06-28 21:15:14 UTC (rev 4924)
+++ software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/en.po 2009-06-28 21:18:35 UTC (rev 4925)
@@ -60,3 +60,60 @@
msgid "cancel"
msgstr "Cancel"
+
+msgid "gadget_settings"
+msgstr "Gadget settings"
+
+msgid "gadget_name"
+msgstr "Gadget name"
+
+msgid "my_use_of_the_gadget"
+msgstr "My use of the gadget"
+
+msgid "on_demand_description"
+msgstr "This gadget will be accessible with the remote control."
+
+msgid "date"
+msgstr "Date"
+
+msgid "starting_at"
+msgstr "Starting at"
+
+msgid "stopping_at"
+msgstr "Stopping at"
+
+msgid "delay"
+msgstr "Delay"
+
+msgid "my_week"
+msgstr "My week"
+
+msgid "all_days"
+msgstr "All days"
+
+msgid "working_days"
+msgstr "Working days"
+
+msgid "weekend"
+msgstr "Weekend"
+
+msgid "monday"
+msgstr "Monday"
+
+msgid "tuesday"
+msgstr "Tuesday"
+
+msgid "wednesday"
+msgstr "Wednesday"
+
+msgid "thursday"
+msgstr "Thursday"
+
+msgid "friday"
+msgstr "Friday"
+
+msgid "saturday"
+msgstr "Saturday"
+
+msgid "sunday"
+msgstr "Sunday"
Modified: software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/fr.po
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/fr.po 2009-06-28 21:15:14 UTC (rev 4924)
+++ software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/fr.po 2009-06-28 21:18:35 UTC (rev 4925)
@@ -56,7 +56,64 @@
msgstr "Fermer"
msgid "apply"
-msgstr "Appliquer"
+msgstr "Valider"
msgid "cancel"
msgstr "Annuler"
+
+msgid "gadget_settings"
+msgstr "Paramètres du gadget"
+
+msgid "gadget_name"
+msgstr "Nom du gadget"
+
+msgid "my_use_of_the_gadget"
+msgstr "Mon utilisation du gadget"
+
+msgid "on_demand_description"
+msgstr "Ce gadget sera accessible par la télécommande."
+
+msgid "date"
+msgstr "Date"
+
+msgid "starting_at"
+msgstr "Démarrer à"
+
+msgid "stopping_at"
+msgstr "Stopper à"
+
+msgid "delay"
+msgstr "Délai"
+
+msgid "my_week"
+msgstr "Ma semaine"
+
+msgid "all_days"
+msgstr "Tous les jours"
+
+msgid "working_days"
+msgstr "Les jours ouvrables"
+
+msgid "weekend"
+msgstr "Le weekend"
+
+msgid "monday"
+msgstr "Lundi"
+
+msgid "tuesday"
+msgstr "Mardi"
+
+msgid "wednesday"
+msgstr "Mercredi"
+
+msgid "thursday"
+msgstr "Jeudi"
+
+msgid "friday"
+msgstr "Vendredi"
+
+msgid "saturday"
+msgstr "Samedi"
+
+msgid "sunday"
+msgstr "Dimanche"
|