|
From: <ma...@us...> - 2011-05-22 16:17:50
|
Revision: 342
http://openautomation.svn.sourceforge.net/openautomation/?rev=342&view=rev
Author: mayerch
Date: 2011-05-22 16:17:43 +0000 (Sun, 22 May 2011)
Log Message:
-----------
New feature: groups
Note: this will need some additional polishing
Modified Paths:
--------------
CometVisu/trunk/visu/designs/discreet/basic.css
CometVisu/trunk/visu/designs/pure/basic.css
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/designs/discreet/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet/basic.css 2011-05-21 16:31:52 UTC (rev 341)
+++ CometVisu/trunk/visu/designs/discreet/basic.css 2011-05-22 16:17:43 UTC (rev 342)
@@ -17,6 +17,14 @@
padding-left: 15px;
}
+h2
+{
+ font-size: 1.25em;
+ margin-left: 15px;
+ margin-top: 5px;
+ margin-bottom: 5px;
+}
+
body hr
{
clear:both;
@@ -90,6 +98,11 @@
background-color: #101010;
}
+.widget .widget
+{
+ width:98%;
+}
+
.text > div,
.link > a {
float:left;
Modified: CometVisu/trunk/visu/designs/pure/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/pure/basic.css 2011-05-21 16:31:52 UTC (rev 341)
+++ CometVisu/trunk/visu/designs/pure/basic.css 2011-05-22 16:17:43 UTC (rev 342)
@@ -19,6 +19,14 @@
margin-left: 15px;
}
+h2
+{
+ font-size: 1.25em;
+ margin-left: 15px;
+ margin-top: 5px;
+ margin-bottom: 5px;
+}
+
body hr
{
clear:both;
@@ -68,6 +76,11 @@
min-height: 2em;
}
+.widget .widget
+{
+ width:98%;
+}
+
.widget .label,
.widget.info .actor,
.text > div,
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2011-05-21 16:31:52 UTC (rev 341)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-05-22 16:17:43 UTC (rev 342)
@@ -84,6 +84,37 @@
},
content: true
});
+
+ this.addCreator('group', {
+ create: function( page, path, flavour ) {
+ var $p = $(page);
+ var ret_val = $('<div class="widget" />');
+ var name = $p.attr('name');
+ if( $p.attr('flavour') ) flavour = $p.attr('flavour');// sub design choice
+ var wstyle = ''; // widget style
+ if( $p.attr('align') ) wstyle += 'text-align:' + $p.attr('align') + ';';
+ if( wstyle != '' ) wstyle = 'style="' + wstyle + '"';
+ var childs = $p.children();
+ var container = $( '<div class="clearfix"/>' );
+ container.append( '<h2>' + name + '</h2>' );
+ $( childs ).each( function(i){
+ container.append( create_pages( childs[i], path + '_' + i, flavour ) );
+ } );
+ var group = $( '<div class="group" id="' + path + '"/>' );
+ group.append(container);
+ if( flavour ) group.addClass( 'flavour_' + flavour );
+ ret_val.append( group );
+ return ret_val;
+ },
+ attributes: {
+ align: { type: 'string', required: false },
+ flavour:{ type: 'string', required: false },
+ name: { type: 'string', required: true }
+ },
+ elements: {
+ },
+ content: true
+ });
this.addCreator('line', {
create: function( page, path ) {
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2011-05-21 16:31:52 UTC (rev 341)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2011-05-22 16:17:43 UTC (rev 342)
@@ -61,21 +61,11 @@
</meta>
<page name="Übersicht">
<text align="center">CometVisu Widget Demo</text>
- <info styling="BluePurpleRed">
- <label>Slide Info</label>
- <address transform="DPT:9" type="">12/4/250</address>
- <address transform="DPT:9.001" type="">12/4/251</address>
- </info>
<switch mapping="OnOff" styling="RedGreen">
<label>Switch - Terrase Licht</label>
<address transform="DPT:1.001" readonly="false" type="">1/0/2</address>
<address transform="DPT:9.001" readonly="true" type="">12/4/253</address>
</switch>
- <slide min="-18" max="26">
- <label>Slide</label>
- <address transform="DPT:9" type="">12/4/250</address>
- <address transform="DPT:9.001" readonly="true" type="">12/4/253</address>
- </slide>
<break/>
<trigger pre="pre" post="post" value="0" mapping="OnOff">
<label>Trigger - Terrasse Licht</label>
@@ -85,6 +75,19 @@
<label>Trigger - Terrasse Licht</label>
<address transform="DPT:1.001" readonly="false" type="">1/0/2</address>
</trigger>
+ <group name="Slide group" flavour="potassium">
+ <info styling="BluePurpleRed">
+ <label>Slide Info</label>
+ <address transform="DPT:9" type="">12/4/250</address>
+ <address transform="DPT:9.001" type="">12/4/251</address>
+ </info>
+ <line />
+ <slide min="-18" max="26">
+ <label>Slide</label>
+ <address transform="DPT:9" type="">12/4/250</address>
+ <address transform="DPT:9.001" readonly="true" type="">12/4/253</address>
+ </slide>
+ </group>
<multitrigger pre="pre" post="post" button1label="An" button1value="0" button2label="Aus" button2value="1" button3label="Essen" button3value="2" button4label="Fernsehen" button4value="3">
<label>Multitrigger - Szenenaufruf</label>
<address transform="DPT:5.010" readonly="false" type="">11/2/50</address>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|