tux-droid-svn Mailing List for Tux Droid CE (Page 45)
Status: Beta
Brought to you by:
ks156
You can subscribe to this list here.
| 2007 |
Jan
|
Feb
(32) |
Mar
(108) |
Apr
(71) |
May
(38) |
Jun
(128) |
Jul
(1) |
Aug
(14) |
Sep
(77) |
Oct
(104) |
Nov
(90) |
Dec
(71) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(81) |
Feb
(18) |
Mar
(40) |
Apr
(102) |
May
(151) |
Jun
(74) |
Jul
(151) |
Aug
(257) |
Sep
(447) |
Oct
(379) |
Nov
(404) |
Dec
(430) |
| 2009 |
Jan
(173) |
Feb
(236) |
Mar
(519) |
Apr
(300) |
May
(112) |
Jun
(232) |
Jul
(314) |
Aug
(58) |
Sep
(203) |
Oct
(293) |
Nov
(26) |
Dec
(109) |
| 2010 |
Jan
(19) |
Feb
(25) |
Mar
(33) |
Apr
(1) |
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: remi <c2m...@c2...> - 2009-06-29 09:07:27
|
Author: remi Date: 2009-06-29 11:07:25 +0200 (Mon, 29 Jun 2009) New Revision: 4930 Modified: 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_top.png software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_title_bar_bottom_1.png Log: * updated some user interface images Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_content_frame_bottom.png =================================================================== (Binary files differ) Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_content_frame_middle.png =================================================================== (Binary files differ) Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_content_frame_top.png =================================================================== (Binary files differ) Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadget_conf_title_bar_bottom_1.png =================================================================== (Binary files differ) |
|
From: remi <c2m...@c2...> - 2009-06-29 09:06:53
|
Author: remi
Date: 2009-06-29 11:06:48 +0200 (Mon, 29 Jun 2009)
New Revision: 4929
Modified:
software_suite_v3/smart-core/smart-server/trunk/util/scheduler/Scheduler.py
Log:
* force to wait 1 second between tasks execution
Modified: software_suite_v3/smart-core/smart-server/trunk/util/scheduler/Scheduler.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/util/scheduler/Scheduler.py 2009-06-29 09:05:32 UTC (rev 4928)
+++ software_suite_v3/smart-core/smart-server/trunk/util/scheduler/Scheduler.py 2009-06-29 09:06:48 UTC (rev 4929)
@@ -447,8 +447,9 @@
tasksToRemove.append(taskInfo)
nextTime = taskInfo[TASK_OBJECT].getNextExecuteTime()
diff = now - taskInfo[TASK_NEXT_TIME]
- if diff.seconds <= 10:
+ if diff.seconds <= 30:
taskInfo[TASK_OBJECT].execute(self.__appGlobals)
+ time.sleep(1.0)
if nextTime != None:
tasksToAdd.append([nextTime, taskInfo[TASK_OBJECT],
taskInfo[TASK_ID], taskInfo[TASK_NAME]])
|
|
From: remi <c2m...@c2...> - 2009-06-29 09:05:36
|
Author: remi Date: 2009-06-29 11:05:32 +0200 (Mon, 29 Jun 2009) New Revision: 4928 Modified: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginsContainer.py Log: * more informations on plugin deployment error Modified: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginsContainer.py =================================================================== --- software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginsContainer.py 2009-06-29 09:04:56 UTC (rev 4927) +++ software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginsContainer.py 2009-06-29 09:05:32 UTC (rev 4928) @@ -6,8 +6,10 @@ # This module is highly inspired by a "gadget framework" written by # "Yoran Brault" <http://artisan.karma-lab.net> +import sys import os import threading +import traceback from util.filesystem.AutoDeployer import AutoDeployer from util.xml.XmlSerializer import XmlSerializer @@ -296,6 +298,21 @@ # ========================================================================== # -------------------------------------------------------------------------- + # Format the last traceback. + # -------------------------------------------------------------------------- + def __formatException(self): + """Format the last traceback. + @return: A string. + """ + fList = traceback.format_exception(sys.exc_info()[0], + sys.exc_info()[1], + sys.exc_info()[2]) + result = "" + for line in fList: + result += line + return result + + # -------------------------------------------------------------------------- # Build a plugin object from a deployed plugin. # -------------------------------------------------------------------------- def __buildPlugin(self, observerName, fileName, pluginPath, pluginName): @@ -310,9 +327,13 @@ """ # Check for "plugin.xml" pluginXmlFile = os.path.join(pluginPath, "resources", "plugin.xml") + if not os.path.isfile(pluginXmlFile): + return None, "'plugin.xml' not found" pluginXmlDict = XmlSerializer.deserializeEx(pluginXmlFile) if pluginXmlDict == None: - return None, "'plugin.xml' not found" + error = "'plugin.xml' XML format error\n" + XmlSerializer.getLastTraceback() + return None, error + #return None, "'plugin.xml' XML format error" # Check for "help.wiki" helpWikiFile = os.path.join(pluginPath, "resources", "help.wiki") if not os.path.isfile(helpWikiFile): @@ -325,7 +346,8 @@ try: plugin = Plugin(self, pluginXmlDict, fileName, pluginPath) except: - return None, "Error in 'plugin.xml'" + error = "Error in 'plugin.xml'\n" + self.__formatException() + return None, error # Check the plugin platform pluginPlatform = plugin.getDescription().getPlatform() if pluginPlatform != "all": |
|
From: remi <c2m...@c2...> - 2009-06-29 09:05:03
|
Author: remi
Date: 2009-06-29 11:04:56 +0200 (Mon, 29 Jun 2009)
New Revision: 4927
Modified:
software_suite_v3/smart-core/smart-server/trunk/util/xml/XmlSerializer.py
Log:
* added a traceback storage on xml reads error
Modified: software_suite_v3/smart-core/smart-server/trunk/util/xml/XmlSerializer.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/util/xml/XmlSerializer.py 2009-06-29 08:15:41 UTC (rev 4926)
+++ software_suite_v3/smart-core/smart-server/trunk/util/xml/XmlSerializer.py 2009-06-29 09:04:56 UTC (rev 4927)
@@ -7,12 +7,15 @@
import os
import sys
+import traceback
import cStringIO
from xml.sax.handler import ContentHandler
from xml.sax.saxutils import XMLGenerator
from xml.sax.xmlreader import XMLReader
from xml.sax import make_parser
+LAST_TRACE_BACK = "No error"
+
# ------------------------------------------------------------------------------
# Xml parser handler to make a dictionary from a xml content.
# ------------------------------------------------------------------------------
@@ -171,6 +174,16 @@
"""
# --------------------------------------------------------------------------
+ # Get the last traceback.
+ # --------------------------------------------------------------------------
+ def getLastTraceback():
+ """Get the last traceback.
+ @return: A string.
+ """
+ global LAST_TRACE_BACK
+ return LAST_TRACE_BACK
+
+ # --------------------------------------------------------------------------
# Deserialize a xml file to a dictionary.
# --------------------------------------------------------------------------
def deserialize(xmlFileName):
@@ -178,6 +191,17 @@
@param xmlFileName: Input xml file.
@return: The resulting dictionary.
"""
+ def setLastTraceback():
+ global LAST_TRACE_BACK
+ fList = traceback.format_exception(sys.exc_info()[0],
+ sys.exc_info()[1],
+ sys.exc_info()[2])
+ LAST_TRACE_BACK = ""
+ for line in fList:
+ LAST_TRACE_BACK += line
+ def reinitLastTraceback():
+ global LAST_TRACE_BACK
+ LAST_TRACE_BACK = "No error"
# Get the xml encoding
encoding = "utf-8"
try:
@@ -191,15 +215,19 @@
encoding = line[line.find("encoding"):].split('"')[1]
finally:
f.close()
+ reinitLastTraceback()
except:
+ setLastTraceback()
return None
try:
parser = make_parser()
dictionaryHandler = DictionaryHandler(encoding)
parser.setContentHandler(dictionaryHandler)
parser.parse(open(xmlFileName))
+ reinitLastTraceback()
return dictionaryHandler.getDictionary()
except:
+ setLastTraceback()
return None
# --------------------------------------------------------------------------
@@ -261,3 +289,4 @@
deserialize = staticmethod(deserialize)
deserializeEx = staticmethod(deserializeEx)
serialize = staticmethod(serialize)
+ getLastTraceback = staticmethod(getLastTraceback)
|
|
From: jerome <c2m...@c2...> - 2009-06-29 08:15:49
|
Author: jerome Date: 2009-06-29 10:15:41 +0200 (Mon, 29 Jun 2009) New Revision: 4926 Added: software_suite_v3/software/plugin/plugin-maxlight/ software_suite_v3/software/plugin/plugin-maxlight/branches/ software_suite_v3/software/plugin/plugin-maxlight/tags/ software_suite_v3/software/plugin/plugin-maxlight/trunk/ software_suite_v3/software/plugin/plugin-maxlight/trunk/build.py software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/ software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/PluginPackager.py software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/__init__.py software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/util/ software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/util/__init__.py software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/util/misc/ software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/util/misc/DirectoriesAndFilesTools.py software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/util/misc/__init__.py software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/util/misc/version.py software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/version.py software_suite_v3/software/plugin/plugin-maxlight/trunk/executables/ software_suite_v3/software/plugin/plugin-maxlight/trunk/executables/plugin-maxlight.py software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/ software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/en.po software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/en.wiki software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/es.po software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/es.wiki software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/fr.po software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/fr.wiki software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/help.wiki software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/nl.po software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/nl.wiki software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/plugin.png software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/plugin.pot software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/plugin.xml Log: * Added plugin-maxlight. Added: software_suite_v3/software/plugin/plugin-maxlight/trunk/build.py =================================================================== --- software_suite_v3/software/plugin/plugin-maxlight/trunk/build.py (rev 0) +++ software_suite_v3/software/plugin/plugin-maxlight/trunk/build.py 2009-06-29 08:15:41 UTC (rev 4926) @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- + +# Copyright (C) 2009 C2ME Sa +# Remi Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +from builder.PluginPackager import PluginPackager + +if __name__ == "__main__": + PluginPackager().createScp("plugin-maxlight.scp") Added: software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/PluginPackager.py =================================================================== --- software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/PluginPackager.py (rev 0) +++ software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/PluginPackager.py 2009-06-29 08:15:41 UTC (rev 4926) @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- + +import version +__author__ = version.author +__date__ = version.date +__version__ = version.version +__licence__ = version.licence +del version + +# Copyleft (C) 2009 C2ME Sa +# Remi Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +import os +from zipfile import * + +from util.misc.DirectoriesAndFilesTools import * + +# ------------------------------------------------------------------------------ +# Class to create a SCP file from the main directory of a python plugin project. +# ------------------------------------------------------------------------------ +class PluginPackager(object): + """Class to create a SCP file from the main directory of a python plugin + project. + """ + + # -------------------------------------------------------------------------- + # Create a scp file. + # -------------------------------------------------------------------------- + def createScp(self, scpFileName): + """Create a scp file. + @param scpFileName: Smart-Core Plugin file name. + @return: The success of the file creation. + """ + self.__sourcePath = os.path.realpath("") + if not os.path.isdir(self.__sourcePath): + return False + if not os.path.isdir(os.path.join(self.__sourcePath, "executables")): + return False + if not os.path.isdir(os.path.join(self.__sourcePath, "resources")): + return False + # Get some paths + SRC_EXECUTABLES_PATH = os.path.join(self.__sourcePath, "executables") + SRC_RESOURCES_PATH = os.path.join(self.__sourcePath, "resources") + TMP_BUILD_PATH = os.path.join(self.__sourcePath, "tmp") + DEST_EXECUTABLES_PATH = os.path.join(TMP_BUILD_PATH, "executables") + DEST_RESOURCES_PATH = os.path.join(TMP_BUILD_PATH, "resources") + DEST_SCP_FILENAME = os.path.join(self.__sourcePath, scpFileName) + # Create the temporary build path + MKDirsF(TMP_BUILD_PATH) + # Copy "executables" directory + CPDir(SRC_EXECUTABLES_PATH, DEST_EXECUTABLES_PATH) + # Copy "resources" directory + CPDir(SRC_RESOURCES_PATH, DEST_RESOURCES_PATH) + # Filtering the content of temporary path + RMWithFilters(TMP_BUILD_PATH, filters = ['.svn', '.pyc']) + # Create a zip file + directory = TMP_BUILD_PATH + last_cwd = os.getcwd() + os.chdir(TMP_BUILD_PATH) + zf = ZipFile(DEST_SCP_FILENAME, 'w', compression = ZIP_DEFLATED) + def walker(zip, directory, files, root = directory): + for file in files: + file = os.path.join(directory, file) + name = file[len(TMP_BUILD_PATH) + 1:] + if os.path.isfile(file): + zip.write(file, name, ZIP_DEFLATED) + elif os.path.isdir(file): + file = os.path.join(file, "") + name = os.path.join(name, "") + zip.writestr(name, name) + os.path.walk(TMP_BUILD_PATH, walker, zf) + zf.close() + os.chdir(os.path.abspath(last_cwd)) + # Remove the temporary directory + RMDirs(TMP_BUILD_PATH) + return True Added: software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/__init__.py =================================================================== Added: software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/util/__init__.py =================================================================== Added: software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/util/misc/DirectoriesAndFilesTools.py =================================================================== --- software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/util/misc/DirectoriesAndFilesTools.py (rev 0) +++ software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/util/misc/DirectoriesAndFilesTools.py 2009-06-29 08:15:41 UTC (rev 4926) @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- + +import version +__author__ = version.author +__date__ = version.date +__version__ = version.version +__licence__ = version.licence +del version + +# Copyleft (C) 2008 Acness World +# Remi Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +import os +import shutil + +if os.name == 'nt': + import win32con + import win32file + +# ============================================================================== +# Public functions +# ============================================================================== + +# ------------------------------------------------------------------------------ +# Force to create a directories tree if not exists. +# ------------------------------------------------------------------------------ +def MKDirs(path): + """Force to create a directories tree if not exists. + @param path: Directory path. + """ + if not os.path.isdir(path): + try: + os.makedirs(path) + except: + pass + +# ------------------------------------------------------------------------------ +# Force to create a directories tree after having deleted the old one. +# ------------------------------------------------------------------------------ +def MKDirsF(path): + """Force to create a directories tree after having deleted the old one. + @param path: Directory path. + """ + if os.path.isdir(path): + RMDirs(path) + os.makedirs(path) + +# ------------------------------------------------------------------------------ +# Remove directories and files recursively. +# ------------------------------------------------------------------------------ +def RMDirs(path): + """Remove directories and files recursively. + @param path: Path of the base directory. + """ + if not os.path.isdir(path): + return + for root, dirs, files in os.walk(path, topdown = False): + for d in dirs: + try: + os.removedirs(os.path.join(root, d)) + except: + pass + for f in files: + try: + if os.name == 'nt': + win32file.SetFileAttributesW(os.path.join(root, f), + win32con.FILE_ATTRIBUTE_NORMAL) + os.remove(os.path.join(root, f)) + except: + pass + if os.path.isdir(path): + try: + os.removedirs(path) + except: + pass + +# ------------------------------------------------------------------------------ +# Remove directories and files recursively with filters. +# ------------------------------------------------------------------------------ +def RMWithFilters(path, filters = ['.pyc', '.pyo']): + """Remove directories and files recursively with filters. + @param path: Path of the base directory. + @param filters: Filters as list. + """ + def checkFilter(name): + for filter in filters: + if name.lower().find(filter.lower()) == (len(name) - len(filter)): + return True + return False + + if not os.path.isdir(path): + return + + for root, dirs, files in os.walk(path, topdown = False): + for d in dirs: + if checkFilter(os.path.join(root, d)): + try: + RMDirs(os.path.join(root, d)) + except: + pass + for f in files: + if checkFilter(os.path.join(root, f)): + try: + if os.name == 'nt': + win32file.SetFileAttributesW(os.path.join(root, f), + win32con.FILE_ATTRIBUTE_NORMAL) + os.remove(os.path.join(root, f)) + except: + pass + +# ------------------------------------------------------------------------------ +# Remove a file. +# ------------------------------------------------------------------------------ +def RMFile(path): + """Remove a file. + @param path: File path. + """ + if os.path.isfile(path): + try: + if os.name == 'nt': + win32file.SetFileAttributesW(path, + win32con.FILE_ATTRIBUTE_NORMAL) + os.remove(path) + except: + pass + +# ------------------------------------------------------------------------------ +# Copy a directories tree to another directory. +# ------------------------------------------------------------------------------ +def CPDir(src, dest): + """Copy a directories tree to another directory. + @param src: Source path. + @param dest: Destination path. + """ + if not os.path.isdir(src): + return + if os.path.isdir(dest): + RMDirs(dest) + shutil.copytree(src, dest) + +# ------------------------------------------------------------------------------ +# Retrieve the OS temporary directory. +# ------------------------------------------------------------------------------ +def GetOSTMPDir(): + """Retrieve the OS temporary directory. + @return: The OS temporary directory. + """ + result = None + # On Windows + if os.name == 'nt': + result = os.environ.get('tmp') + if result == None: + result = os.environ.get('temp') + if result == None: + result = "c:\\windows\\temp" + # On linux + else: + result = "/tmp" + return result Added: software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/util/misc/__init__.py =================================================================== Added: software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/util/misc/version.py =================================================================== --- software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/util/misc/version.py (rev 0) +++ software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/util/misc/version.py 2009-06-29 08:15:41 UTC (rev 4926) @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + +"""Version data for tuxisalive.lib.Util""" + +__author__ = "Remi Jocaille (rem...@c2...)" + +# Copyleft (C) 2008 C2ME Sa +# Remi Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +name = 'util.misc' +version = '0.0.1' +author = "Remi Jocaille (rem...@c2...)" + +description = "Utilities libraries." + +licence = "GPL" +date = "December 2008" Added: software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/version.py =================================================================== --- software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/version.py (rev 0) +++ software_suite_v3/software/plugin/plugin-maxlight/trunk/builder/version.py 2009-06-29 08:15:41 UTC (rev 4926) @@ -0,0 +1,9 @@ +# Copyleft (C) 2009 C2ME Sa +# Remi Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +version = '2.0' +author = "Jerome Conan (jer...@ky...)" +licence = "GPL" +date = "2009" Added: software_suite_v3/software/plugin/plugin-maxlight/trunk/executables/plugin-maxlight.py =================================================================== --- software_suite_v3/software/plugin/plugin-maxlight/trunk/executables/plugin-maxlight.py (rev 0) +++ software_suite_v3/software/plugin/plugin-maxlight/trunk/executables/plugin-maxlight.py 2009-06-29 08:15:41 UTC (rev 4926) @@ -0,0 +1,207 @@ +# -*- coding: utf-8 -*- + +# Copyright (C) 2009 Kysoh Sa +# Eric Lescaudron AKA Gwadavel http://gwadaself.tux.free.fr +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +__author__ = "Gwadavel" +__appname__ = "Python plugin skeleton" +__version__ = "2.0" +__date__ = "2009/05/05" +__license__ = "GPL" + +import os +import sys + +import locale +import gettext +from tuxisalive.api import * +from time import sleep, time +import threading + +sys.path.append(os.environ['TUXDROID_SERVER_PYTHON_UTIL']) + +from util.SimplePlugin.SimplePluginConfiguration import SimplePluginConfiguration +from util.SimplePlugin.SimplePlugin import SimplePlugin + + +class Light(object): + """ + Manage the light research. + """ + + tgp_language = "en" + tgp_ip = "127.0.0.1" + tgp_port = 270 + tux = TuxAPI("127.0.0.1", 270) + + def __init__(self, plug): + ''' + ''' + self.plugin = plug + + + + def tuxConnect(self): + ''' + Wait connected + ''' + + self.tux.server.autoConnect(CLIENT_LEVEL_RESTRICTED, 'TuxMaxLight', 'plugin-maxlight') + self.tux.server.waitConnected(5.0) + self.tux.dongle.waitConnected(5.0) + self.tux.radio.waitConnected(5.0) + return self.tux.access.waitAcquire(5.0, ACCESS_PRIORITY_NORMAL) + + + def startSpinning(self): + ''' + Start tux spinning. + ''' + self.tux.spinning.leftOn(4.0, speed = SPV_SLOW); + + + + def search(self): + ''' + Search maximum light + ''' + + l_max = 0 # Light Max + + # Turn on left 2 turns, asynchrone mode + thread = threading.Thread(target = self.startSpinning, args = []) + thread.start() + + # wait Tux began to turn + sleep(1.5) + + isTurning = self.tux.status.requestOne(ST_NAME_SPIN_LEFT_MOTOR_ON)[0] + + mutex = threading.Lock() + + while isTurning == "True": + + mutex.acquire() + isTurning = self.tux.status.requestOne(ST_NAME_SPIN_LEFT_MOTOR_ON)[0] + + lum = self.tux.light.getLevel() # Light + sleep(0.1) + + if lum > l_max: # Light Max ? + l_max = lum // 1 + + mutex.release() + + return l_max # Return Light Max + + + + def stopSearch(self, l_stop, currentTime): + ''' + Tux stop when it finds light up Modified by ks156 who wrote light + monitor gadget for TuxDroid V1 Tux turn a little, wait and turn while light < light max + ''' + brk = False + l_stop = l_stop - 4.0 #Because of Windblows. + while 1: + + self.tux.spinning.leftOnDuring(0.1, speed=SPV_VERYSLOW) + sleep(1.5) + lum = self.tux.light.getLevel() + + + if lum >= l_stop: + self.tux.spinning.off() + break + + + if (int(time()) - currentTime) >= 30: + plugin.throwMessage("Sorry I'm not sure where the most of the light is coming from") + self.tux.spinning.off() + brk = True + break + + + if not brk: + plugin.throwMessage("I think most of the light is coming from this direction.") + + + def startAll(self): + ''' + ''' + + if "tgp_language" in os.environ: + self.tgp_language = os.environ["tgp_language"] + + # Test if tgp_ip and tgp_port exist + if "tgp_ip" in os.environ: + self.tgp_ip = os.environ["tgp_ip"] + + if "tgp_port" in os.environ: + self.tgp_port = int(os.environ["tgp_port"]) + + tux = TuxAPI(self.tgp_ip, self.tgp_port) + + if self.tuxConnect(): + + if not self.tux.radio.getConnected(): + plugin.throwMessage("I can't find my fish. Please, make sure I'm connected.") + + # Test if charger are plugged + elif not ( self.tux.status.requestOne('charger_state')[0] == 'UNPLUGGED' ) : + plugin.throwMessage("Unplug my charger first and try again.") + else: + plugin.throwMessage("Looking for the brightest light source") + self.tux.eyes.open() + self.tux.flippers.up() + light = self.search() # search light up + self.stopSearch(light, int(time())) # stop + self.tux.flippers.down() + + self.tux.access.release() + self.tux.server.disconnect() + self.tux.destroy() + + + +class MaxlightPlugin(SimplePlugin): + """This class override the SimplePlugin class to make easy + the plugin coding. + """ + + def __init__(self): + """Initialization of the class. + """ + # Call the super class + SimplePlugin.__init__(self) + self.slight = Light(self) + + def start(self): + """Plugin entry point. + This method should be used to dispatch commands. + """ + self.run() + + + def run(self): + """Plugin entry point for the "run" command. + """ + self.slight.startAll() + + def onPluginStop(self): + """Callback on plugin stop. + """ + pass + + def onPluginEvent(self, eventName, eventValues): + """Callback on plugin event. + @param eventName: Event name. + @param eventValues: Event values. + """ + pass + +if __name__ == "__main__": + plugin = MaxlightPlugin() + plugin.boot(sys.argv[1:], SimplePluginConfiguration()) Added: software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/en.po =================================================================== --- software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/en.po (rev 0) +++ software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/en.po 2009-06-29 08:15:41 UTC (rev 4926) @@ -0,0 +1,25 @@ + +msgid "" +msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-05-12 11:58+0200\nPO-Revision-Date: 2009-05-12 11:59+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: en\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n" + +msgid "Max Light Plugin" +msgstr "Max Light Plugin" + +msgid "The Max Light plugin will make Tux Droid rotate towards the direction of the brightest light source." +msgstr "The Max Light plugin will make Tux Droid rotate towards the direction of the brightest light source." + +msgid "I think most of the light is coming from this direction." +msgstr "I think most of the light is coming from this direction." + +msgid "Unplug my charger first and try again." +msgstr "Unplug my charger first and try again." + +msgid "Sorry, I'm not sure where the light is coming from" +msgstr "Sorry, I'm not sure where the light is coming from" + +msgid "I can't find my fish. Please, make sure I'm connected." +msgstr "I can't find my fish. Please, make sure I'm connected." + +msgid "Looking for the brightest light source" +msgstr "Looking for the brightest light source" + Added: software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/en.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/en.wiki (rev 0) +++ software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/en.wiki 2009-06-29 08:15:41 UTC (rev 4926) @@ -0,0 +1,3 @@ +== Synopsis == +The Max Light plugin will make Tux Droid rotate towards the brightest light source. +Also, make sure to unplug the charger so Tux Droid can spin while searching for the light source. \ No newline at end of file Added: software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/es.po =================================================================== --- software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/es.po (rev 0) +++ software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/es.po 2009-06-29 08:15:41 UTC (rev 4926) @@ -0,0 +1,25 @@ + +msgid "" +msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-05-12 11:58+0200\nPO-Revision-Date: 2009-05-14 14:46+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: es\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n" + +msgid "Max Light Plugin" +msgstr "Plugin Luz Maxima" + +msgid "The Max Light plugin will make Tux Droid rotate towards the direction of the brightest light source." +msgstr "El plugin de Luz Maxima hara que Tux Droid gire en la direccion desde se encuentre la fuente de luz mas brillante." + +msgid "I think most of the light is coming from this direction." +msgstr "Creo que la fuente de luz mas brillante viene de esta dirección." + +msgid "Unplug my charger first and try again." +msgstr "Desconecte primero mi cargador e intentelo de nuevo." + +msgid "Sorry, I'm not sure where the light is coming from" +msgstr "Lo sentimos, no estoy seguro de que la luz proviene" + +msgid "I can't find my fish. Please, make sure I'm connected." +msgstr "" + +msgid "Looking for the brightest light source" +msgstr "Buscando la fuente de luz mas brillante." + Added: software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/es.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/es.wiki (rev 0) +++ software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/es.wiki 2009-06-29 08:15:41 UTC (rev 4926) @@ -0,0 +1,3 @@ +==Synopsis == +El gadget de Luz Maxima hará que Tux Droid gire hacia la fuente de luz mas brillante. +Asegurese tambien de desconectar el cargador para que Tux Droid pueda girar en busca de la fuente de luz. \ No newline at end of file Added: software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/fr.po =================================================================== --- software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/fr.po (rev 0) +++ software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/fr.po 2009-06-29 08:15:41 UTC (rev 4926) @@ -0,0 +1,25 @@ + +msgid "" +msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-05-12 11:58+0200\nPO-Revision-Date: 2009-05-12 12:04+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: fr\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n > 1);\nX-Generator: Pootle 1.2.1\n" + +msgid "Max Light Plugin" +msgstr "Plugin lumière maximum" + +msgid "The Max Light plugin will make Tux Droid rotate towards the direction of the brightest light source." +msgstr "Le plugin maxlight fera tourner Tux Droid pour trouver l'endroit le plus lumineux." + +msgid "I think most of the light is coming from this direction." +msgstr "Je pense que l'endroit le plus lumineux est ici." + +msgid "Unplug my charger first and try again." +msgstr "Débranchez mon chargeur et essayez à nouveau." + +msgid "Sorry, I'm not sure where the light is coming from" +msgstr "Désolé, je n'arrive pas à déterminer d'où vient la lumière." + +msgid "I can't find my fish. Please, make sure I'm connected." +msgstr "Je ne trouve pas mon poisson, assurez vous que je soit connecté." + +msgid "Looking for the brightest light source" +msgstr "Je cherche l'endroit le plus lumineux." + Added: software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/fr.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/fr.wiki (rev 0) +++ software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/fr.wiki 2009-06-29 08:15:41 UTC (rev 4926) @@ -0,0 +1,3 @@ +==Synopsis== +Le gadget lumière maximum fait tourner Tux Droid pour trouver l'endroit le plus lumineux. +Assurez vous d'avoir déconnecté le chargeur pour que Tux Droid puisse tourner. \ No newline at end of file Added: software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/help.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/help.wiki (rev 0) +++ software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/help.wiki 2009-06-29 08:15:41 UTC (rev 4926) @@ -0,0 +1,3 @@ +== Synopsis == +The Max Light plugin will make Tux Droid rotate towards the brightest light source. +Also, make sure to unplug the charger so Tux Droid can spin while searching for the light source. Added: software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/nl.po =================================================================== --- software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/nl.po (rev 0) +++ software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/nl.po 2009-06-29 08:15:41 UTC (rev 4926) @@ -0,0 +1,25 @@ + +msgid "" +msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-05-12 11:58+0200\nPO-Revision-Date: 2009-05-12 15:40+0200\nLast-Translator: Sebastiaan Vanpoucke <se...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: nl\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n" + +msgid "Max Light Plugin" +msgstr "Max Licht Plugin" + +msgid "The Max Light plugin will make Tux Droid rotate towards the direction of the brightest light source." +msgstr "De Max Light plugin zal Tux Droid laten draaien in de richting van de helderste lichtbron." + +msgid "I think most of the light is coming from this direction." +msgstr "Ik denk dat het licht uit deze richting komt." + +msgid "Unplug my charger first and try again." +msgstr "Koppel eerst de oplader los en probeer dan opnieuw." + +msgid "Sorry, I'm not sure where the light is coming from" +msgstr "Sorry, ik kan de lichtbron niet vinden" + +msgid "I can't find my fish. Please, make sure I'm connected." +msgstr "Ik kan mijn vis niet zien. Gelieve te controleren of de vis geconnecteerd is" + +msgid "Looking for the brightest light source" +msgstr "Ik ben nu aan het zoeken naar de helderste lichtbron." + Added: software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/nl.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/nl.wiki (rev 0) +++ software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/nl.wiki 2009-06-29 08:15:41 UTC (rev 4926) @@ -0,0 +1,3 @@ +==Synopsis== +De Max Light gadget zal Tux Droid laten draaien in de richting van de helderste lichtbron. +Vergeet niet de oplader los te koppelen zodat Tux Droid kan ronddraaien om de lichtbron te zoeken. \ No newline at end of file Added: software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/plugin.png =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/plugin.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/plugin.pot =================================================================== --- software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/plugin.pot (rev 0) +++ software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/plugin.pot 2009-06-29 08:15:41 UTC (rev 4926) @@ -0,0 +1,21 @@ +msgid "Max Light Plugin" +msgstr "" + +msgid "The Max Light plugin will make Tux Droid rotate towards the direction of the brightest light source." +msgstr "" + +msgid "I think most of the light is coming from this direction." +msgstr "" + +msgid "Unplug my charger first and try again." +msgstr "" + +msgid "Sorry, I'm not sure where the light is coming from" +msgstr "" + +msgid "I can't find my fish. Please, make sure I'm connected." +msgstr "" + +msgid "Looking for the brightest light source" +msgstr "" + Added: software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/plugin.xml =================================================================== --- software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/plugin.xml (rev 0) +++ software_suite_v3/software/plugin/plugin-maxlight/trunk/resources/plugin.xml 2009-06-29 08:15:41 UTC (rev 4926) @@ -0,0 +1,24 @@ +<gadget> + <interpreter + kind="python"> + <executable>executables/plugin-maxlight.py</executable> + </interpreter> + <description> + <name>Max Light Plugin</name> + <description>The Max Light plugin will make Tux Droid rotate towards the direction of the brightest light source.</description> + <author>Eric Lescaudron</author> + <version>2.0</version> + <iconFile>resources/plugin.png</iconFile> + <executionMode>command</executionMode> + <uuid>c8a41dd3-ae21-4b1f-aea3-ba151bcbd903</uuid> + </description> + <parameters> + </parameters> + <commands> + <command + name="run" + description="Seeks maximum light" /> + </commands> + <tasks> + </tasks> +</gadget> |
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"
|
|
From: remi <c2m...@c2...> - 2009-06-28 21:15:18
|
Author: remi
Date: 2009-06-28 23:15:14 +0200 (Sun, 28 Jun 2009)
New Revision: 4924
Modified:
software_suite_v3/smart-core/smart-server/trunk/util/i18n/I18n.py
Log:
* fixed a problem with translation requests with mixed encoding.
Modified: software_suite_v3/smart-core/smart-server/trunk/util/i18n/I18n.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/util/i18n/I18n.py 2009-06-28 21:14:28 UTC (rev 4923)
+++ software_suite_v3/smart-core/smart-server/trunk/util/i18n/I18n.py 2009-06-28 21:15:14 UTC (rev 4924)
@@ -99,6 +99,14 @@
value = value.replace("'", "''")
for i, argument in enumerate(arguments):
trArg = str(argument)
+ try:
+ # Some applications sends a mixed encoding. For example :
+ # Weather gadget (in french) sends message in utf-8 with
+ # arguments in latin-1 ...
+ trArg = trArg.decode("latin-1", "ignore")
+ trArg = trArg.encode("utf-8", "ignore")
+ except:
+ pass
if self.__data.has_key(trArg):
trArg = self.__data[trArg]
value = value.replace("{%d}" % i, trArg)
|
|
From: remi <c2m...@c2...> - 2009-06-28 21:14:39
|
Author: remi
Date: 2009-06-28 23:14:28 +0200 (Sun, 28 Jun 2009)
New Revision: 4923
Modified:
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/Gadget.py
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/ugc/Ugc.py
Log:
* fixed some default values in the start commands (multi-language support)
Modified: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/Gadget.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/Gadget.py 2009-06-28 21:13:17 UTC (rev 4922)
+++ software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/Gadget.py 2009-06-28 21:14:28 UTC (rev 4923)
@@ -491,7 +491,7 @@
if parameters.has_key(parameter.getName()):
myParameters[parameter.getName()] = parameters[parameter.getName()]
else:
- myParameters[parameter.getName()] = parameter.getDefaultValue()
+ myParameters[parameter.getName()] = parameter.getDefaultValue(self.__parent.getLanguage())
if not parameters.has_key('uuid'):
myParameters['uuid'] = self.getDescription().getUuid()
for key in parameters.keys():
Modified: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/ugc/Ugc.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/ugc/Ugc.py 2009-06-28 21:13:17 UTC (rev 4922)
+++ software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/ugc/Ugc.py 2009-06-28 21:14:28 UTC (rev 4923)
@@ -411,6 +411,11 @@
for key in parameters.keys():
if not myParameters.has_key(key):
myParameters[key] = parameters[key]
+ if not myParameters.has_key("language"):
+ myParameters["language"] = self.__parent.getLanguage()
+ myParameters["locutor"] = self.__parent.getLocutor()
+ myParameters["pitch"] = self.__parent.getPitch()
+ myParameters["country"] = self.__parent.getCountry()
return self.__parentGadget.start(command, myParameters)
# --------------------------------------------------------------------------
|
|
From: remi <c2m...@c2...> - 2009-06-28 21:13:19
|
Author: remi
Date: 2009-06-28 23:13:17 +0200 (Sun, 28 Jun 2009)
New Revision: 4922
Modified:
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/GadgetGenerator.py
Log:
* "ttsName" value is removed from the user interface
Modified: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/GadgetGenerator.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/GadgetGenerator.py 2009-06-28 21:12:24 UTC (rev 4921)
+++ software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/GadgetGenerator.py 2009-06-28 21:13:17 UTC (rev 4922)
@@ -627,6 +627,7 @@
ugcName = ugcContainer.generateSingleName(tmpDataDict['description']['name'])
else:
ugcName = tmpDataDict['description']['name']
+ tmpDataDict['description']['ttsName'] = ugcName
ugcTtsName = tmpDataDict['description']['ttsName']
ugcDataDict = {}
# Parent Gadget
|
|
From: remi <c2m...@c2...> - 2009-06-28 21:12:33
|
Author: remi
Date: 2009-06-28 23:12:24 +0200 (Sun, 28 Jun 2009)
New Revision: 4921
Modified:
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/GadgetsContainer.py
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/ugc/UgcContainer.py
Log:
* fixed bug with the retrieving of some locals values
Modified: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/GadgetsContainer.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/GadgetsContainer.py 2009-06-28 21:11:28 UTC (rev 4920)
+++ software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/GadgetsContainer.py 2009-06-28 21:12:24 UTC (rev 4921)
@@ -64,7 +64,7 @@
"""Get the current container country.
@return: A string.
"""
- self.__pluginsContainer.getCountry()
+ return self.__pluginsContainer.getCountry()
# --------------------------------------------------------------------------
# Get the current container locutor.
@@ -73,7 +73,7 @@
"""Get the current container locutor.
@return: A string.
"""
- self.__pluginsContainer.getLocutor()
+ return self.__pluginsContainer.getLocutor()
# --------------------------------------------------------------------------
# Get the current container pitch.
@@ -82,7 +82,7 @@
"""Get the current container pitch.
@return: An integer.
"""
- self.__pluginsContainer.getPitch()
+ return self.__pluginsContainer.getPitch()
# --------------------------------------------------------------------------
# Generate a single name.
Modified: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/ugc/UgcContainer.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/ugc/UgcContainer.py 2009-06-28 21:11:28 UTC (rev 4920)
+++ software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/ugc/UgcContainer.py 2009-06-28 21:12:24 UTC (rev 4921)
@@ -63,7 +63,7 @@
"""Get the current container country.
@return: A string.
"""
- self.__gadgetsContainer.getCountry()
+ return self.__gadgetsContainer.getCountry()
# --------------------------------------------------------------------------
# Get the current container locutor.
@@ -72,7 +72,7 @@
"""Get the current container locutor.
@return: A string.
"""
- self.__gadgetsContainer.getLocutor()
+ return self.__gadgetsContainer.getLocutor()
# --------------------------------------------------------------------------
# Get the current container pitch.
@@ -81,7 +81,7 @@
"""Get the current container pitch.
@return: An integer.
"""
- self.__gadgetsContainer.getPitch()
+ return self.__gadgetsContainer.getPitch()
# --------------------------------------------------------------------------
# Generate a single name.
|
|
From: remi <c2m...@c2...> - 2009-06-28 21:11:35
|
Author: remi Date: 2009-06-28 23:11:28 +0200 (Sun, 28 Jun 2009) New Revision: 4920 Modified: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/PluginInterpreterContext.py Log: * fixed file format to unix Modified: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/PluginInterpreterContext.py =================================================================== --- software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/PluginInterpreterContext.py 2009-06-28 21:10:16 UTC (rev 4919) +++ software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/PluginInterpreterContext.py 2009-06-28 21:11:28 UTC (rev 4920) @@ -1,303 +1,303 @@ -# Copyright (C) 2009 C2ME Sa -# Remi Jocaille <rem...@c2...> -# Distributed under the terms of the GNU General Public License -# http://www.gnu.org/copyleft/gpl.html - -# ------------------------------------------------------------------------------ -# PluginInterpreterContext class. -# ------------------------------------------------------------------------------ -class PluginInterpreterContext(object): - """PluginInterpreterContext class. - """ - - # -------------------------------------------------------------------------- - # Contructor of the class. - # -------------------------------------------------------------------------- - def __init__(self, parent, interpreterClass, interpreterExecution): - """Contructor of the class. - @param parent: Parent plugin. - @param interpreterClass: Interpreter class. - @param interpreterExecution: Interpreter execution. - """ - self.__parentPlugin = parent - self.__pluginInterpreter = interpreterClass() - self.__pluginInterpreter.setOnPluginStartedCallback(self.__onInterpreterStarted) - self.__pluginInterpreter.setOnPluginStoppedCallback(self.__onInterpreterStopped) - self.__pluginInterpreter.setOnNotificationThrowedCallback(self.__onInterpreterNotification) - self.__pluginInterpreter.setWorkingPath(self.__parentPlugin.getWorkingPath()) - self.__pluginInterpreter.setExecutable(interpreterExecution) - self.__pluginInstanceParameters = {} - self.__pluginInstanceCommand = "" - self.__pluginInstanceIsDaemon = False - # Callbacks - self.__onPluginNotificationCallback = None - self.__onPluginMessageCallback = None - self.__onPluginErrorCallback = None - self.__onPluginTraceCallback = None - self.__onPluginResultCallback = None - self.__onPluginActuationCallback = None - self.__onPluginStartingCallback = None - self.__onPluginStoppedCallback = None - - # -------------------------------------------------------------------------- - # Set the instance parameters. - # -------------------------------------------------------------------------- - def setInstanceParameters(self, parameters): - """Set the instance parameters. - @param parameters: Parameters as dictionary. - """ - self.__pluginInstanceParameters = parameters - self.__pluginInterpreter.setParameters(parameters) - - # -------------------------------------------------------------------------- - # Get the instance parameters. - # -------------------------------------------------------------------------- - def getInstanceParameters(self): - """Get the instance parameters. - @return: A dictionary. - """ - return self.__pluginInstanceParameters - - # -------------------------------------------------------------------------- - # Get the parent plugin. - # -------------------------------------------------------------------------- - def getParentPlugin(self): - """Get the parent plugin. - @return: A Plugin object. - """ - return self.__parentPlugin - - # -------------------------------------------------------------------------- - # Get the host uuid. - # -------------------------------------------------------------------------- - def getHostUuid(self): - """Get the host uuid. - @return: A string. - """ - if self.__pluginInstanceParameters.has_key('uuid'): - return self.__pluginInstanceParameters['uuid'] - else: - return self.__parentPlugin.getDescription().getUuid() - - # -------------------------------------------------------------------------- - # Set the instance command name. - # -------------------------------------------------------------------------- - def setInstanceCommandName(self, command): - """Set the instance command name. - @param command: Command name. - """ - self.__pluginInstanceCommand = command - - # -------------------------------------------------------------------------- - # Get the instance command name. - # -------------------------------------------------------------------------- - def getInstanceCommandName(self): - """Get the instance command name. - @return: A string. - """ - return self.__pluginInstanceCommand - - # -------------------------------------------------------------------------- - # Set if the instance is a daemon or not. - # -------------------------------------------------------------------------- - def setInstanceIsDaemon(self, isDaemon): - """Set if the instance is a daemon or not. - @param isDaemon: Is daemon or not. - """ - self.__pluginInstanceIsDaemon = isDaemon - - # -------------------------------------------------------------------------- - # Get if the instance is a daemon or not. - # -------------------------------------------------------------------------- - def instanceIsDaemon(self): - """Get if the instance is a daemon or not. - @return: A boolean. - """ - return self.__pluginInstanceIsDaemon - - # -------------------------------------------------------------------------- - # Execute the interpreter. - # -------------------------------------------------------------------------- - def run(self): - """Execute the interpreter. - """ - self.__pluginInterpreter.run(self.__pluginInstanceCommand, - self.__pluginInstanceIsDaemon) - - # -------------------------------------------------------------------------- - # Abort the execution of the interpreter. - # -------------------------------------------------------------------------- - def abort(self): - """Abort the execution of the interpreter. - """ - self.__pluginInterpreter.abort() - - # -------------------------------------------------------------------------- - # Send event to the plugin. (Daemon mode) - # -------------------------------------------------------------------------- - def sendEvent(self, eventName, eventValues = []): - """Send event to the plugin. (Daemon mode) - @eventName: Event name. - @eventValues: Event values list. - """ - self.__pluginInterpreter.sendEvent(eventName, eventValues) - - # -------------------------------------------------------------------------- - # Get if the interpreter run or not. - # -------------------------------------------------------------------------- - def isRun(self): - """Get if the interpreter run or not. - @return: A boolean. - """ - return self.__pluginInterpreter.isRun() - - # -------------------------------------------------------------------------- - # Set the plugin notification event callback. - # -------------------------------------------------------------------------- - def setOnPluginNotificationCallback(self, funct): - """Set the plugin notification event callback. - @param funct: Function pointer. - Function prototype: - def onPluginNotification(pluginInterpreterContext, messageId, *args): - pass - """ - self.__onPluginNotificationCallback = funct - - # -------------------------------------------------------------------------- - # Set the plugin message event callback. - # -------------------------------------------------------------------------- - def setOnPluginMessageCallback(self, funct): - """Set the plugin message event callback. - @param funct: Function pointer. - Function prototype: - def onPluginMessage(pluginInterpreterContext, message): - pass - """ - self.__onPluginMessageCallback = funct - - # -------------------------------------------------------------------------- - # Set the plugin error event callback. - # -------------------------------------------------------------------------- - def setOnPluginErrorCallback(self, funct): - """Set the plugin error event callback. - @param funct: Function pointer. - Function prototype: - def onPluginError(pluginInterpreterContext, *messagesList): - pass - """ - self.__onPluginErrorCallback = funct - - # -------------------------------------------------------------------------- - # Set the plugin trace event callback. - # -------------------------------------------------------------------------- - def setOnPluginTraceCallback(self, funct): - """Set the plugin trace event callback. - @param funct: Function pointer. - Function prototype: - def onPluginTrace(pluginInterpreterContext, *messagesList): - pass - """ - self.__onPluginTraceCallback = funct - - # -------------------------------------------------------------------------- - # Set the plugin result event callback. - # -------------------------------------------------------------------------- - def setOnPluginResultCallback(self, funct): - """Set the plugin result event callback. - @param funct: Function pointer. - Function prototype: - def onPluginResult(pluginInterpreterContext, pluginResult): - pass - """ - self.__onPluginResultCallback = funct - - # -------------------------------------------------------------------------- - # Set the plugin actuation event callback. - # -------------------------------------------------------------------------- - def setOnPluginActuationCallback(self, funct): - """Set the plugin actuation event callback. - @param funct: Function pointer. - Function prototype: - def onPluginActuation(pluginInterpreterContext, *messagesList): - pass - """ - self.__onPluginActuationCallback = funct - - # -------------------------------------------------------------------------- - # Set the plugin starting event callback. - # -------------------------------------------------------------------------- - def setOnPluginStartingCallback(self, funct): - """Set the plugin starting event callback. - @param funct: Function pointer. - Function prototype: - def onPluginStarting(pluginInterpreterContext): - pass - """ - self.__onPluginStartingCallback = funct - - # -------------------------------------------------------------------------- - # Set the plugin stopped event callback. - # -------------------------------------------------------------------------- - def setOnPluginStoppedCallback(self, funct): - """Set the plugin stopped event callback. - @param funct: Function pointer. - Function prototype: - def onPluginStopped(pluginInterpreterContext): - pass - """ - self.__onPluginStoppedCallback = funct - - # -------------------------------------------------------------------------- - # Event on plugin interpreter started. - # -------------------------------------------------------------------------- - def __onInterpreterStarted(self): - """Event on plugin interpreter started. - """ - if self.__onPluginStartingCallback != None: - self.__onPluginStartingCallback(self) - - # -------------------------------------------------------------------------- - # Event on plugin interpreter stopped. - # -------------------------------------------------------------------------- - def __onInterpreterStopped(self): - """Event on plugin interpreter stopped. - """ - if self.__onPluginStoppedCallback != None: - self.__onPluginStoppedCallback(self) - - # -------------------------------------------------------------------------- - # Event on plugin interpreter notification. - # -------------------------------------------------------------------------- - def __onInterpreterNotification(self, messageId, *args): - """Event on plugin interpreter notification. - @param messageId: Message identifiant as string. - @param args: Arguments of the notification. - """ - messageId = messageId.lower() - if messageId == "message": - language = self.__pluginInstanceParameters['language'] - if self.__onPluginMessageCallback != None: - self.__onPluginMessageCallback(self, - self.getParentPlugin().tr2(language, *args)) - elif messageId == "trace": - if self.__onPluginTraceCallback != None: - self.__onPluginTraceCallback(self, *args) - elif messageId == "error": - if self.__onPluginErrorCallback != None: - self.__onPluginErrorCallback(self, *args) - elif messageId == "check_result": - if self.__onPluginResultCallback != None: - if len(args) > 0: - if args[0] == "true": - checkResult = True - else: - checkResult = False - else: - checkResult = False - self.__onPluginResultCallback(self, checkResult) - elif messageId == "actuation": - if self.__onPluginActuationCallback != None: - self.__onPluginActuationCallback(self, *args) - else: - if self.__onPluginNotificationCallback != None: - self.__onPluginNotificationCallback(self, messageId, *args) +# Copyright (C) 2009 C2ME Sa +# Remi Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +# ------------------------------------------------------------------------------ +# PluginInterpreterContext class. +# ------------------------------------------------------------------------------ +class PluginInterpreterContext(object): + """PluginInterpreterContext class. + """ + + # -------------------------------------------------------------------------- + # Contructor of the class. + # -------------------------------------------------------------------------- + def __init__(self, parent, interpreterClass, interpreterExecution): + """Contructor of the class. + @param parent: Parent plugin. + @param interpreterClass: Interpreter class. + @param interpreterExecution: Interpreter execution. + """ + self.__parentPlugin = parent + self.__pluginInterpreter = interpreterClass() + self.__pluginInterpreter.setOnPluginStartedCallback(self.__onInterpreterStarted) + self.__pluginInterpreter.setOnPluginStoppedCallback(self.__onInterpreterStopped) + self.__pluginInterpreter.setOnNotificationThrowedCallback(self.__onInterpreterNotification) + self.__pluginInterpreter.setWorkingPath(self.__parentPlugin.getWorkingPath()) + self.__pluginInterpreter.setExecutable(interpreterExecution) + self.__pluginInstanceParameters = {} + self.__pluginInstanceCommand = "" + self.__pluginInstanceIsDaemon = False + # Callbacks + self.__onPluginNotificationCallback = None + self.__onPluginMessageCallback = None + self.__onPluginErrorCallback = None + self.__onPluginTraceCallback = None + self.__onPluginResultCallback = None + self.__onPluginActuationCallback = None + self.__onPluginStartingCallback = None + self.__onPluginStoppedCallback = None + + # -------------------------------------------------------------------------- + # Set the instance parameters. + # -------------------------------------------------------------------------- + def setInstanceParameters(self, parameters): + """Set the instance parameters. + @param parameters: Parameters as dictionary. + """ + self.__pluginInstanceParameters = parameters + self.__pluginInterpreter.setParameters(parameters) + + # -------------------------------------------------------------------------- + # Get the instance parameters. + # -------------------------------------------------------------------------- + def getInstanceParameters(self): + """Get the instance parameters. + @return: A dictionary. + """ + return self.__pluginInstanceParameters + + # -------------------------------------------------------------------------- + # Get the parent plugin. + # -------------------------------------------------------------------------- + def getParentPlugin(self): + """Get the parent plugin. + @return: A Plugin object. + """ + return self.__parentPlugin + + # -------------------------------------------------------------------------- + # Get the host uuid. + # -------------------------------------------------------------------------- + def getHostUuid(self): + """Get the host uuid. + @return: A string. + """ + if self.__pluginInstanceParameters.has_key('uuid'): + return self.__pluginInstanceParameters['uuid'] + else: + return self.__parentPlugin.getDescription().getUuid() + + # -------------------------------------------------------------------------- + # Set the instance command name. + # -------------------------------------------------------------------------- + def setInstanceCommandName(self, command): + """Set the instance command name. + @param command: Command name. + """ + self.__pluginInstanceCommand = command + + # -------------------------------------------------------------------------- + # Get the instance command name. + # -------------------------------------------------------------------------- + def getInstanceCommandName(self): + """Get the instance command name. + @return: A string. + """ + return self.__pluginInstanceCommand + + # -------------------------------------------------------------------------- + # Set if the instance is a daemon or not. + # -------------------------------------------------------------------------- + def setInstanceIsDaemon(self, isDaemon): + """Set if the instance is a daemon or not. + @param isDaemon: Is daemon or not. + """ + self.__pluginInstanceIsDaemon = isDaemon + + # -------------------------------------------------------------------------- + # Get if the instance is a daemon or not. + # -------------------------------------------------------------------------- + def instanceIsDaemon(self): + """Get if the instance is a daemon or not. + @return: A boolean. + """ + return self.__pluginInstanceIsDaemon + + # -------------------------------------------------------------------------- + # Execute the interpreter. + # -------------------------------------------------------------------------- + def run(self): + """Execute the interpreter. + """ + self.__pluginInterpreter.run(self.__pluginInstanceCommand, + self.__pluginInstanceIsDaemon) + + # -------------------------------------------------------------------------- + # Abort the execution of the interpreter. + # -------------------------------------------------------------------------- + def abort(self): + """Abort the execution of the interpreter. + """ + self.__pluginInterpreter.abort() + + # -------------------------------------------------------------------------- + # Send event to the plugin. (Daemon mode) + # -------------------------------------------------------------------------- + def sendEvent(self, eventName, eventValues = []): + """Send event to the plugin. (Daemon mode) + @eventName: Event name. + @eventValues: Event values list. + """ + self.__pluginInterpreter.sendEvent(eventName, eventValues) + + # -------------------------------------------------------------------------- + # Get if the interpreter run or not. + # -------------------------------------------------------------------------- + def isRun(self): + """Get if the interpreter run or not. + @return: A boolean. + """ + return self.__pluginInterpreter.isRun() + + # -------------------------------------------------------------------------- + # Set the plugin notification event callback. + # -------------------------------------------------------------------------- + def setOnPluginNotificationCallback(self, funct): + """Set the plugin notification event callback. + @param funct: Function pointer. + Function prototype: + def onPluginNotification(pluginInterpreterContext, messageId, *args): + pass + """ + self.__onPluginNotificationCallback = funct + + # -------------------------------------------------------------------------- + # Set the plugin message event callback. + # -------------------------------------------------------------------------- + def setOnPluginMessageCallback(self, funct): + """Set the plugin message event callback. + @param funct: Function pointer. + Function prototype: + def onPluginMessage(pluginInterpreterContext, message): + pass + """ + self.__onPluginMessageCallback = funct + + # -------------------------------------------------------------------------- + # Set the plugin error event callback. + # -------------------------------------------------------------------------- + def setOnPluginErrorCallback(self, funct): + """Set the plugin error event callback. + @param funct: Function pointer. + Function prototype: + def onPluginError(pluginInterpreterContext, *messagesList): + pass + """ + self.__onPluginErrorCallback = funct + + # -------------------------------------------------------------------------- + # Set the plugin trace event callback. + # -------------------------------------------------------------------------- + def setOnPluginTraceCallback(self, funct): + """Set the plugin trace event callback. + @param funct: Function pointer. + Function prototype: + def onPluginTrace(pluginInterpreterContext, *messagesList): + pass + """ + self.__onPluginTraceCallback = funct + + # -------------------------------------------------------------------------- + # Set the plugin result event callback. + # -------------------------------------------------------------------------- + def setOnPluginResultCallback(self, funct): + """Set the plugin result event callback. + @param funct: Function pointer. + Function prototype: + def onPluginResult(pluginInterpreterContext, pluginResult): + pass + """ + self.__onPluginResultCallback = funct + + # -------------------------------------------------------------------------- + # Set the plugin actuation event callback. + # -------------------------------------------------------------------------- + def setOnPluginActuationCallback(self, funct): + """Set the plugin actuation event callback. + @param funct: Function pointer. + Function prototype: + def onPluginActuation(pluginInterpreterContext, *messagesList): + pass + """ + self.__onPluginActuationCallback = funct + + # -------------------------------------------------------------------------- + # Set the plugin starting event callback. + # -------------------------------------------------------------------------- + def setOnPluginStartingCallback(self, funct): + """Set the plugin starting event callback. + @param funct: Function pointer. + Function prototype: + def onPluginStarting(pluginInterpreterContext): + pass + """ + self.__onPluginStartingCallback = funct + + # -------------------------------------------------------------------------- + # Set the plugin stopped event callback. + # -------------------------------------------------------------------------- + def setOnPluginStoppedCallback(self, funct): + """Set the plugin stopped event callback. + @param funct: Function pointer. + Function prototype: + def onPluginStopped(pluginInterpreterContext): + pass + """ + self.__onPluginStoppedCallback = funct + + # -------------------------------------------------------------------------- + # Event on plugin interpreter started. + # -------------------------------------------------------------------------- + def __onInterpreterStarted(self): + """Event on plugin interpreter started. + """ + if self.__onPluginStartingCallback != None: + self.__onPluginStartingCallback(self) + + # -------------------------------------------------------------------------- + # Event on plugin interpreter stopped. + # -------------------------------------------------------------------------- + def __onInterpreterStopped(self): + """Event on plugin interpreter stopped. + """ + if self.__onPluginStoppedCallback != None: + self.__onPluginStoppedCallback(self) + + # -------------------------------------------------------------------------- + # Event on plugin interpreter notification. + # -------------------------------------------------------------------------- + def __onInterpreterNotification(self, messageId, *args): + """Event on plugin interpreter notification. + @param messageId: Message identifiant as string. + @param args: Arguments of the notification. + """ + messageId = messageId.lower() + if messageId == "message": + language = self.__pluginInstanceParameters['language'] + if self.__onPluginMessageCallback != None: + self.__onPluginMessageCallback(self, + self.getParentPlugin().tr2(language, *args)) + elif messageId == "trace": + if self.__onPluginTraceCallback != None: + self.__onPluginTraceCallback(self, *args) + elif messageId == "error": + if self.__onPluginErrorCallback != None: + self.__onPluginErrorCallback(self, *args) + elif messageId == "check_result": + if self.__onPluginResultCallback != None: + if len(args) > 0: + if args[0] == "true": + checkResult = True + else: + checkResult = False + else: + checkResult = False + self.__onPluginResultCallback(self, checkResult) + elif messageId == "actuation": + if self.__onPluginActuationCallback != None: + self.__onPluginActuationCallback(self, *args) + else: + if self.__onPluginNotificationCallback != None: + self.__onPluginNotificationCallback(self, messageId, *args) |
|
From: remi <c2m...@c2...> - 2009-06-28 21:10:26
|
Author: remi
Date: 2009-06-28 23:10:16 +0200 (Sun, 28 Jun 2009)
New Revision: 4919
Modified:
software_suite_v3/software/plugin/plugin-weather/trunk/plugin-weather/src/net/karmaLab/tuxDroid/plugins/WeatherPlugin.java
Log:
* fixed a bug with weather in french. The humidity level string contains bad unicode characters "/xc2/xa0".
Modified: software_suite_v3/software/plugin/plugin-weather/trunk/plugin-weather/src/net/karmaLab/tuxDroid/plugins/WeatherPlugin.java
===================================================================
--- software_suite_v3/software/plugin/plugin-weather/trunk/plugin-weather/src/net/karmaLab/tuxDroid/plugins/WeatherPlugin.java 2009-06-27 17:01:40 UTC (rev 4918)
+++ software_suite_v3/software/plugin/plugin-weather/trunk/plugin-weather/src/net/karmaLab/tuxDroid/plugins/WeatherPlugin.java 2009-06-28 21:10:16 UTC (rev 4919)
@@ -171,6 +171,7 @@
String humidity = getData(current, "humidity"); //$NON-NLS-1$
humidity = humidity.split(":")[1]; //$NON-NLS-1$
humidity = ((String) humidity.subSequence(0, humidity.length() - 1)).trim();
+ humidity = humidity.replaceAll("[^a-zA-Z0-9]", "");
if (weather.length() == 0) {
throwMessage("Current weather at {0} is \"unknown\" with a temperature of {1} degrees {2}; Humidity level is {3} percent.", configuration().getLocation().replace("%20", " "), temperature, configuration().getUnit() == Unit.celsius ? "celsius" : "fahrenheit",
humidity);
|
Author: remi
Date: 2009-06-27 19:01:40 +0200 (Sat, 27 Jun 2009)
New Revision: 4918
Added:
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/img/window_btn_activate.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/window_btn_enable.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/window_frame01_bottom.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/window_frame01_middle.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/window_frame01_top.png
Modified:
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/popup-ie6.css
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/popup.css
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/js/lightbox.js
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/gadgets.xsl
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 "configuration" and "help" frame. (with a fake content inside for the moment ...)
* added icon in the "delete gadget confirmation" popup
* added some translations
Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/popup-ie6.css
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/popup-ie6.css 2009-06-27 11:59:10 UTC (rev 4917)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/popup-ie6.css 2009-06-27 17:01:40 UTC (rev 4918)
@@ -22,17 +22,26 @@
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/data/web_interface/user_01/img/popup_frame01_bottom.png",sizingMethod="scale");
}
+.popup01GadgetIcon{
+ height:34px;
+ width:34px;
+ margin-left:5px;
+ margin-top:4px;
+ display:table;
+ float:left;
+}
+
.popup01Message{
- width:351px;
+ width:313px;
height:34px;
- margin-left:10px;
+ margin-left:6px;
margin-top:4px;
display:table;
float:left;
line-height:34px;
font-size:12px;
color:#000;
- text-align:center;
+ text-align:left;
vertical-align:middle;
font-weight:bold;
overflow:hidden;
Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/popup.css
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/popup.css 2009-06-27 11:59:10 UTC (rev 4917)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/popup.css 2009-06-27 17:01:40 UTC (rev 4918)
@@ -22,17 +22,26 @@
background-image:url(/data/web_interface/user_01/img/popup_frame01_bottom.png);
}
-.popup01Message{
- width:351px;
+.popup01GadgetIcon{
height:34px;
+ width:34px;
margin-left:10px;
margin-top:4px;
display:table;
float:left;
+}
+
+.popup01Message{
+ width:313px;
+ height:34px;
+ margin-left:6px;
+ margin-top:4px;
+ display:table;
+ float:left;
line-height:34px;
font-size:12px;
color:#000;
- text-align:center;
+ text-align:left;
vertical-align:middle;
font-weight:bold;
overflow:hidden;
Added: 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 (rev 0)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/window-ie6.css 2009-06-27 17:01:40 UTC (rev 4918)
@@ -0,0 +1,101 @@
+.windowFrame01Top{
+ height:50px;
+ width:450px;
+ overflow:hidden;
+ display:block;
+ filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/data/web_interface/user_01/img/window_frame01_top.png",sizingMethod="scale");
+}
+
+.windowFrame01Middle{
+ height:440px;
+ width:450px;
+ overflow:hidden;
+ display:block;
+ filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/data/web_interface/user_01/img/window_frame01_middle.png",sizingMethod="scale");
+}
+
+.windowFrame01Bottom{
+ height:10px;
+ width:450px;
+ overflow:hidden;
+ display:block;
+ filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/data/web_interface/user_01/img/window_frame01_bottom.png",sizingMethod="scale");
+}
+
+.windowGadgetIcon{
+ height:33px;
+ width:33px;
+ margin-left:5px;
+ margin-top:10px;
+ display:table;
+ float:left;
+}
+
+.windowTitle{
+ width:391px;
+ height:33px;
+ margin-left:6px;
+ margin-top:10px;
+ display:table;
+ float:left;
+ line-height:33px;
+ font-size:12px;
+ 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;
+}
+
+iframe.windowContentIFrame{
+ left:0px;
+ top:0px;
+ width:424px;
+ height:390px;
+ display:table;
+ margin-top:8px;
+ margin-left:12px;
+ background-color:#EFEFEF;
+ border-color:black;
+ border-style:solid;
+ border-width:1px;
+ overflow-y:auto;
+ overflow-x:hidden;
+}
+
+.windowBtn{
+ width:68px;
+ height:34px;
+ margin-left:2px;
+ margin-top:6px;
+ padding-top:-1px;
+ line-height:34px;
+ font-size:10px;
+ color:#FFFFFF;
+ text-align:center;
+ vertical-align:middle;
+ font-weight:bold;
+ overflow:hidden;
+ text-decoration:none;
+ display:table;
+ float:left;
+ font-family:Verdana, Bitstream Vera Sans, Arial, Helvetica, sans-serif;
+ background-image:url(/data/web_interface/user_01/img/window_btn_enable.png);
+}
+
+.windowBtn:hover{
+ background-image:url(/data/web_interface/user_01/img/window_btn_activate.png);
+}
+
+.window01Box {
+ display: none;
+ position:absolute;
+ top:0px;
+ left:202px;
+ width:450px;
+ height:500px;
+ z-index:1001;
+ overflow:hidden;
+}
\ No newline at end of file
Added: 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 (rev 0)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/window.css 2009-06-27 17:01:40 UTC (rev 4918)
@@ -0,0 +1,101 @@
+.windowFrame01Top{
+ height:50px;
+ width:450px;
+ overflow:hidden;
+ display:block;
+ background-image:url(/data/web_interface/user_01/img/window_frame01_top.png);
+}
+
+.windowFrame01Middle{
+ height:440px;
+ width:450px;
+ overflow:hidden;
+ display:block;
+ background-image:url(/data/web_interface/user_01/img/window_frame01_middle.png);
+}
+
+.windowFrame01Bottom{
+ height:10px;
+ width:450px;
+ overflow:hidden;
+ display:block;
+ background-image:url(/data/web_interface/user_01/img/window_frame01_bottom.png);
+}
+
+.windowGadgetIcon{
+ height:33px;
+ width:33px;
+ margin-left:10px;
+ margin-top:10px;
+ display:table;
+ float:left;
+}
+
+.windowTitle{
+ width:391px;
+ height:33px;
+ margin-left:6px;
+ margin-top:10px;
+ display:table;
+ float:left;
+ line-height:33px;
+ font-size:12px;
+ 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;
+}
+
+iframe.windowContentIFrame{
+ left:0px;
+ top:0px;
+ width:424px;
+ height:390px;
+ display:table;
+ margin-top:8px;
+ margin-left:12px;
+ background-color:#EFEFEF;
+ border-color:black;
+ border-style:solid;
+ border-width:1px;
+ overflow-y:auto;
+ overflow-x:hidden;
+}
+
+.windowBtn{
+ width:68px;
+ height:34px;
+ margin-left:2px;
+ margin-top:6px;
+ padding-top:-1px;
+ line-height:34px;
+ font-size:10px;
+ color:#FFFFFF;
+ text-align:center;
+ vertical-align:middle;
+ font-weight:bold;
+ overflow:hidden;
+ text-decoration:none;
+ display:table;
+ float:left;
+ font-family:Verdana, Bitstream Vera Sans, Arial, Helvetica, sans-serif;
+ background-image:url(/data/web_interface/user_01/img/window_btn_enable.png);
+}
+
+.windowBtn:hover{
+ background-image:url(/data/web_interface/user_01/img/window_btn_activate.png);
+}
+
+.window01Box {
+ display: none;
+ position:absolute;
+ top:0px;
+ left:202px;
+ width:450px;
+ height:500px;
+ z-index:1001;
+ overflow:hidden;
+}
\ No newline at end of file
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/window_btn_activate.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/window_btn_activate.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/window_btn_enable.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/window_btn_enable.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/window_frame01_bottom.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/window_frame01_bottom.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/window_frame01_middle.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/window_frame01_middle.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/window_frame01_top.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/window_frame01_top.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/js/lightbox.js
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/js/lightbox.js 2009-06-27 11:59:10 UTC (rev 4917)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/js/lightbox.js 2009-06-27 17:01:40 UTC (rev 4918)
@@ -16,6 +16,7 @@
var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;
+var _abortNext = false;
/*-----------------------------------------------------------------------------------------------*/
@@ -57,6 +58,11 @@
/*-----------------------------------------------------------------------------------------------*/
+function abortNextLightbox()
+{
+ _abortNext = true;
+}
+
Event.observe(window, 'load', getBrowserInfo, false);
Event.observe(window, 'unload', Event.unloadCache, false);
@@ -76,58 +82,23 @@
// Turn everything on - mainly the IE fixes
activate: function(){
- if (browser == 'Internet Explorer'){
- this.getScroll();
- this.prepareIE('100%', 'hidden');
- this.setScroll(0,0);
- this.hideSelects('hidden');
- }
- this.displayLightbox("block");
+ this.displayLightbox("block");
},
- // Ie requires height to 100% and overflow hidden or else you can scroll down past the lightbox
- prepareIE: function(height, overflow){
- bod = document.getElementsByTagName('body')[0];
- bod.style.height = height;
- bod.style.overflow = overflow;
-
- htm = document.getElementsByTagName('html')[0];
- htm.style.height = height;
- htm.style.overflow = overflow;
- },
-
- // In IE, select elements hover on top of the lightbox
- hideSelects: function(visibility){
- selects = document.getElementsByTagName('select');
- for(i = 0; i < selects.length; i++) {
- selects[i].style.visibility = visibility;
- }
- },
-
- // Taken from lightbox implementation found at http://www.huddletogether.com/projects/lightbox/
- getScroll: function(){
- if (self.pageYOffset) {
- this.yPos = self.pageYOffset;
- } else if (document.documentElement && document.documentElement.scrollTop){
- this.yPos = document.documentElement.scrollTop;
- } else if (document.body) {
- this.yPos = document.body.scrollTop;
- }
- },
-
- setScroll: function(x, y){
- window.scrollTo(x, y);
- },
-
displayLightbox: function(display){
$('overlay').style.display = display;
parent.top.document.getElementById('overlay').style.display = display;
$(this.content).style.display = display;
- if (display != 'none')
+ if (display != 'none')
{
+ this.actions();
$(this.content).onfocus(this.elementId);
+ if (_abortNext)
+ {
+ _abortNext = false;
+ this.displayLightbox("none");
+ }
}
- if(display != 'none') this.actions();
},
// Search through new links within the lightbox, and attach click event
@@ -144,12 +115,6 @@
// Example of creating your own functionality once lightbox is initiated
deactivate: function(){
- if (browser == "Internet Explorer"){
- this.setScroll(0,this.yPos);
- this.prepareIE("auto", "auto");
- this.hideSelects("visible");
- }
-
this.displayLightbox("none");
}
}
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-27 11:59:10 UTC (rev 4917)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/gadgets.xsl 2009-06-27 17:01:40 UTC (rev 4918)
@@ -16,15 +16,18 @@
<!-- IE <= 7 -->
<xsl:comment><![CDATA[[if lte IE 7]>
<link href="/data/web_interface/user_01/css/popup-ie6.css" rel="stylesheet" type="text/css"/>
+ <link href="/data/web_interface/user_01/css/window-ie6.css" rel="stylesheet" type="text/css"/>
<![endif]]]></xsl:comment>
<!-- IE >= 8 -->
<xsl:comment><![CDATA[[if gte IE 8]>
<link href="/data/web_interface/user_01/css/popup.css" rel="stylesheet" type="text/css"/>
+ <link href="/data/web_interface/user_01/css/window.css" rel="stylesheet" type="text/css"/>
<![endif]]]></xsl:comment>
</xsl:when>
<!-- FIREFOX ETC... -->
<xsl:otherwise>
<link href="/data/web_interface/user_01/css/popup.css" rel="stylesheet" type="text/css"/>
+ <link href="/data/web_interface/user_01/css/window.css" rel="stylesheet" type="text/css"/>
</xsl:otherwise>
</xsl:choose>
<script src="/data/web_interface/user_01/js/hashtable.js" type="text/javascript"/>
@@ -37,7 +40,9 @@
var knowedGadgetsDict = null;
var knowedPlayingGadgetUuid1 = "0";
var knowedPlayingGadgetUuid2 = "0";
- var lastUuidAction = "0";
+ var lastGadgetUuidInAction = "0";
+ var lastGadgetNameInAction = "0";
+ var lastGadgetIconInAction = "0";
var translationStart = "";
var translationStop = ""
var translationDelete = "";
@@ -210,17 +215,53 @@
htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnStopDisable" id="stopId_' + uuid + '" onclick="javascript:return false;" href="#">' + translationStop + '</a>';
}
htmlContent += '<div class="gadgetsVSpacer" style="width:18px;"></div>';
- htmlContent += '<a class="gadgetsBtnNoTitle gadgetsBtnHelp" id="helpId_' + uuid + '" onclick="" href="#" name="lbOn" rel="popupNotYetImplemented"></a>';
+ htmlContent += '<a class="gadgetsBtnNoTitle gadgetsBtnHelp" id="helpId_' + uuid + '" onclick="" href="#" name="lbOn" rel="windowGadgetHelp"></a>';
htmlContent += '<div class="gadgetsVSpacer" style="width:8px;"></div>';
- htmlContent += '<a class="gadgetsBtnNoTitle gadgetsBtnConfigure" id="configureId_' + uuid + '" onclick="" href="#" name="lbOn" rel="popupNotYetImplemented"></a>';
+ htmlContent += '<a class="gadgetsBtnNoTitle gadgetsBtnConfigure" id="configureId_' + uuid + '" onclick="" href="#" name="lbOn" rel="windowGadgetConfiguration"></a>';
htmlContent += '<div class="gadgetsVSpacer" style="width:8px;"></div>';
- htmlContent += '<a class="gadgetsBtnNoTitle gadgetsBtnDuplicate" id="duplicateId_' + uuid + '" onclick="javascript:setUuidAction(\''+uuid+'\');duplicateUgc();return false;" href="#"></a>';
+ htmlContent += '<a class="gadgetsBtnNoTitle gadgetsBtnDuplicate" id="duplicateId_' + uuid + '" onclick="javascript:setLastGadgetInAction(\''+uuid+'\');duplicateUgc();return false;" href="#"></a>';
htmlContent += '<div class="gadgetsVSpacer" style="width:18px;"></div>';
htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnDelete" id="deleteId_' + uuid + '" onclick="" href="#" name="lbOn" rel="popupConfirmDelete">' + translationDelete + '</a>';
htmlContent += '<div class="frame01Sep2"></div>';
return htmlContent;
}
+ function getGadgetNameFromUuid(uuid)
+ {
+ if (knowedGadgetsDict != null)
+ {
+ var gadgets = knowedGadgetsDict;
+ var gadgetsCount = parseInt(gadgets.get("data0").get("count"));
+ for (i = 0; i < gadgetsCount; i++)
+ {
+ gUuid = gadgets.get("data0").get("gadget_" + i + "_uuid");
+ if (gUuid == uuid)
+ {
+ return gadgets.get("data0").get("gadget_" + i + "_name");
+ }
+ }
+ }
+ return "";
+ }
+
+ function getGadgetIconFromUuid(uuid)
+ {
+ if (knowedGadgetsDict != null)
+ {
+ var gadgets = knowedGadgetsDict;
+ var gadgetsCount = parseInt(gadgets.get("data0").get("count"));
+ for (i = 0; i < gadgetsCount; i++)
+ {
+ gUuid = gadgets.get("data0").get("gadget_" + i + "_uuid");
+ if (gUuid == uuid)
+ {
+ return gadgets.get("data0").get("gadget_" + i + "_icon");
+ }
+ }
+ }
+ return "";
+ }
+
function disableAllGadgetButtons(uuid)
{
disableStartStopGadgetButtons(uuid);
@@ -316,7 +357,7 @@
getRequest("/robot_content_interactions/stop_gadget", {});
}
- function setUuidAction(uuid)
+ function setLastGadgetInAction(uuid)
{
var idx = uuid.indexOf("_", 0) + 1;
uuid = uuid.slice(idx, uuid.length);
@@ -324,41 +365,82 @@
{
if (thisGadgetIsPlaying(uuid))
{
- lastUuidAction = "0";
- clickMe("closeLightbox");
- return;
+ lastGadgetUuidInAction = "0";
+ lastGadgetNameInAction = "0";
+ lastGadgetIconInAction = "0";
+ return false;
}
}
- lastUuidAction = uuid;
+ lastGadgetUuidInAction = uuid;
+ lastGadgetNameInAction = getGadgetNameFromUuid(uuid);
+ lastGadgetIconInAction = getGadgetIconFromUuid(uuid);
+ return true;
}
+ function updateWindowGadgetHelpContent(uuid)
+ {
+ if (!setLastGadgetInAction(uuid))
+ {
+ abortNextLightbox();
+ return;
+ }
+ document.getElementById("windowGadgetHelpIcon").src = lastGadgetIconInAction;
+ setpng(document.getElementById("windowGadgetHelpIcon"));
+ document.getElementById("windowGadgetHelpTitle").firstChild.nodeValue = lastGadgetNameInAction;
+ document.getElementById("windowGadgetHelpContentIFrame").src = "http://www.google.fr";
+ }
+
+ function updateWindowGadgetConfigurationContent(uuid)
+ {
+ if (!setLastGadgetInAction(uuid))
+ {
+ abortNextLightbox();
+ return;
+ }
+ document.getElementById("windowGadgetConfigurationIcon").src = lastGadgetIconInAction;
+ setpng(document.getElementById("windowGadgetConfigurationIcon"));
+ document.getElementById("windowGadgetConfigurationTitle").firstChild.nodeValue = lastGadgetNameInAction;
+ document.getElementById("windowGadgetConfigurationContentIFrame").src = "http://www.google.fr";
+ }
+
+ function updatePopupGadgetDeleteContent(uuid)
+ {
+ if (!setLastGadgetInAction(uuid))
+ {
+ abortNextLightbox();
+ return;
+ }
+ document.getElementById("popup01GadgetDeleteIcon").src = lastGadgetIconInAction;
+ setpng(document.getElementById("popup01GadgetDeleteIcon"));
+ }
+
function duplicateUgc()
{
- if (lastUuidAction == "0")
+ if (lastGadgetUuidInAction == "0")
{
return;
}
var language = document.getElementById("language").value;
var args = {
- "uuid" : lastUuidAction,
+ "uuid" : lastGadgetUuidInAction,
"language" : language
}
getRequest("/wi_devel/ugc_duplicate", args);
- lastUuidAction = "0";
+ lastGadgetUuidInAction = "0";
fillGadgetRows(knowedGadgetsFilter);
}
function deleteUgc()
{
- if (lastUuidAction == "0")
+ if (lastGadgetUuidInAction == "0")
{
return;
}
var args = {
- "uuid" : lastUuidAction
+ "uuid" : lastGadgetUuidInAction
}
getRequest("/ugc_server/remove_ugc", args);
- lastUuidAction = "0";
+ lastGadgetUuidInAction = "0";
fillGadgetRows(knowedGadgetsFilter);
}
]]>
@@ -430,9 +512,17 @@
<div class="frame01Bottom"></div>
</div>
<!-- POPUP CONFIRM DELETE -->
- <div id="popupConfirmDelete" class="popup01Box" onfocus="setUuidAction(arguments[0]);">
+ <div id="popupConfirmDelete" class="popup01Box" onfocus="updatePopupGadgetDeleteContent(arguments[0]);">
<div class="popupFrame01Top"></div>
<div class="popupFrame01Middle">
+ <div class="popup01GadgetIcon">
+ <xsl:element name="img">
+ <xsl:attribute name="id">popup01GadgetDeleteIcon</xsl:attribute>
+ <xsl:attribute name="src">/data/web_interface/user_01/img/empty.png</xsl:attribute>
+ <xsl:attribute name="height">34</xsl:attribute>
+ <xsl:attribute name="width">34</xsl:attribute>
+ </xsl:element>
+ </div>
<span class="popup01Message"><xsl:value-of select="root/translations/popup_confirm_delete_gadget"/></span>
<xsl:element name="a">
<xsl:attribute name="class">popupBtn</xsl:attribute>
@@ -452,10 +542,10 @@
<div class="popupFrame01Bottom"></div>
</div>
<!-- POPUP NOT YET IMPLEMENTED -->
- <div id="popupNotYetImplemented" class="popup01Box" onfocus="return false;">
+ <div id="popupNotYetImplemented" class="popup01Box" onfocus="return true;">
<div class="popupFrame01Top"></div>
<div class="popupFrame01Middle">
- <span class="popup01Message" style="width:409px;"><xsl:value-of select="root/translations/popup_not_yet_implemented"/></span>
+ <span class="popup01Message" style="width:409px;text-align:center;"><xsl:value-of select="root/translations/popup_not_yet_implemented"/></span>
<xsl:element name="a">
<xsl:attribute name="class">popupBtn</xsl:attribute>
<xsl:attribute name="name">lbOff</xsl:attribute>
@@ -465,6 +555,75 @@
</div>
<div class="popupFrame01Bottom"></div>
</div>
+ <!-- WINDOW GADGET HELP -->
+ <div id="windowGadgetHelp" class="window01Box" onfocus="updateWindowGadgetHelpContent(arguments[0]);">
+ <div class="windowFrame01Top">
+ <div class="windowGadgetIcon">
+ <xsl:element name="img">
+ <xsl:attribute name="id">windowGadgetHelpIcon</xsl:attribute>
+ <xsl:attribute name="src">/data/web_interface/user_01/img/empty.png</xsl:attribute>
+ <xsl:attribute name="height">33</xsl:attribute>
+ <xsl:attribute name="width">33</xsl:attribute>
+ </xsl:element>
+ </div>
+ <span class="windowTitle" id="windowGadgetHelpTitle"> . </span>
+ </div>
+ <div class="windowFrame01Middle">
+ <iframe class="windowContentIFrame"
+ id="windowGadgetHelpContentIFrame"
+ name="windowGadgetHelpContentIFrame"
+ frameborder="0"
+ scrolling="no"
+ src="">
+ </iframe>
+ <div style="display:table;float:left;height:34px;width:370px"></div>
+ <xsl:element name="a">
+ <xsl:attribute name="class">windowBtn</xsl:attribute>
+ <xsl:attribute name="name">lbOff</xsl:attribute>
+ <xsl:attribute name="rel">deactivate</xsl:attribute>
+ <xsl:attribute name="href">#</xsl:attribute><xsl:value-of select="root/translations/close"/>
+ </xsl:element>
+ </div>
+ <div class="windowFrame01Bottom"></div>
+ </div>
+ <!-- WINDOW GADGET CONFIGURATION -->
+ <div id="windowGadgetConfiguration" class="window01Box" onfocus="updateWindowGadgetConfigurationContent(arguments[0]);">
+ <div class="windowFrame01Top">
+ <div class="windowGadgetIcon">
+ <xsl:element name="img">
+ <xsl:attribute name="id">windowGadgetConfigurationIcon</xsl:attribute>
+ <xsl:attribute name="src">/data/web_interface/user_01/img/empty.png</xsl:attribute>
+ <xsl:attribute name="height">33</xsl:attribute>
+ <xsl:attribute name="width">33</xsl:attribute>
+ </xsl:element>
+ </div>
+ <span class="windowTitle" id="windowGadgetConfigurationTitle"> . </span>
+ </div>
+ <div class="windowFrame01Middle">
+ <iframe class="windowContentIFrame"
+ id="windowGadgetConfigurationContentIFrame"
+ name="windowGadgetConfigurationContentIFrame"
+ frameborder="0"
+ scrolling="no"
+ src="">
+ </iframe>
+ <div style="display:table;float:left;height:34px;width:300px"></div>
+ <xsl:element name="a">
+ <xsl:attribute name="class">windowBtn</xsl:attribute>
+ <xsl:attribute name="name">lbOff</xsl:attribute>
+ <xsl:attribute name="rel">deactivate</xsl:attribute>
+ <xsl:attribute name="href">#</xsl:attribute><xsl:value-of select="root/translations/apply"/>
+ </xsl:element>
+ <xsl:element name="a">
+ <xsl:attribute name="class">windowBtn</xsl:attribute>
+ <xsl:attribute name="name">lbOff</xsl:attribute>
+ <xsl:attribute name="rel">deactivate</xsl:attribute>
+ <xsl:attribute name="href">#</xsl:attribute><xsl:value-of select="root/translations/cancel"/>
+ </xsl:element>
+ </div>
+ <div class="windowFrame01Bottom"></div>
+ </div>
+
</body>
</html>
</xsl:template>
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-27 11:59:10 UTC (rev 4917)
+++ software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/default.pot 2009-06-27 17:01:40 UTC (rev 4918)
@@ -54,3 +54,9 @@
msgid "close"
msgstr ""
+
+msgid "apply"
+msgstr ""
+
+msgid "cancel"
+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-27 11:59:10 UTC (rev 4917)
+++ software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/en.po 2009-06-27 17:01:40 UTC (rev 4918)
@@ -54,3 +54,9 @@
msgid "close"
msgstr "Close"
+
+msgid "apply"
+msgstr "Apply"
+
+msgid "cancel"
+msgstr "Cancel"
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-27 11:59:10 UTC (rev 4917)
+++ software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/fr.po 2009-06-27 17:01:40 UTC (rev 4918)
@@ -44,7 +44,7 @@
msgstr "Cette functionnalité n'est pas encore implémentée."
msgid "popup_confirm_delete_gadget"
-msgstr "Cette action va supprimer ce gadget. Continuer ?"
+msgstr "Etes-vous sûr de vouloir supprimer ce gadget ?"
msgid "yes"
msgstr "Oui"
@@ -54,3 +54,9 @@
msgid "close"
msgstr "Fermer"
+
+msgid "apply"
+msgstr "Appliquer"
+
+msgid "cancel"
+msgstr "Annuler"
|
|
From: remi <c2m...@c2...> - 2009-06-27 11:59:13
|
Author: remi
Date: 2009-06-27 13:59:10 +0200 (Sat, 27 Jun 2009)
New Revision: 4917
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/xsl/gadgets.xsl
software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py
Log:
* added dynamic enabling/disabling of the buttons in the "gadgets" web page.
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-27 11:57:50 UTC (rev 4916)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/js/common.js 2009-06-27 11:59:10 UTC (rev 4917)
@@ -406,3 +406,20 @@
}
window.open(url);
}
+
+/**
+ *
+ */
+function clickMe(element)
+{
+ try
+ {
+ document.getElementById(element).click();
+ } catch(e)
+ {
+ var evt = document.createEvent("MouseEvents");
+ evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
+ var cb = document.getElementById(element);
+ cb.dispatchEvent(evt);
+ }
+}
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-27 11:57:50 UTC (rev 4916)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/gadgets.xsl 2009-06-27 11:59:10 UTC (rev 4917)
@@ -35,6 +35,8 @@
<![CDATA[
var knowedGadgetsFilter = "all";
var knowedGadgetsDict = null;
+ var knowedPlayingGadgetUuid1 = "0";
+ var knowedPlayingGadgetUuid2 = "0";
var lastUuidAction = "0";
var translationStart = "";
var translationStop = ""
@@ -46,8 +48,77 @@
translationStop = document.getElementById("translationStop").value;
translationDelete = document.getElementById("translationDelete").value;
fillGadgetRows("all");
+ updatePlayingGadgetUuid();
}
+ function updatePlayingGadgetUuid()
+ {
+ var result = requestData("/robot_content_interactions/get_current_playing_gadgets",{});
+ if (result != null)
+ {
+ if (!result.containsKey("uuid1"))
+ {
+ setTimeout("updatePlayingGadgetUuid()", 500);
+ return;
+ }
+ }
+ else
+ {
+ setTimeout("updatePlayingGadgetUuid()", 500);
+ return;
+ }
+ var uuid1 = result.get("uuid1");
+ var uuid2 = result.get("uuid2");
+ if ((uuid1 != knowedPlayingGadgetUuid1) || (uuid2 != knowedPlayingGadgetUuid2))
+ {
+ knowedPlayingGadgetUuid1 = uuid1;
+ knowedPlayingGadgetUuid2 = uuid2;
+ if (knowedGadgetsDict != null)
+ {
+ var gadgets = knowedGadgetsDict;
+ var gadgetsCount = parseInt(gadgets.get("data0").get("count"));
+ for (i = 0; i < gadgetsCount; i++)
+ {
+ gUuid = gadgets.get("data0").get("gadget_" + i + "_uuid");
+ ondemand = gadgets.get("data0").get("gadget_" + i + "_ondemand");
+ if (thisGadgetIsPlaying(gUuid))
+ {
+ if (ondemand == "true")
+ {
+ setStartedGadgetButtons(gUuid);
+ }
+ else
+ {
+ disableStartStopGadgetButtons(gUuid);
+ }
+ disableEditGadgetButtons(gUuid);
+ }
+ else
+ {
+ if (aGadgetIsPlaying())
+ {
+ disableStartStopGadgetButtons(gUuid);
+ enableEditGadgetButtons(gUuid);
+ }
+ else
+ {
+ if (ondemand == "true")
+ {
+ enableStartStopGadgetButtons(gUuid);
+ }
+ else
+ {
+ disableStartStopGadgetButtons(gUuid);
+ }
+ enableEditGadgetButtons(gUuid);
+ }
+ }
+ }
+ }
+ }
+ setTimeout("updatePlayingGadgetUuid()", 500);
+ }
+
function fillGadgetRows(filter)
{
var gadgets = requestData("/robot_content_interactions/get_gadgets_data",{'filter' : filter});
@@ -70,6 +141,8 @@
return;
}
knowedGadgetsDict = gadgets;
+ knowedPlayingGadgetUuid1 = "0";
+ knowedPlayingGadgetUuid2 = "0";
var htmlContent = "";
var gadgetsCount = parseInt(gadgets.get("data0").get("count"));
for (i = 0; i < gadgetsCount; i++)
@@ -130,7 +203,7 @@
htmlContent += '<div class="gadgetsVSpacer" style="width:8px;"></div>';
if (ondemand == 'true')
{
- htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnStopEnable" id="stopId_' + uuid + '" onclick="javascript:stopGadget();return false;" href="#">' + translationStop + '</a>';
+ htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnStopEnable" id="stopId_' + uuid + '" onclick="javascript:stopGadget(\''+uuid+'\');return false;" href="#">' + translationStop + '</a>';
}
else
{
@@ -169,9 +242,15 @@
function enableStartStopGadgetButtons(uuid)
{
document.getElementById("startId_" + uuid).className = "gadgetsBtnTitle gadgetsBtnStartEnable";
- document.getElementById("stopId_" + uuid).className = "gadgetsBtnTitle gadgetsBtnStopActivate";
+ document.getElementById("stopId_" + uuid).className = "gadgetsBtnTitle gadgetsBtnStopEnable";
}
+ function setStartedGadgetButtons(uuid)
+ {
+ document.getElementById("startId_" + uuid).className = "gadgetsBtnTitle gadgetsBtnStartActivate";
+ document.getElementById("stopId_" + uuid).className = "gadgetsBtnTitle gadgetsBtnStopEnable";
+ }
+
function disableEditGadgetButtons(uuid)
{
document.getElementById("helpId_" + uuid).className = "gadgetsBtnNoTitle gadgetsBtnHelpDisable";
@@ -188,20 +267,69 @@
document.getElementById("deleteId_" + uuid).className = "gadgetsBtnTitle gadgetsBtnDelete";
}
+ function thisGadgetIsPlaying(uuid)
+ {
+ if ((uuid == knowedPlayingGadgetUuid1) || (uuid == knowedPlayingGadgetUuid2))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ function aGadgetIsPlaying()
+ {
+ if ((knowedPlayingGadgetUuid1 != "0") || (knowedPlayingGadgetUuid2 != "0"))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
function startGadget(uuid)
{
+ if (aGadgetIsPlaying())
+ {
+ return;
+ }
getRequest("/robot_content_interactions/start_gadget_by_uuid", {'uuid' : uuid});
}
- function stopGadget()
+ function stopGadget(uuid)
{
+ if (aGadgetIsPlaying())
+ {
+ if (!thisGadgetIsPlaying(uuid))
+ {
+ return;
+ }
+ }
+ else
+ {
+ return;
+ }
getRequest("/robot_content_interactions/stop_gadget", {});
}
function setUuidAction(uuid)
{
var idx = uuid.indexOf("_", 0) + 1;
- lastUuidAction = uuid.slice(idx, uuid.length);
+ uuid = uuid.slice(idx, uuid.length);
+ if (aGadgetIsPlaying())
+ {
+ if (thisGadgetIsPlaying(uuid))
+ {
+ lastUuidAction = "0";
+ clickMe("closeLightbox");
+ return;
+ }
+ }
+ lastUuidAction = uuid;
}
function duplicateUgc()
@@ -316,6 +444,7 @@
<xsl:element name="a">
<xsl:attribute name="class">popupBtn</xsl:attribute>
<xsl:attribute name="name">lbOff</xsl:attribute>
+ <xsl:attribute name="id">closeLightbox</xsl:attribute>
<xsl:attribute name="rel">deactivate</xsl:attribute>
<xsl:attribute name="href">#</xsl:attribute><xsl:value-of select="root/translations/no"/>
</xsl:element>
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-27 11:57:50 UTC (rev 4916)
+++ software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py 2009-06-27 11:59:10 UTC (rev 4917)
@@ -440,6 +440,8 @@
for i, ugcObj in enumerate(self.__onDemandList):
if ugcObj.getDescription().getUuid() == uuid:
self.__onDemandIndex = i
+ self.computeOnDemandDictForThumbnailBar()
+ break
def computeOnDemandDictForThumbnailBar(self):
"""
@@ -944,6 +946,23 @@
return
ugc.start(ugc.getDefaultRunCommandName())
+ def getCurrentPlayingGadgets(self):
+ """
+ """
+ if not self.isStarted():
+ return "0", "0"
+ uuid1 = "0"
+ fc = self.getForegroundPguContext()
+ if fc != None:
+ if fc.executionIsStarted():
+ uuid1 = fc.getPguUuid()
+ uuid2 = "0"
+ bc = self.getBackgroundPguContext()
+ if bc != None:
+ if bc.executionIsStarted():
+ uuid2 = bc.getPguUuid()
+ return uuid1, uuid2
+
def __contextLTPrevious(self, eventName, *args):
"""
"""
@@ -1344,6 +1363,30 @@
resourceRobotContentInteractions.addService(TDSServiceRobotContentInteractionsStartStopGadget)
# ------------------------------------------------------------------------------
+# Declaration of the service "get_current_playing_gadgets".
+# ------------------------------------------------------------------------------
+class TDSServiceRobotContentInteractionsGetCurrentPlayingGadgets(TDSService):
+
+ def configure(self):
+ self.parametersDict = {}
+ self.minimalUserLevel = TDS_CLIENT_LEVEL_ANONYMOUS
+ self.exclusiveExecution = True
+ self.name = "get_current_playing_gadgets"
+ self.comment = "Get the current playing gadgets uuid."
+
+ def execute(self, id, parameters):
+ headersStruct = self.getDefaultHeadersStruct()
+ contentStruct = self.getDefaultContentStruct()
+ uuid1, uuid2 = resourceRobotContentInteractions.getPguContextsManager().getCurrentPlayingGadgets()
+ contentStruct['root']['uuid1'] = uuid1
+ contentStruct['root']['uuid2'] = uuid2
+ contentStruct['root']['result'] = getStrError(E_TDREST_SUCCESS)
+ return headersStruct, contentStruct
+
+# Register the service into the resource
+resourceRobotContentInteractions.addService(TDSServiceRobotContentInteractionsGetCurrentPlayingGadgets)
+
+# ------------------------------------------------------------------------------
# Declaration of the service "get_gadgets_data".
# ------------------------------------------------------------------------------
class TDSServiceRobotContentInteractionsGetGadgetsData(TDSService):
|
|
From: remi <c2m...@c2...> - 2009-06-27 11:57:56
|
Author: remi
Date: 2009-06-27 13:57:50 +0200 (Sat, 27 Jun 2009)
New Revision: 4916
Modified:
software_suite_v3/smart-core/smart-server/trunk/util/driver/TuxDriver.py
Log:
* fixed exception on "PerformCommand" when dongle is not plugged. (correction must be applied in tuxdriver library in the future)
Modified: software_suite_v3/smart-core/smart-server/trunk/util/driver/TuxDriver.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/util/driver/TuxDriver.py 2009-06-26 16:50:00 UTC (rev 4915)
+++ software_suite_v3/smart-core/smart-server/trunk/util/driver/TuxDriver.py 2009-06-27 11:57:50 UTC (rev 4916)
@@ -342,8 +342,11 @@
if self.tux_driver_lib == None:
return E_TUXDRV_PARSERISDISABLED
- ret = self.tux_driver_lib.TuxDrv_PerformCommand(c_double(delay),
- c_char_p(command))
+ try:
+ ret = self.tux_driver_lib.TuxDrv_PerformCommand(c_double(delay),
+ c_char_p(command))
+ except:
+ ret = E_TUXDRV_NOERROR
self.__logger.logDebug("Perform the cmd : cmd(%s) delay (%f)" % \
(command, delay))
|
|
From: JDM <c2m...@c2...> - 2009-06-26 16:50:11
|
Author: JDM Date: 2009-06-26 18:50:00 +0200 (Fri, 26 Jun 2009) New Revision: 4915 Modified: software_suite_v3/smart-core/smart-api/csharp/trunk/ControlTuxDroid/TuxAPIDemo.suo software_suite_v3/smart-core/smart-api/csharp/trunk/ControlTuxDroid/TuxAPIDemo/Form1.cs software_suite_v3/smart-core/smart-api/csharp/trunk/ControlTuxDroid/TuxAPIDemo/TuxAPIDemo.csproj Log: * Added the google weather capability to ControlTuxDroid application Modified: software_suite_v3/smart-core/smart-api/csharp/trunk/ControlTuxDroid/TuxAPIDemo/Form1.cs =================================================================== --- software_suite_v3/smart-core/smart-api/csharp/trunk/ControlTuxDroid/TuxAPIDemo/Form1.cs 2009-06-26 15:31:50 UTC (rev 4914) +++ software_suite_v3/smart-core/smart-api/csharp/trunk/ControlTuxDroid/TuxAPIDemo/Form1.cs 2009-06-26 16:50:00 UTC (rev 4915) @@ -5,7 +5,10 @@ using System.Windows.Forms; using System.Threading; //sleep using System.IO; // +using System.Xml; +using System.Net; + namespace TuxAPIDemo { using TuxAPI; @@ -357,19 +360,27 @@ { //http://www.google.com/ig/api?hl=fr&weather=paris - /* - * <current_conditions> -<condition data="Nuageux"/> -<temp_f data="59"/> -<temp_c data="15"/> -<humidity data="Humidité : 63 %"/> -<icon data="/ig/images/weather/cloudy.gif"/> -<wind_condition data="Vent : SO à 11 km/h"/> -</current_conditions>*/ - - //TODO + XmlDocument xmlWeather = new XmlDocument(); - + HttpWebRequest webRequest = (HttpWebRequest)HttpWebRequest.Create("http://www.google.com/ig/api?hl=fr&weather=paris"); + webRequest.ReadWriteTimeout = 1000 * 60; + + HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse(); + Stream webStream = webResponse.GetResponseStream(); + StreamReader webStreamReader = new StreamReader(webStream, System.Text.Encoding.Default); + + xmlWeather = new XmlDocument(); + xmlWeather.LoadXml(webStreamReader.ReadToEnd()); + + XmlNode cnode = xmlWeather["xml_api_reply"]["weather"]["current_conditions"]; + string condition = cnode["condition"].Attributes["data"].Value.ToString(); + string humidity = cnode["humidity"].Attributes["data"].Value.ToString().Replace("Humidité : ", ""); // + string temp_c = cnode["temp_c"].Attributes["data"].Value.ToString(); + string temp_f = cnode["temp_f"].Attributes["data"].Value.ToString(); + string vent = cnode["wind_condition"].Attributes["data"].Value.ToString(); + + //La météo actuel a Paris est: " condition " avec une température de " " dégrès celcus. Le taux d'humidité est de " " pour cent + TuxAPI.Speak(TuxAPI.TuxAPI_SPEAK_LOCUTOR.Bruno, 180, "La météo actuel à Paris est \"" + condition + "\" avec une température de " + temp_c + " degrés celcius; Le taux d'humidité est de " + humidity + " %."); } } } Modified: software_suite_v3/smart-core/smart-api/csharp/trunk/ControlTuxDroid/TuxAPIDemo/TuxAPIDemo.csproj =================================================================== --- software_suite_v3/smart-core/smart-api/csharp/trunk/ControlTuxDroid/TuxAPIDemo/TuxAPIDemo.csproj 2009-06-26 15:31:50 UTC (rev 4914) +++ software_suite_v3/smart-core/smart-api/csharp/trunk/ControlTuxDroid/TuxAPIDemo/TuxAPIDemo.csproj 2009-06-26 16:50:00 UTC (rev 4915) @@ -38,6 +38,7 @@ </Reference> <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> + <Reference Include="System.XML" /> </ItemGroup> <ItemGroup> <Compile Include="Form1.cs"> Modified: software_suite_v3/smart-core/smart-api/csharp/trunk/ControlTuxDroid/TuxAPIDemo.suo =================================================================== (Binary files differ) |
|
From: remi <c2m...@c2...> - 2009-06-26 15:32:02
|
Author: remi
Date: 2009-06-26 17:31:50 +0200 (Fri, 26 Jun 2009)
New Revision: 4914
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/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py
Log:
* added actions on start/stop gadget in the "gadgets" page.
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-26 14:59:23 UTC (rev 4913)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/gadgets.xsl 2009-06-26 15:31:50 UTC (rev 4914)
@@ -121,7 +121,7 @@
htmlContent += '<div class="gadgetsVSpacer" style="width:10px;"></div>';
if (ondemand == 'true')
{
- htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnStartEnable" id="startId_' + uuid + '" onclick="" href="#" name="lbOn" rel="popupNotYetImplemented">' + translationStart + '</a>';
+ htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnStartEnable" id="startId_' + uuid + '" onclick="javascript:startGadget(\''+uuid+'\');return false;" href="#">' + translationStart + '</a>';
}
else
{
@@ -130,7 +130,7 @@
htmlContent += '<div class="gadgetsVSpacer" style="width:8px;"></div>';
if (ondemand == 'true')
{
- htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnStopEnable" id="stopId_' + uuid + '" onclick="" href="#" name="lbOn" rel="popupNotYetImplemented">' + translationStop + '</a>';
+ htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnStopEnable" id="stopId_' + uuid + '" onclick="javascript:stopGadget();return false;" href="#">' + translationStop + '</a>';
}
else
{
@@ -190,10 +190,12 @@
function startGadget(uuid)
{
+ getRequest("/robot_content_interactions/start_gadget_by_uuid", {'uuid' : uuid});
}
- function stopGadget(uuid)
+ function stopGadget()
{
+ getRequest("/robot_content_interactions/stop_gadget", {});
}
function setUuidAction(uuid)
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-26 14:59:23 UTC (rev 4913)
+++ software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py 2009-06-26 15:31:50 UTC (rev 4914)
@@ -434,6 +434,13 @@
resourceTuxDriver.playSound(11, 100.0)
self.__speakOnDemand()
+ def selectOnDemandByUuid(self, uuid):
+ """
+ """
+ for i, ugcObj in enumerate(self.__onDemandList):
+ if ugcObj.getDescription().getUuid() == uuid:
+ self.__onDemandIndex = i
+
def computeOnDemandDictForThumbnailBar(self):
"""
"""
@@ -1264,6 +1271,33 @@
resourceRobotContentInteractions.addService(TDSServiceRobotContentInteractionsStartGadget)
# ------------------------------------------------------------------------------
+# Declaration of the service "start_gadget_by_uuid".
+# ------------------------------------------------------------------------------
+class TDSServiceRobotContentInteractionsStartGadgetByUuid(TDSService):
+
+ def configure(self):
+ self.parametersDict = {
+ 'uuid' : 'string',
+ }
+ self.minimalUserLevel = TDS_CLIENT_LEVEL_ANONYMOUS
+ self.exclusiveExecution = True
+ self.name = "start_gadget_by_uuid"
+ self.comment = "Start a gadget by it uuid."
+
+ def execute(self, id, parameters):
+ headersStruct = self.getDefaultHeadersStruct()
+ contentStruct = self.getDefaultContentStruct()
+ uuid = parameters['uuid']
+ resourceRobotContentInteractions.getPguContextsManager().selectOnDemandByUuid(uuid)
+ t = threading.Thread(target = resourceRobotContentInteractions.getPguContextsManager().startCurrentGadget)
+ t.start()
+ contentStruct['root']['result'] = getStrError(E_TDREST_SUCCESS)
+ return headersStruct, contentStruct
+
+# Register the service into the resource
+resourceRobotContentInteractions.addService(TDSServiceRobotContentInteractionsStartGadgetByUuid)
+
+# ------------------------------------------------------------------------------
# Declaration of the service "stop_gadget".
# ------------------------------------------------------------------------------
class TDSServiceRobotContentInteractionsStopGadget(TDSService):
|
|
From: remi <c2m...@c2...> - 2009-06-26 14:59:27
|
Author: remi
Date: 2009-06-26 16:59:23 +0200 (Fri, 26 Jun 2009)
New Revision: 4913
Modified:
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/gadgets.xsl
Log:
* fixed bug with translations
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-26 14:57:20 UTC (rev 4912)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/gadgets.xsl 2009-06-26 14:59:23 UTC (rev 4913)
@@ -36,12 +36,15 @@
var knowedGadgetsFilter = "all";
var knowedGadgetsDict = null;
var lastUuidAction = "0";
- var translationStart = document.getElementById("translationStart").value;
- var translationStop = document.getElementById("translationStop").value;
- var translationDelete = document.getElementById("translationDelete").value;
+ var translationStart = "";
+ var translationStop = ""
+ var translationDelete = "";
function initialization()
{
+ translationStart = document.getElementById("translationStart").value;
+ translationStop = document.getElementById("translationStop").value;
+ translationDelete = document.getElementById("translationDelete").value;
fillGadgetRows("all");
}
|
|
From: remi <c2m...@c2...> - 2009-06-26 14:57:26
|
Author: remi
Date: 2009-06-26 16:57:20 +0200 (Fri, 26 Jun 2009)
New Revision: 4912
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/img/notify_hint_alert.png
Log:
* updated "current alert" hint picture
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-26 14:28:44 UTC (rev 4911)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/livewithtux.css 2009-06-26 14:57:20 UTC (rev 4912)
@@ -319,7 +319,7 @@
top:0px;
left:0px;
width:99px;
- height:40px;
+ height:56px;
margin-left:47px;
margin-top:155px;
display:block;
@@ -331,9 +331,9 @@
left:0px;
width:26px;
height:26px;
- margin-left:19px;
- -margin-left:10px;
- margin-top:9px;
+ margin-left:24px;
+ -margin-left:12px;
+ margin-top:17px;
display:table;
float:left;
}
Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/notify_hint_alert.png
===================================================================
(Binary files differ)
|
|
From: remi <c2m...@c2...> - 2009-06-26 14:28:51
|
Author: remi
Date: 2009-06-26 16:28:44 +0200 (Fri, 26 Jun 2009)
New Revision: 4911
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/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 translations for the page "gadgets"
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-26 13:47:52 UTC (rev 4910)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/gadgets.xsl 2009-06-26 14:28:44 UTC (rev 4911)
@@ -36,6 +36,9 @@
var knowedGadgetsFilter = "all";
var knowedGadgetsDict = null;
var lastUuidAction = "0";
+ var translationStart = document.getElementById("translationStart").value;
+ var translationStop = document.getElementById("translationStop").value;
+ var translationDelete = document.getElementById("translationDelete").value;
function initialization()
{
@@ -115,20 +118,20 @@
htmlContent += '<div class="gadgetsVSpacer" style="width:10px;"></div>';
if (ondemand == 'true')
{
- htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnStartEnable" id="startId_' + uuid + '" onclick="" href="#" name="lbOn" rel="popupNotYetImplemented">Start</a>';
+ htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnStartEnable" id="startId_' + uuid + '" onclick="" href="#" name="lbOn" rel="popupNotYetImplemented">' + translationStart + '</a>';
}
else
{
- htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnStartDisable" id="startId_' + uuid + '" onclick="return false;" href="#">Start</a>';
+ htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnStartDisable" id="startId_' + uuid + '" onclick="return false;" href="#">' + translationStart + '</a>';
}
htmlContent += '<div class="gadgetsVSpacer" style="width:8px;"></div>';
if (ondemand == 'true')
{
- htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnStopEnable" id="stopId_' + uuid + '" onclick="" href="#" name="lbOn" rel="popupNotYetImplemented">Stop</a>';
+ htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnStopEnable" id="stopId_' + uuid + '" onclick="" href="#" name="lbOn" rel="popupNotYetImplemented">' + translationStop + '</a>';
}
else
{
- htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnStopDisable" id="stopId_' + uuid + '" onclick="javascript:return false;" href="#">Stop</a>';
+ htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnStopDisable" id="stopId_' + uuid + '" onclick="javascript:return false;" href="#">' + translationStop + '</a>';
}
htmlContent += '<div class="gadgetsVSpacer" style="width:18px;"></div>';
htmlContent += '<a class="gadgetsBtnNoTitle gadgetsBtnHelp" id="helpId_' + uuid + '" onclick="" href="#" name="lbOn" rel="popupNotYetImplemented"></a>';
@@ -137,7 +140,7 @@
htmlContent += '<div class="gadgetsVSpacer" style="width:8px;"></div>';
htmlContent += '<a class="gadgetsBtnNoTitle gadgetsBtnDuplicate" id="duplicateId_' + uuid + '" onclick="javascript:setUuidAction(\''+uuid+'\');duplicateUgc();return false;" href="#"></a>';
htmlContent += '<div class="gadgetsVSpacer" style="width:18px;"></div>';
- htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnDelete" id="deleteId_' + uuid + '" onclick="" href="#" name="lbOn" rel="popupConfirmDelete">Delete</a>';
+ htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnDelete" id="deleteId_' + uuid + '" onclick="" href="#" name="lbOn" rel="popupConfirmDelete">' + translationDelete + '</a>';
htmlContent += '<div class="frame01Sep2"></div>';
return htmlContent;
}
@@ -238,6 +241,28 @@
<xsl:value-of select="root/language"/>
</xsl:attribute>
</xsl:element>
+ <!-- SOME TRANSLATIONS FOR JS -->
+ <xsl:element name="input">
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">translationStart</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="root/translations/start"/>
+ </xsl:attribute>
+ </xsl:element>
+ <xsl:element name="input">
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">translationStop</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="root/translations/stop"/>
+ </xsl:attribute>
+ </xsl:element>
+ <xsl:element name="input">
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">translationDelete</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="root/translations/delete"/>
+ </xsl:attribute>
+ </xsl:element>
<!-- MAIN DIV FRAME -->
<div style="position:absolute;
left:0px;
@@ -249,21 +274,21 @@
<xsl:attribute name="class">gadgetsFilterRadio gadgetsFilterRadioActivate</xsl:attribute>
<xsl:attribute name="id">gadgetsFilterRadioAll</xsl:attribute>
<xsl:attribute name="onclick">javascript:fillGadgetRows('all');return false;</xsl:attribute>
- <xsl:attribute name="href">#</xsl:attribute>All
+ <xsl:attribute name="href">#</xsl:attribute><xsl:value-of select="root/translations/all"/>
</xsl:element>
<div class="gadgetsVSpacer" style="width:5px;height:40px;"></div>
<xsl:element name="a">
<xsl:attribute name="class">gadgetsFilterRadio gadgetsFilterRadioEnable</xsl:attribute>
<xsl:attribute name="id">gadgetsFilterRadioOnDemand</xsl:attribute>
<xsl:attribute name="onclick">javascript:fillGadgetRows('on_demand');return false;</xsl:attribute>
- <xsl:attribute name="href">#</xsl:attribute>On demand
+ <xsl:attribute name="href">#</xsl:attribute><xsl:value-of select="root/translations/on_demand"/>
</xsl:element>
<div class="gadgetsVSpacer" style="width:5px;height:40px;"></div>
<xsl:element name="a">
<xsl:attribute name="class">gadgetsFilterRadio gadgetsFilterRadioEnable</xsl:attribute>
<xsl:attribute name="id">gadgetsFilterRadioAlerts</xsl:attribute>
<xsl:attribute name="onclick">javascript:fillGadgetRows('alerts');return false;</xsl:attribute>
- <xsl:attribute name="href">#</xsl:attribute>Alerts
+ <xsl:attribute name="href">#</xsl:attribute><xsl:value-of select="root/translations/alerts"/>
</xsl:element>
</div>
<div class="frame01Middle" style="height:465px;">
@@ -275,19 +300,19 @@
<div id="popupConfirmDelete" class="popup01Box" onfocus="setUuidAction(arguments[0]);">
<div class="popupFrame01Top"></div>
<div class="popupFrame01Middle">
- <span class="popup01Message">This action will delete this gadget. Continue ?</span>
+ <span class="popup01Message"><xsl:value-of select="root/translations/popup_confirm_delete_gadget"/></span>
<xsl:element name="a">
<xsl:attribute name="class">popupBtn</xsl:attribute>
<xsl:attribute name="name">lbOff</xsl:attribute>
<xsl:attribute name="rel">deactivate</xsl:attribute>
<xsl:attribute name="onclick">javascript:deleteUgc();return false;</xsl:attribute>
- <xsl:attribute name="href">#</xsl:attribute>Yes
+ <xsl:attribute name="href">#</xsl:attribute><xsl:value-of select="root/translations/yes"/>
</xsl:element>
<xsl:element name="a">
<xsl:attribute name="class">popupBtn</xsl:attribute>
<xsl:attribute name="name">lbOff</xsl:attribute>
<xsl:attribute name="rel">deactivate</xsl:attribute>
- <xsl:attribute name="href">#</xsl:attribute>No
+ <xsl:attribute name="href">#</xsl:attribute><xsl:value-of select="root/translations/no"/>
</xsl:element>
</div>
<div class="popupFrame01Bottom"></div>
@@ -296,12 +321,12 @@
<div id="popupNotYetImplemented" class="popup01Box" onfocus="return false;">
<div class="popupFrame01Top"></div>
<div class="popupFrame01Middle">
- <span class="popup01Message" style="width:409px;">Not yet implemented</span>
+ <span class="popup01Message" style="width:409px;"><xsl:value-of select="root/translations/popup_not_yet_implemented"/></span>
<xsl:element name="a">
<xsl:attribute name="class">popupBtn</xsl:attribute>
<xsl:attribute name="name">lbOff</xsl:attribute>
<xsl:attribute name="rel">deactivate</xsl:attribute>
- <xsl:attribute name="href">#</xsl:attribute>Close
+ <xsl:attribute name="href">#</xsl:attribute><xsl:value-of select="root/translations/close"/>
</xsl:element>
</div>
<div class="popupFrame01Bottom"></div>
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-26 13:47:52 UTC (rev 4910)
+++ software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/default.pot 2009-06-26 14:28:44 UTC (rev 4911)
@@ -27,3 +27,30 @@
msgid "stop"
msgstr ""
+
+msgid "all"
+msgstr ""
+
+msgid "on_demand"
+msgstr ""
+
+msgid "alerts"
+msgstr ""
+
+msgid "delete"
+msgstr ""
+
+msgid "popup_not_yet_implemented"
+msgstr ""
+
+msgid "popup_confirm_delete_gadget"
+msgstr ""
+
+msgid "yes"
+msgstr ""
+
+msgid "no"
+msgstr ""
+
+msgid "close"
+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-26 13:47:52 UTC (rev 4910)
+++ software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/en.po 2009-06-26 14:28:44 UTC (rev 4911)
@@ -27,3 +27,30 @@
msgid "stop"
msgstr "Stop"
+
+msgid "all"
+msgstr "All"
+
+msgid "on_demand"
+msgstr "On demand"
+
+msgid "alerts"
+msgstr "Alerts"
+
+msgid "delete"
+msgstr "Delete"
+
+msgid "popup_not_yet_implemented"
+msgstr "This functionality is not yet implemented."
+
+msgid "popup_confirm_delete_gadget"
+msgstr "This action will delete this gadget. Continue ?"
+
+msgid "yes"
+msgstr "Yes"
+
+msgid "no"
+msgstr "No"
+
+msgid "close"
+msgstr "Close"
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-26 13:47:52 UTC (rev 4910)
+++ software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/fr.po 2009-06-26 14:28:44 UTC (rev 4911)
@@ -27,3 +27,30 @@
msgid "stop"
msgstr "Stop"
+
+msgid "all"
+msgstr "Tous"
+
+msgid "on_demand"
+msgstr "A la demande"
+
+msgid "alerts"
+msgstr "Alertes"
+
+msgid "delete"
+msgstr "Suppr."
+
+msgid "popup_not_yet_implemented"
+msgstr "Cette functionnalité n'est pas encore implémentée."
+
+msgid "popup_confirm_delete_gadget"
+msgstr "Cette action va supprimer ce gadget. Continuer ?"
+
+msgid "yes"
+msgstr "Oui"
+
+msgid "no"
+msgstr "Non"
+
+msgid "close"
+msgstr "Fermer"
|
|
From: remi <c2m...@c2...> - 2009-06-26 14:16:17
|
Author: remi
Date: 2009-06-26 15:47:52 +0200 (Fri, 26 Jun 2009)
New Revision: 4910
Added:
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/gadgets.css
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/popup-ie6.css
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/popup.css
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/frame_01_bottom_2.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/frame_01_middle_2.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/frame_01_middle_3.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/frame_01_sep.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/frame_01_sep_2.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/frame_01_top_2.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_configure_activate.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_configure_disable.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_configure_enable.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_delete_activate.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_delete_disable.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_delete_enable.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_duplicate_activate.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_duplicate_disable.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_duplicate_enable.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_help_activate.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_help_disable.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_help_enable.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_play_activate.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_play_disable.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_play_enable.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_stop_activate.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_stop_disable.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_stop_enable.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_filter_radio_activate.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_filter_radio_enable.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/popup_btn_activate.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/popup_btn_enable.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/popup_frame01_bottom.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/popup_frame01_middle.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/popup_frame01_top.png
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/gadgets.xsl
Modified:
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/menu.css
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/js/lightbox.js
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/index.xsl
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:
* some gui fixes
* added gadgets page. (not yet finished)
* fixed lightbox js script
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/gadgets.css
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/gadgets.css (rev 0)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/gadgets.css 2009-06-26 13:47:52 UTC (rev 4910)
@@ -0,0 +1,320 @@
+*:focus {
+ outline: none;
+}
+
+*::-moz-focus-inner {
+ border: none;
+}
+
+div.frame01TopSpace{
+ margin-top:15px;
+ font-family:Verdana, Bitstream Vera Sans;
+ background-image:url(/data/web_interface/user_01/img/frame_01_top_2.png);
+ background-repeat:no-repeat;
+ height:40px;
+ width:855px;
+ overflow: hidden;
+}
+
+div.frame01Middle{
+ font-family:Verdana, Bitstream Vera Sans;
+ display:table;
+ background-image:url(/data/web_interface/user_01/img/frame_01_middle.png);
+ background-repeat:repeat;
+ height:1px;
+ width:855px;
+ overflow: hidden;
+}
+
+div.frame01Middle2{
+ font-family:Verdana, Bitstream Vera Sans;
+ display:table;
+ background-image:url(/data/web_interface/user_01/img/frame_01_middle_2.png);
+ background-repeat:repeat;
+ height:1px;
+ width:855px;
+ overflow: hidden;
+}
+
+div.frame01Sep{
+ font-family:Verdana, Bitstream Vera Sans;
+ display:table;
+ background-image:url(/data/web_interface/user_01/img/frame_01_sep.png);
+ background-repeat:repeat;
+ height:4px;
+ width:855px;
+ overflow: hidden;
+}
+
+div.frame01Sep2{
+ font-family:Verdana, Bitstream Vera Sans;
+ display:table;
+ background-image:url(/data/web_interface/user_01/img/frame_01_sep_2.png);
+ background-repeat:repeat;
+ height:2px;
+ width:845px;
+ overflow: hidden;
+}
+
+div.frame01Sep2{
+ margin-top:2px;
+ display:table;
+ background-image:url(/data/web_interface/user_01/img/frame_01_sep_2.png);
+ background-repeat:repeat;
+ height:2px;
+ width:845px;
+ overflow: hidden;
+}
+
+div.frame01Bottom{
+ margin-top:0px;
+ font-family:Verdana, Bitstream Vera Sans;
+ background-image:url(/data/web_interface/user_01/img/frame_01_bottom_2.png);
+ background-repeat:no-repeat;
+ height:20px;
+ width:855px;
+ overflow: hidden;
+}
+
+div.gadgetsListScrollbox{
+ height:465px;
+ width:845px;
+ border-color:black;
+ border-style:solid;
+ border-width:0px;
+ background-color:#DCDADB;
+ overflow-y:auto;
+ overflow-x:hidden;
+ margin-left:5px;
+ margin-right:5px;
+ margin-top:0px;
+ background-image:url(/data/web_interface/user_01/img/frame_01_middle_3.png);
+}
+
+div.gadgetsVSpacer{
+ height:34px;
+ width:8px;
+ margin-left:0px;
+ margin-top:0px;
+ display:table;
+ float:left;
+}
+
+.gadgetsRowIcon{
+ height:34px;
+ width:34px;
+ margin-left:0px;
+ margin-top:2px;
+ display:table;
+ float:left;
+}
+
+.gadgetsRowName{
+ width:390px;
+ height:34px;
+ margin-left:0px;
+ margin-top:2px;
+ display:table;
+ float:left;
+ line-height:34px;
+ font-size:12px;
+ color:#000;
+ text-align:left;
+ vertical-align:middle;
+ font-weight:bold;
+ overflow:hidden;
+ text-decoration:none;
+ font-family:Verdana, Bitstream Vera Sans, Arial, Helvetica, sans-serif;
+}
+
+.gadgetsBtnTitle{
+ width:56px;
+ _width:72px;
+ height:34px;
+ padding-left:16px;
+ padding-top:-1px;
+ margin-left:0px;
+ margin-top:2px;
+ display:table;
+ float:left;
+ line-height:34px;
+ font-size:10px;
+ color:#FFFFFF;
+ text-align:center;
+ vertical-align:middle;
+ font-weight:bold;
+ overflow:hidden;
+ text-decoration:none;
+ font-family:Verdana, Bitstream Vera Sans, Arial, Helvetica, sans-serif;
+}
+
+.gadgetsBtnNoTitle{
+ width:32px;
+ height:34px;
+ margin-left:0px;
+ margin-top:2px;
+ display:table;
+ float:left;
+ overflow:hidden;
+}
+
+.gadgetsBtnStartEnable{
+ width:59px;
+ _width:72px;
+ padding-left:13px;
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_play_enable.png);
+}
+
+.gadgetsBtnStartEnable:hover{
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_play_activate.png);
+}
+
+.gadgetsBtnStartActivate{
+ width:59px;
+ _width:72px;
+ padding-left:13px;
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_play_activate.png);
+}
+
+.gadgetsBtnStartDisable{
+ width:59px;
+ _width:72px;
+ padding-left:13px;
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_play_disable.png);
+}
+
+.gadgetsBtnStopEnable{
+ width:53px;
+ _width:72px;
+ padding-left:19px;
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_stop_enable.png);
+}
+
+.gadgetsBtnStopEnable:hover{
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_stop_activate.png);
+}
+
+.gadgetsBtnStopActivate{
+ width:53px;
+ _width:72px;
+ padding-left:19px;
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_stop_activate.png);
+}
+
+.gadgetsBtnStopDisable{
+ width:53px;
+ _width:72px;
+ padding-left:19px;
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_stop_disable.png);
+}
+
+.gadgetsBtnHelp{
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_help_enable.png);
+}
+
+.gadgetsBtnHelp:hover{
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_help_activate.png);
+}
+
+.gadgetsBtnHelpDisable{
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_help_disable.png);
+}
+
+.gadgetsBtnConfigure{
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_configure_enable.png);
+}
+
+.gadgetsBtnConfigure:hover{
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_configure_activate.png);
+}
+
+.gadgetsBtnConfigureDisable{
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_configure_disable.png);
+}
+
+.gadgetsBtnDuplicate{
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_duplicate_enable.png);
+}
+
+.gadgetsBtnDuplicate:hover{
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_duplicate_activate.png);
+}
+
+.gadgetsBtnDuplicateDisable{
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_duplicate_disable.png);
+}
+
+.gadgetsBtnDelete{
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_delete_enable.png);
+}
+
+.gadgetsBtnDelete:hover{
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_delete_activate.png);
+}
+
+.gadgetsBtnDeleteDisable{
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_delete_disable.png);
+}
+
+.gadgetsFilterRadio{
+ width:85px;
+ height:25px;
+ margin-left:0px;
+ margin-top:9px;
+ padding-top:-1px;
+ line-height:25px;
+ font-size:10px;
+ color:#FFFFFF;
+ text-align:center;
+ vertical-align:middle;
+ font-weight:bold;
+ overflow:hidden;
+ text-decoration:none;
+ display:table;
+ float:left;
+ font-family:Verdana, Bitstream Vera Sans, Arial, Helvetica, sans-serif;
+}
+
+.gadgetsFilterRadioEnable{
+ background-image:url(/data/web_interface/user_01/img/gadgets_filter_radio_enable.png);
+}
+
+.gadgetsFilterRadioEnable:hover{
+ background-image:url(/data/web_interface/user_01/img/gadgets_filter_radio_activate.png);
+}
+
+.gadgetsFilterRadioActivate{
+ background-image:url(/data/web_interface/user_01/img/gadgets_filter_radio_activate.png);
+}
+
+.leightbox {
+ color: #333;
+ display: none;
+ position: absolute;
+ top: 25%;
+ left: 25%;
+ width: 50%;
+ height: 50%;
+ padding: 1em;
+ border: 1em solid #B8B8B8;
+ background-color: white;
+ text-align: left;
+ z-index:1001;
+ overflow: auto;
+}
+
+#overlay{
+ display:none;
+ position:absolute;
+ top:0px;
+ left:0px;
+ width:855px;
+ height:535px;
+ z-index:1000;
+ background-color:#000000;
+ -moz-opacity: 0.7;
+ opacity:.70;
+ filter: alpha(opacity=70);
+}
+
+.lightbox[id]{ /* IE6 and below Can't See This */ position:fixed; }#overlay[id]{ /* IE6 and below Can't See This */ position:fixed; }
Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/menu.css
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/menu.css 2009-06-26 12:33:37 UTC (rev 4909)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/menu.css 2009-06-26 13:47:52 UTC (rev 4910)
@@ -128,13 +128,16 @@
#overlay{
display:none;
position:absolute;
+ margin-top:0px;
+ margin-left:0px;
top:0px;
left:0px;
- width:100%;
+ width:100% !important;
+ _width:110%;
height:100%;
z-index:1000;
background-color:#000000;
- -moz-opacity: 0.7;
+ -moz-opacity: 0.70;
opacity:.70;
filter: alpha(opacity=70);
}
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/popup-ie6.css
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/popup-ie6.css (rev 0)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/popup-ie6.css 2009-06-26 13:47:52 UTC (rev 4910)
@@ -0,0 +1,76 @@
+.popupFrame01Top{
+ height:10px;
+ width:490px;
+ overflow:hidden;
+ display:block;
+ filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/data/web_interface/user_01/img/popup_frame01_top.png",sizingMethod="scale");
+}
+
+.popupFrame01Middle{
+ height:42px;
+ width:490px;
+ overflow:hidden;
+ display:block;
+ filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/data/web_interface/user_01/img/popup_frame01_middle.png",sizingMethod="scale");
+}
+
+.popupFrame01Bottom{
+ height:10px;
+ width:490px;
+ overflow:hidden;
+ display:block;
+ filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/data/web_interface/user_01/img/popup_frame01_bottom.png",sizingMethod="scale");
+}
+
+.popup01Message{
+ width:351px;
+ height:34px;
+ margin-left:10px;
+ margin-top:4px;
+ display:table;
+ float:left;
+ line-height:34px;
+ font-size:12px;
+ color:#000;
+ text-align:center;
+ vertical-align:middle;
+ font-weight:bold;
+ overflow:hidden;
+ text-decoration:none;
+ font-family:Verdana, Bitstream Vera Sans, Arial, Helvetica, sans-serif;
+}
+
+.popupBtn{
+ width:58px;
+ height:34px;
+ margin-left:2px;
+ margin-top:4px;
+ padding-top:-1px;
+ line-height:34px;
+ font-size:10px;
+ color:#FFFFFF;
+ text-align:center;
+ vertical-align:middle;
+ font-weight:bold;
+ overflow:hidden;
+ text-decoration:none;
+ display:table;
+ float:left;
+ font-family:Verdana, Bitstream Vera Sans, Arial, Helvetica, sans-serif;
+ background-image:url(/data/web_interface/user_01/img/popup_btn_enable.png);
+}
+
+.popupBtn:hover{
+ background-image:url(/data/web_interface/user_01/img/popup_btn_activate.png);
+}
+
+.popup01Box {
+ display: none;
+ position:absolute;
+ top:209px;
+ left:182px;
+ width:490px;
+ height:62px;
+ z-index:1001;
+ overflow:hidden;
+}
\ No newline at end of file
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/popup.css
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/popup.css (rev 0)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/popup.css 2009-06-26 13:47:52 UTC (rev 4910)
@@ -0,0 +1,76 @@
+.popupFrame01Top{
+ height:10px;
+ width:490px;
+ overflow:hidden;
+ display:block;
+ background-image:url(/data/web_interface/user_01/img/popup_frame01_top.png);
+}
+
+.popupFrame01Middle{
+ height:42px;
+ width:490px;
+ overflow:hidden;
+ display:block;
+ background-image:url(/data/web_interface/user_01/img/popup_frame01_middle.png);
+}
+
+.popupFrame01Bottom{
+ height:10px;
+ width:490px;
+ overflow:hidden;
+ display:block;
+ background-image:url(/data/web_interface/user_01/img/popup_frame01_bottom.png);
+}
+
+.popup01Message{
+ width:351px;
+ height:34px;
+ margin-left:10px;
+ margin-top:4px;
+ display:table;
+ float:left;
+ line-height:34px;
+ font-size:12px;
+ color:#000;
+ text-align:center;
+ vertical-align:middle;
+ font-weight:bold;
+ overflow:hidden;
+ text-decoration:none;
+ font-family:Verdana, Bitstream Vera Sans, Arial, Helvetica, sans-serif;
+}
+
+.popupBtn{
+ width:58px;
+ height:34px;
+ margin-left:2px;
+ margin-top:4px;
+ padding-top:-1px;
+ line-height:34px;
+ font-size:10px;
+ color:#FFFFFF;
+ text-align:center;
+ vertical-align:middle;
+ font-weight:bold;
+ overflow:hidden;
+ text-decoration:none;
+ display:table;
+ float:left;
+ font-family:Verdana, Bitstream Vera Sans, Arial, Helvetica, sans-serif;
+ background-image:url(/data/web_interface/user_01/img/popup_btn_enable.png);
+}
+
+.popupBtn:hover{
+ background-image:url(/data/web_interface/user_01/img/popup_btn_activate.png);
+}
+
+.popup01Box {
+ display: none;
+ position:absolute;
+ top:209px;
+ left:182px;
+ width:490px;
+ height:62px;
+ z-index:1001;
+ overflow:hidden;
+}
\ No newline at end of file
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/frame_01_bottom_2.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/frame_01_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/frame_01_middle_2.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/frame_01_middle_2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/frame_01_middle_3.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/frame_01_middle_3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/frame_01_sep.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/frame_01_sep.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/frame_01_sep_2.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/frame_01_sep_2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/frame_01_top_2.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/frame_01_top_2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_configure_activate.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_configure_activate.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_configure_disable.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_configure_disable.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_configure_enable.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_configure_enable.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_delete_activate.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_delete_activate.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_delete_disable.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_delete_disable.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_delete_enable.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_delete_enable.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_duplicate_activate.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_duplicate_activate.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_duplicate_disable.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_duplicate_disable.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_duplicate_enable.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_duplicate_enable.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_help_activate.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_help_activate.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_help_disable.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_help_disable.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_help_enable.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_help_enable.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_play_activate.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_play_activate.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_play_disable.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_play_disable.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_play_enable.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_play_enable.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_stop_activate.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_stop_activate.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_stop_disable.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_stop_disable.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_stop_enable.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_stop_enable.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_filter_radio_activate.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_filter_radio_activate.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_filter_radio_enable.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_filter_radio_enable.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/popup_btn_activate.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/popup_btn_activate.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/popup_btn_enable.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/popup_btn_enable.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/popup_frame01_bottom.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/popup_frame01_bottom.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/popup_frame01_middle.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/popup_frame01_middle.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/popup_frame01_top.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/popup_frame01_top.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/js/lightbox.js
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/js/lightbox.js 2009-06-26 12:33:37 UTC (rev 4909)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/js/lightbox.js 2009-06-26 13:47:52 UTC (rev 4910)
@@ -57,7 +57,6 @@
/*-----------------------------------------------------------------------------------------------*/
-Event.observe(window, 'load', initialize, false);
Event.observe(window, 'load', getBrowserInfo, false);
Event.observe(window, 'unload', Event.unloadCache, false);
@@ -70,10 +69,11 @@
initialize: function(ctrl) {
this.content = ctrl.rel;
+ this.elementId = ctrl.id;
Event.observe(ctrl, 'click', this.activate.bindAsEventListener(this), false);
ctrl.onclick = function(){return false;};
},
-
+
// Turn everything on - mainly the IE fixes
activate: function(){
if (browser == 'Internet Explorer'){
@@ -84,18 +84,18 @@
}
this.displayLightbox("block");
},
-
+
// Ie requires height to 100% and overflow hidden or else you can scroll down past the lightbox
prepareIE: function(height, overflow){
bod = document.getElementsByTagName('body')[0];
bod.style.height = height;
bod.style.overflow = overflow;
-
+
htm = document.getElementsByTagName('html')[0];
htm.style.height = height;
- htm.style.overflow = overflow;
+ htm.style.overflow = overflow;
},
-
+
// In IE, select elements hover on top of the lightbox
hideSelects: function(visibility){
selects = document.getElementsByTagName('select');
@@ -103,40 +103,45 @@
selects[i].style.visibility = visibility;
}
},
-
+
// Taken from lightbox implementation found at http://www.huddletogether.com/projects/lightbox/
getScroll: function(){
if (self.pageYOffset) {
this.yPos = self.pageYOffset;
} else if (document.documentElement && document.documentElement.scrollTop){
- this.yPos = document.documentElement.scrollTop;
+ this.yPos = document.documentElement.scrollTop;
} else if (document.body) {
this.yPos = document.body.scrollTop;
}
},
-
+
setScroll: function(x, y){
- window.scrollTo(x, y);
+ window.scrollTo(x, y);
},
-
+
displayLightbox: function(display){
$('overlay').style.display = display;
parent.top.document.getElementById('overlay').style.display = display;
$(this.content).style.display = display;
- if(display != 'none') this.actions();
+ if (display != 'none')
+ {
+ $(this.content).onfocus(this.elementId);
+ }
+ if(display != 'none') this.actions();
},
-
+
// Search through new links within the lightbox, and attach click event
actions: function(){
- lbActions = document.getElementsByClassName('lbAction');
+ lbActions = document.getElementsByTagName('a');
+ for(i = 0; i < lbActions.length; i++)
+ {
+ if (lbActions[i].name == 'lbOff')
+ {
+ Event.observe(lbActions[i], 'click', this[lbActions[i].rel].bindAsEventListener(this), false);
+ }
+ }
+ },
- for(i = 0; i < lbActions.length; i++) {
- Event.observe(lbActions[i], 'click', this[lbActions[i].rel].bindAsEventListener(this), false);
- lbActions[i].onclick = function(){return false;};
- }
-
- },
-
// Example of creating your own functionality once lightbox is initiated
deactivate: function(){
if (browser == "Internet Explorer"){
@@ -144,7 +149,7 @@
this.prepareIE("auto", "auto");
this.hideSelects("visible");
}
-
+
this.displayLightbox("none");
}
}
@@ -152,7 +157,7 @@
/*-----------------------------------------------------------------------------------------------*/
// Onload, make all links that need to trigger a lightbox active
-function initialize(){
+function initializeLightbox(){
addLightboxMarkup();
lbox = document.getElementsByTagName('a');
for(i = 0; i < lbox.length; i++)
@@ -175,7 +180,7 @@
overlay.id = 'overlay';
bod.appendChild(overlay);
-
+
bodParent = window.top.document.getElementsByTagName('body')[0];
overlay = window.top.document.createElement('div');
overlay.id = 'overlay';
Added: 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 (rev 0)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/gadgets.xsl 2009-06-26 13:47:52 UTC (rev 4910)
@@ -0,0 +1,312 @@
+<?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/gadgets.css" rel="stylesheet" type="text/css"/>
+ <!-- CSS HACKS FOR BROWSERS -->
+ <xsl:choose>
+ <!-- IE -->
+ <xsl:when test="system-property('xsl:vendor') = 'Microsoft'">
+ <!-- IE <= 7 -->
+ <xsl:comment><![CDATA[[if lte IE 7]>
+ <link href="/data/web_interface/user_01/css/popup-ie6.css" rel="stylesheet" type="text/css"/>
+ <![endif]]]></xsl:comment>
+ <!-- IE >= 8 -->
+ <xsl:comment><![CDATA[[if gte IE 8]>
+ <link href="/data/web_interface/user_01/css/popup.css" rel="stylesheet" type="text/css"/>
+ <![endif]]]></xsl:comment>
+ </xsl:when>
+ <!-- FIREFOX ETC... -->
+ <xsl:otherwise>
+ <link href="/data/web_interface/user_01/css/popup.css" rel="stylesheet" type="text/css"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <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 type="text/javascript" src="/data/web_interface/user_01/js/prototype.js"></script>
+ <script type="text/javascript" src="/data/web_interface/user_01/js/lightbox.js"></script>
+ <script language="javascript">
+ <![CDATA[
+ var knowedGadgetsFilter = "all";
+ var knowedGadgetsDict = null;
+ var lastUuidAction = "0";
+
+ function initialization()
+ {
+ fillGadgetRows("all");
+ }
+
+ function fillGadgetRows(filter)
+ {
+ var gadgets = requestData("/robot_content_interactions/get_gadgets_data",{'filter' : filter});
+ if (gadgets != null)
+ {
+ if (!gadgets.containsKey("data0"))
+ {
+ return;
+ }
+ else
+ {
+ if (gadgets.get("data0").get("count") == '0')
+ {
+ return;
+ }
+ }
+ }
+ else
+ {
+ return;
+ }
+ knowedGadgetsDict = gadgets;
+ var htmlContent = "";
+ var gadgetsCount = parseInt(gadgets.get("data0").get("count"));
+ for (i = 0; i < gadgetsCount; i++)
+ {
+ uuid = gadgets.get("data0").get("gadget_" + i + "_uuid");
+ name = gadgets.get("data0").get("gadget_" + i + "_name");
+ icon = gadgets.get("data0").get("gadget_" + i + "_icon");
+ ondemand = gadgets.get("data0").get("gadget_" + i + "_ondemand");
+ htmlContent += addGadgetRow(uuid, name, icon, ondemand);
+ }
+ document.getElementById("gadgetsListScrollbox").innerHTML = htmlContent;
+ // Set png effet for IE6
+ for (i = 0; i < gadgetsCount; i++)
+ {
+ var iconId = "gadgetsRowIcon_" + gadgets.get("data0").get("gadget_" + i + "_uuid");
+ setpng(document.getElementById(iconId));
+ }
+ // Show correct filter radio button
+ if (filter == 'all')
+ {
+ document.getElementById("gadgetsFilterRadioAll").className = "gadgetsFilterRadio gadgetsFilterRadioActivate";
+ document.getElementById("gadgetsFilterRadioOnDemand").className = "gadgetsFilterRadio gadgetsFilterRadioEnable";
+ document.getElementById("gadgetsFilterRadioAlerts").className = "gadgetsFilterRadio gadgetsFilterRadioEnable";
+ }
+ else if (filter == 'on_demand')
+ {
+ document.getElementById("gadgetsFilterRadioAll").className = "gadgetsFilterRadio gadgetsFilterRadioEnable";
+ document.getElementById("gadgetsFilterRadioOnDemand").className = "gadgetsFilterRadio gadgetsFilterRadioActivate";
+ document.getElementById("gadgetsFilterRadioAlerts").className = "gadgetsFilterRadio gadgetsFilterRadioEnable";
+ }
+ else
+ {
+ document.getElementById("gadgetsFilterRadioAll").className = "gadgetsFilterRadio gadgetsFilterRadioEnable";
+ document.getElementById("gadgetsFilterRadioOnDemand").className = "gadgetsFilterRadio gadgetsFilterRadioEnable";
+ document.getElementById("gadgetsFilterRadioAlerts").className = "gadgetsFilterRadio gadgetsFilterRadioActivate";
+ }
+ knowedGadgetsFilter = filter;
+ initializeLightbox();
+ }
+
+ function addGadgetRow(uuid, name, icon, ondemand)
+ {
+ var htmlContent = "";
+ var iconId = "gadgetsRowIcon_" + uuid;
+ htmlContent += '<div class="gadgetsVSpacer" style="width:10px;"></div>';
+ htmlContent += '<div class="gadgetsRowIcon"><img src="' + icon + '" height="34" width="34" id="' + iconId + '"></img></div>';
+ htmlContent += '<div class="gadgetsVSpacer" style="width:10px;"></div>';
+ htmlContent += '<span class="gadgetsRowName">' + name + '</span>';
+ htmlContent += '<div class="gadgetsVSpacer" style="width:10px;"></div>';
+ if (ondemand == 'true')
+ {
+ htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnStartEnable" id="startId_' + uuid + '" onclick="" href="#" name="lbOn" rel="popupNotYetImplemented">Start</a>';
+ }
+ else
+ {
+ htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnStartDisable" id="startId_' + uuid + '" onclick="return false;" href="#">Start</a>';
+ }
+ htmlContent += '<div class="gadgetsVSpacer" style="width:8px;"></div>';
+ if (ondemand == 'true')
+ {
+ htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnStopEnable" id="stopId_' + uuid + '" onclick="" href="#" name="lbOn" rel="popupNotYetImplemented">Stop</a>';
+ }
+ else
+ {
+ htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnStopDisable" id="stopId_' + uuid + '" onclick="javascript:return false;" href="#">Stop</a>';
+ }
+ htmlContent += '<div class="gadgetsVSpacer" style="width:18px;"></div>';
+ htmlContent += '<a class="gadgetsBtnNoTitle gadgetsBtnHelp" id="helpId_' + uuid + '" onclick="" href="#" name="lbOn" rel="popupNotYetImplemented"></a>';
+ htmlContent += '<div class="gadgetsVSpacer" style="width:8px;"></div>';
+ htmlContent += '<a class="gadgetsBtnNoTitle gadgetsBtnConfigure" id="configureId_' + uuid + '" onclick="" href="#" name="lbOn" rel="popupNotYetImplemented"></a>';
+ htmlContent += '<div class="gadgetsVSpacer" style="width:8px;"></div>';
+ htmlContent += '<a class="gadgetsBtnNoTitle gadgetsBtnDuplicate" id="duplicateId_' + uuid + '" onclick="javascript:setUuidAction(\''+uuid+'\');duplicateUgc();return false;" href="#"></a>';
+ htmlContent += '<div class="gadgetsVSpacer" style="width:18px;"></div>';
+ htmlContent += '<a class="gadgetsBtnTitle gadgetsBtnDelete" id="deleteId_' + uuid + '" onclick="" href="#" name="lbOn" rel="popupConfirmDelete">Delete</a>';
+ htmlContent += '<div class="frame01Sep2"></div>';
+ return htmlContent;
+ }
+
+ function disableAllGadgetButtons(uuid)
+ {
+ disableStartStopGadgetButtons(uuid);
+ disableEditGadgetButtons(uuid);
+ }
+
+ function enableAllGadgetButtons(uuid)
+ {
+ enableStartStopGadgetButtons(uuid);
+ enableEditGadgetButtons(uuid);
+ }
+
+ function disableStartStopGadgetButtons(uuid)
+ {
+ document.getElementById("startId_" + uuid).className = "gadgetsBtnTitle gadgetsBtnStartDisable";
+ document.getElementById("stopId_" + uuid).className = "gadgetsBtnTitle gadgetsBtnStopDisable";
+ }
+
+ function enableStartStopGadgetButtons(uuid)
+ {
+ document.getElementById("startId_" + uuid).className = "gadgetsBtnTitle gadgetsBtnStartEnable";
+ document.getElementById("stopId_" + uuid).className = "gadgetsBtnTitle gadgetsBtnStopActivate";
+ }
+
+ function disableEditGadgetButtons(uuid)
+ {
+ document.getElementById("helpId_" + uuid).className = "gadgetsBtnNoTitle gadgetsBtnHelpDisable";
+ document.getElementById("configureId_" + uuid).className = "gadgetsBtnNoTitle gadgetsBtnConfigureDisable";
+ document.getElementById("duplicateId_" + uuid).className = "gadgetsBtnNoTitle gadgetsBtnDuplicateDisable";
+ document.getElementById("deleteId_" + uuid).className = "gadgetsBtnTitle gadgetsBtnDeleteDisable";
+ }
+
+ function enableEditGadgetButtons(uuid)
+ {
+ document.getElementById("helpId_" + uuid).className = "gadgetsBtnNoTitle gadgetsBtnHelp";
+ document.getElementById("configureId_" + uuid).className = "gadgetsBtnNoTitle gadgetsBtnConfigure";
+ document.getElementById("duplicateId_" + uuid).className = "gadgetsBtnNoTitle gadgetsBtnDuplicate";
+ document.getElementById("deleteId_" + uuid).className = "gadgetsBtnTitle gadgetsBtnDelete";
+ }
+
+ function startGadget(uuid)
+ {
+ }
+
+ function stopGadget(uuid)
+ {
+ }
+
+ function setUuidAction(uuid)
+ {
+ var idx = uuid.indexOf("_", 0) + 1;
+ lastUuidAction = uuid.slice(idx, uuid.length);
+ }
+
+ function duplicateUgc()
+ {
+ if (lastUuidAction == "0")
+ {
+ return;
+ }
+ var language = document.getElementById("language").value;
+ var args = {
+ "uuid" : lastUuidAction,
+ "language" : language
+ }
+ getRequest("/wi_devel/ugc_duplicate", args);
+ lastUuidAction = "0";
+ fillGadgetRows(knowedGadgetsFilter);
+ }
+
+ function deleteUgc()
+ {
+ if (lastUuidAction == "0")
+ {
+ return;
+ }
+ var args = {
+ "uuid" : lastUuidAction
+ }
+ getRequest("/ugc_server/remove_ugc", args);
+ lastUuidAction = "0";
+ fillGadgetRows(knowedGadgetsFilter);
+ }
+ ]]>
+ </script>
+ </head>
+
+ <body bgcolor="#EFEFEF" onLoad="initialization();">
+ <!-- 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>
+ <!-- MAIN DIV FRAME -->
+ <div style="position:absolute;
+ left:0px;
+ top:0px;">
+ <!-- NOTIFICATION VIEW -->
+ <div class="frame01TopSpace">
+ <div class="gadgetsVSpacer" style="width:35px;height:40px;"></div>
+ <xsl:element name="a">
+ <xsl:attribute name="class">gadgetsFilterRadio gadgetsFilterRadioActivate</xsl:attribute>
+ <xsl:attribute name="id">gadgetsFilterRadioAll</xsl:attribute>
+ <xsl:attribute name="onclick">javascript:fillGadgetRows('all');return false;</xsl:attribute>
+ <xsl:attribute name="href">#</xsl:attribute>All
+ </xsl:element>
+ <div class="gadgetsVSpacer" style="width:5px;height:40px;"></div>
+ <xsl:element name="a">
+ <xsl:attribute name="class">gadgetsFilterRadio gadgetsFilterRadioEnable</xsl:attribute>
+ <xsl:attribute name="id">gadgetsFilterRadioOnDemand</xsl:attribute>
+ <xsl:attribute name="onclick">javascript:fillGadgetRows('on_demand');return false;</xsl:attribute>
+ <xsl:attribute name="href">#</xsl:attribute>On demand
+ </xsl:element>
+ <div class="gadgetsVSpacer" style="width:5px;height:40px;"></div>
+ <xsl:element name="a">
+ <xsl:attribute name="class">gadgetsFilterRadio gadgetsFilterRadioEnable</xsl:attribute>
+ <xsl:attribute name="id">gadgetsFilterRadioAlerts</xsl:attribute>
+ <xsl:attribute name="onclick">javascript:fillGadgetRows('alerts');return false;</xsl:attribute>
+ <xsl:attribute name="href">#</xsl:attribute>Alerts
+ </xsl:element>
+ </div>
+ <div class="frame01Middle" style="height:465px;">
+ <div class="gadgetsListScrollbox" id="gadgetsListScrollbox"></div>
+ </div>
+ <div class="frame01Bottom"></div>
+ </div>
+ <!-- POPUP CONFIRM DELETE -->
+ <div id="popupConfirmDelete" class="popup01Box" onfocus="setUuidAction(arguments[0]);">
+ <div class="popupFrame01Top"></div>
+ <div class="popupFrame01Middle">
+ <span class="popup01Message">This action will delete this gadget. Continue ?</span>
+ <xsl:element name="a">
+ <xsl:attribute name="class">popupBtn</xsl:attribute>
+ <xsl:attribute name="name">lbOff</xsl:attribute>
+ <xsl:attribute name="rel">deactivate</xsl:attribute>
+ <xsl:attribute name="onclick">javascript:deleteUgc();return false;</xsl:attribute>
+ <xsl:attribute name="href">#</xsl:attribute>Yes
+ </xsl:element>
+ <xsl:element name="a">
+ <xsl:attribute name="class">popupBtn</xsl:attribute>
+ <xsl:attribute name="name">lbOff</xsl:attribute>
+ <xsl:attribute name="rel">deactivate</xsl:attribute>
+ <xsl:attribute name="href">#</xsl:attribute>No
+ </xsl:element>
+ </div>
+ <div class="popupFrame01Bottom"></div>
+ </div>
+ <!-- POPUP NOT YET IMPLEMENTED -->
+ <div id="popupNotYetImplemented" class="popup01Box" onfocus="return false;">
+ <div class="popupFrame01Top"></div>
+ <div class="popupFrame01Middle">
+ <span class="popup01Message" style="width:409px;">Not yet implemented</span>
+ <xsl:element name="a">
+ <xsl:attribute name="class">popupBtn</xsl:attribute>
+ <xsl:attribute name="name">lbOff</xsl:attribute>
+ <xsl:attribute name="rel">deactivate</xsl:attribute>
+ <xsl:attribute name="href">#</xsl:attribute>Close
+ </xsl:element>
+ </div>
+ <div class="popupFrame01Bottom"></div>
+ </div>
+ </body>
+</html>
+</xsl:template>
+</xsl:stylesheet>
Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/index.xsl
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/index.xsl 2009-06-26 12:33:37 UTC (rev 4909)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/index.xsl 2009-06-26 13:47:52 UTC (rev 4910)
@@ -32,7 +32,7 @@
else if (menu == "gadgets")
{
menuCenter1.className = "menuCenterActivate";
- frameUrl = "/wi_user_01/gadgets?";
+ frameUrl = "/wi_user_01/gadgets?uuid=NULL";
}
else if (menu == "attitunes")
{
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-26 12:33:37 UTC (rev 4909)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/livewithtux.xsl 2009-06-26 13:47:52 UTC (rev 4910)
@@ -188,6 +188,7 @@
function initialization()
{
setpng(document.getElementById('thumbnailBarTooltip'));
+ updateCurrentAlertGadget("0", "0", "0");
updateStates();
}
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-26 12:33:37 UTC (rev 4909)
+++ software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py 2009-06-26 13:47:52 UTC (rev 4910)
@@ -461,6 +461,55 @@
fillByIndex(3, 7)
self.__onDemandDictForThumbnailBarMutex.release()
+ def getGadgetsDictOnDemand(self):
+ """
+ """
+ result = {}
+ count = 0
+ for ugcObj in resourceUgcServer.getUgcContainer().getUgcs():
+ if ugcObj.getDescription().onDemandIsActivated() == 'true':
+ result["gadget_%d_name" % count] = ugcObj.getDescription().getName()
+ result["gadget_%d_uuid" % count] = ugcObj.getDescription().getUuid()
+ result["gadget_%d_icon" % count] = "/%s/icon.png" % ugcObj.getParentGadget().getDescription().getUuid()
+ result["gadget_%d_ondemand" % count] = ugcObj.getParentGadget().getDescription().onDemandIsAble()
+ count += 1
+ result['count'] = count
+ return result
+
+ def getGadgetsDictAll(self):
+ """
+ """
+ result = {}
+ count = 0
+ for ugcObj in resourceUgcServer.getUgcContainer().getUgcs():
+ result["gadget_%d_name" % count] = ugcObj.getDescription().getName()
+ result["gadget_%d_uuid" % count] = ugcObj.getDescription().getUuid()
+ result["gadget_%d_icon" % count] = "/%s/icon.png" % ugcObj.getParentGadget().getDescription().getUuid()
+ result["gadget_%d_ondemand" % count] = ugcObj.getParentGadget().getDescription().onDemandIsAble()
+ count += 1
+ result['count'] = count
+ return result
+
+ def getGadgetsDictAlerts(self):
+ """
+ """
+ result = {}
+ count = 0
+ for ugcObj in resourceUgcServer.getUgcContainer().getUgcs():
+ taskActive = False
+ for task in ugcObj.getTasks():
+ if task.isActivated():
+ taskActive = True
+ break
+ if taskActive:
+ result["gadget_%d_name" % count] = ugcObj.getDescription().getName()
+ result["gadget_%d_uuid" % count] = ugcObj.getDescription().getUuid()
+ result["gadget_%d_icon" % count] = "/%s/icon.png" % ugcObj.getParentGadget().getDescription().getUuid()
+ result["gadget_%d_ondemand" % count] = ugcObj.getParentGadget().getDescription().onDemandIsAble()
+ count += 1
+ result['count'] = count
+ return result
+
def getOnDemandDictForThumbnailBar(self):
"""
"""
@@ -1259,3 +1308,35 @@
# Register the service into the resource
resourceRobotContentInteractions.addService(TDSServiceRobotContentInteractionsStartStopGadget)
+
+# ------------------------------------------------------------------------------
+# Declaration of the service "get_gadgets_data".
+# ------------------------------------------------------------------------------
+class TDSServiceRobotContentInteractionsGetGadgetsData(TDSService):
+
+ def configure(self):
+ self.parametersDict = {
+ 'filter' : 'string',
+ }
+ self.minimalUserLevel = TDS_CLIENT_LEVEL_ANONYMOUS
+ self.exclusiveExecution = True
+ self.name = "get_gadgets_data"
+ self.comment = "Get gadgets data."
+
+ def execute(self, id, parameters):
+ headersStruct = self.getDefaultHeadersStruct()
+ contentStruct = self.getDefaultContentStruct()
+ filter = parameters['filter']
+ if filter == 'on_demand':
+ contentStruct['root']['data'] = resourceRobotContentInteractions.getPguContextsManager().getGadgetsDictOnDemand()
+ elif filter == 'all':
+ contentStruct['root']['data'] = resourceRobotContentInteractions.getPguContextsManager().getGadgetsDictAll()
+ elif filter == 'alerts':
+ contentStruct['root']['data'] = resourceRobotContentInteractions.getPguContextsManager().getGadgetsDictAlerts()
+ else:
+ pass
+ contentStruct['root']['result'] = getStrError(E_TDREST_SUCCESS)
+ return headersStruct, contentStruct
+
+# Register the service into the resource
+resourceRobotContentInteractions.addService(TDSServiceRobotContentInteractionsGetGadgetsData)
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-26 12:33:37 UTC (rev 4909)
+++ software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py 2009-06-26 13:47:52 UTC (rev 4910)
@@ -146,6 +146,38 @@
resourceWIUser01.addService(TDSServiceWIUser01LiveWithTux)
# ------------------------------------------------------------------------------
+# Declaration of the service "gadgets".
+# ------------------------------------------------------------------------------
+class TDSServiceWIUser01Gadgets(TDSService):
+
+ def configure(self):
+ self.parametersDict = {
+ 'language' : 'string',
+ 'skin' : 'string',
+ }
+ self.minimalUserLevel = TDS_CLIENT_LEVEL_ANONYMOUS
+ self.exclusiveExecution = False
+ self.name = "gadgets"
+ self.comment = "Show the gadgets page."
+
+ def execute(self, id, parameters):
+ headersStruct = self.getDefaultHeadersStruct()
+ contentStruct = self.getDefaultContentStruct()
+ contentStruct['root']['result'] = getStrError(E_TDREST_SUCCESS)
+ language = parameters['language']
+ skin = ...
[truncated message content] |
|
From: jerome <c2m...@c2...> - 2009-06-26 13:26:25
|
Author: jerome
Date: 2009-06-26 14:33:37 +0200 (Fri, 26 Jun 2009)
New Revision: 4909
Modified:
software_suite_v3/software/plugin/plugin-facebook/trunk/plugin-facebook/src/FacebookPlugin.java
Log:
* Fixed a bug : 'Nothing news on your account was always sent'.
Modified: software_suite_v3/software/plugin/plugin-facebook/trunk/plugin-facebook/src/FacebookPlugin.java
===================================================================
--- software_suite_v3/software/plugin/plugin-facebook/trunk/plugin-facebook/src/FacebookPlugin.java 2009-06-26 10:46:00 UTC (rev 4908)
+++ software_suite_v3/software/plugin/plugin-facebook/trunk/plugin-facebook/src/FacebookPlugin.java 2009-06-26 12:33:37 UTC (rev 4909)
@@ -190,6 +190,7 @@
protected void start() throws Throwable
{
boolean throwNotif = false;
+ boolean news = false;
if(getCommand().equals("check"))
{
@@ -212,6 +213,7 @@
{
if(functions.getEmailNotifications().intValue() > 0)
{
+ news = true;
if(this.check && (!throwNotif))
{
throwNotif = true;
@@ -234,6 +236,7 @@
{
if(functions.getFriendRequestsCount().intValue() > 0)
{
+ news = true;
if(this.check && (!throwNotif))
{
throwNotif = true;
@@ -264,6 +267,7 @@
//Get group invites notifications.
if(this.configuration().showGroupsInvites)
{
+ news = true;
if(functions.getGroupsInvitesCount().intValue() > 0)
{
if(this.check && (!throwNotif))
@@ -298,6 +302,7 @@
{
if(functions.getEventsInvitesCount().intValue() > 0)
{
+ news = true;
if(this.check && (!throwNotif))
{
throwNotif = true;
@@ -329,6 +334,7 @@
{
if(functions.getPokesCount().intValue() > 0)
{
+ news = true;
if(this.check && (!throwNotif))
{
throwNotif = true;
@@ -350,7 +356,7 @@
{
this.throwResult(false);
}
- else if(!this.check)
+ else if((!this.check) && (!news))
{
this.throwMessage("Nothing new on your account");
}
|
|
From: jerome <c2m...@c2...> - 2009-06-26 10:46:10
|
Author: jerome Date: 2009-06-26 12:46:00 +0200 (Fri, 26 Jun 2009) New Revision: 4908 Added: software_suite_v3/software/plugin/plugin-WMP/trunk/resources/attitunes/ software_suite_v3/software/plugin/plugin-email/trunk/plugin-email/resources/attitunes/ software_suite_v3/software/plugin/plugin-facebook/trunk/plugin-facebook/resources/attitunes/ software_suite_v3/software/plugin/plugin-gmail/trunk/plugin-gmail/resources/attitunes/ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/attitunes/ software_suite_v3/software/plugin/plugin-system/trunk/plugin-system/resources/attitunes/ software_suite_v3/software/plugin/plugin-weather/trunk/plugin-weather/resources/attitunes/ Log: * Added 'attitunes' directories for all new plugins. |
Author: jerome Date: 2009-06-26 12:15:32 +0200 (Fri, 26 Jun 2009) New Revision: 4907 Added: software_suite_v3/software/plugin/plugin-programsTv/ software_suite_v3/software/plugin/plugin-programsTv/branches/ software_suite_v3/software/plugin/plugin-programsTv/tags/ software_suite_v3/software/plugin/plugin-programsTv/trunk/ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/pom.xml software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/en.po software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/en.wiki software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/es.po software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/es.wiki software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/fr.po software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/fr.wiki software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/help.wiki software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/nl.po software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/nl.wiki software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/plugin.png software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/plugin.pot software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/plugin.xml software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/HTMLUtils.java software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/Program.java software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/ProgramLoadListener.java software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/Configuration.java software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/PluginBeDu.java software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/PluginBeFr.java software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/PluginEs.java software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/PluginFr.java software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/PluginGe.java software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/PluginNl.java software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/PluginProgramTV.java software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/PluginStart.java software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/PluginUk.java software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/programs/ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/programs/SimplePrograms.java Log: * Added plugin-programsTv. Added: software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/pom.xml =================================================================== --- software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/pom.xml (rev 0) +++ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/pom.xml 2009-06-26 10:15:32 UTC (rev 4907) @@ -0,0 +1,116 @@ +<project> + <!--General project informations--> + <modelVersion>4.0.0</modelVersion> + <groupId>com.kysoh</groupId> + <artifactId>plugin-programsTv</artifactId> + <packaging>jar</packaging> + <version>2.0</version> + <name>ProgramsTv plugin for Tux Droid</name> + <url>http://www.kysoh.com</url> + + <!--Dependency list--> + <dependencies> + <dependency> + <groupId>com.kysoh</groupId> + <artifactId>tuxdroid-plugin-java-kit</artifactId> + <version>0.0.3</version> + </dependency> + </dependencies> + + <!--Repository list--> + <repositories> + <repository> + <id>kysoh</id> + <name>Kysoh Repository</name> + <layout>default</layout> + <url>http://ftp.kysoh.com/maven2</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + </repositories> + + <!--Build process--> + <build> + <sourceDirectory>src</sourceDirectory> + <plugins> + + <!--This section copy the dependencies into ./libraries--> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>copy-dependencies</id> + <phase>package</phase> + <goals> + <goal>copy-dependencies</goal> + </goals> + <configuration> + <outputDirectory>./libraries</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> + + <!--This plugin run small ant scripts to pack and clean the gadget --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <version>1.3</version> + <executions> + + <!--This section create the .tgf file during the package lifecycle--> + <execution> + <phase>package</phase> + <id>package</id> + <configuration> + <tasks> + <mkdir dir="./libraries"/> + <copy file="${project.build.directory}/${project.artifactId}-${project.version}.jar" + todir="./libraries" /> + <zip destfile="./${project.artifactId}.scp"> + <zipfileset dir="." includes="resources/*" /> + <zipfileset dir="." includes="resources/attitunes/*" /> + <zipfileset dir="." includes="libraries/*" > + <exclude name="libraries/tuxdroid-plugin-java-kit*" /> + <exclude name="libraries/karmalab-commons*" /> + <exclude name="libraries/tuxdroid-java-api*" /> + </zipfileset> + <zipfileset dir="." includes="executables/*" /> + </zip> + </tasks> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + + <!--This section clean the ./libraries and the SCP file during the 'clean' lifecycle--> + <execution> + <phase>clean</phase> + <configuration> + <tasks> + <delete dir="./libraries"/> + <delete file="./${project.artifactId}.scp"/> + </tasks> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + + <!--This plugin compile the project--> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.6</source> + <target>1.6</target> + </configuration> + </plugin> + </plugins> + </build> +</project> Added: software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/en.po =================================================================== --- software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/en.po (rev 0) +++ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/en.po 2009-06-26 10:15:32 UTC (rev 4907) @@ -0,0 +1,103 @@ + +msgid "" +msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-30 09:25+0200\nPO-Revision-Date: 2009-04-30 09:25+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: en\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n" + +msgid "Belgian Dutch programs" +msgstr "Belgian Dutch programs" + +msgid "This gadget reads your tv programs in Belgium" +msgstr "This gadget reads your tv programs in Belgium" + +msgid "Belgian French Programs" +msgstr "Belgian French Programs" + +msgid "German programs" +msgstr "German programs" + +msgid "This plugin reads your German tv programs" +msgstr "This plugin reads your German tv programs" + +msgid "Netherland programs" +msgstr "Netherland programs" + +msgid "This plugin reads your tv programs in Netherlands" +msgstr "This plugin reads your tv programs in Netherlands" + +msgid "Spanish programs" +msgstr "Spanish programs" + +msgid "This plugin reads your Spanish tv programs" +msgstr "This plugin reads your Spanish tv programs" + +msgid "United Kingdom programs" +msgstr "United Kingdom programs" + +msgid "This plugin reads your tv programs in United Kingdom" +msgstr "This plugin reads your tv programs in United Kingdom" + +msgid "French programs" +msgstr "French programs" + +msgid "This plugin reads your French tv programs" +msgstr "This plugin reads your French tv programs" + +msgid "Select your channel" +msgstr "Select your channel" + +msgid "Give program description" +msgstr "Give program description" + +msgid "Morning" +msgstr "Morning" + +msgid "Afternoon" +msgstr "Afternoon" + +msgid "Evening" +msgstr "Evening" + +msgid "Give currently playing program" +msgstr "Give currently playing program" + +msgid "Give the tv program" +msgstr "Give the tv program" + +msgid "No TV program for now" +msgstr "No TV program for now" + +msgid "Now playing on {0}. {1}" +msgstr "Now playing on {0}. {1}" + +msgid "Next playing {0} at {1}" +msgstr "Next playing {0} at {1}" + +msgid "On {0}" +msgstr "On {0}" + +msgid "Your morning TV Programs" +msgstr "Your morning TV Programs" + +msgid "{0}, {1}" +msgstr "{0}, {1}" + +msgid "{0}, {1}, {2}" +msgstr "{0}, {1}, {2}" + +msgid "Your afternoon TV Programs" +msgstr "Your afternoon TV Programs" + +msgid "Your evening TV Programs" +msgstr "Your evening TV Programs" + +msgid "Please re-configure your gadget to get a TV program list." +msgstr "Please re-configure your gadget to get a TV program list." + +msgid "I didn't find any TV programs according to your selected time frame." +msgstr "I didn't find any TV programs according to your selected time frame." + +msgid "Select time frame" +msgstr "Select time frame" + +msgid "Error while loading the TV program" +msgstr "Error while loading the TV program" + Added: software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/en.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/en.wiki (rev 0) +++ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/en.wiki 2009-06-26 10:15:32 UTC (rev 4907) @@ -0,0 +1,2 @@ +== Synopsis == +This plugin lets Tux Droid read the TV programs on your favorite channel. \ No newline at end of file Added: software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/es.po =================================================================== --- software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/es.po (rev 0) +++ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/es.po 2009-06-26 10:15:32 UTC (rev 4907) @@ -0,0 +1,103 @@ + +msgid "" +msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-30 09:25+0200\nPO-Revision-Date: 2009-04-30 09:27+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: es\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n" + +msgid "Belgian Dutch programs" +msgstr "Programas en Belga Aleman" + +msgid "This plugin reads your tv programs in Belgium" +msgstr "Este plugin lee sus programa de TV en Belgica." + +msgid "Belgian French Programs" +msgstr "Programas en Belga Frances" + +msgid "German programs" +msgstr "Programas en Aleman" + +msgid "This plugin reads your German tv programs" +msgstr "Este plugin lee sus programa de TV en Aleman." + +msgid "Netherland programs" +msgstr "Programas en Holandes" + +msgid "This plugin reads your tv programs in Netherlands" +msgstr "Este plugin lee sus programa de TV en Holanda." + +msgid "Spanish programs" +msgstr "Programas en Español" + +msgid "This plugin reads your Spanish tv programs" +msgstr "Este plugin lee sus programa de TV en España." + +msgid "United Kingdom programs" +msgstr "Programas en Reino Unido" + +msgid "This plugin reads your tv programs in United Kingdom" +msgstr "Este plugin lee sus programas de TV en Reino Unido" + +msgid "French programs" +msgstr "Programas en Frances" + +msgid "This plugin reads your French tv programs" +msgstr "Este plugin lee sus programas de TV en Frances." + +msgid "Select your channel" +msgstr "Seleccione su canal" + +msgid "Give program description" +msgstr "Dar una descripción del programa" + +msgid "Morning" +msgstr "Mañana" + +msgid "Afternoon" +msgstr "Tarde" + +msgid "Evening" +msgstr "Noche" + +msgid "Give currently playing program" +msgstr "Dar el programa en curso" + +msgid "Give the tv program" +msgstr "Dar la programación de TV" + +msgid "No TV program for now" +msgstr "No dar la programación de TV por ahora" + +msgid "Now playing on {0}. {1}" +msgstr "Dar programa actual de {0} a {1}" + +msgid "Next playing {0} at {1}" +msgstr "Próximo programa {0} a {1}" + +msgid "On {0}" +msgstr "A las {0}" + +msgid "Your morning TV Programs" +msgstr "Sus programas de TV en la mañana" + +msgid "{0}, {1}" +msgstr "de {0} a {1}" + +msgid "{0}, {1}, {2}" +msgstr "{0},{1},{2}" + +msgid "Your afternoon TV Programs" +msgstr "Sus programas de TV en la tarde" + +msgid "Your evening TV Programs" +msgstr "Sus programas de TV en la noche" + +msgid "Please re-configure your gadget to get a TV program list." +msgstr "Por favor reconfigure su gadget para obtener la programacion de TV." + +msgid "I didn't find any TV programs according to your selected time frame." +msgstr "No se puede encontrar ningún programa dentro de la franja horaria seleccionada." + +msgid "Select time frame" +msgstr "Seleccione una franja horaria" + +msgid "Error while loading the TV program" +msgstr "Error al cargar el programa de TV" + Added: software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/es.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/es.wiki (rev 0) +++ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/es.wiki 2009-06-26 10:15:32 UTC (rev 4907) @@ -0,0 +1,2 @@ +== Synopsis == +Este gadget hará que Tux Droid lea la programación televisiva de su canal de TV favorito \ No newline at end of file Added: software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/fr.po =================================================================== --- software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/fr.po (rev 0) +++ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/fr.po 2009-06-26 10:15:32 UTC (rev 4907) @@ -0,0 +1,103 @@ + +msgid "" +msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-30 09:25+0200\nPO-Revision-Date: 2009-04-30 09:26+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: fr\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n > 1);\nX-Generator: Pootle 1.2.1\n" + +msgid "Belgian Dutch programs" +msgstr "Programmes Flamands" + +msgid "This plugin reads your tv programs in Belgium" +msgstr "Ce plugin vous donne votre programme de télévision en Belgique" + +msgid "Belgian French Programs" +msgstr "Programmes francophones" + +msgid "German programs" +msgstr "Programmes Allemands" + +msgid "This plugin reads your German tv programs" +msgstr "Ce plugin vous donne votre programme de télévision en Allemagne" + +msgid "Netherland programs" +msgstr "Programmes Néerlandais" + +msgid "This plugin reads your tv programs in Netherlands" +msgstr "Ce plugin vous donne votre programme de télévision aux Pays-Bas" + +msgid "Spanish programs" +msgstr "Programmes Espagnols" + +msgid "This plugin reads your Spanish tv programs" +msgstr "Ce plugin vous donne votre programme de télévision en Espagne" + +msgid "United Kingdom programs" +msgstr "Programmes Anglais" + +msgid "This plugin reads your tv programs in United Kingdom" +msgstr "Ce plugin vous donne votre programme de télévision en Angleterre" + +msgid "French programs" +msgstr "Programmes Français" + +msgid "This plugin reads your French tv programs" +msgstr "Ce plugin vous donne votre programme de télévision en Françe" + +msgid "Select your channel" +msgstr "Choisissez votre chaîne" + +msgid "Give program description" +msgstr "Donner la description" + +msgid "Morning" +msgstr "Matin" + +msgid "Afternoon" +msgstr "Après-midi" + +msgid "Evening" +msgstr "Soirée" + +msgid "Give currently playing program" +msgstr "Donner le programme en cours" + +msgid "Give the tv program" +msgstr "Donner le programme TV" + +msgid "No TV program for now" +msgstr "Aucun programme de télévision trouvé pour le moment" + +msgid "Now playing on {0}. {1}" +msgstr "Actuellement sur {0}. {1}" + +msgid "Next playing {0} at {1}" +msgstr "Ensuite {0} à {1}" + +msgid "On {0}" +msgstr "Sur {0}" + +msgid "Your morning TV Programs" +msgstr "Votre programme télé du matin" + +msgid "{0}, {1}" +msgstr "{0}, {1}" + +msgid "{0}, {1}, {2}" +msgstr "{0}, {1}, {2}" + +msgid "Your afternoon TV Programs" +msgstr "Votre programme télé pour l'après-midi" + +msgid "Your evening TV Programs" +msgstr "Le programme télé pour votre soirée" + +msgid "Please re-configure your gadget to get a TV program list." +msgstr "S'il vous plait, reconfigurez votre gadget pour obtenir une liste de programmes." + +msgid "I didn't find any TV programs according to your selected time frame." +msgstr "Je n'ai pas trouvé de programme télévision pour la tranche horaire sélectionnée." + +msgid "Select time frame" +msgstr "Choisissez une tranche horaire" + +msgid "Error while loading the TV program" +msgstr "Erreur lors du chargement du programme télé" + Added: software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/fr.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/fr.wiki (rev 0) +++ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/fr.wiki 2009-06-26 10:15:32 UTC (rev 4907) @@ -0,0 +1,2 @@ +== Synopsis == +Ce gadget laisse Tux Droid lire votre programme de télévision pour votre chaîne favorite. \ No newline at end of file Added: software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/help.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/help.wiki (rev 0) +++ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/help.wiki 2009-06-26 10:15:32 UTC (rev 4907) @@ -0,0 +1,2 @@ +== Synopsis == +This plugin lets Tux Droid read the TV programs on your favorite channel. Added: software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/nl.po =================================================================== --- software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/nl.po (rev 0) +++ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/nl.po 2009-06-26 10:15:32 UTC (rev 4907) @@ -0,0 +1,103 @@ + +msgid "" +msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-30 09:25+0200\nPO-Revision-Date: 2009-04-30 09:30+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: nl\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n" + +msgid "Belgian Dutch programs" +msgstr "Vlaamse TV programma's" + +msgid "This plugin reads your tv programs in Belgium" +msgstr "Deze plugin zal de Belgische TV programma's voorlezen" + +msgid "Belgian French Programs" +msgstr "Waalse TV programma's" + +msgid "German programs" +msgstr "Duitse TV programma's" + +msgid "This plugin reads your German tv programs" +msgstr "Deze plugin zal de Duitse TV programma's voorlezen" + +msgid "Netherland programs" +msgstr "Nederlandse TV programma's" + +msgid "This plugin reads your tv programs in Netherlands" +msgstr "Deze plugin zal de Nederlandse TV programma's voorlezen" + +msgid "Spanish programs" +msgstr "Spaanse TV programma's" + +msgid "This plugin reads your Spanish tv programs" +msgstr "Deze plugin zal de Spaanse TV programma's voorlezen" + +msgid "United Kingdom programs" +msgstr "UK TV programma's" + +msgid "This plugin reads your tv programs in United Kingdom" +msgstr "Deze plugin zal de UK programma's voorlezen" + +msgid "French programs" +msgstr "Franse TV programma's" + +msgid "This plugin reads your French tv programs" +msgstr "Deze plugin zal de Franse TV programma's voorlezen" + +msgid "Select your channel" +msgstr "Selecteer jouw kanaal" + +msgid "Give program description" +msgstr "Geef programma beschrijving" + +msgid "Morning" +msgstr "Voormiddag" + +msgid "Afternoon" +msgstr "Namiddag" + +msgid "Evening" +msgstr "Avond" + +msgid "Give currently playing program" +msgstr "Geef programma dat nu aan het spelen is" + +msgid "Give the tv program" +msgstr "Geef het TV programma" + +msgid "No TV program for now" +msgstr "Op het ogenblik is er geen programma aan het spelen" + +msgid "Now playing on {0}. {1}" +msgstr "Nu aan het spelen op {0}. {1}" + +msgid "Next playing {0} at {1}" +msgstr "Gevolgd door {0} om {1}" + +msgid "On {0}" +msgstr "Op {0}" + +msgid "Your morning TV Programs" +msgstr "Jouw voormiddag TV programma's" + +msgid "{0}, {1}" +msgstr "{0}, {1}" + +msgid "{0}, {1}, {2}" +msgstr "{0}, {1}, {2}" + +msgid "Your afternoon TV Programs" +msgstr "Jouw namiddag TV programma's" + +msgid "Your evening TV Programs" +msgstr "Jouw avond TV programma's" + +msgid "Please re-configure your gadget to get a TV program list." +msgstr "Gelieve de gadget anders te configureren om een TV programma lijst te verkrijgen." + +msgid "I didn't find any TV programs according to your selected time frame." +msgstr "I kan geen TV programma's vinden voor de periode die je ingesteld hebt." + +msgid "Select time frame" +msgstr "Selecteer periode van de dag" + +msgid "Error while loading the TV program" +msgstr "Fout bij het laden van de TV-programma" + Added: software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/nl.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/nl.wiki (rev 0) +++ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/nl.wiki 2009-06-26 10:15:32 UTC (rev 4907) @@ -0,0 +1,3 @@ +== Synopsis == +Deze gadget zal Tux Droid jouw Tv programma's laten voorlezen van jouw favoriete kanaal. + \ No newline at end of file Added: software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/plugin.png =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/plugin.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/plugin.pot =================================================================== --- software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/plugin.pot (rev 0) +++ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/plugin.pot 2009-06-26 10:15:32 UTC (rev 4907) @@ -0,0 +1,122 @@ +msgid "Belgian Dutch programs" +msgstr "" + +msgid "This plugin reads your tv programs in Belgium" +msgstr "" + +msgid "Select a country" +msgstr"" + +msgid "Select a French channel" +msgstr "" + +msgid "Select your Belgian Dutch channel" +msgstr "" + +msgid "Select your Belgian French channel" +msgstr "" + +msgid "Select your Netherland channel" +msgstr "" + +msgid "Select your Spain channel" +msgstr "" + +msgid "Select a UK channel" +msgstr "" + +msgid "Select a German channel" +msgstr "" + +msgid "Belgian French Programs" +msgstr "" + +msgid "German programs" +msgstr "" + +msgid "This plugin reads your German tv programs" +msgstr "" + +msgid "Netherland programs" +msgstr "" + +msgid "This plugin reads your tv programs in Netherlands" +msgstr "" + +msgid "Spanish programs" +msgstr "" + +msgid "This plugin reads your Spanish tv programs" +msgstr "" + +msgid "United Kingdom programs" +msgstr "" + +msgid "This plugin reads your tv programs in United Kingdom" +msgstr "" + +msgid "French programs" +msgstr "" + +msgid "This plugin reads your French tv programs" +msgstr "" + +msgid "Select your channel" +msgstr "" + +msgid "Give program description" +msgstr "" + +msgid "Morning" +msgstr "" + +msgid "Afternoon" +msgstr "" + +msgid "Evening" +msgstr "" + +msgid "Give currently playing program" +msgstr "" + +msgid "Give the tv program" +msgstr "" + +msgid "No TV program for now" +msgstr "" + +msgid "Now playing on {0}. {1}" +msgstr "" + +msgid "Next playing {0} at {1}" +msgstr "" + +msgid "On {0}" +msgstr "" + +msgid "Your morning TV Programs" +msgstr "" + +msgid "{0}, {1}" +msgstr "" + +msgid "{0}, {1}, {2}" +msgstr "" + +msgid "Your afternoon TV Programs" +msgstr "" + +msgid "Your evening TV Programs" +msgstr "" + +msgid "Please re-configure your gadget to get a TV program list." +msgstr "" + +msgid "I didn't find any TV programs according to your selected time frame." +msgstr "" + +msgid "Select time frame" +msgstr "" + +msgid "Error while loading the TV program" +msgstr "" \ No newline at end of file Added: software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/plugin.xml =================================================================== --- software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/plugin.xml (rev 0) +++ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/resources/plugin.xml 2009-06-26 10:15:32 UTC (rev 4907) @@ -0,0 +1,103 @@ + +<plugin> + <interpreter + kind="java"> + <executable>com.kysoh.tvPrograms.plugin.PluginStart</executable> + </interpreter> + <description> + <name>Tv programs</name> + <ttsName>Tv programs</ttsName> + <description>This plugin reads your tv programs</description> + <author>Jérôme Conan</author> + <version>2.0</version> + <iconFile>resources/plugin.png</iconFile> + <executionMode>command</executionMode> + <uuid>69a8518b-dab7-44d5-819e-41aaf8ea380b</uuid> + <platform>all</platform> + </description> + <parameters> + <parameter + category="Options" + name="countr" + description="Select a country" + type="enum(France, Flandre, Wallonnie, Espana, Deutschland, Nederland, United Kingdom)" + defaultValue="France" /> + <parameter + category="Options" + name="frenchChannel" + description="Select a French channel" + type="enum(ARTE,Canal + France,EuroNews Fr.,France 2,France 3,La 5,M6,TF1,TV5, + CINE CINEMA CLASSIC,CINE CINEMA EMOTION,CINE CINEMA FAMIZ,CINE CINEMA FRISSON, + AB Channel 1,AB Moteurs,AB4,Action,Animaux,BFM TV,Canal J, + CINE CINEMA PREMIER,CINE CINEMA STAR,Cine Fx,Cine Polar,Direct 8,Disney Channel, + Encyclopedia,Escales,France 4,Gulli,ITV,LCI,Mangas,Mezzo,NRJ 12,NT1,RTL 9, + TF6,TMC,TPS STAR,Virgin 17,Voyage,W9)" + defaultValue="TF1" /> + <parameter + category="Options" + name="flandreChannel" + description="Select your Belgian Dutch channel" + type="enum(Vijf TV, Prime One, Prime Action, Prime Movies, Canvas, Fashion TV Prime Fezztival, + JIM,KANAALTWEE, Ketnet, MTV Netherland, Prime Sport, The Music Factory, Trace TV, Vitaya, VT4, VTM)" + defaultValue="Vijf TV" /> + <parameter + category="Options" + name="wallonnieChannel" + description="Select your Belgian French channel" + type="enum(AB 3, BE CINE 1, BE 1, BE 1 + 1h, BE Serie, BE SPORT 1, BE SPORT 2, Cartoon network, + Club RTL, Eurosport., Plug TV, La Une, La 2., RTL-TVI)" + defaultValue="AB 3" /> + <parameter + category="Options" + name="nederlandChannel" + description="Select your Netherland channel" + type="enum(EuroSport, Film1+1, V8, Nederland 1, Nederland 2, Nederland 3, + Net 5, RTL 5, RTL 7, RTL 4, SBS6, Sport1.1)" + defaultValue="RTL 5" /> + <parameter + category="Options" + name="espanaChannel" + description="Select your Spain channel" + type="enum(Antena 3, Canal 33, Canal 9, Canal Sur, Cuatro, ETB 1, ETB 2, La 2, La sexta, TeleCinco, + Tele Madrid, TV3 Spain, TVE International, TVE 1, TVG)" + defaultValue="Antena 3" /> + <parameter + category="Options" + name="ukChannel" + description="Select a UK channel" + type="enum(BBC Prime, BBC WORLD, BBC1, BBC2, Cartoons, ChatBox, CNN)" + defaultValue="BBC1" /> + <parameter + category="Options" + name="germanChannel" + description="Select a German channel" + type="enum(ARD, SW3, WDR, ZDF)" + defaultValue="ARD" /> + <parameter + category="Options" + name="tHour" + description="Select time frame" + type="enum(Morning, Afternoon, Evening)" + defaultValue="Evening" /> + <parameter + category="Options" + name="giveProgramDescription" + description="Give program description" + type="boolean" + defaultValue="false" /> + <parameter + category="Options" + name="giveNowPlaying" + description="Give currently playing program" + type="boolean" + defaultValue="true" /> + </parameters> + <commands> + <command + name="run" + description="Give the tv program" /> + </commands> + <tasks> + + </tasks> +</plugin> Added: software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/HTMLUtils.java =================================================================== --- software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/HTMLUtils.java (rev 0) +++ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/HTMLUtils.java 2009-06-26 10:15:32 UTC (rev 4907) @@ -0,0 +1,132 @@ +/* This file is part of "tuxdroid programs tv". + * Copyright 2009, kysoh + * Author : Conan Jerome + * eMail : jerome.conan AT kysoh.com + * + * "tuxdroid programs tv" is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * "tuxdroid programs tv" is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with "tuxdroid programs tv"; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + +package com.kysoh.tvPrograms; + +import java.io.BufferedInputStream; +import java.io.DataInputStream; +import java.net.HttpURLConnection; +import java.net.URL; + + +public class HTMLUtils { + + /** + * Remove all html text occurencies. + * @param s : the string to be parsed. + * @return + */ + public static String HtmlToString(String s) + { + + if(s.contains("�")) + { + s = s.replaceAll("�", "è"); + } + + + if(s.contains("?u")) + { + s = s.replaceAll("\\?u", "oeu"); + } + + + if(s.contains("&#")) + { + int i1 = s.indexOf("&#") + 2; + int i2 = s.indexOf(";", i1); + String html = ""; + String result = ""; + try + { + html = s.substring(i1, i2); + } + catch(StringIndexOutOfBoundsException e) + { + return s; + } + if(!html.equals( "146")) + { + try + { + int v = Integer.valueOf(html).intValue(); + result = String.valueOf((char)v); + s = s.replace("&#" + html + ";", result); + } + catch(NumberFormatException impossible) + { + ; + } + } + else + { + s = s.substring(0, i1 -2) + "'" + s.substring(i2 + 1); + } + + if(s.contains("&#")) + { + return HtmlToString(s); + } + } + return s; + } + + + + /** + * Get a page from an url. + * @param url : the web page url. + * @param channel : the channel page. + */ + @SuppressWarnings("deprecation") + public static String getPage(String url, String channel) + { + String inputLine; + DataInputStream dis; + String result = ""; + + try + { + /* create a new URL object */ + URL xml = new URL(String.format(url, channel.replace(" ", "%20"))); + + /* Open the connection */ + HttpURLConnection.setDefaultRequestProperty("User-Agent", "Mozilla/4.0 ( compatible ) "); + HttpURLConnection yc = (HttpURLConnection) xml.openConnection(); + yc.setRequestProperty ("User-Agent", "Mozilla/4.0 ( compatible ) "); + + dis = new DataInputStream(new BufferedInputStream(yc.getInputStream())); + + while((inputLine = dis.readLine()) != null) + { + result += inputLine; + } + + } + catch (Exception e) + { + //Handle connections errors too. + return null; + } + + return result; + } +} Added: software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/Program.java =================================================================== --- software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/Program.java (rev 0) +++ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/Program.java 2009-06-26 10:15:32 UTC (rev 4907) @@ -0,0 +1,151 @@ +/* This file is part of "tuxdroid programs tv". + * Copyright 2009, kysoh + * Author : Conan Jerome + * eMail : jerome.conan AT kysoh.com + * + * "tuxdroid programs tv" is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * "tuxdroid programs tv" is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with "tuxdroid programs tv"; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + +package com.kysoh.tvPrograms; + +public class Program { + + private String startTime; + private String title; + private String description; + private String channel; + + + /** + * Class constructor. + * @param title : The program title. + * @param startTime : The program start time. + * @param endTime : The program end time. + * @param description : The program description. + * @param channel : The program channel. + */ + public Program(String title, String startTime, String description, String channel) throws Exception + { + if((title == null) || (title == "")) + { + throw new Exception("Program title cannot be empty: " + title); + } + + this.title = title; + this.startTime = startTime; + this.description = description; + this.channel = channel; + + //Checking description that is not always referenced by all websites. + if((this.description == null) || this.description.contains(" ") || this.description.equals("") || this.description.equals(" ")) + { + this.description = "UNDEFINED"; + } + + this.description = this.description.replace("&", ""); + } + + + + /** + * Set the prgram title. + * @param aTitile + */ + public void setTitle(String aTitle) + { + this.title = aTitle; + } + + + /** + * Return the program title. + * @return + */ + public String getTitle() + { + return this.title; + } + + + /** + * Set the program description. + * @param aDescription + */ + public void setDescription(String aDescription) + { + this.description = aDescription; + } + + + /** + * Return the description. + * @return + */ + public String getDescription() + { + return this.description; + } + + + /** + * Return true if this program has a description. + * @return + */ + public boolean hasDescription() + { + return this.description != "UNDEFINED"; + } + + + /** + * Set the progam channel. + * @param aChannel + */ + public void setChannel(String aChannel) + { + this.channel = aChannel; + } + + + /** + * Return the program channel. + * @return + */ + public String getChannel() + { + return this.channel; + } + + + /** + * Set the start time. + * @param aStartTime + */ + public void setStartTime(String aStartTime) + { + this.startTime = aStartTime; + } + + + /** + * Return the program start time. + * @return + */ + public String getStartTime() + { + return this.startTime; + } +} Added: software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/ProgramLoadListener.java =================================================================== --- software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/ProgramLoadListener.java (rev 0) +++ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/ProgramLoadListener.java 2009-06-26 10:15:32 UTC (rev 4907) @@ -0,0 +1,32 @@ +/* This file is part of "tuxdroid programs tv". + * Copyright 2009, kysoh + * Author : Conan Jerome + * eMail : jerome.conan AT kysoh.com + * + * "tuxdroid programs tv" is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * "tuxdroid programs tv" is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with "tuxdroid programs tv"; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + +package com.kysoh.tvPrograms; + +import java.util.Vector; + +import com.kysoh.tvPrograms.Program; + +public interface ProgramLoadListener { + + public void loaded(Vector<Program> completeProgram); + public void loadError(String aUrl); +} Added: software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/Configuration.java =================================================================== --- software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/Configuration.java (rev 0) +++ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/Configuration.java 2009-06-26 10:15:32 UTC (rev 4907) @@ -0,0 +1,353 @@ +/* This file is part of "tuxdroid programs tv". + * Copyright 2009, kysoh + * Author : Conan Jerome + * eMail : jerome.conan AT kysoh.com + * + * "tuxdroid programs tv" is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * "tuxdroid programs tv" is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with "tuxdroid programs tv"; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + +package com.kysoh.tvPrograms.plugin; + +import com.kysoh.tuxdroid.plugin.framework.plugin.SimplePluginConfiguration; + +public class Configuration extends SimplePluginConfiguration{ + + private String countr = ""; + private String channel = "Mezzo"; + + private String frenchChannel = ""; + private String flandreChannel = ""; + private String wallonnieChannel = ""; + private String nederlandChannel = ""; + private String espanaChannel = ""; + private String ukChannel = ""; + private String germanChannel = ""; + + private boolean giveProgramDescription = false; + private boolean giveMorning = false; + private boolean giveAfternoon = false; + private boolean giveEvening = false; + private boolean giveNowPlaying = false; + + private String tHour = "Morning"; + + /** + * Sets the channel. + * @param aChannel + */ + public void setGermanChannel(String aChannel) + { + this.germanChannel = aChannel; + } + + + /** + * Return the channel. + * @return + */ + public String getGermanChannel() + { + return this.germanChannel; + } + + /** + * Sets the channel. + * @param aChannel + */ + public void setUkChannel(String aChannel) + { + this.ukChannel = aChannel; + } + + + /** + * Return the channel. + * @return + */ + public String getUkChannel() + { + return this.ukChannel; + } + + + /** + * Sets the channel. + * @param aChannel + */ + public void setSpaniaChannel(String aChannel) + { + this.espanaChannel = aChannel; + } + + + /** + * Return the channel. + * @return + */ + public String getSpaniaChannel() + { + return this.espanaChannel; + } + + /** + * Sets the channel. + * @param aChannel + */ + public void setNederlandChannel(String aChannel) + { + this.nederlandChannel = aChannel; + } + + + /** + * Return the channel. + * @return + */ + public String getNederlandChannel() + { + return this.nederlandChannel; + } + + + /** + * Sets the channel. + * @param aChannel + */ + public void setWallonnieChannel(String aChannel) + { + this.wallonnieChannel = aChannel; + } + + + /** + * Return the channel. + * @return + */ + public String getWallonnieChannel() + { + return this.wallonnieChannel; + } + + + /** + * Sets the channel. + * @param aChannel + */ + public void setFlandreChannel(String aChannel) + { + this.flandreChannel = aChannel; + } + + + /** + * Return the channel. + * @return + */ + public String getFlandreChannel() + { + return this.flandreChannel; + } + + /** + * Sets the channel. + * @param aChannel + */ + public void setFrenchChannel(String aChannel) + { + this.frenchChannel = aChannel; + } + + + /** + * Return the channel. + * @return + */ + public String getFrenchChannel() + { + return this.frenchChannel; + } + + + /** + * Return the country. + * @return + */ + public String getCountr() + { + return this.countr; + } + + + /** + * Sets country parameter value. + * @return + */ + public void setCountr(String aCountry) + { + this.countr = aCountry; + } + + /** + * Return the channel. + * @return + */ + public String getChannel() + { + return this.channel; + } + + + /** + * Sets 'morning' 'evening' or 'afternoon' + * @return + */ + public String getTHour() + { + return this.tHour; + } + + /** + * Sets the parameter value. + * @param aTHour + */ + public void setTHour(String aTHour) + { + this.tHour = aTHour; + + if(this.tHour.equalsIgnoreCase("morning")) + { + this.setGiveMorning(true); + } + else if(this.tHour.equalsIgnoreCase("afternoon")) + { + this.setGiveAfternoon(true); + } + else if(this.tHour.equalsIgnoreCase("evening")) + { + this.setGiveEvening(true); + } + } + + + /** + * Sets the channel. + * @param aChannel + */ + public void setChannel(String aChannel) + { + this.channel = aChannel; + } + + + /** + * Return true if user wants to hear the programs description. + * @return + */ + public boolean getGiveProgramDescription() + { + return this.giveProgramDescription; + } + + + /** + * Sets to give program desciption parameter. + * @param give + */ + public void setGiveProgramDescription(boolean give) + { + this.giveProgramDescription = give; + } + + + /** + * Sets the 'now playing' parameter. + * @param aNowPlaying + */ + public void setNowPlaying(boolean aNowPlaying) + { + this.giveNowPlaying = aNowPlaying; + } + + + /** + * Return true if user wants to hear the current played program. + * @return + */ + public boolean getGiveNowPlaying() + { + return this.giveNowPlaying; + } + + + /** + * Set the 'give morning' parameter. + * @param aGiveMorning + */ + public void setGiveMorning(boolean aGiveMorning) + { + this.giveMorning = aGiveMorning; + } + + + /** + * Return true if user wants to hear the morning program. + * @return + */ + public boolean getGiveMorning() + { + return this.giveMorning; + } + + + /** + * Return true if user wants to hear the afternoon program. + * @return + */ + public boolean getGiveAfternoon() + { + return this.giveAfternoon; + } + + + /** + * Set the afternnon parameter. + * @param aGiveAfternoon + */ + public void setGiveAfternoon(boolean aGiveAfternoon) + { + this.giveAfternoon = aGiveAfternoon; + } + + + /** + * Return true if user wants to hear the evening prgrams. + * @return + */ + public boolean getGiveEvening() + { + return this.giveEvening; + } + + + /** + * Set the 'give evening' parameter. + * @param aGiveEvening + */ + public void setGiveEvening(boolean aGiveEvening) + { + this.giveEvening = aGiveEvening; + } +} Added: software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/PluginBeDu.java =================================================================== --- software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/PluginBeDu.java (rev 0) +++ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/PluginBeDu.java 2009-06-26 10:15:32 UTC (rev 4907) @@ -0,0 +1,112 @@ +/* This file is part of "tuxdroid programs tv". + * Copyright 2009, kysoh + * Author : Conan Jerome + * eMail : jerome.conan AT kysoh.com + * + * "tuxdroid programs tv" is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * "tuxdroid programs tv" is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with "tuxdroid programs tv"; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + +package com.kysoh.tvPrograms.plugin; + +import java.util.Vector; + +import com.kysoh.tuxdroid.plugin.framework.plugin.SimplePlugin; +import com.kysoh.tvPrograms.Program; +import com.kysoh.tvPrograms.ProgramLoadListener; +import com.kysoh.tvPrograms.programs.SimplePrograms; + + +public class PluginBeDu extends SimplePlugin<Configuration> implements ProgramLoadListener{ + + + /** + * Getting programs. + */ + SimplePrograms duPrograms; + + + @Override + protected void start() throws Throwable + { + configuration().setTHour(configuration().getTHour()); + + if(configuration().getGiveAfternoon() || configuration().getGiveEvening() || + configuration().getGiveMorning() || configuration().getGiveNowPlaying()) + { + SimplePrograms.addProgramLoadListener(this); + duPrograms = new SimplePrograms(SimplePrograms.BEDU, this.configuration().getChannel()); + } + else + { + throwMessage("Please re-configure your gadget to get a TV program list."); + PluginProgramTV.quitGadget(); + } + } + + + /** + * Load error event received. + */ + @Override + public void loadError(String url) + { + throwMessage("Error while loading the TV program"); + PluginProgramTV.quitGadget(); + } + + + /** + * Loaded event received. + */ + @Override + public void loaded(Vector<Program> completeProgram) + { + try + { + PluginProgramTV.giveProgram(this.configuration(), completeProgram, this); + } + catch(Exception error) + { + error.printStackTrace(); + this.loadError(null); + } + } + + + /** + * Simple main tests. + * @param args + */ + public void main(String[] args, Configuration config) + { + new PluginBeDu().boot(args, config); + } + + + @Override + protected void onPluginEvent(String arg0, String[] arg1) throws Throwable + { + ; + } + + + @Override + protected void onPluginStop() throws Throwable + { + ; + } + +} Added: software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/PluginBeFr.java =================================================================== --- software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/PluginBeFr.java (rev 0) +++ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/PluginBeFr.java 2009-06-26 10:15:32 UTC (rev 4907) @@ -0,0 +1,108 @@ +/* This file is part of "tuxdroid programs tv". + * Copyright 2009, kysoh + * Author : Conan Jerome + * eMail : jerome.conan AT kysoh.com + * + * "tuxdroid programs tv" is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * "tuxdroid programs tv" is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with "tuxdroid programs tv"; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + +package com.kysoh.tvPrograms.plugin; + +import java.util.Vector; + +import com.kysoh.tuxdroid.plugin.framework.plugin.SimplePlugin; +import com.kysoh.tvPrograms.Program; +import com.kysoh.tvPrograms.ProgramLoadListener; +import com.kysoh.tvPrograms.programs.SimplePrograms; + +public class PluginBeFr extends SimplePlugin<Configuration> implements ProgramLoadListener{ + + SimplePrograms frPrograms; + + /** + * Start the gadget. + */ + @Override + protected void start() throws Throwable + { + configuration().setTHour(configuration().getTHour()); + + if(configuration().getGiveAfternoon() || configuration().getGiveEvening() || + configuration().getGiveMorning() || configuration().getGiveNowPlaying()) + { + SimplePrograms.addProgramLoadListener(this); + frPrograms = new SimplePrograms(SimplePrograms.BEFR, this.configuration().getChannel()); + } + else + { + throwMessage("Please re-configure your gadget to get a TV program list."); + PluginProgramTV.quitGadget(); + } + } + + + /** + * Handle load errors. + */ + @Override + public void loadError(String url) + { + throwMessage("Error while loading the TV program"); + PluginProgramTV.quitGadget(); + } + + + /** + * Handle program loaded. + */ + @Override + public void loaded(Vector<Program> completeProgram) + { + try + { + PluginProgramTV.giveProgram(this.configuration(), completeProgram, this); + } + catch(Exception error) + { + ; + } + } + + + /** + * Simple main tests. + * @param args + */ + public void main(String[] args, Configuration config) + { + new PluginBeFr().boot(args, config); + } + + + @Override + protected void onPluginEvent(String arg0, String[] arg1) throws Throwable + { + ; + } + + + @Override + protected void onPluginStop() throws Throwable + { + ; + } + +} Added: software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/PluginEs.java =================================================================== --- software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/PluginEs.java (rev 0) +++ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/PluginEs.java 2009-06-26 10:15:32 UTC (rev 4907) @@ -0,0 +1,109 @@ +/* This file is part of "tuxdroid programs tv". + * Copyright 2009, kysoh + * Author : Conan Jerome + * eMail : jerome.conan AT kysoh.com + * + * "tuxdroid programs tv" is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * "tuxdroid programs tv" is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with "tuxdroid programs tv"; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + +package com.kysoh.tvPrograms.plugin; + +import java.util.Vector; + +import com.kysoh.tuxdroid.plugin.framework.plugin.SimplePlugin; +import com.kysoh.tvPrograms.Program; +import com.kysoh.tvPrograms.ProgramLoadListener; +import com.kysoh.tvPrograms.programs.SimplePrograms; + +public class PluginEs extends SimplePlugin<Configuration> implements ProgramLoadListener{ + + SimplePrograms spPrograms; + + /** + * Gadget entry point. + */ + @Override + protected void start() throws Throwable + { + configuration().setTHour(configuration().getTHour()); + + if(configuration().getGiveAfternoon() || configuration().getGiveEvening() || + configuration().getGiveMorning() || configuration().getGiveNowPlaying()) + { + SimplePrograms.addProgramLoadListener(this); + spPrograms = new SimplePrograms(SimplePrograms.SP, this.configuration().getChannel()); + } + else + { + throwMessage("Please re-configure your gadget to get a TV program list."); + PluginProgramTV.quitGadget(); + } + } + + + /** + * Handle programs load errors. + */ + @Override + public void loadError(String url) + { + throwMessage("Error while loading the TV program"); + PluginProgramTV.quitGadget(); + } + + + /** + * Handle program loaded event. + */ + @Override + public void loaded(Vector<Program> completeProgram) + { + try + { + PluginProgramTV.giveProgram(this.configuration(), completeProgram, this); + } + catch(Exception errors) + { + this.loadError(null); + } + } + + + /** + * Main point entry. + * @param args + */ + public void main(String[] args, Configuration config) + { + new PluginEs().boot(args, config); + } + + + @Override + protected void onPluginEvent(String arg0, String[] arg1) throws Throwable + { + ; + } + + + @Override + protected void onPluginStop() throws Throwable + { + ; + } + + +} Added: software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/PluginFr.java =================================================================== --- software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/PluginFr.java (rev 0) +++ software_suite_v3/software/plugin/plugin-programsTv/trunk/plugin-programsTv/src/com/kysoh/tvPrograms/plugin/PluginFr.java 2009-06-26 10:15:32 UTC (rev 4907) @@ -0,0 +1,107 @@ +/* This file is part of "tuxdroid programs tv". + * Copyright 2009, kysoh + * Author : Conan Jerome + * eMail : jerome.conan AT kysoh.com + * + * "tuxdroid programs tv" is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * "tuxdroid programs tv" is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License alo... [truncated message content] |
|
From: remi <c2m...@c2...> - 2009-06-26 09:57:12
|
Author: remi
Date: 2009-06-26 11:57:00 +0200 (Fri, 26 Jun 2009)
New Revision: 4906
Modified:
software_suite_v3/smart-core/smart-server/trunk/util/xml/XmlSerializer.py
Log:
* fixed encoding of xml attributes.
Modified: software_suite_v3/smart-core/smart-server/trunk/util/xml/XmlSerializer.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/util/xml/XmlSerializer.py 2009-06-26 08:52:47 UTC (rev 4905)
+++ software_suite_v3/smart-core/smart-server/trunk/util/xml/XmlSerializer.py 2009-06-26 09:57:00 UTC (rev 4906)
@@ -54,14 +54,22 @@
@param nodeName: Xml node name.
@param nodeAttributes: Xml node attributes.
"""
+ nodeAttributes = dict(nodeAttributes)
+ for key in nodeAttributes.keys():
+ try:
+ node = nodeAttributes[key]
+ node = node.encode(self.__encoding)
+ nodeAttributes[key] = node
+ except:
+ pass
if self.__nodesCounter == 0:
self.__parentNodeName = nodeName
- self.__dictionary[nodeName] = [dict(nodeAttributes), '', []]
+ self.__dictionary[nodeName] = [nodeAttributes, '', []]
self.__currentNodeDict = self.__dictionary
else:
self.__parentNodeName = self.__nodeNameStack[-1]
self.__parentNodeDict = self.__nodeDictsStack[-1]
- childNode = {nodeName: [dict(nodeAttributes), '', []]}
+ childNode = {nodeName: [nodeAttributes, '', []]}
childNodesList = (self.__parentNodeDict[self.__parentNodeName])[2]
childNodesList.append(childNode)
self.__currentNodeDict = childNode
|