[tuxdroid-svn] r5672 - in software_suite_v3/smart-core/smart-server/trunk: data/web_interface/user
Status: Beta
Brought to you by:
ks156
|
From: remi <c2m...@c2...> - 2009-10-15 09:31:12
|
Author: remi
Date: 2009-10-15 11:30:59 +0200 (Thu, 15 Oct 2009)
New Revision: 5672
Modified:
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/resources/07_web_interfaces/01_resourceWIUser01.py
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/Plugin.py
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginDescription.py
Log:
* Moved Attitunes combobox for alert introductions to the alert frame
* Plugin can now avoid Attitunes combox show
Modified: 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 2009-10-15 09:29:10 UTC (rev 5671)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/gadget_configuration.xsl 2009-10-15 09:30:59 UTC (rev 5672)
@@ -108,38 +108,6 @@
</xsl:if>
</xsl:for-each>
<!-- GADGET ALERT ATTITUNE -->
- <xsl:if test="root/data/showAlertAttitune = '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="root/translations/introduction_alerts"/>
- </span>
- <span class="gadgetConfParamValue">
- <xsl:element name="select">
- <xsl:attribute name="class">select</xsl:attribute>
- <xsl:attribute name="id">req_alertAttitune</xsl:attribute>
- <xsl:attribute name="name">AlertAttitune</xsl:attribute>
- <xsl:for-each select="root/data/availableAttitunes/*">
- <xsl:element name="option">
- <xsl:attribute name="value">
- <xsl:value-of select="."/>
- </xsl:attribute>
- <xsl:if test=". = ../../alertAttitune">
- <xsl:attribute name="selected">true</xsl:attribute>
- </xsl:if>
- <xsl:value-of select="."/>
- </xsl:element>
- </xsl:for-each>
- </xsl:element>
- </span>
- </div>
- </xsl:if>
<div class="gadgetConfContentFrameBottom"></div>
<!-- ON DEMAND -->
<xsl:choose>
@@ -194,8 +162,37 @@
<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' or count(parameters/*[visible='True']) > 0">
+ <xsl:if test="dateVisible='True' or hoursBeginVisible='True' or hoursEndVisible='True' or delayVisible='True' or weekMaskVisible='True' or ../../showAlertAttitune='True' or count(parameters/*[visible='True']) > 0">
<div class="gadgetConfContentFrameTop"></div>
+ <!-- GADGET ALERT ATTITUNE -->
+ <xsl:if test="../../showAlertAttitune = 'True'">
+ <div class="gadgetConfContentFrameMiddle">
+ <span class="gadgetConfParamName">
+ <xsl:value-of select="../../../translations/introduction_alerts"/>
+ </span>
+ <span class="gadgetConfParamValue">
+ <xsl:element name="select">
+ <xsl:attribute name="class">select</xsl:attribute>
+ <xsl:attribute name="id">req_alertAttitune</xsl:attribute>
+ <xsl:attribute name="name">AlertAttitune</xsl:attribute>
+ <xsl:for-each select="../../availableAttitunes/*">
+ <xsl:element name="option">
+ <xsl:attribute name="value">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ <xsl:if test=". = ../../alertAttitune">
+ <xsl:attribute name="selected">true</xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:element>
+ </xsl:for-each>
+ </xsl:element>
+ </span>
+ <xsl:if test="dateVisible='True' or hoursBeginVisible='True' or hoursEndVisible='True' or delayVisible='True' or weekMaskVisible='True' or count(parameters/*[visible='True']) > 0">
+ <div class="gadgetConfContentFrameSep"></div>
+ </xsl:if>
+ </div>
+ </xsl:if>
<!-- ALERT PARAMETERS -->
<xsl:for-each select="parameters/*">
<xsl:if test="visible = 'True'">
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-10-15 09:29:10 UTC (rev 5671)
+++ software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py 2009-10-15 09:30:59 UTC (rev 5672)
@@ -380,15 +380,16 @@
showAttitunes = False
ugc = resourceUgcServer.getUgcContainer().getUgcByUuid(uuid)
parentPlugin = ugc.getParentGadget().getParentPlugin()
- tasks = ugc.getTasks()
- for task in tasks:
- parentTask = parentPlugin.getTask(task.getName())
- if parentTask != None:
- parentCommand = parentPlugin.getCommand(parentTask.getCommand())
- if parentCommand != None:
- if not parentCommand.isNotifier():
- showAttitunes = True
- break
+ if parentPlugin.getDescription().hasAttituneAlert():
+ tasks = ugc.getTasks()
+ for task in tasks:
+ parentTask = parentPlugin.getTask(task.getName())
+ if parentTask != None:
+ parentCommand = parentPlugin.getCommand(parentTask.getCommand())
+ if parentCommand != None:
+ if not parentCommand.isNotifier():
+ showAttitunes = True
+ break
data['showAlertAttitune'] = showAttitunes
parentUuid = parentPlugin.getDescription().getUuid()
attitunesList = resourceAttituneManager.getAttitunesNameByObserversList([parentUuid, "userAttitunes"])
Modified: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/Plugin.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/Plugin.py 2009-10-15 09:29:10 UTC (rev 5671)
+++ software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/Plugin.py 2009-10-15 09:30:59 UTC (rev 5672)
@@ -200,6 +200,7 @@
data['description']['author'] = description.getAuthor()
data['description']['description'] = description.getDescription(language)
data['description']['platform'] = description.getPlatform()
+ data['description']['hasAttituneAlert'] = description.hasAlertAttitune()
try:
f = open(description.getHelpFile(language), "rb")
try:
Modified: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginDescription.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginDescription.py 2009-10-15 09:29:10 UTC (rev 5671)
+++ software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginDescription.py 2009-10-15 09:30:59 UTC (rev 5672)
@@ -36,6 +36,7 @@
self.__helpFile = None
self.__platform = None
self.__ttsName = None
+ self.__noAttituneAlert = None
self.__update(dictionary, workingPath)
# --------------------------------------------------------------------------
@@ -83,6 +84,9 @@
self.__ttsName = self.__name
if dictionary.has_key('ttsName'):
self.__ttsName = dictionary['ttsName']
+ self.__noAttituneAlert = "false"
+ if dictionary.has_key('noAttituneAlert'):
+ self.__noAttituneAlert = dictionary['noAttituneAlert']
# --------------------------------------------------------------------------
# Get the plugin name.
@@ -200,3 +204,15 @@
@return: A string. <"all"|"linux"|"windows">
"""
return self.__platform
+
+ # --------------------------------------------------------------------------
+ # Get if the alert can have attitune introduction.
+ # --------------------------------------------------------------------------
+ def hasAttituneAlert(self):
+ """Get if the alert can have attitune introduction.
+ @return: True or False.
+ """
+ if self.__noAttituneAlert == "false":
+ return True
+ else:
+ return False
|