|
From: <ma...@us...> - 2010-11-28 14:57:18
|
Revision: 168
http://openautomation.svn.sourceforge.net/openautomation/?rev=168&view=rev
Author: mayerch
Date: 2010-11-28 14:57:12 +0000 (Sun, 28 Nov 2010)
Log Message:
-----------
Moved the Meta-Information down inside a meta tag to clean the configuration XML a bit more up.
NOTE #1: this means that all existing configuration files have to be changed!
NORE #2: the editor might have to be changed to create the config XML in the new layout (is it's currently broken due to the jQuery 1.4.4 you might not notice that...)
Modified Paths:
--------------
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/visu_config.xml
CometVisu/trunk/visu/visu_config.xsd
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2010-11-26 21:21:48 UTC (rev 167)
+++ CometVisu/trunk/visu/lib/templateengine.js 2010-11-28 14:57:12 UTC (rev 168)
@@ -173,13 +173,13 @@
handleResize();
// start with the plugins
- $( 'pages > plugins plugin', xml ).each( function(i){
+ $( 'meta > plugins plugin', xml ).each( function(i){
var name = $(this).attr('name');
$( 'head' ).append( '<script src="plugins/' + name + '/structure_plugin.js" type="text/javascript"></script>' );
} );
// then the mappings
- $( 'pages > mappings mapping', xml ).each( function(i){
+ $( 'meta > mappings mapping', xml ).each( function(i){
var name = $(this).attr('name');
mappings[ name ] = {};
$(this).find('entry').each( function(){
@@ -195,7 +195,7 @@
});
// then the stylings
- $( 'pages > stylings styling', xml ).each( function(i){
+ $( 'meta > stylings styling', xml ).each( function(i){
var name = $(this).attr('name');
stylings[ name ] = {};
$(this).find('entry').each( function(){
Modified: CometVisu/trunk/visu/visu_config.xml
===================================================================
--- CometVisu/trunk/visu/visu_config.xml 2010-11-26 21:21:48 UTC (rev 167)
+++ CometVisu/trunk/visu/visu_config.xml 2010-11-28 14:57:12 UTC (rev 168)
@@ -1,38 +1,40 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<pages design="pure">
- <plugins>
- <plugin name="colorChooser" />
- </plugins>
- <mappings>
- <mapping name="OpenClose">
- <entry value="0">zu</entry>
- <entry value="1">offen</entry>
- </mapping>
- <mapping name="OnOff">
- <entry value="0">Aus</entry>
- <entry value="1">An</entry>
- </mapping>
- <mapping name="Sign">
- <entry range_min="-1e99" range_max="0">Negativ</entry>
- <entry value="0">Null</entry>
- <entry range_min="0" range_max="1e99">Positiv</entry>
- </mapping>
- </mappings>
- <stylings>
- <styling name="RedGreen">
- <entry value="0">red</entry>
- <entry value="1">green</entry>
- </styling>
- <styling name="GreenRed">
- <entry value="0">green</entry>
- <entry value="1">red</entry>
- </styling>
- <styling name="BluePurpleRed">
- <entry range_min="-100" range_max="0" >blue</entry>
- <entry value="0" >purple</entry>
- <entry range_min="0" range_max="100">red</entry>
- </styling>
- </stylings>
+ <meta>
+ <plugins>
+ <plugin name="colorChooser" />
+ </plugins>
+ <mappings>
+ <mapping name="OpenClose">
+ <entry value="0">zu</entry>
+ <entry value="1">offen</entry>
+ </mapping>
+ <mapping name="OnOff">
+ <entry value="0">Aus</entry>
+ <entry value="1">An</entry>
+ </mapping>
+ <mapping name="Sign">
+ <entry range_min="-1e99" range_max="0">Negativ</entry>
+ <entry value="0">Null</entry>
+ <entry range_min="0" range_max="1e99">Positiv</entry>
+ </mapping>
+ </mappings>
+ <stylings>
+ <styling name="RedGreen">
+ <entry value="0">red</entry>
+ <entry value="1">green</entry>
+ </styling>
+ <styling name="GreenRed">
+ <entry value="0">green</entry>
+ <entry value="1">red</entry>
+ </styling>
+ <styling name="BluePurpleRed">
+ <entry range_min="-100" range_max="0" >blue</entry>
+ <entry value="0" >purple</entry>
+ <entry range_min="0" range_max="100">red</entry>
+ </styling>
+ </stylings>
+ </meta>
<page name="Übersicht" flavour="orange">
<text align="center">Willkommen bei der CometVisu!</text>
<toggle address="1/0/2" datatype="1.001" response_address="1/0/2" mapping="OnOff" styling="RedGreen" >Terrase Licht</toggle>
@@ -48,10 +50,10 @@
<info address="12/4/250" datatype="9" styling="BluePurpleRed">Slide Info</info>
<info address="12/4/250" datatype="9" styling="BluePurpleRed" mapping="Sign">Slide Info</info>
<designtoggle>Change design</designtoggle>
- <colorChooser address_r="1/2/13" address_g="1/2/14" address_b="1/2/15" datatype="5.001">A colorChooser</colorChooser>
- <info address="1/2/13" datatype="5.001" >R</info>
- <info address="1/2/14" datatype="5.001" >G</info>
- <info address="1/2/15" datatype="5.001" >B</info>
+ <colorChooser address_r="1/2/59" address_g="1/2/60" address_b="1/2/61" datatype="5.001">A colorChooser</colorChooser>
+ <info address="1/2/59" datatype="5.001" >R</info>
+ <info address="1/2/60" datatype="5.001" >G</info>
+ <info address="1/2/61" datatype="5.001" >B</info>
<line />
<image src="icon/comet_128_ff8000.png" >Ein Bild</image>
<image src="icon/comet_128_ff8000.png" />
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2010-11-26 21:21:48 UTC (rev 167)
+++ CometVisu/trunk/visu/visu_config.xsd 2010-11-28 14:57:12 UTC (rev 168)
@@ -47,14 +47,37 @@
<xsd:element name="pages">
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:element ref="mappings" />
- <xsd:element ref="stylings" />
+ <xsd:element ref="meta" />
<xsd:element ref="page" minOccurs="1" />
</xsd:choice>
<xsd:attribute name="design" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
+<xsd:element name="meta">
+ <xsd:complexType>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="plugins" />
+ <xsd:element ref="mappings" />
+ <xsd:element ref="stylings" />
+ </xsd:choice>
+ </xsd:complexType>
+</xsd:element>
+
+<xsd:element name="plugins">
+ <xsd:complexType>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="plugin" />
+ </xsd:choice>
+ </xsd:complexType>
+</xsd:element>
+^
+<xsd:element name="plugin">
+ <xsd:complexType>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+</xsd:element>
+
<xsd:element name="mappings">
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|