|
From: <ma...@us...> - 2011-03-04 20:58:20
|
Revision: 311
http://openautomation.svn.sourceforge.net/openautomation/?rev=311&view=rev
Author: mayerch
Date: 2011-03-04 20:58:14 +0000 (Fri, 04 Mar 2011)
Log Message:
-----------
Tweak for Android
Modified Paths:
--------------
CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
CometVisu/trunk/visu/transforms/transform_knx.js
Modified: CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2011-02-27 21:26:29 UTC (rev 310)
+++ CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2011-03-04 20:58:14 UTC (rev 311)
@@ -163,7 +163,7 @@
unit: {type: "string", required: false},
series: {type: "list", required: false, list: {day: "1 day", week: "1 week", month: "1 month", year: "1 year"}},
refresh: {type: "numeric", required: false},
- tooltip: {type: "list", required: false, list: {true: "yes", false: "no"}},
+ tooltip: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
},
content: {type: "string", required: true}
});
Modified: CometVisu/trunk/visu/transforms/transform_knx.js
===================================================================
--- CometVisu/trunk/visu/transforms/transform_knx.js 2011-02-27 21:26:29 UTC (rev 310)
+++ CometVisu/trunk/visu/transforms/transform_knx.js 2011-03-04 20:58:14 UTC (rev 311)
@@ -267,7 +267,7 @@
},
unit : '-',
range : {
- enum: [ 'auto', 'comfort', 'standby', 'economy', 'building_protection' ]
+ 'enum': [ 'auto', 'comfort', 'standby', 'economy', 'building_protection' ]
},
encode: function( phy ){
var val;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
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.
|
|
From: <j-...@us...> - 2011-05-23 07:05:55
|
Revision: 344
http://openautomation.svn.sourceforge.net/openautomation/?rev=344&view=rev
Author: j-n-k
Date: 2011-05-23 07:05:49 +0000 (Mon, 23 May 2011)
Log Message:
-----------
Added widget "infotrigger"
Modified Paths:
--------------
CometVisu/trunk/visu/designs/pure/basic.css
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/visu_config.xsd
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/designs/pure/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/pure/basic.css 2011-05-22 20:06:21 UTC (rev 343)
+++ CometVisu/trunk/visu/designs/pure/basic.css 2011-05-23 07:05:49 UTC (rev 344)
@@ -214,7 +214,30 @@
border-radius: 5px;
}
+.switchInvisible
+{
+ border-style: solid;
+ border-width: 1px;
+ border-color: #000 #000 #000 #000;
+ -moz-border-radius: 7px;
+ -webkit-border-radius: 7px;
+ border-radius: 7px;
+ padding: 1px;
+}
+.switchInvisible div
+{
+ border-style: solid;
+ border-width: 1px;
+ border-color: #000 #000 #000 #000;
+ padding: 5px;
+ width: 5em;
+ float: left;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+}
+
.ui-slider { position: relative; text-align: left; }
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.6em; height: 1.6em; cursor: default; }
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2011-05-22 20:06:21 UTC (rev 343)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-05-23 07:05:49 UTC (rev 344)
@@ -623,6 +623,110 @@
content: false
});
+ this.addCreator('infotrigger', {
+ create: function( page, path ) {
+ var $p = $(page);
+ var ret_val = $('<div class="widget switch" />');
+
+ // handle label
+ var labelElement = $p.find('label')[0];
+ var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
+ ret_val.append( label );
+
+ // handle addresses
+ var address = {};
+ var addrread = {};
+ $p.find('address').each( function(){
+ var src = this.textContent;
+ var transform = this.getAttribute('transform');
+ var readonly = this.getAttribute('readonly');
+ ga_list.push( src )
+ if (readonly=='true') {
+ addrread[ '_' + src ] = [ transform, readonly=='true' ];
+ } else {
+ address[ '_' + src ] = [ transform, readonly=='true' ];
+ };
+ });
+
+ // create buttons + info
+ var buttons = $('<div style="float:left;"/>');
+ var buttonCount = 2;
+
+ var actor = '<div class="actor switchUnpressed '
+ if ( $p.attr( 'align' ) )
+ actor += $p.attr( 'align' );
+ actor += '">';
+ actor += '<div class="value">' + ($p.attr('downlabel') ? $p.attr('downlabel') : '-') + '</div>';
+ actor += '</div>';
+ var $actor = $(actor).data( {
+ 'address' : address,
+ 'mapping' : $p.attr('mapping'),
+ 'styling' : $p.attr('styling'),
+ 'value' : $p.attr('downvalue') || 0,
+ 'align' : $p.attr('align'),
+ 'type' : 'switch'
+ } ).bind( 'click', this.action );
+ buttons.append( $actor );
+
+ var actor = '<div class="actor switchUnpressed '
+ if ( $p.attr( 'align' ) )
+ actor += $p.attr( 'align' );
+ actor += '">';
+ actor += '<div class="value">' + ($p.attr('uplabel') ? $p.attr('uplabel') : '+') + '</div>';
+ actor += '</div>';
+ var $actor = $(actor).data( {
+ 'address' : address,
+ 'mapping' : $p.attr('mapping'),
+ 'styling' : $p.attr('styling'),
+ 'value' : $p.attr('upvalue') || 1,
+ 'align' : $p.attr('align'),
+ 'type' : 'switch'
+ } ).bind( 'click', this.action );
+ buttons.append( $actor );
+
+ var actor = '<div class="actor switchInvisible "><div class="value">-</div></div>';
+ var $actor = $(actor).data({
+ 'address' : addrread,
+ 'format' : $p.attr('format'),
+ 'mapping' : $p.attr('mapping'),
+ 'styling' : $p.attr('styling'),
+ });
+ for( var addr in addrread ) $actor.bind( addr, this.update );
+ buttons.append( $actor );
+
+ ret_val.append( buttons );
+ return ret_val;
+ },
+
+ update: function(e,d) {
+ var element = $(this);
+ var value = defaultUpdate( e, d, element );
+ element.addClass('switchInvisible');
+ },
+ action: function() {
+ var data = $(this).data();
+ for( var addr in data.address )
+ {
+ if( data.address[addr][1] == true ) continue; // skip read only
+ visu.write( addr.substr(1), transformEncode( data.address[addr][0], data.value ) );
+ }
+ },
+ attributes: {
+ uplabel: { type: 'string' , required: false },
+ upvalue: { type: 'string' , required: false },
+ downlabel: { type: 'string' , required: false },
+ downvalue: { type: 'string' , required: false },
+ mapping: { type: 'mapping' , required: false },
+ styling: { type: 'styling' , required: false },
+ align: { type: 'string' , required: false }
+ },
+ elements: {
+ label: { type: 'string', required: false, multi: false },
+ address: { type: 'address', required: true, multi: true }
+ },
+ content: false
+ });
+
this.addCreator('unknown', {
create: function( page, path ) {
var ret_val = $('<div class="widget" />');
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2011-05-22 20:06:21 UTC (rev 343)
+++ CometVisu/trunk/visu/visu_config.xsd 2011-05-23 07:05:49 UTC (rev 344)
@@ -47,9 +47,6 @@
<!-- simple elements -->
<!-- attributes -->
-<xsd:attribute name="pre" type="xsd:string" />
-<xsd:attribute name="post" type="xsd:string" />
-
<xsd:attribute name="min" type="xsd:decimal" />
<xsd:attribute name="max" type="xsd:decimal" />
<xsd:attribute name="step" type="xsd:decimal" />
@@ -169,7 +166,8 @@
<xsd:element name="switch" type="switch" />
<xsd:element name="toggle" type="switch" />
<xsd:element name="trigger" type="trigger" />
- <xsd:element name="multitrigger" type="multitrigger" />
+ <xsd:element name="multitrigger" type="multitrigger" />
+ <xsd:element name="infotrigger" type="infotrigger" />
<xsd:element name="designtoggle" type="designtoggle" />
<xsd:element name="slide" type="slide" />
<xsd:element name="info" type="info" />
@@ -215,9 +213,7 @@
<xsd:attribute ref="mapping" use="optional" />
<xsd:attribute name="on_value" type="xsd:string" use="optional" />
<xsd:attribute name="off_value" type="xsd:string" use="optional" />
- <xsd:attribute ref="pre" use="optional" />
- <xsd:attribute ref="post" use="optional" />
-
+ <xsd:attribute ref="align" use="optional" />
</xsd:complexType>
<xsd:complexType name="trigger">
@@ -228,10 +224,23 @@
<xsd:attribute ref="value" use="required" />
<xsd:attribute ref="mapping" use="optional"/>
<xsd:attribute ref="styling" use="optional"/>
- <xsd:attribute ref="pre" use="optional" />
- <xsd:attribute ref="post" use="optional" />
</xsd:complexType>
+<xsd:complexType name="infotrigger">
+ <xsd:choice maxOccurs="unbounded" minOccurs="1">
+ <xsd:element name="label" type="xsd:string" />
+ <xsd:element name="address" type="address" minOccurs="2" maxOccurs="unbounded"/>
+ </xsd:choice>
+ <xsd:attribute name="upvalue" type="xsd:string" use="optional"/>
+ <xsd:attribute name="downvalue" type="xsd:string" use="optional"/>
+ <xsd:attribute name="uplabel" type="xsd:string" use="optional"/>
+ <xsd:attribute name="downlabel" type="xsd:string" use="optional"/>
+ <xsd:attribute ref="mapping" use="optional"/>
+ <xsd:attribute ref="styling" use="optional"/>
+ <xsd:attribute ref="align" use="optional" />
+ <xsd:attribute ref="format" use="optional" />
+</xsd:complexType>
+
<xsd:complexType name="multitrigger">
<xsd:choice maxOccurs="unbounded" minOccurs="1">
<xsd:element name="label" type="xsd:string" />
@@ -266,8 +275,6 @@
<xsd:element name="label" type="xsd:string" maxOccurs="1" />
<xsd:element name="address" type="address" minOccurs="1"/>
</xsd:choice>
- <xsd:attribute ref="pre" use="optional" />
- <xsd:attribute ref="post" use="optional" />
<xsd:attribute ref="format" use="optional" />
<xsd:attribute ref="styling" use="optional" />
<xsd:attribute ref="mapping" use="optional" />
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2011-05-22 20:06:21 UTC (rev 343)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2011-05-23 07:05:49 UTC (rev 344)
@@ -270,5 +270,10 @@
</slide>
<diagram_popup rrd="200_DALI_Linie_1_Strom" unit="mA" series="day" refresh="300">DALI Strom L1</diagram_popup>
<diagram_inline rrd="200_DALI_Linie_1_Strom" width="600" height="400"/>
+ <infotrigger uplabel="wärmer" downlabel="kälter" upvalue="1" downvalue="0" align="center" format="%.1f °C">
+ <label>Temperatur Sollwert</label>
+ <address transform="DPT:1.001">4/1/3</address>
+ <address transform="DPT:9" readonly="true">4/2/3</address>
+ </infotrigger>
</page>
</pages>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-06-21 20:05:14
|
Revision: 369
http://openautomation.svn.sourceforge.net/openautomation/?rev=369&view=rev
Author: mayerch
Date: 2011-06-21 20:05:06 +0000 (Tue, 21 Jun 2011)
Log Message:
-----------
Update flot to version 0.7 to have a better fix for bug 3175343
Note: This flot version has a bug that calculates the width for the y-axis labels wrongly. The submitted file jquery.flot.js (but not the minimized version!) contains a patch to fix that bahaviour.
Modified Paths:
--------------
CometVisu/trunk/visu/designs/discreet/basic.css
CometVisu/trunk/visu/designs/pure/basic.css
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.crosshair.min.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.image.min.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.min.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.navigate.min.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.selection.min.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.stack.min.js
CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
Added Paths:
-----------
CometVisu/trunk/visu/plugins/diagram/flot/jquery.colorhelpers.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.colorhelpers.min.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.crosshair.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.fillbetween.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.fillbetween.min.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.image.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.navigate.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.pie.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.pie.min.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.resize.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.resize.min.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.selection.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.stack.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.symbol.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.symbol.min.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.threshold.js
Modified: CometVisu/trunk/visu/designs/discreet/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet/basic.css 2011-06-21 19:57:10 UTC (rev 368)
+++ CometVisu/trunk/visu/designs/discreet/basic.css 2011-06-21 20:05:06 UTC (rev 369)
@@ -366,7 +366,6 @@
}
.diagram_inline {
- margin-left: 1em;
width: 320px;
height: 180px;
}
Modified: CometVisu/trunk/visu/designs/pure/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/pure/basic.css 2011-06-21 19:57:10 UTC (rev 368)
+++ CometVisu/trunk/visu/designs/pure/basic.css 2011-06-21 20:05:06 UTC (rev 369)
@@ -353,7 +353,6 @@
}
.diagram_inline {
- margin-left: 1em;
width: 320px;
height: 180px;
}
Added: CometVisu/trunk/visu/plugins/diagram/flot/jquery.colorhelpers.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/flot/jquery.colorhelpers.js (rev 0)
+++ CometVisu/trunk/visu/plugins/diagram/flot/jquery.colorhelpers.js 2011-06-21 20:05:06 UTC (rev 369)
@@ -0,0 +1,179 @@
+/* Plugin for jQuery for working with colors.
+ *
+ * Version 1.1.
+ *
+ * Inspiration from jQuery color animation plugin by John Resig.
+ *
+ * Released under the MIT license by Ole Laursen, October 2009.
+ *
+ * Examples:
+ *
+ * $.color.parse("#fff").scale('rgb', 0.25).add('a', -0.5).toString()
+ * var c = $.color.extract($("#mydiv"), 'background-color');
+ * console.log(c.r, c.g, c.b, c.a);
+ * $.color.make(100, 50, 25, 0.4).toString() // returns "rgba(100,50,25,0.4)"
+ *
+ * Note that .scale() and .add() return the same modified object
+ * instead of making a new one.
+ *
+ * V. 1.1: Fix error handling so e.g. parsing an empty string does
+ * produce a color rather than just crashing.
+ */
+
+(function($) {
+ $.color = {};
+
+ // construct color object with some convenient chainable helpers
+ $.color.make = function (r, g, b, a) {
+ var o = {};
+ o.r = r || 0;
+ o.g = g || 0;
+ o.b = b || 0;
+ o.a = a != null ? a : 1;
+
+ o.add = function (c, d) {
+ for (var i = 0; i < c.length; ++i)
+ o[c.charAt(i)] += d;
+ return o.normalize();
+ };
+
+ o.scale = function (c, f) {
+ for (var i = 0; i < c.length; ++i)
+ o[c.charAt(i)] *= f;
+ return o.normalize();
+ };
+
+ o.toString = function () {
+ if (o.a >= 1.0) {
+ return "rgb("+[o.r, o.g, o.b].join(",")+")";
+ } else {
+ return "rgba("+[o.r, o.g, o.b, o.a].join(",")+")";
+ }
+ };
+
+ o.normalize = function () {
+ function clamp(min, value, max) {
+ return value < min ? min: (value > max ? max: value);
+ }
+
+ o.r = clamp(0, parseInt(o.r), 255);
+ o.g = clamp(0, parseInt(o.g), 255);
+ o.b = clamp(0, parseInt(o.b), 255);
+ o.a = clamp(0, o.a, 1);
+ return o;
+ };
+
+ o.clone = function () {
+ return $.color.make(o.r, o.b, o.g, o.a);
+ };
+
+ return o.normalize();
+ }
+
+ // extract CSS color property from element, going up in the DOM
+ // if it's "transparent"
+ $.color.extract = function (elem, css) {
+ var c;
+ do {
+ c = elem.css(css).toLowerCase();
+ // keep going until we find an element that has color, or
+ // we hit the body
+ if (c != '' && c != 'transparent')
+ break;
+ elem = elem.parent();
+ } while (!$.nodeName(elem.get(0), "body"));
+
+ // catch Safari's way of signalling transparent
+ if (c == "rgba(0, 0, 0, 0)")
+ c = "transparent";
+
+ return $.color.parse(c);
+ }
+
+ // parse CSS color string (like "rgb(10, 32, 43)" or "#fff"),
+ // returns color object, if parsing failed, you get black (0, 0,
+ // 0) out
+ $.color.parse = function (str) {
+ var res, m = $.color.make;
+
+ // Look for rgb(num,num,num)
+ if (res = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str))
+ return m(parseInt(res[1], 10), parseInt(res[2], 10), parseInt(res[3], 10));
+
+ // Look for rgba(num,num,num,num)
+ if (res = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))
+ return m(parseInt(res[1], 10), parseInt(res[2], 10), parseInt(res[3], 10), parseFloat(res[4]));
+
+ // Look for rgb(num%,num%,num%)
+ if (res = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))
+ return m(parseFloat(res[1])*2.55, parseFloat(res[2])*2.55, parseFloat(res[3])*2.55);
+
+ // Look for rgba(num%,num%,num%,num)
+ if (res = /rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))
+ return m(parseFloat(res[1])*2.55, parseFloat(res[2])*2.55, parseFloat(res[3])*2.55, parseFloat(res[4]));
+
+ // Look for #a0b1c2
+ if (res = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))
+ return m(parseInt(res[1], 16), parseInt(res[2], 16), parseInt(res[3], 16));
+
+ // Look for #fff
+ if (res = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))
+ return m(parseInt(res[1]+res[1], 16), parseInt(res[2]+res[2], 16), parseInt(res[3]+res[3], 16));
+
+ // Otherwise, we're most likely dealing with a named color
+ var name = $.trim(str).toLowerCase();
+ if (name == "transparent")
+ return m(255, 255, 255, 0);
+ else {
+ // default to black
+ res = lookupColors[name] || [0, 0, 0];
+ return m(res[0], res[1], res[2]);
+ }
+ }
+
+ var lookupColors = {
+ aqua:[0,255,255],
+ azure:[240,255,255],
+ beige:[245,245,220],
+ black:[0,0,0],
+ blue:[0,0,255],
+ brown:[165,42,42],
+ cyan:[0,255,255],
+ darkblue:[0,0,139],
+ darkcyan:[0,139,139],
+ darkgrey:[169,169,169],
+ darkgreen:[0,100,0],
+ darkkhaki:[189,183,107],
+ darkmagenta:[139,0,139],
+ darkolivegreen:[85,107,47],
+ darkorange:[255,140,0],
+ darkorchid:[153,50,204],
+ darkred:[139,0,0],
+ darksalmon:[233,150,122],
+ darkviolet:[148,0,211],
+ fuchsia:[255,0,255],
+ gold:[255,215,0],
+ green:[0,128,0],
+ indigo:[75,0,130],
+ khaki:[240,230,140],
+ lightblue:[173,216,230],
+ lightcyan:[224,255,255],
+ lightgreen:[144,238,144],
+ lightgrey:[211,211,211],
+ lightpink:[255,182,193],
+ lightyellow:[255,255,224],
+ lime:[0,255,0],
+ magenta:[255,0,255],
+ maroon:[128,0,0],
+ navy:[0,0,128],
+ olive:[128,128,0],
+ orange:[255,165,0],
+ pink:[255,192,203],
+ purple:[128,0,128],
+ violet:[128,0,128],
+ red:[255,0,0],
+ silver:[192,192,192],
+ white:[255,255,255],
+ yellow:[255,255,0]
+ };
+})(jQuery);
Added: CometVisu/trunk/visu/plugins/diagram/flot/jquery.colorhelpers.min.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/flot/jquery.colorhelpers.min.js (rev 0)
+++ CometVisu/trunk/visu/plugins/diagram/flot/jquery.colorhelpers.min.js 2011-06-21 20:05:06 UTC (rev 369)
@@ -0,0 +1 @@
+(function(b){b.color={};b.color.make=function(f,e,c,d){var h={};h.r=f||0;h.g=e||0;h.b=c||0;h.a=d!=null?d:1;h.add=function(k,j){for(var g=0;g<k.length;++g){h[k.charAt(g)]+=j}return h.normalize()};h.scale=function(k,j){for(var g=0;g<k.length;++g){h[k.charAt(g)]*=j}return h.normalize()};h.toString=function(){if(h.a>=1){return"rgb("+[h.r,h.g,h.b].join(",")+")"}else{return"rgba("+[h.r,h.g,h.b,h.a].join(",")+")"}};h.normalize=function(){function g(j,k,i){return k<j?j:(k>i?i:k)}h.r=g(0,parseInt(h.r),255);h.g=g(0,parseInt(h.g),255);h.b=g(0,parseInt(h.b),255);h.a=g(0,h.a,1);return h};h.clone=function(){return b.color.make(h.r,h.b,h.g,h.a)};return h.normalize()};b.color.extract=function(e,d){var f;do{f=e.css(d).toLowerCase();if(f!=""&&f!="transparent"){break}e=e.parent()}while(!b.nodeName(e.get(0),"body"));if(f=="rgba(0, 0, 0, 0)"){f="transparent"}return b.color.parse(f)};b.color.parse=function(f){var e,c=b.color.make;if(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)){return c(parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10))}if(e=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(f)){return c(parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10),parseFloat(e[4]))}if(e=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(f)){return c(parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55)}if(e=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(f)){return c(parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55,parseFloat(e[4]))}if(e=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(f)){return c(parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16))}if(e=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(f)){return c(parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16))}var d=b.trim(f).toLowerCase();if(d=="transparent"){return c(255,255,255,0)}else{e=a[d]||[0,0,0];return c(e[0],e[1],e[2])}};var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);
\ No newline at end of file
Added: CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.crosshair.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.crosshair.js (rev 0)
+++ CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.crosshair.js 2011-06-21 20:05:06 UTC (rev 369)
@@ -0,0 +1,167 @@
+/*
+Flot plugin for showing crosshairs, thin lines, when the mouse hovers
+over the plot.
+
+ crosshair: {
+ mode: null or "x" or "y" or "xy"
+ color: color
+ lineWidth: number
+ }
+
+Set the mode to one of "x", "y" or "xy". The "x" mode enables a
+vertical crosshair that lets you trace the values on the x axis, "y"
+enables a horizontal crosshair and "xy" enables them both. "color" is
+the color of the crosshair (default is "rgba(170, 0, 0, 0.80)"),
+"lineWidth" is the width of the drawn lines (default is 1).
+
+The plugin also adds four public methods:
+
+ - setCrosshair(pos)
+
+ Set the position of the crosshair. Note that this is cleared if
+ the user moves the mouse. "pos" is in coordinates of the plot and
+ should be on the form { x: xpos, y: ypos } (you can use x2/x3/...
+ if you're using multiple axes), which is coincidentally the same
+ format as what you get from a "plothover" event. If "pos" is null,
+ the crosshair is cleared.
+
+ - clearCrosshair()
+
+ Clear the crosshair.
+
+ - lockCrosshair(pos)
+
+ Cause the crosshair to lock to the current location, no longer
+ updating if the user moves the mouse. Optionally supply a position
+ (passed on to setCrosshair()) to move it to.
+
+ Example usage:
+ var myFlot = $.plot( $("#graph"), ..., { crosshair: { mode: "x" } } };
+ $("#graph").bind("plothover", function (evt, position, item) {
+ if (item) {
+ // Lock the crosshair to the data point being hovered
+ myFlot.lockCrosshair({ x: item.datapoint[0], y: item.datapoint[1] });
+ }
+ else {
+ // Return normal crosshair operation
+ myFlot.unlockCrosshair();
+ }
+ });
+
+ - unlockCrosshair()
+
+ Free the crosshair to move again after locking it.
+*/
+
+(function ($) {
+ var options = {
+ crosshair: {
+ mode: null, // one of null, "x", "y" or "xy",
+ color: "rgba(170, 0, 0, 0.80)",
+ lineWidth: 1
+ }
+ };
+
+ function init(plot) {
+ // position of crosshair in pixels
+ var crosshair = { x: -1, y: -1, locked: false };
+
+ plot.setCrosshair = function setCrosshair(pos) {
+ if (!pos)
+ crosshair.x = -1;
+ else {
+ var o = plot.p2c(pos);
+ crosshair.x = Math.max(0, Math.min(o.left, plot.width()));
+ crosshair.y = Math.max(0, Math.min(o.top, plot.height()));
+ }
+
+ plot.triggerRedrawOverlay();
+ };
+
+ plot.clearCrosshair = plot.setCrosshair; // passes null for pos
+
+ plot.lockCrosshair = function lockCrosshair(pos) {
+ if (pos)
+ plot.setCrosshair(pos);
+ crosshair.locked = true;
+ }
+
+ plot.unlockCrosshair = function unlockCrosshair() {
+ crosshair.locked = false;
+ }
+
+ function onMouseOut(e) {
+ if (crosshair.locked)
+ return;
+
+ if (crosshair.x != -1) {
+ crosshair.x = -1;
+ plot.triggerRedrawOverlay();
+ }
+ }
+
+ function onMouseMove(e) {
+ if (crosshair.locked)
+ return;
+
+ if (plot.getSelection && plot.getSelection()) {
+ crosshair.x = -1; // hide the crosshair while selecting
+ return;
+ }
+
+ var offset = plot.offset();
+ crosshair.x = Math.max(0, Math.min(e.pageX - offset.left, plot.width()));
+ crosshair.y = Math.max(0, Math.min(e.pageY - offset.top, plot.height()));
+ plot.triggerRedrawOverlay();
+ }
+
+ plot.hooks.bindEvents.push(function (plot, eventHolder) {
+ if (!plot.getOptions().crosshair.mode)
+ return;
+
+ eventHolder.mouseout(onMouseOut);
+ eventHolder.mousemove(onMouseMove);
+ });
+
+ plot.hooks.drawOverlay.push(function (plot, ctx) {
+ var c = plot.getOptions().crosshair;
+ if (!c.mode)
+ return;
+
+ var plotOffset = plot.getPlotOffset();
+
+ ctx.save();
+ ctx.translate(plotOffset.left, plotOffset.top);
+
+ if (crosshair.x != -1) {
+ ctx.strokeStyle = c.color;
+ ctx.lineWidth = c.lineWidth;
+ ctx.lineJoin = "round";
+
+ ctx.beginPath();
+ if (c.mode.indexOf("x") != -1) {
+ ctx.moveTo(crosshair.x, 0);
+ ctx.lineTo(crosshair.x, plot.height());
+ }
+ if (c.mode.indexOf("y") != -1) {
+ ctx.moveTo(0, crosshair.y);
+ ctx.lineTo(plot.width(), crosshair.y);
+ }
+ ctx.stroke();
+ }
+ ctx.restore();
+ });
+
+ plot.hooks.shutdown.push(function (plot, eventHolder) {
+ eventHolder.unbind("mouseout", onMouseOut);
+ eventHolder.unbind("mousemove", onMouseMove);
+ });
+ }
+
+ $.plot.plugins.push({
+ init: init,
+ options: options,
+ name: 'crosshair',
+ version: '1.0'
+ });
+})(jQuery);
Modified: CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.crosshair.min.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.crosshair.min.js 2011-06-21 19:57:10 UTC (rev 368)
+++ CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.crosshair.min.js 2011-06-21 20:05:06 UTC (rev 369)
@@ -1 +1 @@
-(function(B){var A={crosshair:{mode:null,color:"rgba(170, 0, 0, 0.80)",lineWidth:1}};function C(G){var H={x:-1,y:-1,locked:false};G.setCrosshair=function D(J){if(!J){H.x=-1}else{var I=G.getAxes();H.x=Math.max(0,Math.min(J.x!=null?I.xaxis.p2c(J.x):I.x2axis.p2c(J.x2),G.width()));H.y=Math.max(0,Math.min(J.y!=null?I.yaxis.p2c(J.y):I.y2axis.p2c(J.y2),G.height()))}G.triggerRedrawOverlay()};G.clearCrosshair=G.setCrosshair;G.lockCrosshair=function E(I){if(I){G.setCrosshair(I)}H.locked=true};G.unlockCrosshair=function F(){H.locked=false};G.hooks.bindEvents.push(function(J,I){if(!J.getOptions().crosshair.mode){return }I.mouseout(function(){if(H.x!=-1){H.x=-1;J.triggerRedrawOverlay()}});I.mousemove(function(K){if(J.getSelection&&J.getSelection()){H.x=-1;return }if(H.locked){return }var L=J.offset();H.x=Math.max(0,Math.min(K.pageX-L.left,J.width()));H.y=Math.max(0,Math.min(K.pageY-L.top,J.height()));J.triggerRedrawOverlay()})});G.hooks.drawOverlay.push(function(K,I){var L=K.getOptions().crosshair;if(!L.mode){return }var J=K.getPlotOffset();I.save();I.translate(J.left,J.top);if(H.x!=-1){I.strokeStyle=L.color;I.lineWidth=L.lineWidth;I.lineJoin="round";I.beginPath();if(L.mode.indexOf("x")!=-1){I.moveTo(H.x,0);I.lineTo(H.x,K.height())}if(L.mode.indexOf("y")!=-1){I.moveTo(0,H.y);I.lineTo(K.width(),H.y)}I.stroke()}I.restore()})}B.plot.plugins.push({init:C,options:A,name:"crosshair",version:"1.0"})})(jQuery);
\ No newline at end of file
+(function(b){var a={crosshair:{mode:null,color:"rgba(170, 0, 0, 0.80)",lineWidth:1}};function c(h){var j={x:-1,y:-1,locked:false};h.setCrosshair=function e(l){if(!l){j.x=-1}else{var k=h.p2c(l);j.x=Math.max(0,Math.min(k.left,h.width()));j.y=Math.max(0,Math.min(k.top,h.height()))}h.triggerRedrawOverlay()};h.clearCrosshair=h.setCrosshair;h.lockCrosshair=function f(k){if(k){h.setCrosshair(k)}j.locked=true};h.unlockCrosshair=function g(){j.locked=false};function d(k){if(j.locked){return}if(j.x!=-1){j.x=-1;h.triggerRedrawOverlay()}}function i(k){if(j.locked){return}if(h.getSelection&&h.getSelection()){j.x=-1;return}var l=h.offset();j.x=Math.max(0,Math.min(k.pageX-l.left,h.width()));j.y=Math.max(0,Math.min(k.pageY-l.top,h.height()));h.triggerRedrawOverlay()}h.hooks.bindEvents.push(function(l,k){if(!l.getOptions().crosshair.mode){return}k.mouseout(d);k.mousemove(i)});h.hooks.drawOverlay.push(function(m,k){var n=m.getOptions().crosshair;if(!n.mode){return}var l=m.getPlotOffset();k.save();k.translate(l.left,l.top);if(j.x!=-1){k.strokeStyle=n.color;k.lineWidth=n.lineWidth;k.lineJoin="round";k.beginPath();if(n.mode.indexOf("x")!=-1){k.moveTo(j.x,0);k.lineTo(j.x,m.height())}if(n.mode.indexOf("y")!=-1){k.moveTo(0,j.y);k.lineTo(m.width(),j.y)}k.stroke()}k.restore()});h.hooks.shutdown.push(function(l,k){k.unbind("mouseout",d);k.unbind("mousemove",i)})}b.plot.plugins.push({init:c,options:a,name:"crosshair",version:"1.0"})})(jQuery);
\ No newline at end of file
Added: CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.fillbetween.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.fillbetween.js (rev 0)
+++ CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.fillbetween.js 2011-06-21 20:05:06 UTC (rev 369)
@@ -0,0 +1,183 @@
+/*
+Flot plugin for computing bottoms for filled line and bar charts.
+
+The case: you've got two series that you want to fill the area
+between. In Flot terms, you need to use one as the fill bottom of the
+other. You can specify the bottom of each data point as the third
+coordinate manually, or you can use this plugin to compute it for you.
+
+In order to name the other series, you need to give it an id, like this
+
+ var dataset = [
+ { data: [ ... ], id: "foo" } , // use default bottom
+ { data: [ ... ], fillBetween: "foo" }, // use first dataset as bottom
+ ];
+
+ $.plot($("#placeholder"), dataset, { line: { show: true, fill: true }});
+
+As a convenience, if the id given is a number that doesn't appear as
+an id in the series, it is interpreted as the index in the array
+instead (so fillBetween: 0 can also mean the first series).
+
+Internally, the plugin modifies the datapoints in each series. For
+line series, extra data points might be inserted through
+interpolation. Note that at points where the bottom line is not
+defined (due to a null point or start/end of line), the current line
+will show a gap too. The algorithm comes from the jquery.flot.stack.js
+plugin, possibly some code could be shared.
+*/
+
+(function ($) {
+ var options = {
+ series: { fillBetween: null } // or number
+ };
+
+ function init(plot) {
+ function findBottomSeries(s, allseries) {
+ var i;
+ for (i = 0; i < allseries.length; ++i) {
+ if (allseries[i].id == s.fillBetween)
+ return allseries[i];
+ }
+
+ if (typeof s.fillBetween == "number") {
+ i = s.fillBetween;
+
+ if (i < 0 || i >= allseries.length)
+ return null;
+
+ return allseries[i];
+ }
+
+ return null;
+ }
+
+ function computeFillBottoms(plot, s, datapoints) {
+ if (s.fillBetween == null)
+ return;
+
+ var other = findBottomSeries(s, plot.getData());
+ if (!other)
+ return;
+
+ var ps = datapoints.pointsize,
+ points = datapoints.points,
+ otherps = other.datapoints.pointsize,
+ otherpoints = other.datapoints.points,
+ newpoints = [],
+ px, py, intery, qx, qy, bottom,
+ withlines = s.lines.show,
+ withbottom = ps > 2 && datapoints.format[2].y,
+ withsteps = withlines && s.lines.steps,
+ fromgap = true,
+ i = 0, j = 0, l;
+
+ while (true) {
+ if (i >= points.length)
+ break;
+
+ l = newpoints.length;
+
+ if (points[i] == null) {
+ // copy gaps
+ for (m = 0; m < ps; ++m)
+ newpoints.push(points[i + m]);
+ i += ps;
+ }
+ else if (j >= otherpoints.length) {
+ // for lines, we can't use the rest of the points
+ if (!withlines) {
+ for (m = 0; m < ps; ++m)
+ newpoints.push(points[i + m]);
+ }
+ i += ps;
+ }
+ else if (otherpoints[j] == null) {
+ // oops, got a gap
+ for (m = 0; m < ps; ++m)
+ newpoints.push(null);
+ fromgap = true;
+ j += otherps;
+ }
+ else {
+ // cases where we actually got two points
+ px = points[i];
+ py = points[i + 1];
+ qx = otherpoints[j];
+ qy = otherpoints[j + 1];
+ bottom = 0;
+
+ if (px == qx) {
+ for (m = 0; m < ps; ++m)
+ newpoints.push(points[i + m]);
+
+ //newpoints[l + 1] += qy;
+ bottom = qy;
+
+ i += ps;
+ j += otherps;
+ }
+ else if (px > qx) {
+ // we got past point below, might need to
+ // insert interpolated extra point
+ if (withlines && i > 0 && points[i - ps] != null) {
+ intery = py + (points[i - ps + 1] - py) * (qx - px) / (points[i - ps] - px);
+ newpoints.push(qx);
+ newpoints.push(intery)
+ for (m = 2; m < ps; ++m)
+ newpoints.push(points[i + m]);
+ bottom = qy;
+ }
+
+ j += otherps;
+ }
+ else { // px < qx
+ if (fromgap && withlines) {
+ // if we come from a gap, we just skip this point
+ i += ps;
+ continue;
+ }
+
+ for (m = 0; m < ps; ++m)
+ newpoints.push(points[i + m]);
+
+ // we might be able to interpolate a point below,
+ // this can give us a better y
+ if (withlines && j > 0 && otherpoints[j - otherps] != null)
+ bottom = qy + (otherpoints[j - otherps + 1] - qy) * (px - qx) / (otherpoints[j - otherps] - qx);
+
+ //newpoints[l + 1] += bottom;
+
+ i += ps;
+ }
+
+ fromgap = false;
+
+ if (l != newpoints.length && withbottom)
+ newpoints[l + 2] = bottom;
+ }
+
+ // maintain the line steps invariant
+ if (withsteps && l != newpoints.length && l > 0
+ && newpoints[l] != null
+ && newpoints[l] != newpoints[l - ps]
+ && newpoints[l + 1] != newpoints[l - ps + 1]) {
+ for (m = 0; m < ps; ++m)
+ newpoints[l + ps + m] = newpoints[l + m];
+ newpoints[l + 1] = newpoints[l - ps + 1];
+ }
+ }
+
+ datapoints.points = newpoints;
+ }
+
+ plot.hooks.processDatapoints.push(computeFillBottoms);
+ }
+
+ $.plot.plugins.push({
+ init: init,
+ options: options,
+ name: 'fillbetween',
+ version: '1.0'
+ });
+})(jQuery);
Added: CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.fillbetween.min.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.fillbetween.min.js (rev 0)
+++ CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.fillbetween.min.js 2011-06-21 20:05:06 UTC (rev 369)
@@ -0,0 +1 @@
+(function(b){var a={series:{fillBetween:null}};function c(f){function d(j,h){var g;for(g=0;g<h.length;++g){if(h[g].id==j.fillBetween){return h[g]}}if(typeof j.fillBetween=="number"){g=j.fillBetween;if(g<0||g>=h.length){return null}return h[g]}return null}function e(B,u,g){if(u.fillBetween==null){return}var p=d(u,B.getData());if(!p){return}var y=g.pointsize,E=g.points,h=p.datapoints.pointsize,x=p.datapoints.points,r=[],w,v,k,G,F,q,t=u.lines.show,o=y>2&&g.format[2].y,n=t&&u.lines.steps,D=true,C=0,A=0,z;while(true){if(C>=E.leng...
[truncated message content] |
|
From: <ma...@us...> - 2011-06-26 09:03:31
|
Revision: 375
http://openautomation.svn.sourceforge.net/openautomation/?rev=375&view=rev
Author: mayerch
Date: 2011-06-26 09:03:25 +0000 (Sun, 26 Jun 2011)
Log Message:
-----------
Added forceReload=true to the reload link to avoid cache trouble
Modified Paths:
--------------
CometVisu/trunk/visu/visu_config.xml
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/visu_config.xml
===================================================================
--- CometVisu/trunk/visu/visu_config.xml 2011-06-25 13:42:59 UTC (rev 374)
+++ CometVisu/trunk/visu/visu_config.xml 2011-06-26 09:03:25 UTC (rev 375)
@@ -10,7 +10,7 @@
<statusbar>
<status type="html"><![CDATA[
<img src="icon/comet_64_ff8000.png" alt="CometVisu" /> by <a href="http://www.cometvisu.org/">CometVisu.org</a>
- - <a href=".">Reload</a>
+ - <a href=".?forceReload=true">Reload</a>
- <a href="?config=demo">Widget Demo</a>
]]></status>
<status type="html" condition="!edit" hrefextend="config"><![CDATA[
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2011-06-25 13:42:59 UTC (rev 374)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2011-06-26 09:03:25 UTC (rev 375)
@@ -45,7 +45,7 @@
<statusbar>
<status type="html"><![CDATA[
<img src="icon/comet_64_ff8000.png" alt="CometVisu" /> by <a href="http://www.cometvisu.org/">CometVisu.org</a>
- - <a href=".?config=demo">Reload</a>
+ - <a href=".?config=demo&forceReload=true">Reload</a>
- <a href=".">Default Config</a>
]]></status>
<status type="html" condition="!edit" hrefextend="config"><![CDATA[
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-07-03 13:04:55
|
Revision: 376
http://openautomation.svn.sourceforge.net/openautomation/?rev=376&view=rev
Author: chris_ace
Date: 2011-07-03 13:04:49 +0000 (Sun, 03 Jul 2011)
Log Message:
-----------
Add certain iframe style attributes
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/visu_config.xsd
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2011-06-26 09:03:25 UTC (rev 375)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-07-03 13:04:49 UTC (rev 376)
@@ -611,15 +611,21 @@
var style = '';
if( $p.attr('width' ) ) style += 'width:' + $p.attr('width' ) + ';';
if( $p.attr('height') ) style += 'height:' + $p.attr('height') + ';';
+ if( $p.attr('allowtransparency') == 0 ) style += 'allowTransparency: false ;';
+ if( $p.attr('frameborder') == 0 ) style += 'border: 0px ;';
+ if( $p.attr('background') ) style += 'background-color:' + $p.attr('background') + ';';
if( style != '' ) style = 'style="' + style + '"';
var actor = '<div class="actor"><iframe src="' +$p.attr('src') + '" ' + style + '></iframe></div>';
ret_val.append( $(actor) );
return ret_val;
},
attributes: {
- src: { type: 'uri' , required: true },
- width: { type: 'string', required: false },
- height: { type: 'string', required: false }
+ src: { type: 'uri' , required: true },
+ width: { type: 'string', required: false },
+ height: { type: 'string', required: false },
+ allowtransparency: { type: 'numeric', required: false },
+ frameborder: { type: 'numeric', required: false },
+ background: { type: 'string', required: false }
},
elements: {
label: { type: 'string', required: false, multi: false }
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2011-06-26 09:03:25 UTC (rev 375)
+++ CometVisu/trunk/visu/visu_config.xsd 2011-07-03 13:04:49 UTC (rev 376)
@@ -329,9 +329,12 @@
<xsd:choice maxOccurs="unbounded" minOccurs="0">
<xsd:element name="label" type="xsd:string" maxOccurs="1" />
</xsd:choice>
- <xsd:attribute name="src" type="uri" use="required" />
+ <xsd:attribute name="src" type="uri" use="required" />
<xsd:attribute name="width" type="dimension" />
<xsd:attribute name="height" type="dimension" />
+ <xsd:attribute name="allowtransparency" type="xsd:bool" />
+ <xsd:attribute name="frameborder" type="xsd:bool" />
+ <xsd:attribute name="background" type="xsd:string" />
</xsd:complexType>
<xsd:complexType name="colorchooser" >
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-09-17 07:37:47
|
Revision: 418
http://openautomation.svn.sourceforge.net/openautomation/?rev=418&view=rev
Author: chris_ace
Date: 2011-09-17 07:37:37 +0000 (Sat, 17 Sep 2011)
Log Message:
-----------
Change all DOS line endings to Unix line endings using:
fgrep -rl "^M" . | fgrep -v svn | egrep "js|css|php|csv|svg" | xargs dos2unix
Modified Paths:
--------------
CometVisu/trunk/visu/designs/alaska/basic.css
CometVisu/trunk/visu/designs/alaska/mobile.css
CometVisu/trunk/visu/designs/alaska_slim/basic.css
CometVisu/trunk/visu/designs/alaska_slim/mobile.css
CometVisu/trunk/visu/designs/discreet/basic.css
CometVisu/trunk/visu/designs/discreet/mobile.css
CometVisu/trunk/visu/designs/discreet_sand/basic.css
CometVisu/trunk/visu/designs/discreet_sand/mobile.css
CometVisu/trunk/visu/designs/discreet_slim/basic.css
CometVisu/trunk/visu/designs/discreet_slim/mobile.css
CometVisu/trunk/visu/designs/pure/basic.css
CometVisu/trunk/visu/designs/pure/mobile.css
CometVisu/trunk/visu/edit/dpt_list.csv
CometVisu/trunk/visu/edit/dpt_list.json
CometVisu/trunk/visu/icon/comet_opt.svg
CometVisu/trunk/visu/lib/jquery.jnotify.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.pie.js
CometVisu/trunk/visu/plugins/gweather/gweather.php
CometVisu/trunk/visu/plugins/gweather/structure_plugin.js
CometVisu/trunk/visu/plugins/rss/structure_plugin.js
CometVisu/trunk/visu/plugins/rss/zrssfeed/jquery.vticker.js
CometVisu/trunk/visu/plugins/rss/zrssfeed/jquery.zrssfeed.js
CometVisu/trunk/visu/plugins/rss/zrssfeed/jquery.zrssfeed.min.js
Modified: CometVisu/trunk/visu/designs/alaska/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska/basic.css 2011-09-11 20:49:21 UTC (rev 417)
+++ CometVisu/trunk/visu/designs/alaska/basic.css 2011-09-17 07:37:37 UTC (rev 418)
@@ -1,384 +1,384 @@
-@import "colors.css";
-@font-face { font-family: new_cicle; src:url(fonts/new_cicle_fina.ttf); }
-@font-face { font-family: new_cicle; font-weight: bold; src:url(fonts/new_cicle_gordita.ttf); }
-
-body
-{
- font-family: new_cicle,sans-serif;
- font-size: 5.5mm;
- overflow: hidden;
- margin:0;
-}
-
-h1
-{
- font-size: 1.5em;
- padding-left: 15px;
-}
-
-h2
-{
- font-size: 1.1em;
- margin-left: 15px;
- margin-top: 5px;
- margin-bottom: 5px;
-}
-
-body hr
-{
- clear:both;
- height: 1px;
- border: none;
- padding: 0;
- margin:0.1em;
-}
-
-#pages hr
-{
- /* margin: 15px 0.1em 15px 0.1em; */
- margin: 4px 1px 4px 1px;
- border: 0; /* for Firefox and Opera */
- border-top-style: solid;
- border-top-width: 1px;
- border-bottom: transparent;
- clear: both;
-}
-
-
-body br
-{
- clear:both;
-}
-
-div#top {
- padding-top: 8px;
- border-bottom-style: solid;
- border-width: 1px;
- padding-bottom: 2px;
-}
-
-.page h1
-{
- margin-top: 0;
- padding-top: 1em;
-}
-
-.nav_path
-{
- margin-left: 15px;
-}
-
-.nav_path a
-{
- text-decoration:none;
-}
-
-.footer, .footer *
-{
- font-size: 0.9em;
- vertical-align: middle;
- border-top-style: solid;
- border-width: 1px;
-}
-
-.footer *
-{
- border-style: none;
- text-decoration: none;
-}
-
-.widget
-{
- float:left;
- width:48%;
- margin: 0.2em;
- padding: 0.2em;
- border-style: solid none none none; /* oben rechts unten links */
- border-width: 1px;
- min-height: 2em;
- background: transparent;
-}
-
-.widget .widget
-{
- width:98%;
-}
-
-.text > div, .link > a
-{
- float:left;
- text-align:left;
- padding-left: 1em;
-}
-
-.widget .label, .widget.info .actor, .text > div, .link > a
-{
- line-height: 2em;
-}
-
-.widget .label
-{
- float:left;
- width:49%;
- text-align:left;
- padding-left: 1em;
-}
-.widget .actor
-{
- float:left;
- margin-left:1em;
- text-align:left;
-}
-.widget .actor div
-{
- float:left;
- white-space: pre-wrap;
-}
-
-.link a
-{
- width: 49%;
-}
-
-.page
-{
- float:left;
- width: 900px;
- overflow: auto;
- position: relative;
-}
-
-.switchPressed, .switchUnpressed, .widget.link.pagelink div a
-{
- overflow: hidden;
- text-align: center;
- white-space: nowrap;
- font: 14px/100%;
- padding: 1px;
- -webkit-border-radius: .5em;
- -moz-border-radius: .5em;
- border-radius: .5em;
- border-style: solid;
- border-width: 1px;
- margin: 5px;
-}
-
-.switchPressed, .switchUnpressed:active
-{
- position: relative;
- top: 1px;
-}
-.switchPressed:active
-{
- position: relative;
- top: 2px;
-}
-
-.switchUnpressed div, .switchPressed div
-{
- padding: 2px;
- width: 6em;
- float: left;
- background: transparent;
- text-align: center;
- cursor: pointer;
-}
-
-.ui-slider { position: relative; text-align: left;}
-.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.6em; height: 1.6em; cursor: default; }
-.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; }
-
-.ui-slider-horizontal { height: .8em; }
-.ui-slider-horizontal .ui-slider-handle { top: -.5em; margin-left: -.8em; }
-.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
-.ui-slider-horizontal .ui-slider-range-min { left: 0; }
-.ui-slider-horizontal .ui-slider-range-max { right: 0; }
-
-.ui-slider-vertical { width: .8em; height: 100px; }
-.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
-.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
-.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
-.ui-slider-vertical .ui-slider-range-max { top: 0; }
-.ui-widget-content
-{
- border-style: solid;
- border-width: 1px;
-}
-.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default
-{
- border-style: solid;
- border-width: 1px;
- font-weight: bold;
-}
-.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { text-decoration: none; }
-
-.dim .actor
-{
- width: 3em;
-}
-
-.widget .ui-slider
-{
- width: 30%;
- float: left;
- margin-left: 1em;
- margin-top: 0.5em;
- border-style: solid;
- border-width: 1px;
- -webkit-border-radius: .5em;
- -moz-border-radius: .5em;
- border-radius: .5em;
-}
-
-.widget .ui-slider-handle
-{
- padding: 1px;
- /*height: 0.9em; /* Slider small */
- /* width: 0.9em; /* Slider small */
- /* margin: 0em 0em 0em -0.4em; /* Slider small top */
- /* margin: 0.38em 0em 0em -0.4em; /* Slider small middle */
- -webkit-border-radius: 50%;
- -moz-border-radius: 50%;
- border-radius: 50%;
- border-style: solid;
- border-width: 1px;
-}
-/* Clearfix */
-.clearfix:after
-{
- content: ".";
- display: block;
- clear: both;
- visibility: hidden;
- line-height: 0;
- height: 0;
-}
-
-.clearfix
-{
- display: inline-block;
- -webkit-border-radius: .5em;
- -moz-border-radius: .5em;
- border-radius: .5em;
- border-style: solid;
- border-width: 1px;
-}
-
-html[xmlns] .clearfix
-{
- display: block;
-}
-
-*:first-child+html .clearfix
-{
- min-height: 0;
-}
-
-* html .clearfix
-{
- height: 1%;
-}
-
-* html>body .clearfix
-{
- display: inline-block;
- width: 100%;
-}
-
-* html .clearfix
-{
- /* Hides from IE-mac \*/
- height: 1%;
- /* End hide from IE-mac */
-}
-
-.loading
-{
- display: block !important;
-}
-
-div#loading
-{
- display: none !important;
-}
-
-.popup, .popup_background
-{
- position: absolute;
- width: 90%;
- height: 90%;
- top: 5%;
- left: 5%;
-}
-
-.popup
-{
- z-index: 101;
- background: transparent;
-}
-
-
-.popup_background
-{
- z-index: 100;
- -webkit-border-radius: .5em;
- -moz-border-radius: .5em;
- border-radius: .5em;
- border-style: solid;
- border-width: 1px;
- opacity: .98;
-}
-
-.popup div
-{
- margin: 4px;
-}
-
-.popup div.head
-{
- border-bottom-style: solid;
- border-bottom-width: 1px;
-}
-
-.clickable
-{
- cursor: pointer;
-}
-
-.diagram_inline
-{
- width: 320px;
- height: 180px;
-}
-
-.diagram_preview
-{
- width: 240px;
- height: 2em;
-}
-
-#diagramTooltip
-{
- z-index: 1000;
- border-style: solid;
- border-width: 1px;
- padding: 2px;
- opacity: 0.80;
-}
-
-.widget IFRAME
-{
- -webkit-border-radius: .5em;
- -moz-border-radius: .5em;
- border-radius: .5em;
- border-style: solid;
- border-width: 1px;
-}
-
-/* Pagelinks as Button */
-.widget.link.pagelink div a
-{
- display: inline-block;
- width: 100%;
- text-decoration: none;
-}
+@import "colors.css";
+@font-face { font-family: new_cicle; src:url(fonts/new_cicle_fina.ttf); }
+@font-face { font-family: new_cicle; font-weight: bold; src:url(fonts/new_cicle_gordita.ttf); }
+
+body
+{
+ font-family: new_cicle,sans-serif;
+ font-size: 5.5mm;
+ overflow: hidden;
+ margin:0;
+}
+
+h1
+{
+ font-size: 1.5em;
+ padding-left: 15px;
+}
+
+h2
+{
+ font-size: 1.1em;
+ margin-left: 15px;
+ margin-top: 5px;
+ margin-bottom: 5px;
+}
+
+body hr
+{
+ clear:both;
+ height: 1px;
+ border: none;
+ padding: 0;
+ margin:0.1em;
+}
+
+#pages hr
+{
+ /* margin: 15px 0.1em 15px 0.1em; */
+ margin: 4px 1px 4px 1px;
+ border: 0; /* for Firefox and Opera */
+ border-top-style: solid;
+ border-top-width: 1px;
+ border-bottom: transparent;
+ clear: both;
+}
+
+
+body br
+{
+ clear:both;
+}
+
+div#top {
+ padding-top: 8px;
+ border-bottom-style: solid;
+ border-width: 1px;
+ padding-bottom: 2px;
+}
+
+.page h1
+{
+ margin-top: 0;
+ padding-top: 1em;
+}
+
+.nav_path
+{
+ margin-left: 15px;
+}
+
+.nav_path a
+{
+ text-decoration:none;
+}
+
+.footer, .footer *
+{
+ font-size: 0.9em;
+ vertical-align: middle;
+ border-top-style: solid;
+ border-width: 1px;
+}
+
+.footer *
+{
+ border-style: none;
+ text-decoration: none;
+}
+
+.widget
+{
+ float:left;
+ width:48%;
+ margin: 0.2em;
+ padding: 0.2em;
+ border-style: solid none none none; /* oben rechts unten links */
+ border-width: 1px;
+ min-height: 2em;
+ background: transparent;
+}
+
+.widget .widget
+{
+ width:98%;
+}
+
+.text > div, .link > a
+{
+ float:left;
+ text-align:left;
+ padding-left: 1em;
+}
+
+.widget .label, .widget.info .actor, .text > div, .link > a
+{
+ line-height: 2em;
+}
+
+.widget .label
+{
+ float:left;
+ width:49%;
+ text-align:left;
+ padding-left: 1em;
+}
+.widget .actor
+{
+ float:left;
+ margin-left:1em;
+ text-align:left;
+}
+.widget .actor div
+{
+ float:left;
+ white-space: pre-wrap;
+}
+
+.link a
+{
+ width: 49%;
+}
+
+.page
+{
+ float:left;
+ width: 900px;
+ overflow: auto;
+ position: relative;
+}
+
+.switchPressed, .switchUnpressed, .widget.link.pagelink div a
+{
+ overflow: hidden;
+ text-align: center;
+ white-space: nowrap;
+ font: 14px/100%;
+ padding: 1px;
+ -webkit-border-radius: .5em;
+ -moz-border-radius: .5em;
+ border-radius: .5em;
+ border-style: solid;
+ border-width: 1px;
+ margin: 5px;
+}
+
+.switchPressed, .switchUnpressed:active
+{
+ position: relative;
+ top: 1px;
+}
+.switchPressed:active
+{
+ position: relative;
+ top: 2px;
+}
+
+.switchUnpressed div, .switchPressed div
+{
+ padding: 2px;
+ width: 6em;
+ float: left;
+ background: transparent;
+ text-align: center;
+ cursor: pointer;
+}
+
+.ui-slider { position: relative; text-align: left;}
+.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.6em; height: 1.6em; cursor: default; }
+.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; }
+
+.ui-slider-horizontal { height: .8em; }
+.ui-slider-horizontal .ui-slider-handle { top: -.5em; margin-left: -.8em; }
+.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
+.ui-slider-horizontal .ui-slider-range-min { left: 0; }
+.ui-slider-horizontal .ui-slider-range-max { right: 0; }
+
+.ui-slider-vertical { width: .8em; height: 100px; }
+.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
+.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
+.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
+.ui-slider-vertical .ui-slider-range-max { top: 0; }
+.ui-widget-content
+{
+ border-style: solid;
+ border-width: 1px;
+}
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default
+{
+ border-style: solid;
+ border-width: 1px;
+ font-weight: bold;
+}
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { text-decoration: none; }
+
+.dim .actor
+{
+ width: 3em;
+}
+
+.widget .ui-slider
+{
+ width: 30%;
+ float: left;
+ margin-left: 1em;
+ margin-top: 0.5em;
+ border-style: solid;
+ border-width: 1px;
+ -webkit-border-radius: .5em;
+ -moz-border-radius: .5em;
+ border-radius: .5em;
+}
+
+.widget .ui-slider-handle
+{
+ padding: 1px;
+ /*height: 0.9em; /* Slider small */
+ /* width: 0.9em; /* Slider small */
+ /* margin: 0em 0em 0em -0.4em; /* Slider small top */
+ /* margin: 0.38em 0em 0em -0.4em; /* Slider small middle */
+ -webkit-border-radius: 50%;
+ -moz-border-radius: 50%;
+ border-radius: 50%;
+ border-style: solid;
+ border-width: 1px;
+}
+/* Clearfix */
+.clearfix:after
+{
+ content: ".";
+ display: block;
+ clear: both;
+ visibility: hidden;
+ line-height: 0;
+ height: 0;
+}
+
+.clearfix
+{
+ display: inline-block;
+ -webkit-border-radius: .5em;
+ -moz-border-radius: .5em;
+ border-radius: .5em;
+ border-style: solid;
+ border-width: 1px;
+}
+
+html[xmlns] .clearfix
+{
+ display: block;
+}
+
+*:first-child+html .clearfix
+{
+ min-height: 0;
+}
+
+* html .clearfix
+{
+ height: 1%;
+}
+
+* html>body .clearfix
+{
+ display: inline-block;
+ width: 100%;
+}
+
+* html .clearfix
+{
+ /* Hides from IE-mac \*/
+ height: 1%;
+ /* End hide from IE-mac */
+}
+
+.loading
+{
+ display: block !important;
+}
+
+div#loading
+{
+ display: none !important;
+}
+
+.popup, .popup_background
+{
+ position: absolute;
+ width: 90%;
+ height: 90%;
+ top: 5%;
+ left: 5%;
+}
+
+.popup
+{
+ z-index: 101;
+ background: transparent;
+}
+
+
+.popup_background
+{
+ z-index: 100;
+ -webkit-border-radius: .5em;
+ -moz-border-radius: .5em;
+ border-radius: .5em;
+ border-style: solid;
+ border-width: 1px;
+ opacity: .98;
+}
+
+.popup div
+{
+ margin: 4px;
+}
+
+.popup div.head
+{
+ border-bottom-style: solid;
+ border-bottom-width: 1px;
+}
+
+.clickable
+{
+ cursor: pointer;
+}
+
+.diagram_inline
+{
+ width: 320px;
+ height: 180px;
+}
+
+.diagram_preview
+{
+ width: 240px;
+ height: 2em;
+}
+
+#diagramTooltip
+{
+ z-index: 1000;
+ border-style: solid;
+ border-width: 1px;
+ padding: 2px;
+ opacity: 0.80;
+}
+
+.widget IFRAME
+{
+ -webkit-border-radius: .5em;
+ -moz-border-radius: .5em;
+ border-radius: .5em;
+ border-style: solid;
+ border-width: 1px;
+}
+
+/* Pagelinks as Button */
+.widget.link.pagelink div a
+{
+ display: inline-block;
+ width: 100%;
+ text-decoration: none;
+}
Modified: CometVisu/trunk/visu/designs/alaska/mobile.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska/mobile.css 2011-09-11 20:49:21 UTC (rev 417)
+++ CometVisu/trunk/visu/designs/alaska/mobile.css 2011-09-17 07:37:37 UTC (rev 418)
@@ -1,14 +1,14 @@
-.widget
-{
- width:98%;
-}
-
-#bottom
-{
- display: none;
-}
-
-.page
-{
- overflow: visible;
-}
+.widget
+{
+ width:98%;
+}
+
+#bottom
+{
+ display: none;
+}
+
+.page
+{
+ overflow: visible;
+}
Modified: CometVisu/trunk/visu/designs/alaska_slim/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska_slim/basic.css 2011-09-11 20:49:21 UTC (rev 417)
+++ CometVisu/trunk/visu/designs/alaska_slim/basic.css 2011-09-17 07:37:37 UTC (rev 418)
@@ -1,364 +1,364 @@
-@import "colors.css";
-@font-face { font-family: new_cicle; src:url(fonts/new_cicle_fina.ttf); }
-@font-face { font-family: new_cicle; font-weight: bold; src:url(fonts/new_cicle_gordita.ttf); }
-
-body
-{
- font-family: new_cicle,sans-serif;
- font-size: 5mm;
- overflow: hidden;
- margin:0;
-}
-
-h1
-{
- font-size: 1.5em;
- padding-left: 15px;
-}
-
-h2
-{
- font-size: 1.1em;
- margin-left: 15px;
- margin-top: 5px;
- margin-bottom: 5px;
-}
-
-body hr
-{
- clear:both;
- height: 1px;
- border: none;
- padding: 0;
- margin: 0.1em;
-}
-
-#pages hr {
- margin: 4px 1px 4px 1px;
- border: 0; /* Für Firefox und Opera */
- border-top: solid 1px;
- border-bottom: transparent;
- clear: both;
-}
-
-
-body br
-{
- clear:both;
-}
-
-div#top {
- padding-top: 8px;
- border-bottom: 1px solid;
- padding-bottom: 2px;
-}
-
-.page h1 {
- margin-top: 0;
- padding-top: 1em;
-}
-
-.nav_path
-{
- margin-left: 15px;
-}
-
-.nav_path a
-{
- text-decoration:none;
-}
-
-.footer, .footer *
-{
- font-size: 0.9em;
- vertical-align: middle;
- border-top-style: solid;
- border-width: 1px;
-}
-
-.footer *
-{
- border-style: none;
- text-decoration: none;
-}
-
-.widget
-{
- float:left;
- width:32%;
- margin: 0.2em;
- padding: 0.2em;
- border-style: solid none none none; /* oben rechts unten links */
- border-width: 1px;
- min-height: 2em;
- background: transparent;
-}
-
-.widget .widget
-{
- width:98%;
-}
-
-.text > div, .link > a {
- float:left;
- text-align:left;
- padding-left: 1em;
- text-decoration: none;
-}
-
-.widget .label, .widget.info .actor, .text > div, .link > a
-{
- line-height: 2em;
-}
-
-.widget .label
-{
- float:left;
- width:49%;
- text-align:left;
- padding-left: 1em;
-}
-.widget .actor
-{
- float:left;
- margin-left:1em;
- text-align:left;
-}
-.widget .actor div
-{
- float:left;
- white-space: pre-wrap;
-}
-
-.link a
-{
- width: 49%;
-}
-
-.page
-{
- float:left;
- width: 900px;
- overflow: auto;
- position: relative;
-}
-
-.switchPressed, .switchUnpressed, .widget.link.pagelink div a
-{
- overflow: hidden;
- text-align: center;
- white-space: nowrap;
- font: 14px/100%;
- padding: 1px;
- -webkit-border-radius: .5em;
- -moz-border-radius: .5em;
- border-radius: .5em;
- border-style: solid;
- border-width: 1px;
- margin: 5px;
-}
-
-.switchPressed, .switchUnpressed:active
-{
- position: relative;
- top: 1px;
-}
-
-.switchPressed:active {
- position: relative;
- top: 2px;
-}
-
-.switchUnpressed div, .switchPressed div
-{
- padding: 2px;
- width: 6em;
- float: left;
- background: transparent;
- text-align: center;
- cursor: pointer;
-}
-
-.ui-slider { position: relative; text-align: left;}
-.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.6em; height: 1.6em; cursor: default; }
-.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; }
-
-.ui-slider-horizontal { height: .8em; }
-.ui-slider-horizontal .ui-slider-handle { top: -.5em; margin-left: -.8em; }
-.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
-.ui-slider-horizontal .ui-slider-range-min { left: 0; }
-.ui-slider-horizontal .ui-slider-range-max { right: 0; }
-
-.ui-slider-vertical { width: .8em; height: 100px; }
-.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
-.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
-.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
-.ui-slider-vertical .ui-slider-range-max { top: 0; }
-.ui-widget-content { border: 0px solid; }
-.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 0px solid; }
-.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { text-decoration: none; }
-
-.dim .actor
-{
- width: 3em;
-}
-.widget .ui-slider
-{
- width: 30%;
- float: left;
- margin-left: 1em;
- margin-top: 0.5em;
- border: solid 1px;
- -webkit-border-radius: .5em;
- -moz-border-radius: .5em;
- border-radius: .5em;
-}
-
-.widget .ui-slider-handle
-{
- padding: 1px;
- /*height: 0.9em; /* Slider small */
- /* width: 0.9em; /* Slider small */
- /* margin: 0em 0em 0em -0.4em; /* Slider small top */
- /* margin: 0.38em 0em 0em -0.4em; /* Slider small middle */
- border: solid 1px;
- -webkit-border-radius: 50%;
- -moz-border-radius: 50%;
- border-radius: 50%;
-}
-/* Clearfix */
-.clearfix:after {
- content: ".";
- display: block;
- clear: both;
- visibility: hidden;
- line-height: 0;
- height: 0;
-}
-
-.clearfix {
- display: inline-block;
- -webkit-border-radius: .5em;
- -moz-border-radius: .5em;
- border-radius: .5em;
- border: solid 1px;
-}
-
-html[xmlns] .clearfix
-{
- display: block;
-}
-
-*:first-child+html .clearfix
-{
- min-height: 0;
-}
-
-* html .clearfix
-{
- height: 1%;
-}
-
-* html>body .clearfix
-{
- display: inline-block;
- width: 100%;
-}
-
-* html .clearfix
-{
- /* Hides from IE-mac \*/
- height: 1%;
- /* End hide from IE-mac */
-}
-
-.loading
-{
- display: block !important;
-}
-
-div#loading
-{
- display: none !important;
-}
-
-.popup, .popup_background
-{
- position: absolute;
- width: 90%;
- height: 90%;
- top: 5%;
- left: 5%;
-}
-
-.popup
-{
- z-index: 101;
- background: transparent;
-}
-
-
-.popup_background
-{
- z-index: 100;
- -webkit-border-radius: .5em;
- -moz-border-radius: .5em;
- border-radius: .5em;
- opacity: .98;
-}
-
-.popup div
-{
- margin: 4px;
-}
-
-.popup div.head
-{
- border-bottom: 1px solid;
-}
-
-.popup_background.error
-{
- background: #ececec;
- border: solid 1px;
-}
-
-.clickable
-{
- cursor: pointer;
-}
-
-.diagram_inline
-{
- width: 320px;
- height: 180px;
-}
-
-.diagram_preview
-{
- width: 240px;
- height: 2em;
-}
-
-#diagramTooltip
-{
- z-index: 1000;
- border: solid 1px;
- padding: 2px;
- opacity: 0.80;
-}
-
-.widget IFRAME
-{
- -webkit-border-radius: .5em;
- -moz-border-radius: .5em;
- border-radius: .5em;
-}
-
-/* Pagelinks as Button */
-.widget.link.pagelink div a
-{
- display: inline-block;
- width: 100%;
- text-decoration: none;
-}
+@import "colors.css";
+@font-face { font-family: new_cicle; src:url(fonts/new_cicle_fina.ttf); }
+@font-face { font-family: new_cicle; font-weight: bold; src:url(fonts/new_cicle_gordita.ttf); }
+
+body
+{
+ font-family: new_cicle,sans-serif;
+ font-size: 5mm;
+ overflow: hidden;
+ margin:0;
+}
+
+h1
+{
+ font-size: 1.5em;
+ padding-left: 15px;
+}
+
+h2
+{
+ font-size: 1.1em;
+ margin-left: 15px;
+ margin-top: 5px;
+ margin-bottom: 5px;
+}
+
+body hr
+{
+ clear:both;
+ height: 1px;
+ border: none;
+ padding: 0;
+ margin: 0.1em;
+}
+
+#pages hr {
+ margin: 4px 1px 4px 1px;
+ border: 0; /* Für Firefox und Opera */
+ border-top: solid 1px;
+ border-bottom: transparent;
+ clear: both;
+}
+
+
+body br
+{
+ clear:both;
+}
+
+div#top {
+ padding-top: 8px;
+ border-bottom: 1px solid;
+ padding-bottom: 2px;
+}
+
+.page h1 {
+ margin-top: 0;
+ padding-top: 1em;
+}
+
+.nav_path
+{
+ margin-left: 15px;
+}
+
+.nav_path a
+{
+ text-decoration:none;
+}
+
+.footer, .footer *
+{
+ font-size: 0.9em;
+ vertical-align: middle;
+ border-top-style: solid;
+ border-width: 1px;
+}
+
+.footer *
+{
+ border-style: none;
+ text-decoration: none;
+}
+
+.widget
+{
+ float:left;
+ width:32%;
+ margin: 0.2em;
+ padding: 0.2em;
+ border-style: solid none none none; /* oben rechts unten links */
+ border-width: 1px;
+ min-height: 2em;
+ background: transparent;
+}
+
+.widget .widget
+{
+ width:98%;
+}
+
+.text > div, .link > a {
+ float:left;
+ text-align:left;
+ padding-left: 1em;
+ text-decoration: none;
+}
+
+.widget .label, .widget.info .actor, .text > div, .link > a
+{
+ line-height: 2em;
+}
+
+.widget .label
+{
+ float:left;
+ width:49%;
+ text-align:left;
+ padding-left: 1em;
+}
+.widget .actor
+{
+ float:left;
+ margin-left:1em;
+ text-align:left;
+}
+.widget .actor div
+{
+ float:left;
+ white-space: pre-wrap;
+}
+
+.link a
+{
+ width: 49%;
+}
+
+.page
+{
+ float:left;
+ width: 900px;
+ overflow: auto;
+ position: relative;
+}
+
+.switchPressed, .switchUnpressed, .widget.link.pagelink div a
+{
+ overflow: hidden;
+ text-align: center;
+ white-space: nowrap;
+ font: 14px/100%;
+ padding: 1px;
+ -webkit-border-radius: .5em;
+ -moz-border-radius: .5em;
+ border-radius: .5em;
+ border-style: solid;
+ border-width: 1px;
+ margin: 5px;
+}
+
+.switchPressed, .switchUnpressed:active
+{
+ position: relative;
+ top: 1px;
+}
+
+.switchPressed:active {
+ position: relative;
+ top: 2px;
+}
+
+.switchUnpressed div, .switchPressed div
+{
+ padding: 2px;
+ width: 6em;
+ float: left;
+ background: transparent;
+ text-align: center;
+ cursor: pointer;
+}
+
+.ui-slider { position: relative; text-align: left;}
+.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.6em; height: 1.6em; cursor: default; }
+.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; }
+
+.ui-slider-horizontal { height: .8em; }
+.ui-slider-horizontal .ui-slider-handle { top: -.5em; margin-left: -.8em; }
+.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
+.ui-slider-horizontal .ui-slider-range-min { left: 0; }
+.ui-slider-horizontal .ui-slider-range-max { right: 0; }
+
+.ui-slider-vertical { width: .8em; height: 100px; }
+.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
+.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
+.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
+.ui-slider-vertical .ui-slider-range-max { top: 0; }
+.ui-widget-content { border: 0px solid; }
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 0px solid; }
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { text-decoration: none; }
+
+.dim .actor
+{
+ width: 3em;
+}
+.widget .ui-slider
+{
+ width: 30%;
+ float: left;
+ margin-left: 1em;
+ margin-top: 0.5em;
+ border: solid 1px;
+ -webkit-border-radius: .5em;
+ -moz-border-radius: .5em;
+ border-radius: .5em;
+}
+
+.widget .ui-slider-handle
+{
+ padding: 1px;
+ /*height: 0.9em; /* Slider small */
+ /* width: 0.9em; /* Slider small */
+ /* margin: 0em 0em 0em -0.4em; /* Slider small top */
+ /* margin: 0.38em 0em 0em -0.4em; /* Slider small middle */
+ border: solid 1px;
+ -webkit-border-radius: 50%;
+ -moz-border-radius: 50%;
+ border-radius: 50%;
+}
+/* Clearfix */
+.clearfix:after {
+ content: ".";
+ display: block;
+ clear: both;
+ visibility: hidden;
+ line-height: 0;
+ height: 0;
+}
+
+.clearfix {
+ display: inline-block;
+ -webkit-border-radius: .5em;
+ -moz-border-radius: .5em;
+ border-radius: .5em;
+ border: solid 1px;
+}
+
+html[xmlns] .clearfix
+{
+ display: block;
+}
+
+*:first-child+html .clearfix
+{
+ min-height: 0;
+}
+
+* html .clearfix
+{
+ height: 1%;
+}
+
+* html>body .clearfix
+{
+ display: inline-block;
+ width: 100%;
+}
+
+* html .clearfix
+{
+ /* Hides from IE-mac \*/
+ height: 1%;
+ /* End hide from IE-mac */
+}
+
+.loading
+{
+ display: block !important;
+}
+
+div#loading
+{
+ display: none !important;
+}
+
+.popup, .popup_background
+{
+ position: absolute;
+ width: 90%;
+ height: 90%;
+ top: 5%;
+ left: 5%;
+}
+
+.popup
+{
+ z-index: 101;
+ background: transparent;
+}
+
+
+.popup_background
+{
+ z-index: 100;
+ -webkit-border-radius: .5em;
+ -moz-border-radius: .5em;
+ border-radius: .5em;
+ opacity: .98;
+}
+
+.popup div
+{
+ margin: 4px;
+}
+
+.popup div.head
+{
+ border-bottom: 1px solid;
+}
+
+.popup_background.error
+{
+ background: #ececec;
+ border: solid 1px;
+}
+
+.clickable
+{
+ cursor: pointer;
+}
+
+.diagram_inline
+{
+ width: 320px;
+ height: 180px;
+}
+
+.diagram_preview
+{
+ width: 240px;
+ height: 2em;
+}
+
+#diagramTooltip
+{
+ z-index: 1000;
+ border: solid 1px;
+ padding: 2px;
+ opacity: 0.80;
+}
+
+.widget IFRAME
+{
+ -webkit-border-radius: .5em;
+ -moz-border-radius: .5em;
+ border-radius: .5em;
+}
+
+/* Pagelinks as Button */
+.widget.link.pagelink div a
+{
+ display: inline-block;
+ width: 100%;
+ text-decoration: none;
+}
Modified: CometVisu/trunk/visu/designs/alaska_slim/mobile.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska_slim/mobile.css 2011-09-11 20:49:21 UTC (rev 417)
+++ CometVisu/trunk/visu/designs/alaska_slim/mobile.css 2011-09-17 07:37:37 UTC (rev 418)
@@ -1,14 +1,14 @@
-.widget
-{
- width:98%;
-}
-
-#bottom
-{
- display: none;
-}
-
-.page
-{
- overflow: visible;
-}
+.widget
+{
+ width:98%;
+}
+
+#bottom
+{
+ display: none;
+}
+
+.page
+{
+ overflow: visible;
+}
Modified: CometVisu/trunk/visu/designs/discreet/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet/basic.css 2011-09-11 20:49:21 UTC (rev 417)
+++ CometVisu/trunk/visu/designs/discreet/basic.css 2011-09-17 07:37:37 UTC (rev 418)
@@ -1,385 +1,385 @@
-@font-face { font-family: Liberation; src:url(fonts/liberationsans-regular.ttf); }
-@font-face { font-family: Liberation; font-weight: bold; src:url(fonts/liberationsans-bold.ttf); }
-
-body
-{
- color: white;
- font-family: Liberation;
- font-size: 5.5mm;
- overflow: hidden;
- margin:0;
- background: #1d1d1d; /* url(images/body_bg.png) repeat-x; */
-}
-
-h1
-{
- font-size: 2em;
- padding-left: 15px;
-}
-
-h2
-{
- font-size: 1.25em;
- margin-left: 15px;
- margin-top: 5px;
- margin-bottom: 5px;
-}
-
-body hr
-{
- clear:both;
- color: #81664b;
- background-color: #81664b;
- height: 1px;
- border:none;
- padding:0px;
- margin:0.1em;
-}
-
-#pages hr {
- border: 0; height: 30px; margin: 0 .1em;
- background: transparent url(images/hr_bg.png) 50% repeat-x;
- clear: both;
-}
-
-
-body br
-{
- clear:both;
-}
-
-div#top {
- padding-top: 8px;
- border-top: 3px solid #1d1d1d;
- border-bottom: 1px solid #0a0a0a;
- background-color: #121212;
- padding-bottom: 2px;
-}
-
-.page h1 {
- margin-top: 0;
- padding-top: 1em;
- background: #121212 url(images/head_bg.png) scroll repeat-x bottom;
-}
-
-.nav_path
-{
- color: #81664b;
- margin-left: 15px;
-}
-.nav_path a
-{
- color: white;
- text-decoration:none;
-}
-
-.footer,
-.footer *
-{
- color: #000000;
- font-size: 0.9em;
- vertical-align: middle;
-}
-
-.widget
-{
- float:left;
- width:48%;
- margin: .2em;
- padding: 0.3em;
- /* border:yellow 1px solid; */
- border-color: #020202;
- border-style: soli...
[truncated message content] |
|
From: <ma...@us...> - 2011-09-19 15:58:18
|
Revision: 420
http://openautomation.svn.sourceforge.net/openautomation/?rev=420&view=rev
Author: mayerch
Date: 2011-09-19 15:58:09 +0000 (Mon, 19 Sep 2011)
Log Message:
-----------
New Feature: widgets can be (optionally) marked by a maturity value, so the editor can ignore them if they or itself isn't mature enough.
The maturity level can be set through the optional URL parameter "maturity". This can either be the number directly or one of the maturity ENUM values. These are currently: "release" and "development"
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/edit/visuconfig_edit.js
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2011-09-18 13:06:41 UTC (rev 419)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-09-19 15:58:09 UTC (rev 420)
@@ -15,6 +15,13 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
+// Define ENUM of maturity levels for features, so that e.g. the editor can
+// ignore some widgets when they are not supported yet
+var Maturity = {
+ release : 0,
+ development : 1
+};
+
/**
* This class defines all the building blocks for a Visu in the "Pure" design
*/
@@ -86,6 +93,7 @@
});
this.addCreator('group', {
+ maturity: Maturity.development,
create: function( page, path, flavour ) {
var $p = $(page);
var ret_val = $('<div class="widget group" />');
Modified: CometVisu/trunk/visu/edit/visuconfig_edit.js
===================================================================
--- CometVisu/trunk/visu/edit/visuconfig_edit.js 2011-09-18 13:06:41 UTC (rev 419)
+++ CometVisu/trunk/visu/edit/visuconfig_edit.js 2011-09-19 15:58:09 UTC (rev 420)
@@ -138,6 +138,11 @@
// "unknown" is not a good choice for a new widget :)
return;
}
+ if( design.creators[index].maturity > use_maturity )
+ {
+ // widget is not mature enough to show in the edior
+ return;
+ }
$("#addMaster").find("select#add_type").append(
$("<option />").attr("value", index).html(index)
);
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2011-09-18 13:06:41 UTC (rev 419)
+++ CometVisu/trunk/visu/lib/templateengine.js 2011-09-19 15:58:09 UTC (rev 420)
@@ -62,6 +62,18 @@
forceReload = $.getUrlVar('forceReload') != 'false'; // true unless set to false
}
+// Disable features that aren't ready yet
+// This can be overwritten in the URL with the parameter "maturity"
+var use_maturity;
+if( $.getUrlVar('maturity') ) {
+ var url_maturity = $.getUrlVar('maturity');
+ if( !isNaN ( url_maturity - 0 ) )
+ use_maturity = url_maturity - 0; // given directly as number
+ else
+ use_maturity = Maturity[ url_maturity ]; // or as the ENUM name
+}
+if( isNaN( use_maturity ) ) use_maturity = Maturity.release; // default to release
+
$(document).ready(function() {
// get the data once the page was loaded
$.ajaxSetup({cache: !forceReload});
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <net...@us...> - 2011-10-08 10:42:34
|
Revision: 431
http://openautomation.svn.sourceforge.net/openautomation/?rev=431&view=rev
Author: netzkind
Date: 2011-10-08 10:42:25 +0000 (Sat, 08 Oct 2011)
Log Message:
-----------
editor goes OO, php-files go failsave, editor force-reloads always
Modified Paths:
--------------
CometVisu/trunk/visu/designs/discreet/basic.css
CometVisu/trunk/visu/edit/get_addresses.php
CometVisu/trunk/visu/edit/get_widget_diagram.php
CometVisu/trunk/visu/edit/style_edit.css
CometVisu/trunk/visu/edit/visuconfig_edit.js
CometVisu/trunk/visu/edit_config.html
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js
Added Paths:
-----------
CometVisu/trunk/visu/edit/cometeditor.js
Modified: CometVisu/trunk/visu/designs/discreet/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet/basic.css 2011-10-01 09:00:10 UTC (rev 430)
+++ CometVisu/trunk/visu/designs/discreet/basic.css 2011-10-08 10:42:25 UTC (rev 431)
@@ -1,385 +1,386 @@
-@font-face { font-family: Liberation; src:url(fonts/liberationsans-regular.ttf); }
-@font-face { font-family: Liberation; font-weight: bold; src:url(fonts/liberationsans-bold.ttf); }
-
-body
-{
- color: white;
- font-family: Liberation;
- font-size: 5.5mm;
- overflow: hidden;
- margin:0;
- background: #1d1d1d; /* url(images/body_bg.png) repeat-x; */
-}
-
-h1
-{
- font-size: 2em;
- padding-left: 15px;
-}
-
-h2
-{
- font-size: 1.25em;
- margin-left: 15px;
- margin-top: 5px;
- margin-bottom: 5px;
-}
-
-body hr
-{
- clear:both;
- color: #81664b;
- background-color: #81664b;
- height: 1px;
- border:none;
- padding:0px;
- margin:0.1em;
-}
-
-#pages hr {
- border: 0; height: 30px; margin: 0 .1em;
- background: transparent url(images/hr_bg.png) 50% repeat-x;
- clear: both;
-}
-
-
-body br
-{
- clear:both;
-}
-
-div#top {
- padding-top: 8px;
- border-top: 3px solid #1d1d1d;
- border-bottom: 1px solid #0a0a0a;
- background-color: #121212;
- padding-bottom: 2px;
-}
-
-.page h1 {
- margin-top: 0;
- padding-top: 1em;
- background: #121212 url(images/head_bg.png) scroll repeat-x bottom;
-}
-
-.nav_path
-{
- color: #81664b;
- margin-left: 15px;
-}
-.nav_path a
-{
- color: white;
- text-decoration:none;
-}
-
-.footer,
-.footer *
-{
- color: #000000;
- font-size: 0.9em;
- vertical-align: middle;
-}
-
-.widget
-{
- float:left;
- width:48%;
- margin: .2em;
- padding: 0.3em;
- /* border:yellow 1px solid; */
- border-color: #020202;
- border-style: solid;
- border-width: 2px 0px 0px 2px;
- -moz-border-radius: 8px;
- -webkit-border-radius: 8px;
- border-radius: 8px;
- min-height: 2em;
- background-color: #101010;
-}
-
-.widget .widget
-{
- width:98%;
-}
-
-.text > div,
-.link > a {
- float:left;
- text-align:left;
- padding-left: 1em;
-}
-
-.widget .label,
-.widget.info .actor,
-.text > div,
-.link > a {
- line-height: 2em;
-}
-
-.widget .label
-{
- float:left;
- width:49%;
-/* color:red; */
-/* padding-right:0.25em; */
- text-align:left;
- padding-left: 1em;
-/* border:blue 1px solid; */
-}
-.widget .actor
-{
- float:left;
- margin-left:1em;
- text-align:left;
-}
-.widget .actor div
-{
- float:left;
- white-space: pre-wrap;
-}
-
-
-.green.switchPressed div, .green.switchUnpressed div{
- background: transparent url(images/dot_green.png) no-repeat center center;
- color: white !important;
-}
-.red.switchPressed div, .red.switchUnpressed div{
- background: transparent url(images/dot_red.png) no-repeat center center;
- color: white !important;
-}
-
-
-.red
-{
- color:#f44;
- font-weight:bold;
-}
-
-.green
-{
- color:#4f4;
-}
-
-.blue
-{
- color:#44f;
-}
-
-.purple
-{
- color:#f4f;
-}
-
-.link a
-{
- color: #81664b;
- width: 49%;
-}
-
-.page
-{
- float:left;
- width: 900px;
- overflow: auto;
- position: relative;
-}
-
-.switchPressed, .switchUnpressed {
- border-style: solid;
- -moz-border-radius: 12px;
- -webkit-border-radius: 12px;
- border-radius: 12px;
- padding: 1px;
- background: url(images/button_bg.png) #171717 repeat-x;
-}
-
-.switchUnpressed
-{
- border-width: 1px 2px 2px 1px;
- border-color: #282828 #010101 #010101 #282828;
- margin-top: 0px;
- background-color: #3A3A3A;
- background-position: center +2px;
-}
-.switchUnpressed div, .switchPressed div
-{
- padding: 5px;
- width: 5em;
- float: left;
- background: transparent;
- text-align: center;
- cursor: pointer;
-}
-
-.switchPressed
-{
- border-width: 2px 1px 1px 2px;
- border-color: #010101 #282828 #282828 #010101;
- margin-top: 1px;
- background-position: center -2px;
-}
-
-.switchUnpressed div {
- margin-left: -1px;
-}
-
-.switchPressed div {
- margin-top: -1px;
-}
-
-.ui-slider { position: relative; text-align: left; }
-.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.6em; height: 1.6em; cursor: default; }
-.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
-
-.ui-slider-horizontal { height: .8em; }
-.ui-slider-horizontal .ui-slider-handle { top: -.5em; margin-left: -.8em; }
-.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
-.ui-slider-horizontal .ui-slider-range-min { left: 0; }
-.ui-slider-horizontal .ui-slider-range-max { right: 0; }
-
-.ui-slider-vertical { width: .8em; height: 100px; }
-.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
-.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
-.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
-.ui-slider-vertical .ui-slider-range-max { top: 0; }
-.ui-widget-content { border: 1px solid #dddddd; background: #000 ; color: #000; }
-.ui-widget-content a { color: #333333; }
-.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #000 ; font-weight: bold; color: #1c94c4; }
-.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; }
-.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
-
-.dim .actor
-{
- width: 3em;
-}
-.widget .ui-slider
-{
- width: 30%;
- float: left;
- margin-left: 10px;
- margin-left: 1em;
- margin-top: 0.5em;
- border-color: #010101 #282828 #282828 #010101;
- background: url(images/gradient.png) #a7a7a7 repeat-y;
-}
-
-.widget .ui-slider-handle
-{
- border-style: solid;
- -moz-border-radius: 12px;
- -webkit-border-radius: 12px;
- border-radius: 12px;
- padding: 1px;
- background: url(images/button_bg.png) #171717 repeat-x;
- border-width: 1px 2px 2px 1px;
- border-color: #282828 #010101 #010101 #282828;
-}
-/* Clearfix */
-.clearfix:after {
- content: ".";
- display: block;
- clear: both;
- visibility: hidden;
- line-height: 0;
- height: 0;
-}
-
-.clearfix {
- display: inline-block;
-}
-
-html[xmlns] .clearfix {
- display: block;
-}
-
-*:first-child+html .clearfix {
- min-height: 0;
-}
-
-* html .clearfix {
- height: 1%;
-}
-
-* html>body .clearfix {
- display: inline-block;
- width: 100%;
-}
-
-* html .clearfix {
- /* Hides from IE-mac \*/
- height: 1%;
- /* End hide from IE-mac */
-}
-
-.loading {
- display: block !important;
-}
-
-div#loading {
- display: none !important;
-}
-
-
-.popup,
-.popup_background {
- position: absolute;
- width: 90%;
- height: 90%;
- top: 5%;
- left: 5%;
-}
-
-.popup {
- z-index: 101;
- background: transparent;
-}
-
-
-.popup_background {
- z-index: 100;
- border-color: #020202;
- border-style: solid;
- border-width: 2px 0px 0px 2px;
- -moz-border-radius: 8px;
- -webkit-border-radius: 8px;
- border-radius: 8px;
- background: #101010;
- opacity: .98;
-}
-
-.popup div {
- margin: 4px;
-}
-
-.popup div.head {
- border-bottom: 1px solid;
-}
-
-.popup_background.error {
- background: #800000;
- border: #f00;
-}
-
-.clickable {
- cursor: pointer;
-}
-
-.diagram_inline {
- width: 320px;
- height: 180px;
-}
-
-.diagram_preview {
- width: 240px;
- height: 2em;
-}
-
-#diagramTooltip {
- z-index: 1000;
- color: black;
- border: 1px solid #fdd;
- padding: 2px;
- background-color: #fee;
- opacity: 0.80;
+@font-face { font-family: Liberation; src:url(fonts/liberationsans-regular.ttf); }
+@font-face { font-family: Liberation; font-weight: bold; src:url(fonts/liberationsans-bold.ttf); }
+
+body
+{
+ color: white;
+ font-family: Liberation;
+ font-size: 5.5mm;
+ overflow: hidden;
+ margin:0;
+ background: #1d1d1d; /* url(images/body_bg.png) repeat-x; */
+}
+
+h1
+{
+ font-size: 2em;
+ padding-left: 15px;
+}
+
+h2
+{
+ font-size: 1.25em;
+ margin-left: 15px;
+ margin-top: 5px;
+ margin-bottom: 5px;
+}
+
+body hr
+{
+ clear:both;
+ color: #81664b;
+ background-color: #81664b;
+ height: 1px;
+ border:none;
+ padding:0px;
+ margin:0.1em;
+}
+
+#pages hr {
+ border: 0; height: 30px; margin: 0 .1em;
+ background: transparent url(images/hr_bg.png) 50% repeat-x;
+ clear: both;
+}
+
+
+body br
+{
+ clear:both;
+}
+
+div#top {
+ padding-top: 8px;
+ border-top: 3px solid #1d1d1d;
+ border-bottom: 1px solid #0a0a0a;
+ background-color: #121212;
+ padding-bottom: 2px;
+}
+
+.page h1 {
+ margin-top: 0;
+ padding-top: 1em;
+ background: #121212 url(images/head_bg.png) scroll repeat-x bottom;
+}
+
+.nav_path
+{
+ color: #81664b;
+ margin-left: 15px;
+}
+.nav_path a
+{
+ color: white;
+ text-decoration:none;
+}
+
+.footer,
+.footer *
+{
+ color: #000000;
+ font-size: 0.9em;
+ vertical-align: middle;
+}
+
+.widget
+{
+ float:left;
+ width:48%;
+ margin: .2em;
+ padding: 0.3em;
+ /* border:yellow 1px solid; */
+ border-color: #020202;
+ border-style: solid;
+ border-width: 2px 0px 0px 2px;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ border-radius: 8px;
+ min-height: 2em;
+ background-color: #101010;
+}
+
+.widget .widget
+{
+ width:98%;
+}
+
+.text > div,
+.link > a {
+ float:left;
+ text-align:left;
+ padding-left: 1em;
+}
+
+.widget .label,
+.widget.info .actor,
+.text > div,
+.link > a {
+ line-height: 2em;
+}
+
+.widget .label
+{
+ float:left;
+ width:49%;
+/* color:red; */
+/* padding-right:0.25em; */
+ text-align:left;
+ padding-left: 1em;
+/* border:blue 1px solid; */
+}
+.widget .actor
+{
+ float:left;
+ margin-left:1em;
+ text-align:left;
+}
+.widget .actor div
+{
+ float:left;
+ white-space: pre-wrap;
+}
+
+
+.green.switchPressed div, .green.switchUnpressed div{
+ background: transparent url(images/dot_green.png) no-repeat center center;
+ color: white !important;
+}
+.red.switchPressed div, .red.switchUnpressed div{
+ background: transparent url(images/dot_red.png) no-repeat center center;
+ color: white !important;
+}
+
+
+.red
+{
+ color:#f44;
+ font-weight:bold;
+}
+
+.green
+{
+ color:#4f4;
+}
+
+.blue
+{
+ color:#44f;
+}
+
+.purple
+{
+ color:#f4f;
+}
+
+.link a
+{
+ color: #81664b;
+ width: 49%;
+}
+
+.page
+{
+ float:left;
+ width: 900px;
+ overflow: auto;
+ position: relative;
+}
+
+.switchPressed, .switchUnpressed {
+ border-style: solid;
+ -moz-border-radius: 12px;
+ -webkit-border-radius: 12px;
+ border-radius: 12px;
+ padding: 1px;
+ background: url(images/button_bg.png) #171717 repeat-x;
+}
+
+.switchUnpressed
+{
+ border-width: 1px 2px 2px 1px;
+ border-color: #282828 #010101 #010101 #282828;
+ margin-top: 0px;
+ background-color: #3A3A3A;
+ background-position: center +2px;
+}
+.switchUnpressed div, .switchPressed div
+{
+ padding: 5px;
+ width: 5em;
+ float: left;
+ background: transparent;
+ text-align: center;
+ cursor: pointer;
+}
+
+.switchPressed
+{
+ border-width: 2px 1px 1px 2px;
+ border-color: #010101 #282828 #282828 #010101;
+ margin-top: 1px;
+ background-position: center -2px;
+}
+
+.switchUnpressed div {
+ margin-left: -1px;
+}
+
+.switchPressed div {
+ margin-top: -1px;
+}
+
+.ui-slider { position: relative; text-align: left; }
+.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.6em; height: 1.6em; cursor: default; }
+.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
+
+.ui-slider-horizontal { height: .8em; }
+.ui-slider-horizontal .ui-slider-handle { top: -.5em; margin-left: -.8em; }
+.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
+.ui-slider-horizontal .ui-slider-range-min { left: 0; }
+.ui-slider-horizontal .ui-slider-range-max { right: 0; }
+
+.ui-slider-vertical { width: .8em; height: 100px; }
+.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
+.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
+.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
+.ui-slider-vertical .ui-slider-range-max { top: 0; }
+.ui-widget-content { border: 1px solid #dddddd; background: #000 ; color: #000; }
+.ui-widget-content a { color: #333333; }
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #000 ; font-weight: bold; color: #1c94c4; }
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; }
+.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
+
+.dim .actor
+{
+ width: 3em;
+}
+.widget .ui-slider
+{
+ width: 30%;
+ float: left;
+ margin-left: 10px;
+ margin-left: 1em;
+ margin-top: 0.5em;
+ border-color: #010101 #282828 #282828 #010101;
+ background: url(images/gradient.png) #a7a7a7 repeat-y;
+}
+
+.widget .ui-slider-handle
+{
+ border-style: solid;
+ -moz-border-radius: 12px;
+ -webkit-border-radius: 12px;
+ border-radius: 12px;
+ padding: 1px;
+ background: url(images/button_bg.png) #171717 repeat-x;
+ border-width: 1px 2px 2px 1px;
+ border-color: #282828 #010101 #010101 #282828;
+}
+/* Clearfix */
+.clearfix:after {
+ content: ".";
+ display: block;
+ clear: both;
+ visibility: hidden;
+ line-height: 0;
+ height: 0;
+}
+
+.clearfix {
+ display: inline-block;
+}
+
+html[xmlns] .clearfix {
+ display: block;
+}
+
+*:first-child+html .clearfix {
+ min-height: 0;
+}
+
+* html .clearfix {
+ height: 1%;
+}
+
+* html>body .clearfix {
+ display: inline-block;
+ width: 100%;
+}
+
+* html .clearfix {
+ /* Hides from IE-mac \*/
+ height: 1%;
+ /* End hide from IE-mac */
+}
+
+.loading {
+ display: block !important;
+}
+
+div#loading {
+ display: none !important;
+}
+
+
+.popup,
+.popup_background {
+ position: absolute;
+ width: 90%;
+ height: 90%;
+ top: 5%;
+ left: 5%;
+}
+
+.popup {
+ z-index: 101;
+ background: transparent;
+}
+
+
+.popup_background {
+ z-index: 100;
+ border-color: #020202;
+ border-style: solid;
+ border-width: 2px 0px 0px 2px;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ border-radius: 8px;
+ background: #101010;
+ opacity: .98;
+}
+
+.popup div {
+ margin: 4px;
+}
+
+.popup div.head {
+ border-bottom: 1px solid;
+}
+
+.popup_background.error {
+ background: #800000;
+ border: #f00;
+}
+
+.clickable {
+ cursor: pointer;
+}
+
+.diagram_inline {
+ margin-left: 1em;
+ width: 320px;
+ height: 180px;
+}
+
+.diagram_preview {
+ width: 240px;
+ height: 2em;
+}
+
+#diagramTooltip {
+ z-index: 1000;
+ color: black;
+ border: 1px solid #fdd;
+ padding: 2px;
+ background-color: #fee;
+ opacity: 0.80;
}
\ No newline at end of file
Added: CometVisu/trunk/visu/edit/cometeditor.js
===================================================================
--- CometVisu/trunk/visu/edit/cometeditor.js (rev 0)
+++ CometVisu/trunk/visu/edit/cometeditor.js 2011-10-08 10:42:25 UTC (rev 431)
@@ -0,0 +1,637 @@
+var CometEditor = function() {
+ var Editor = this;
+ Editor.cache = {};
+
+
+ Editor.cacheServerData = function(url, variable) {
+ // get all GAs from the server
+ $.ajax({
+ url: url,
+ type: "GET",
+ dataType: "json",
+ success: function(data) {
+ Editor.cache[variable] = data;
+ },
+ error: function(xhr, textStatus, e) {
+ Editor.cache[variable] = false;
+ $("#StatusBar").jnotifyAddMessage({
+ text: lingua("bad_get_" + variable, textStatus + " " + e),
+ permanent: false,
+ type: "error",
+ disappearTime: 30000
+ });
+ }
+ });
+ }
+
+ Editor.refreshEditor = function(val) {
+ // the type has been changed
+ // we need to change the input-field accordingly to match
+ // what attributes we need
+
+
+ // get all the info we need to edit this piece of work
+ var creator = design.getCreator(val);
+ var attributes = creator.attributes || {};
+ var elements = creator.elements || {};
+
+ // find old input-fields in the editor to remember those values ...
+ // this is need in case someone switches types while editing - and sure they want to keep their settings
+ var container = $("#addMaster div.inputs");
+ var values = $.extend({}, $("#addMaster").data("widgetdata"));
+
+ if (!$("#pages .inedit").is(".widget")) {
+ // this needs to be changed for the new settings-layout - it's completely broken right now!
+ // alte Werte zwischenspeichern
+ container.find(":input").each(function() {
+ if ($(this).val() != "") {
+ var name = $(this).data("name");
+ values[name] = $(this).val();
+ }
+ })
+ }
+ container.empty();
+
+ // we will need this variable later on to store our fieldset in.
+ var set;
+ if (typeof creator.content.type != "undefined" && creator.content.type == "string") {
+
+ var element = $("<div />").addClass("add_input").addClass("content")
+ .append($("<label />").attr("for", "add_textContent").html("text-content"))
+ .append($("<div class=\"input\" />")
+ .append($("<input type=\"text\" id=\"add_textContent\"/>"))
+ );
+ if (typeof values["textContent"] != "undefined") {
+ element.find("input").val(values["textContent"]);
+ }
+
+ element.find(":input").data("required", creator.content.required);
+
+ container.append(element);
+ delete element;
+ }
+
+ if (false === jQuery.isEmptyObject(elements)) {
+ // we've got elements we need to addit :)
+ container.append(set = jQuery("<fieldset />").addClass("elements"));
+ jQuery.each(elements, function(index, e) {
+ var $line = $("<div />").addClass("add_input")
+ .append($("<label />").attr("for", "add_" + index).html(index))
+ .append($("<div class=\"input\" />"));
+ var $input = $line.find("div.input");
+
+ switch (e.type) {
+ case "address":
+ // create a fake input-element to store our data later on
+ $input.append(jQuery("<input type=\"hidden\" id=\"add_" + index + "\" class=\"multi address\" />"));
+
+ // create the real inputs-thingy-thing
+ $input.append('<div><div class="add_element">+</div><div class="multi_element address" /></div>');
+ $input.find(".add_element").click(function() {
+ // insert a new, empty sub-element
+ var objData = {};
+ // don't try to hide it: this is hardcoded and works for addresses only
+ objData.type = "address";
+ objData.textContent = "";
+ objData._attributes = {};
+ objData._attributes.transform = "";
+ objData._attributes.type = "";
+ objData._attributes.readonly = false;
+
+ var elementDiv = HTMLLayer.createAddressEditorElement(objData);
+ $input.find("div.multi_element").append(elementDiv);
+ });
+
+ if (typeof values._elements != "undefined"
+ && typeof values._elements[index] != "undefined") {
+ $.each(values._elements[index], function(i, e) {
+ var elementDiv = HTMLLayer.createAddressEditorElement(e);
+ $input.find("div.multi_element").append(elementDiv);
+ });
+ }
+ break;
+ default:
+ // add an unknown element (e.g. the label)
+ if (e.multi == false) {
+ // this element can appear only once
+ $input.append(jQuery("<input type=\"text\" id=\"add_" + index + "\" />"));
+
+ if (typeof values._elements != "undefined"
+ && typeof values._elements[index] != "undefined") {
+ $.each(values._elements[index], function(i, e) {
+ $input.find("input").val(values._elements[index][0].textContent);
+ });
+ }
+ } else {
+ // handling for "if an element can appear more than once"
+ // TODO: needs to be coded once someone wants to use it :)
+ }
+ break;
+ }
+
+ // remember how to name and how to validate this input
+ $line.find(":input")
+ .data("name", index)
+ .data("required", e.required)
+ .data("type", e.type);
+
+ // add this "line" to the editor
+ set.append($line);
+ delete $line;
+ });
+ }
+
+ if (false === jQuery.isEmptyObject(attributes)) {
+ // we've got attributes to addit :)
+ container.append(set = jQuery("<fieldset />").addClass("attributes"));
+ $.each(attributes, function (index, e) {
+ var $line = $("<div />").addClass("add_input")
+ .append($("<label />").attr("for", "add_" + index).html(index))
+ .append($("<div class=\"input\" />"));
+ var $input = $line.find("div.input");
+
+ switch (e.type) {
+ case "mapping":
+ $input.append($("<select id=\"add_mapping\" />")
+ .append($("<option />").attr("value", "").html("-")));
+ jQuery.each(mappings, function(i, tmp) {
+ $input.find("select#add_mapping").append($("<option />").attr("value", i).html(i));
+ });
+
+ if (typeof values._attributes != "undefined"
+ && typeof values._attributes[index] != "undefined") {
+ $input.find("option[value=" + values._attributes[index] + "]").attr("selected", "selected");
+ }
+
+ break;
+
+ case "styling":
+ $input.append($("<select id=\"add_styling\" />")
+ .append($("<option />").attr("value", "").html("-")));
+ jQuery.each(stylings, function(i, tmp) {
+ $input.find("select#add_styling").append($("<option />").attr("value", i).html(i));
+ });
+
+ if (typeof values._attributes != "undefined"
+ && typeof values._attributes[index] != "undefined") {
+ $input.find("option[value=" + values._attributes[index] + "]").attr("selected", "selected");
+ }
+
+ break;
+ case "datatype":
+ break;
+ case "list":
+ $input.append($("<select id=\"add_" + index + "\" />")
+ .append($("<option />").attr("value", "").html("-")));
+ jQuery.each(e.list, function (i, val) {
+ $input.find("select#add_" + index).append($("<option />").attr("value", i).html(val));
+ });
+
+ if (typeof values._attributes != "undefined"
+ && typeof values._attributes[index] != "undefined") {
+ $input.find("option[value=" + values._attributes[index] + "]").attr("selected", "selected");
+ }
+
+ break;
+ default:
+ $input.append($("<input type=\"text\" id=\"add_" + index + "\" />"));
+
+ if (typeof values._attributes != "undefined"
+ && typeof values._attributes[index] != "undefined") {
+ $input.find("input").val(values._attributes[index]);
+ }
+
+ break;
+ }
+
+ if ($line.find("select")[0]) {
+ var select = $line.find("select");
+ select.change(function() {
+ // update the input-field
+ jQuery(this).parent().find("input").val(jQuery(this).val());
+ })
+ }
+
+ $line.find(":input")
+ .data("name", index)
+ .data("required", e.required)
+ .data("type", e.type);
+
+ set.append($line);
+ delete $line;
+ });
+ }
+ }
+
+
+ Editor.saveElement = function() {
+ // Daten aus den Eingabefeldner übernehmen
+ // einfach alle rein - wir haben ja nur die passenden Felder
+
+ var container = $("#addMaster div.inputs");
+
+ // dataObject needs to be a real dom-object, so we need to go all the
+ // way through parsing an xml-string ...
+ var name = jQuery("#addMaster #add_type").val();
+ var text = container.find("#add_textContent:input").val();
+ var xml = "<" + name + ">" + text + "</" + name + ">";
+ var dataObject;
+
+ if (window.DOMParser) {
+ var parser = new DOMParser();
+ dataObject = parser.parseFromString(xml, "text/xml");
+ } else {
+ // Internet Explorer
+ dataObject = new ActiveXObject("Microsoft.XMLDOM");
+ dataObject.async="false";
+ dataObject.loadXML(xml);
+ }
+
+ dataObject = jQuery(dataObject.documentElement);
+ if (typeof (dataObject.nodeName) == "undefined" || dataObject.nodeName == "") {
+ dataObject.nodeName = name;
+ }
+ if (typeof (text) != "undefined"
+ && (typeof (dataObject.textContent) == "undefined" || dataObject.textContent == "")) {
+ dataObject.textContent = text;
+ }
+
+ var error = false;
+
+ // get the settings for all sub-elements
+ container.find("fieldset.elements :input").each(function() {
+ var name = $(this).data("name");
+
+ if (!$(this).is(".multi")) {
+ if ($(this).val() != "") {
+ // validating
+ if (false === Editor.validateInput($(this).val(), $(this).data("type"))) {
+ $('#StatusBar').jnotifyAddMessage({
+ text: lingua("value_invalid", name),
+ permanent: false,
+ type: 'error'
+ });
+ // do not save
+ error = true;
+ }
+ dataObject.append($("<" + name + " />").append($(this).val()));
+ } else if ($(this).data("required") === true) {
+ // do not save
+ $('#StatusBar').jnotifyAddMessage({
+ text: lingua("value_required", name),
+ permanent: false,
+ type: 'error'
+ });
+ error = true;
+ }
+ } else {
+ // multi-element-input
+ if ($(this).is(".address")) {
+ $elements = jQuery(this).closest("div.input").find(".multi_element .element");
+ $elements.each(function (index, e) {
+ $address = $("<address />")
+ .attr("transform", $(e).data("transform"))
+ .attr("variant", $(e).data("variant"))
+ .attr("readonly", $(e).data("readonly") == true ? "true" : "false")
+ .append($(e).data("address"));
+ dataObject.append($address);
+ });
+ }
+ }
+ });
+
+ // get the settings for all attributes
+ container.find("fieldset.attributes :input").each(function() {
+ var name = $(this).data("name");
+
+ if ($(this).val() != "") {
+ // validating
+ if (false === Editor.validateInput($(this).val(), $(this).data("type"))) {
+ $('#StatusBar').jnotifyAddMessage({
+ text: lingua("value_invalid", name),
+ permanent: false,
+ type: 'error'
+ ...
[truncated message content] |
|
From: <ma...@us...> - 2011-10-10 18:51:58
|
Revision: 438
http://openautomation.svn.sourceforge.net/openautomation/?rev=438&view=rev
Author: mayerch
Date: 2011-10-10 18:51:51 +0000 (Mon, 10 Oct 2011)
Log Message:
-----------
Show version in status bar. (The release script will replace the SVN string by the current version string)
Modified Paths:
--------------
CometVisu/trunk/visu/visu_config.xml
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/visu_config.xml
===================================================================
--- CometVisu/trunk/visu/visu_config.xml 2011-10-10 17:34:36 UTC (rev 437)
+++ CometVisu/trunk/visu/visu_config.xml 2011-10-10 18:51:51 UTC (rev 438)
@@ -21,6 +21,7 @@
]]></status>
<status type="html"><![CDATA[
- <a href="check_config.php">Check Config</a>
+ <div style="float:right;padding-right:0.5em">Version: SVN</div>
]]></status>
</statusbar>
</meta>
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2011-10-10 17:34:36 UTC (rev 437)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2011-10-10 18:51:51 UTC (rev 438)
@@ -56,6 +56,7 @@
]]></status>
<status type="html"><![CDATA[
- <a href="check_config.php">Check Config</a>
+ <div style="float:right;padding-right:0.5em">Version: SVN</div>
]]></status>
</statusbar>
</meta>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-10-21 18:45:52
|
Revision: 461
http://openautomation.svn.sourceforge.net/openautomation/?rev=461&view=rev
Author: makki1
Date: 2011-10-21 18:45:46 +0000 (Fri, 21 Oct 2011)
Log Message:
-----------
infotrigger - restore default behaviour, add XSD; add toogle-widget (a switch toggling multiple values based on mapping)
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/visu_config.xsd
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2011-10-20 23:41:50 UTC (rev 460)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-10-21 18:45:46 UTC (rev 461)
@@ -364,6 +364,70 @@
content: false
});
+ this.addCreator('toggle', {
+ create: function( page, path ) {
+ var $p = $(page);
+ var ret_val = $('<div class="widget toggle" />');
+ var labelElement = $p.find('label')[0];
+ var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
+ var address = {};
+ $p.find('address').each( function(){
+ var src = this.textContent;
+ var transform = this.getAttribute('transform');
+ var readonly = this.getAttribute('readonly');
+ ga_list.push( src )
+ address[ '_' + src ] = [ transform, readonly=='true' ];
+ });
+ var actor = '<div class="actor switchUnpressed"><div class="value">-</div></div>';
+ var $actor = $(actor).data( {
+ 'address' : address,
+ 'mapping' : $p.attr('mapping'),
+ 'styling' : $p.attr('styling'),
+ 'align' : $p.attr('align'),
+ 'type' : 'switch'
+ } ).bind( 'click', this.action );
+ for( var addr in address ) $actor.bind( addr, this.update );
+ ret_val.append( label ).append( $actor );
+ return ret_val;
+ },
+ update: function(e,d) {
+ var element = $(this);
+ var value = defaultUpdate( e, d, element );
+ element.addClass('switchUnpressed');
+ },
+ action: function() {
+ var data = $(this).data();
+ var element_count = 0;
+ var next_element;
+ var first_element;
+ for(var e in mappings[data.mapping])
+ if(mappings[data.mapping].hasOwnProperty(e))
+ {
+ element_count++;
+ if (e > data.value && !next_element)
+ next_element = e;
+ if (!first_element)
+ first_element = e;
+ }
+ sendValue = (next_element) ? next_element : first_element;
+ for( var addr in data.address )
+ {
+ if( data.address[addr][1] == true ) continue; // skip read only
+ visu.write( addr.substr(1), transformEncode( data.address[addr][0], sendValue ) );
+ }
+ },
+ attributes: {
+ mapping: { type: 'mapping' , required: false },
+ styling: { type: 'styling' , required: false },
+ align: { type: 'string' , required: false }
+ },
+ elements: {
+ label: { type: 'string', required: true, multi: false },
+ address: { type: 'address', required: true, multi: true }
+ },
+ content: false
+ });
+
this.addCreator('multitrigger', {
create: function( page, path ) {
var $p = $(page);
@@ -680,7 +744,9 @@
'styling' : $p.attr('styling'),
'value' : $p.attr('downvalue') || 0,
'align' : $p.attr('align'),
- 'change' : $p.attr('change'),
+ 'change' : $p.attr('change') || 'absolute',
+ 'min' : parseFloat($p.attr('min')) || 0,
+ 'max' : parseFloat($p.attr('max')) || 255,
'type' : 'switch'
} ).bind( 'click', this.action );
@@ -696,7 +762,9 @@
'styling' : $p.attr('styling'),
'value' : $p.attr('upvalue') || 1,
'align' : $p.attr('align'),
- 'change' : $p.attr('change'),
+ 'change' : $p.attr('change') || 'absolute',
+ 'min' : parseFloat($p.attr('min')) || 0,
+ 'max' : parseFloat($p.attr('max')) || 255,
'type' : 'switch'
} ).bind( 'click', this.action );
@@ -736,12 +804,14 @@
action: function() {
var data = $(this).data();
var value = parseFloat($(this).parent().find('.switchInvisible').data('basicvalue'));
+ var relativevalue = value + parseFloat(data.value);
for( var addr in data.address )
{
if( data.address[addr][1] == true ) continue; // skip read only
if( data.change == 'relative' )
{
- visu.write( addr.substr(1), transformEncode( data.address[addr][0], value + parseFloat(data.value) ) );
+ if (relativevalue < data.min || relativevalue > data.max) continue; // check min/max
+ visu.write( addr.substr(1), transformEncode( data.address[addr][0], relativevalue ) );
} else {
visu.write( addr.substr(1), transformEncode( data.address[addr][0], data.value ) );
}
@@ -757,7 +827,9 @@
align: { type: 'string' , required: false },
infoposition: { type: 'list' , required: true , list: {0: 'Info/Down/Up', 1: 'Down/Info/Up', 2: 'Down/Up/Info'} },
format: { type: 'string' , required: false },
- change: { type: 'list' , required: true , list: {'relative': 'relative', 'absolute': 'absolute'} }
+ change: { type: 'list' , required: false , list: {'relative': 'relative', 'absolute': 'absolute'} },
+ min: { type: 'numeric' , required: false },
+ max: { type: 'numeric' , required: false }
},
elements: {
label: { type: 'string', required: false, multi: false },
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2011-10-20 23:41:50 UTC (rev 460)
+++ CometVisu/trunk/visu/visu_config.xsd 2011-10-21 18:45:46 UTC (rev 461)
@@ -241,6 +241,16 @@
<xsd:attribute ref="align" use="optional" />
</xsd:complexType>
+<xsd:complexType name="toogle">
+ <xsd:choice maxOccurs="unbounded" minOccurs="1">
+ <xsd:element name="label" type="xsd:string" />
+ <xsd:element name="address" type="address" minOccurs="1" />
+ </xsd:choice>
+ <xsd:attribute ref="styling" use="optional" />
+ <xsd:attribute ref="mapping" use="optional" />
+ <xsd:attribute ref="align" use="optional" />
+</xsd:complexType>
+
<xsd:complexType name="trigger">
<xsd:choice maxOccurs="unbounded" minOccurs="1">
<xsd:element name="label" type="xsd:string" />
@@ -260,6 +270,9 @@
<xsd:attribute name="downvalue" type="xsd:string" use="optional"/>
<xsd:attribute name="uplabel" type="xsd:string" use="optional"/>
<xsd:attribute name="downlabel" type="xsd:string" use="optional"/>
+ <xsd:attribute name="change" type="xsd:string" use="optional"/>
+ <xsd:attribute ref="min" />
+ <xsd:attribute ref="max" />
<xsd:attribute ref="mapping" use="optional"/>
<xsd:attribute ref="styling" use="optional"/>
<xsd:attribute ref="align" use="optional" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-06 12:08:23
|
Revision: 501
http://openautomation.svn.sourceforge.net/openautomation/?rev=501&view=rev
Author: mayerch
Date: 2011-11-06 12:08:17 +0000 (Sun, 06 Nov 2011)
Log Message:
-----------
Preparation for 0.6.0: give usefull defaults in the empty default config and make widget demo config consistent
Modified Paths:
--------------
CometVisu/trunk/visu/visu_config.xml
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/visu_config.xml
===================================================================
--- CometVisu/trunk/visu/visu_config.xml 2011-11-05 20:03:42 UTC (rev 500)
+++ CometVisu/trunk/visu/visu_config.xml 2011-11-06 12:08:17 UTC (rev 501)
@@ -2,10 +2,48 @@
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" design="pure" xsi:noNamespaceSchemaLocation="visu_config.xsd">
<meta>
<plugins>
+ <plugin name="colorchooser"/>
+ <plugin name="diagram"/>
</plugins>
<mappings>
+ <mapping name="Open_Close">
+ <entry value="0">zu</entry>
+ <entry value="1">offen</entry>
+ </mapping>
+ <mapping name="Close_Open">
+ <entry value="0">offen</entry>
+ <entry value="1">zu</entry>
+ </mapping>
+ <mapping name="On_Off">
+ <entry value="0">Aus</entry>
+ <entry value="1">An</entry>
+ </mapping>
+ <mapping name="Off_On">
+ <entry value="0">An</entry>
+ <entry value="1">Aus</entry>
+ </mapping>
+ <mapping name="KonnexHVAC">
+ <entry value="auto">Auto</entry>
+ <entry value="comfort">Komfort</entry>
+ <entry value="standby">Stand By</entry>
+ <entry value="economy">Economy</entry>
+ <entry value="building_protection">Haus-Schutz</entry>
+ </mapping>
</mappings>
<stylings>
+ <styling name="Red_Green">
+ <entry value="0">red</entry>
+ <entry value="1">green</entry>
+ </styling>
+ <styling name="Green_Red">
+ <entry value="0">green</entry>
+ <entry value="1">red</entry>
+ </styling>
+ <styling name="Blue_Green_Red">
+ <entry range_min="-100" range_max="20">blue</entry>
+ <entry range_min="20" range_max="22">green</entry>
+ <entry range_min="22" range_max="100">red</entry>
+ </styling>
</stylings>
<statusbar>
<status type="html"><![CDATA[
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2011-11-05 20:03:42 UTC (rev 500)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2011-11-06 12:08:17 UTC (rev 501)
@@ -6,14 +6,22 @@
<plugin name="diagram"/>
</plugins>
<mappings>
- <mapping name="OpenClose">
+ <mapping name="Open_Close">
<entry value="0">zu</entry>
<entry value="1">offen</entry>
</mapping>
- <mapping name="OnOff">
+ <mapping name="Close_Open">
+ <entry value="0">offen</entry>
+ <entry value="1">zu</entry>
+ </mapping>
+ <mapping name="On_Off">
<entry value="0">Aus</entry>
<entry value="1">An</entry>
</mapping>
+ <mapping name="Off_On">
+ <entry value="0">An</entry>
+ <entry value="1">Aus</entry>
+ </mapping>
<mapping name="Sign">
<entry range_min="-1e99" range_max="0">Negativ</entry>
<entry value="0">Null</entry>
@@ -28,15 +36,15 @@
</mapping>
</mappings>
<stylings>
- <styling name="RedGreen">
+ <styling name="Red_Green">
<entry value="0">red</entry>
<entry value="1">green</entry>
</styling>
- <styling name="GreenRed">
+ <styling name="Green_Red">
<entry value="0">green</entry>
<entry value="1">red</entry>
</styling>
- <styling name="BluePurpleRed">
+ <styling name="Blue_Purple_Red">
<entry range_min="-100" range_max="0">blue</entry>
<entry value="0">purple</entry>
<entry range_min="0" range_max="100">red</entry>
@@ -62,22 +70,22 @@
</meta>
<page name="Übersicht">
<text align="center">CometVisu Widget Demo</text>
- <switch mapping="OnOff" styling="RedGreen">
+ <switch mapping="On_Off" styling="Red_Green">
<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>
<break/>
- <trigger value="0" mapping="OnOff">
+ <trigger value="0" mapping="On_Off">
<label>Trigger - Terrasse Licht</label>
<address transform="DPT:1.001" readonly="false" type="">1/0/2</address>
</trigger>
- <trigger value="1" mapping="OnOff">
+ <trigger value="1" mapping="On_Off">
<label>Trigger - Terrasse Licht</label>
<address transform="DPT:1.001" readonly="false" type="">1/0/2</address>
</trigger>
<group name="Slide group" flavour="potassium" align="center">
- <info styling="BluePurpleRed">
+ <info styling="Blue_Purple_Red">
<label>Slide Info</label>
<address transform="DPT:9" type="">12/4/250</address>
<address transform="DPT:9.001" type="">12/4/251</address>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-07 22:10:03
|
Revision: 510
http://openautomation.svn.sourceforge.net/openautomation/?rev=510&view=rev
Author: makki1
Date: 2011-11-07 22:09:57 +0000 (Mon, 07 Nov 2011)
Log Message:
-----------
Add help-link pointion to sf/oa-wiki in editor
Modified Paths:
--------------
CometVisu/trunk/visu/edit/style_edit.css
CometVisu/trunk/visu/edit_config.html
Modified: CometVisu/trunk/visu/edit/style_edit.css
===================================================================
--- CometVisu/trunk/visu/edit/style_edit.css 2011-11-06 23:12:49 UTC (rev 509)
+++ CometVisu/trunk/visu/edit/style_edit.css 2011-11-07 22:09:57 UTC (rev 510)
@@ -62,6 +62,21 @@
padding: 0 .2em;
}
+div#helplink {
+ padding: 0 .2em;
+ text-decoration: none;
+}
+
+div#helplink a:link {
+ color: #FFFFFF;
+ text-decoration: none;
+}
+
+div#helplink a:visited {
+ color: #FFFFFF;
+ text-decoration: none;
+}
+
div#addwidgetcontrol {
width: 1.5em;
}
Modified: CometVisu/trunk/visu/edit_config.html
===================================================================
--- CometVisu/trunk/visu/edit_config.html 2011-11-06 23:12:49 UTC (rev 509)
+++ CometVisu/trunk/visu/edit_config.html 2011-11-07 22:09:57 UTC (rev 510)
@@ -74,6 +74,7 @@
<div id="StatusBar" style="height: 20px;">
</div>
<div id="controlcontainer" class="loading">
+ <div id="helplink"><a href="https://sourceforge.net/apps/mediawiki/openautomation/index.php?title=Benutzerhandbuch" target="_new">help</a></div>
<div id="saveconfigcontrol">save</div>
<div id="addwidgetcontrol">+</div>
</div>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-17 20:53:33
|
Revision: 522
http://openautomation.svn.sourceforge.net/openautomation/?rev=522&view=rev
Author: mayerch
Date: 2011-11-17 20:53:27 +0000 (Thu, 17 Nov 2011)
Log Message:
-----------
Add favicon - edit in red, svn in black and release in sodium
Modified Paths:
--------------
CometVisu/trunk/visu/edit_config.html
CometVisu/trunk/visu/index.html
Added Paths:
-----------
CometVisu/trunk/visu/icon/comet_16x16_000000.png
CometVisu/trunk/visu/icon/comet_16x16_ff0000.png
CometVisu/trunk/visu/icon/comet_16x16_ff8000.png
Modified: CometVisu/trunk/visu/edit_config.html
===================================================================
--- CometVisu/trunk/visu/edit_config.html 2011-11-16 21:39:18 UTC (rev 521)
+++ CometVisu/trunk/visu/edit_config.html 2011-11-17 20:53:27 UTC (rev 522)
@@ -4,6 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Visu - Editor-Modus</title>
+ <link rel="icon" href="icon/comet_16x16_ff0000.png" type="image/png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" type="text/css" href="edit/style_edit.css" />
<link rel="stylesheet" type="text/css" href="edit/jquery-ui.css" />
Added: CometVisu/trunk/visu/icon/comet_16x16_000000.png
===================================================================
(Binary files differ)
Property changes on: CometVisu/trunk/visu/icon/comet_16x16_000000.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: CometVisu/trunk/visu/icon/comet_16x16_ff0000.png
===================================================================
(Binary files differ)
Property changes on: CometVisu/trunk/visu/icon/comet_16x16_ff0000.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: CometVisu/trunk/visu/icon/comet_16x16_ff8000.png
===================================================================
(Binary files differ)
Property changes on: CometVisu/trunk/visu/icon/comet_16x16_ff8000.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: CometVisu/trunk/visu/index.html
===================================================================
--- CometVisu/trunk/visu/index.html 2011-11-16 21:39:18 UTC (rev 521)
+++ CometVisu/trunk/visu/index.html 2011-11-17 20:53:27 UTC (rev 522)
@@ -4,6 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CometVisu-Client</title>
+ <link rel="icon" href="icon/comet_16x16_000000.png" type="image/png" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0; webkit-user-select: none;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-20 21:10:43
|
Revision: 532
http://openautomation.svn.sourceforge.net/openautomation/?rev=532&view=rev
Author: mayerch
Date: 2011-11-20 21:10:37 +0000 (Sun, 20 Nov 2011)
Log Message:
-----------
Last minute bug fix as discussed in the forum: in relative mode the infotrigger is using the variant types "button" and "display" now
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2011-11-20 16:34:18 UTC (rev 531)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-11-20 21:10:37 UTC (rev 532)
@@ -728,10 +728,10 @@
$p.find('address').each( function(){
var src = this.textContent;
var transform = this.getAttribute('transform');
- var readonly = this.getAttribute('readonly' ) == 'true' ;
- var relative = this.getAttribute('variant' ) == 'relative';
- address[ '_' + src ] = [ transform, readonly, relative ];
- if( !relative ) { // no need to listen to relative address
+ var readonly = this.getAttribute('readonly' ) == 'true';
+ var isButton = this.getAttribute('variant' ) == 'button';
+ address[ '_' + src ] = [ transform, readonly, isButton ];
+ if( !isButton ) { // no need to listen to relative address
ga_list.push( src );
};
});
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2011-11-20 16:34:18 UTC (rev 531)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2011-11-20 21:10:37 UTC (rev 532)
@@ -120,11 +120,11 @@
<break/>
<infotrigger uplabel="wärmer" downlabel="kälter" upvalue="0.1" downvalue="-0.1" align="center" format="%.1f °C" change="absolute" min="7" max="24">
<label>Infotrigger: Sollwert</label>
- <address transform="DPT:9" variant="absolute">12/7/9</address>
+ <address transform="DPT:9">12/7/9</address>
</infotrigger>
<infotrigger uplabel=">" downlabel="<" upvalue="1" downvalue="-1" min="0" max="5" align="center" infoposition="1" change="absolute" mapping="AudioSource" >
<label>Infotrigger: Audioquelle</label>
- <address transform="DPT:5.010" variant="absolute">12/7/105</address>
+ <address transform="DPT:5.010">12/7/105</address>
</infotrigger>
<page name="Infotrigger: Erweitert..." align="center">
<text>Ein Infotrigger lässt sich in zwei verschiedenen Betriebsarten betreiben: relativ und absolut</text>
@@ -133,8 +133,8 @@
<break/>
<infotrigger uplabel="+" upvalue="1" downlabel="-" downvalue="0" align="center" infoposition="1" change="relative">
<label>Lautstärke</label>
- <address transform="DPT:16.000" readonly="true" variant="absolute">12/7/16</address>
- <address transform="DPT:1.001" readonly="false" variant="relative">12/7/1</address>
+ <address transform="DPT:16.000" readonly="true" variant="display">12/7/16</address>
+ <address transform="DPT:1.001" readonly="false" variant="button">12/7/1</address>
</infotrigger>
<break/>
<info>
@@ -154,7 +154,7 @@
<break/>
<infotrigger uplabel="+" upvalue="5" downlabel="-" downvalue="-5" align="center" infoposition="1" change="absolute" format="%.1f%%" max="100">
<label>Lautstärke</label>
- <address transform="DPT:5.001" readonly="false" variant="absolute">12/7/5</address>
+ <address transform="DPT:5.001" readonly="false">12/7/5</address>
</infotrigger>
</page>
<break/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-20 21:22:23
|
Revision: 533
http://openautomation.svn.sourceforge.net/openautomation/?rev=533&view=rev
Author: mayerch
Date: 2011-11-20 21:22:17 +0000 (Sun, 20 Nov 2011)
Log Message:
-----------
Last minute bug fix as discussed in the forum: change diagram to new syntax that uses explicit "label" element
Modified Paths:
--------------
CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2011-11-20 21:10:37 UTC (rev 532)
+++ CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2011-11-20 21:22:17 UTC (rev 533)
@@ -34,7 +34,8 @@
var ret_val = $('<div class="widget" />');
ret_val.addClass( 'diagram' );
- var label = '<div class="label">' + page.textContent + '</div>';
+ var labelElement = $p.find('label')[0];
+ var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
var actor = $("<div class=\"actor\"><div class=\"diagram_inline\" id=\"" + id + "\">loading...</div></div>");
var diagram = $("#" + id, actor);
@@ -53,7 +54,7 @@
diagram.data("series", $p.attr("series") || "day");
diagram.data("period", $p.attr("period") || 1);
diagram.data("datasource", $p.attr("datasource") || "AVERAGE");
- diagram.data("label", page.textContent);
+ diagram.data("label", $p.find('label')[0] ? $p.find('label')[0].textContent : '');
diagram.data("refresh", $p.attr("refresh"));
refreshDiagram(diagram, {});
@@ -70,7 +71,10 @@
datasource: {type: "list", required: false, list: {'MIN': "Min", 'AVERAGE': "Avg", 'MAX': "Max"}},
refresh: {type: "numeric", required: false}
},
- content: {type: "string", required: true}
+ elements: {
+ label: { type: 'string', required: false, multi: false }
+ },
+ content: false
});
VisuDesign_Custom.prototype.addCreator("diagram_popup", {
@@ -86,7 +90,8 @@
var ret_val = $('<div class="widget" />');
ret_val.addClass( 'diagram' );
- var label = '<div class="label">' + page.textContent + '</div>';
+ var labelElement = $p.find('label')[0];
+ var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
var actor = $("<div class=\"actor\"><div class=\"diagram_preview\" id=\"" + id + "\">loading...</div></div>");
var diagram = $("#" + id, actor);
@@ -105,7 +110,7 @@
diagram.data("series", $p.attr("series") || "day");
diagram.data("period", $p.attr("period") || 1);
diagram.data("datasource", $p.attr("datasource") || "AVERAGE");
- diagram.data("label", page.textContent);
+ diagram.data("label", $p.find('label')[0] ? $p.find('label')[0].textContent : '');
diagram.data("refresh", $p.attr("refresh"));
var bDiagram = $("<div class=\"diagram\" id=\"" + id + "_big\"/>");
@@ -174,7 +179,10 @@
refresh: {type: "numeric", required: false},
tooltip: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
},
- content: {type: "string", required: true}
+ elements: {
+ label: { type: 'string', required: false, multi: false }
+ },
+ content: false
});
diagramColors = {
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2011-11-20 21:10:37 UTC (rev 532)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2011-11-20 21:22:17 UTC (rev 533)
@@ -366,7 +366,9 @@
<address transform="DPT:5.001" type="">12/7/52</address>
</slide>
<break/>
- <diagram_popup rrd="eib_traffic" unit="tps" series="day" refresh="300">KNX traffic</diagram_popup>
+ <diagram_popup rrd="eib_traffic" unit="tps" series="day" refresh="300">
+ <label>KNX traffic</label>
+ </diagram_popup>
<diagram_inline rrd="eib_traffic" width="600" height="400"/>
<line/>
<page name="Erweiterte Widgets">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j-...@us...> - 2011-11-29 16:33:18
|
Revision: 550
http://openautomation.svn.sourceforge.net/openautomation/?rev=550&view=rev
Author: j-n-k
Date: 2011-11-29 16:33:08 +0000 (Tue, 29 Nov 2011)
Log Message:
-----------
merged all changes from post-0.6.0 to HEAD, fixing TAB in a lot of places
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
CometVisu/trunk/visu/visu_config.xsd
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2011-11-27 21:44:05 UTC (rev 549)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-11-29 16:33:08 UTC (rev 550)
@@ -60,7 +60,14 @@
this.addCreator('page', {
create: function( page, path, flavour ) {
var $p = $(page);
- var ret_val = $('<div class="widget" />');
+
+ var address = {};
+ if ($p.attr('ga')) {
+ src = $p.attr('ga');
+ ga_list.push($p.attr('ga'));
+ address[ '_' + $p.attr('ga') ] = [ 'DPT:1.001', 0 ];
+ }
+
var pstyle = ( '0' != path ) ? 'display:none;' : ''; // subPage style
var name = $p.attr('name');
var type = $p.attr('type'); //text, 2d or 3d
@@ -68,10 +75,24 @@
var wstyle = ''; // widget style
if( $p.attr('align') ) wstyle += 'text-align:' + $p.attr('align') + ';';
if( wstyle != '' ) wstyle = 'style="' + wstyle + '"';
- ret_val.addClass( 'link' ).addClass('pagelink');
- ret_val.append( '<div ' + wstyle + '><a href="javascript:scrollToPage(\''+path+'\')">' + name + '</a></div>' );
+
+ var ret_val;
+
+ if ($p.attr('visible')=='false') {
+ ret_val=$('');
+ } else { // default is visible
+ ret_val = $('<div class="widget"/>');
+ ret_val.addClass( 'link' ).addClass('pagelink');
+ ret_val.append( '<div ' + wstyle + '><a href="javascript:scrollToPage(\''+path+'\')">' + name + '</a></div>' );
+ }
+
var childs = $p.children();
var container = $( '<div class="clearfix"/>' );
+
+ var $container = $( '<div class="clearfix" path="'+path+'"/>');
+ for( var addr in address ) $container.bind( addr, this.update );
+ var container=$container;
+
container.append( '<h1>' + name + '</h1>' );
$( childs ).each( function(i){
container.append( create_pages( childs[i], path + '_' + i, flavour ) );
@@ -85,10 +106,18 @@
attributes: {
align: { type: 'string', required: false },
flavour:{ type: 'string', required: false },
- name: { type: 'string', required: true }
+ name: { type: 'string', required: true },
+ ga: { type: 'addr', required: false },
+ visible:{ type: 'string', required: false }
},
elements: {
},
+ update: function(e, data) {
+ if (data==01) {
+ scrollToPage(this.attributes.path.nodeValue);
+ visu.write(e.type.substr(1), transformEncode("DPT:1.001", 0));
+ }
+ },
content: true
});
@@ -697,7 +726,11 @@
if( $p.attr('background') ) style += 'background-color:' + $p.attr('background') + ';';
if( style != '' ) style = 'style="' + style + '"';
var actor = '<div class="actor"><iframe src="' +$p.attr('src') + '" ' + style + '></iframe></div>';
- ret_val.append( $(actor) );
+
+ var refresh = $p.attr('refresh') ? $p.attr('refresh')*1000 : 0;
+ ret_val.append( $(actor).data( {
+ 'refresh': refresh
+ } ).each(setupRefreshAction) ); // abuse "each" to call in context...
return ret_val;
},
attributes: {
@@ -705,7 +738,8 @@
width: { type: 'string', required: false },
height: { type: 'string', required: false },
frameborder: { type: 'list' , required: false, list: {'true': "yes", 'false': "no"} },
- background: { type: 'string', required: false }
+ background: { type: 'string', required: false },
+ refresh: { type: 'numeric', required: false }
},
elements: {
label: { type: 'string', required: false, multi: false }
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2011-11-27 21:44:05 UTC (rev 549)
+++ CometVisu/trunk/visu/lib/templateengine.js 2011-11-29 16:33:08 UTC (rev 550)
@@ -344,6 +344,14 @@
{
$('#'+page_id).css( 'display', '' ); // show new page
main_scroll.seekTo( $('.page').index( $('#'+page_id)[0] ), speed ); // scroll to it
+ var pagedivs=$('div', '#'+page_id);
+ for( var i = 0; i<pagedivs.length; i++) //check for inline diagrams & refresh
+ {
+ if( pagedivs[i].className == 'diagram_inline')
+ {
+ refreshDiagram(pagedivs[i]);
+ }
+ }
}
function updateTopNavigation()
@@ -408,7 +416,7 @@
var refresh = $(this).data('refresh');
if( refresh && refresh > 0 )
{
- var target = $('img', $(this) )[0];
+ var target = $('img', $(this) )[0] || $('iframe', $(this) )[0];
var src = target.src;
if( src.indexOf('?') < 0 ) src += '?';
$(this).data('interval', setInterval( function(){refreshAction(target, src);}, refresh ) );
Modified: CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2011-11-27 21:44:05 UTC (rev 549)
+++ CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2011-11-29 16:33:08 UTC (rev 550)
@@ -56,6 +56,8 @@
diagram.data("datasource", $p.attr("datasource") || "AVERAGE");
diagram.data("label", $p.find('label')[0] ? $p.find('label')[0].textContent : '');
diagram.data("refresh", $p.attr("refresh"));
+ diagram.data("linecolor", $p.attr("linecolor") || "");
+ diagram.data("gridcolor", $p.attr("gridcolor") || "");
refreshDiagram(diagram, {});
@@ -69,7 +71,9 @@
series: {type: "list", required: false, list: {hour: "hours", day: "days", week: "weeks", month: "months", year: "years"}},
period: {type: "numeric", required: false},
datasource: {type: "list", required: false, list: {'MIN': "Min", 'AVERAGE': "Avg", 'MAX': "Max"}},
- refresh: {type: "numeric", required: false}
+ refresh: {type: "numeric", required: false},
+ linecolor: {type: "string", required: false},
+ gridcolor: {type: "string", required: false}
},
elements: {
label: { type: 'string', required: false, multi: false }
@@ -112,6 +116,8 @@
diagram.data("datasource", $p.attr("datasource") || "AVERAGE");
diagram.data("label", $p.find('label')[0] ? $p.find('label')[0].textContent : '');
diagram.data("refresh", $p.attr("refresh"));
+ diagram.data("linecolor", $p.attr("linecolor") || "");
+ diagram.data("gridcolor", $p.attr("gridcolor") || "");
var bDiagram = $("<div class=\"diagram\" id=\"" + id + "_big\"/>");
@@ -177,6 +183,8 @@
period: {type: "numeric", required: false},
datasource: {type: "list", required: false, list: {'MIN': "Min", 'AVERAGE': "Avg", 'MAX': "Max"}},
refresh: {type: "numeric", required: false},
+ linecolor: {type: "string", required: false},
+ gridcolor: {type: "string", required: false},
tooltip: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
},
elements: {
@@ -185,6 +193,140 @@
content: false
});
+VisuDesign_Custom.prototype.addCreator("diagram_info", {
+ create: function( page, path ) {
+ var $p = $(page);
+
+ var address = {};
+ $p.find('address').each( function(){
+ var src = this.textContent;
+ ga_list.push( src )
+ address[ '_' + src ] = [ this.getAttribute('transform') ];
+ });
+
+ function uniqid() {
+ var newDate = new Date;
+ return newDate.getTime();
+ }
+
+ var id = "diagram_" + uniqid();
+
+ var ret_val = $('<div class="widget" />');
+ ret_val.addClass( 'diagram' );
+
+ var labelElement = $p.find('label')[0];
+ var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
+
+ var actor = '<div class="actor switchUnpressed ';
+ if ( $p.attr( 'align' ) )
+ actor += $p.attr( 'align' );
+ actor += '">';
+ var map = $p.attr('mapping');
+ if( mappings[map] && mappings[map][value] )
+ actor += '<div class="value">' + mappings[map][value] + '</div>';
+ else
+ actor += '<div class="value">-</div>';
+ actor += '</div>';
+
+ var $actor = $(actor).data({
+ 'address' : address,
+ 'format' : $p.attr('format'),
+ 'mapping' : $p.attr('mapping'),
+ 'styling' : $p.attr('styling')
+ });
+ for( var addr in address ) $actor.bind( addr, this.update );
+
+ ret_val.append(label).append($actor);
+
+ $actor.addClass("clickable");
+
+ var bDiagram = $("<div class=\"diagram\" id=\"" + id + "_big\"/>");
+
+ bDiagram.data("id", id);
+ bDiagram.data("rrd", $p.attr("rrd"));
+ bDiagram.data("unit", $p.attr("unit") || "");
+ bDiagram.data("series", $p.attr("series") || "day");
+ bDiagram.data("period", $p.attr("period") || 1);
+ bDiagram.data("datasource", $p.attr("datasource") || "AVERAGE");
+ bDiagram.data("label", labelElement.textContent);
+ bDiagram.data("refresh", $p.attr("refresh"));
+ bDiagram.data("linecolor", $p.attr("linecolor") || "");
+ bDiagram.data("gridcolor", $p.attr("gridcolor") || "");
+
+ var data = jQuery.extend({}, bDiagram.data());
+
+ $actor.bind("click", function() {
+ bDiagram.data(data);
+ bDiagram.css({height: "90%"});
+
+ showPopup("unknown", {title: labelElement.textContent, content: bDiagram});
+ bDiagram.parent("div").css({height: "100%", width: "90%", margin: "auto"}); // define parent as 100%!
+
+ var bDiagramOpts = {yaxis: {labelWidth: null}};
+ if ($p.attr("tooltip") == "true") {
+ // if we want to display a tooltip, we need to listen to the event
+ var previousPoint = null;
+ jQuery(bDiagram).bind("plothover", function (event, pos, item) {
+ jQuery("#x").text(pos.x.toFixed(2));
+ jQuery("#y").text(pos.y.toFixed(2));
+
+ if (item) {
+ if (previousPoint != item.datapoint) {
+ previousPoint = item.datapoint;
+
+ $("#diagramTooltip").remove();
+ var x = item.datapoint[0],
+ y = item.datapoint[1].toFixed(2);
+
+ //This is a mess but toLocaleString expects UTC again
+ var offset = new Date().getTimezoneOffset() * 60 * 1000;
+ var dte = new Date(x + offset);
+ showDiagramTooltip(item.pageX, item.pageY,
+ dte.toLocaleString() + ": " + y + jQuery(this).data("unit"));
+ }
+ }
+ else {
+ $("#diagramTooltip").remove();
+ previousPoint = null;
+ }
+
+ })
+ .bind("click", function(event) {
+ // don't let the popup know about the click, or it will close on touch-displays
+ event.stopPropagation();
+ });
+
+ bDiagramOpts = jQuery.extend(bDiagramOpts, {grid: {hoverable: true, clickable: true} });
+ }
+
+ refreshDiagram(bDiagram, bDiagramOpts);
+ return false;
+ });
+
+ return ret_val;
+ },
+ update: defaultUpdate,
+ attributes: {
+ rrd: {type: "string", required: true},
+ unit: {type: "string", required: false},
+ series: {type: "list", required: false, list: {hour: "hours", day: "days", week: "weeks", month: "months", year: "years"}},
+ period: {type: "numeric", required: false},
+ datasource: {type: "list", required: false, list: {'MIN': "Min", 'AVERAGE': "Avg", 'MAX': "Max"}},
+ refresh: {type: "numeric", required: false},
+ tooltip: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
+ linecolor: {type: "string", required: false},
+ gridcolor: {type: "string", required: false},
+ format: { type: 'format', required: false },
+ mapping: { type: 'mapping', required: false },
+ styling: { type: 'styling', required: false }
+ },
+ elements: {
+ label: { type: 'string', required: true, multi: false },
+ address: { type: 'address', required: true, multi: true }
+ },
+ content: {type: "string", required: true}
+});
+
diagramColors = {
data: $("<span class='link'><a href='#' /></a>").find("a").css("color")
};
@@ -209,7 +351,9 @@
var refresh = diagram.data("refresh");
var datasource = diagram.data("datasource") || "AVERAGE";
var period = diagram.data("period") || 1;
-
+ var linecolor = diagram.data("linecolor") || diagramColors.data;
+ var gridcolor = diagram.data("gridcolor") || "#81664B";
+
var series = {
hour: {label: "hour", res: "60", start: "hour", end: "now"},
day: {label: "day", res: "300", start: "day", end: "now"},
@@ -236,12 +380,10 @@
grid: {
show: true,
aboveData: false,
- color: "#81664B",
+ color: gridcolor,
backgroundColor: "black",
- tickColor: "#81664B",
- borderColor: "#81664B"//,
- //axisMargin: 0,
- //labelMargin: 0
+ tickColor: gridcolor,
+ borderColor: gridcolor
}
},
flotoptions);
@@ -255,7 +397,7 @@
dataType: "json",
type: "GET",
success: function(data) {
- var color = diagramColors.data || options.grid.color;
+ var color = linecolor || options.grid.color;
var offset = new Date().getTimezoneOffset() * 60 * 1000;
//TODO: find a better way
for (var j = 0; j < data.length; j++) {
@@ -275,9 +417,6 @@
}
}
-
-
-
return false;
}
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2011-11-27 21:44:05 UTC (rev 549)
+++ CometVisu/trunk/visu/visu_config.xsd 2011-11-29 16:33:08 UTC (rev 550)
@@ -43,7 +43,6 @@
<xsd:attribute name="max" type="xsd:decimal" />
<xsd:attribute name="step" type="xsd:decimal" />
-
<xsd:attribute name="transform" type="xsd:string" />
<xsd:attribute name="format" type="xsd:string" />
@@ -152,17 +151,17 @@
<xsd:element name="page">
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
- <!-- visual effects -->
+ <!-- visual effects -->
<xsd:element name="line" type="line" />
- <xsd:element name="break" type="break" />
- <xsd:element name="group" type="group" />
+ <xsd:element name="break" type="break" />
+ <xsd:element name="group" type="group" />
<!-- list all possbile widgets here -->
<xsd:element name="text" type="text" />
<xsd:element name="switch" type="switch" />
<xsd:element name="toggle" type="switch" />
<xsd:element name="trigger" type="trigger" />
<xsd:element name="multitrigger" type="multitrigger" />
- <xsd:element name="infotrigger" type="infotrigger" />
+ <xsd:element name="infotrigger" type="infotrigger" />
<xsd:element name="designtoggle" type="designtoggle" />
<xsd:element name="slide" type="slide" />
<xsd:element name="info" type="info" />
@@ -179,21 +178,23 @@
<xsd:attribute name="name" type="xsd:string" use="required" />
<xsd:attribute name="flavour" type="xsd:string" use="optional" />
<xsd:attribute ref="align" use="optional" />
+ <xsd:attribute name="ga" type="addr" use="optional" />
+ <xsd:attribute name="visible" type="xsd:boolean" />
</xsd:complexType>
</xsd:element>
<xsd:complexType name="group">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
- <!-- visual effects -->
+ <!-- visual effects -->
<xsd:element name="line" type="line" />
- <xsd:element name="break" type="break" />
- <!-- list all possbile widgets here -->
+ <xsd:element name="break" type="break" />
+ <!-- list all possbile widgets here -->
<xsd:element name="text" type="text" />
<xsd:element name="switch" type="switch" />
<xsd:element name="toggle" type="switch" />
<xsd:element name="trigger" type="trigger" />
<xsd:element name="multitrigger" type="multitrigger" />
- <xsd:element name="infotrigger" type="infotrigger" />
+ <xsd:element name="infotrigger" type="infotrigger" />
<xsd:element name="designtoggle" type="designtoggle" />
<xsd:element name="slide" type="slide" />
<xsd:element name="info" type="info" />
@@ -267,17 +268,17 @@
<xsd:element name="address" type="address" minOccurs="1" maxOccurs="unbounded"/>
</xsd:choice>
<xsd:attribute name="upvalue" type="xsd:string" use="optional"/>
- <xsd:attribute name="downvalue" type="xsd:string" use="optional"/>
- <xsd:attribute name="uplabel" type="xsd:string" use="optional"/>
- <xsd:attribute name="downlabel" type="xsd:string" use="optional"/>
+ <xsd:attribute name="downvalue" type="xsd:string" use="optional"/>
+ <xsd:attribute name="uplabel" type="xsd:string" use="optional"/>
+ <xsd:attribute name="downlabel" type="xsd:string" use="optional"/>
<xsd:attribute name="change" type="xsd:string" use="optional"/>
<xsd:attribute ref="min" />
<xsd:attribute ref="max" />
<xsd:attribute ref="mapping" use="optional"/>
- <xsd:attribute ref="styling" use="optional"/>
+ <xsd:attribute ref="styling" use="optional"/>
<xsd:attribute ref="align" use="optional" />
- <xsd:attribute ref="format" use="optional" />
- <xsd:attribute name="infoposition" type="xsd:decimal" use="optional" />
+ <xsd:attribute ref="format" use="optional" />
+ <xsd:attribute name="infoposition" type="xsd:decimal" use="optional" />
</xsd:complexType>
<xsd:complexType name="multitrigger">
@@ -331,7 +332,7 @@
<xsd:complexType name="video">
<xsd:choice maxOccurs="unbounded" minOccurs="0">
- <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ <xsd:element name="label" type="xsd:string" maxOccurs="1" />
</xsd:choice>
<xsd:attribute name="src" type="uri" use="required" />
<xsd:attribute name="width" type="dimension" />
@@ -341,13 +342,14 @@
<xsd:complexType name="iframe">
<xsd:choice maxOccurs="unbounded" minOccurs="0">
- <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ <xsd:element name="label" type="xsd:string" maxOccurs="1" />
</xsd:choice>
<xsd:attribute name="src" type="uri" use="required" />
<xsd:attribute name="width" type="dimension" />
<xsd:attribute name="height" type="dimension" />
<xsd:attribute name="frameborder" type="xsd:string" />
<xsd:attribute name="background" type="xsd:string" />
+ <xsd:attribute name="refresh" type="xsd:decimal" />
</xsd:complexType>
<xsd:complexType name="colorchooser" >
@@ -358,40 +360,60 @@
</xsd:complexType>
<xsd:complexType name="diagram_inline">
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="rrd" type="xsd:string" use="required" />
- <xsd:attribute name="unit" type="xsd:string" use="optional" />
- <xsd:attribute name="width" type="dimension" use="optional"/>
- <xsd:attribute name="series" type="xsd:string" use="optional"/>
- <xsd:attribute name="height" type="dimension" use="optional"/>
- <xsd:attribute name="refresh" type="xsd:integer" use="optional" />
- <xsd:attribute name="period" type="xsd:string" use="optional" />
- <xsd:attribute name="datasource" type="xsd:string" use="optional" />
- </xsd:extension>
- </xsd:simpleContent>
+ <xsd:choice maxOccurs="unbounded" minOccurs="1">
+ <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ </xsd:choice>
+ <xsd:attribute name="rrd" type="xsd:string" use="required" />
+ <xsd:attribute name="unit" type="xsd:string" use="optional" />
+ <xsd:attribute name="width" type="dimension" use="optional"/>
+ <xsd:attribute name="series" type="xsd:string" use="optional"/>
+ <xsd:attribute name="height" type="dimension" use="optional"/>
+ <xsd:attribute name="refresh" type="xsd:integer" use="optional" />
+ <xsd:attribute name="period" type="xsd:string" use="optional" />
+ <xsd:attribute name="datasource" type="xsd:string" use="optional" />
+ <xsd:attribute name="linecolor" type="xsd:string" use="optional" />
+ <xsd:attribute name="gridcolor" type="xsd:string" use="optional" />
</xsd:complexType>
<xsd:complexType name="diagram_popup" >
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="rrd" type="xsd:string" use="required" />
- <xsd:attribute name="unit" type="xsd:string" use="optional" />
- <xsd:attribute name="series" type="xsd:string" use="optional" />
- <xsd:attribute name="refresh" type="xsd:integer" use="optional" />
- <xsd:attribute name="period" type="xsd:string" use="optional" />
- <xsd:attribute name="datasource" type="xsd:string" use="optional" />
- <xsd:attribute name="tooltip" type="xsd:string" use="optional" />
- </xsd:extension>
- </xsd:simpleContent>
+ <xsd:choice maxOccurs="unbounded" minOccurs="1">
+ <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ </xsd:choice>
+ <xsd:attribute name="rrd" type="xsd:string" use="required" />
+ <xsd:attribute name="unit" type="xsd:string" use="optional" />
+ <xsd:attribute name="series" type="xsd:string" use="optional" />
+ <xsd:attribute name="refresh" type="xsd:integer" use="optional" />
+ <xsd:attribute name="period" type="xsd:string" use="optional" />
+ <xsd:attribute name="datasource" type="xsd:string" use="optional" />
+ <xsd:attribute name="tooltip" type="xsd:string" use="optional" />
+ <xsd:attribute name="linecolor" type="xsd:string" use="optional" />
+ <xsd:attribute name="gridcolor" type="xsd:string" use="optional" />
</xsd:complexType>
+<xsd:complexType name="diagram_info" >
+ <xsd:choice maxOccurs="unbounded" minOccurs="1">
+ <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ <xsd:element name="address" type="address" minOccurs="1"/>
+ </xsd:choice>
+ <xsd:attribute ref="format" use="optional" />
+ <xsd:attribute ref="styling" use="optional" />
+ <xsd:attribute ref="mapping" use="optional" />
+ <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ <xsd:attribute name="rrd" type="xsd:string" use="required" />
+ <xsd:attribute name="unit" type="xsd:string" use="optional" />
+ <xsd:attribute name="series" type="xsd:string" use="optional" />
+ <xsd:attribute name="refresh" type="xsd:integer" use="optional" />
+ <xsd:attribute name="period" type="xsd:string" use="optional" />
+ <xsd:attribute name="datasource" type="xsd:string" use="optional" />
+ <xsd:attribute name="tooltip" type="xsd:string" use="optional" />
+ <xsd:attribute name="linecolor" type="xsd:string" use="optional" />
+ <xsd:attribute name="gridcolor" type="xsd:string" use="optional" />
+</xsd:complexType>
+
<xsd:complexType name="break" />
<xsd:complexType name="line" />
<!-- toggle is not yet implemented -->
-<!-- shade is not yet implemented -->
-
</xsd:schema>
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2011-11-27 21:44:05 UTC (rev 549)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2011-11-29 16:33:08 UTC (rev 550)
@@ -370,6 +370,10 @@
<label>KNX traffic</label>
</diagram_popup>
<diagram_inline rrd="eib_traffic" width="600" height="400"/>
+ <diagram_info rrd="200_DALI_Linie_1_Strom" unit="mA" series="day" refresh="300">
+ <label>DALI Strom L1</label>
+ <address transform="DPT:9.021">14/2/7</address>
+ </diagram_info>
<line/>
<page name="Erweiterte Widgets">
<text>Auf dieser Seite sind Widgets zu finden, die noch in Entwicklung
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <net...@us...> - 2011-12-18 11:21:31
|
Revision: 583
http://openautomation.svn.sourceforge.net/openautomation/?rev=583&view=rev
Author: netzkind
Date: 2011-12-18 11:21:22 +0000 (Sun, 18 Dec 2011)
Log Message:
-----------
correct width for widgets on small-screen devices, no longer css-calc widths; Tested on Windows (FF8, Chrome 15), Built-in browsers of: Samsung Galaxy S2 (Gingerbread), Samsung Galaxy Tab 10.1 (Honeycomb), iPhone 3GS (iOS 5), Samsung Galaxy S (Gingerbread)
Modified Paths:
--------------
CometVisu/trunk/visu/designs/alaska/basic.css
CometVisu/trunk/visu/designs/alaska/mobile.css
CometVisu/trunk/visu/designs/alaska_slim/basic.css
CometVisu/trunk/visu/designs/alaska_slim/mobile.css
CometVisu/trunk/visu/designs/discreet/basic.css
CometVisu/trunk/visu/designs/discreet/mobile.css
CometVisu/trunk/visu/designs/discreet_sand/basic.css
CometVisu/trunk/visu/designs/discreet_sand/mobile.css
CometVisu/trunk/visu/designs/discreet_slim/basic.css
CometVisu/trunk/visu/designs/discreet_slim/mobile.css
CometVisu/trunk/visu/designs/pure/basic.css
CometVisu/trunk/visu/designs/pure/mobile.css
CometVisu/trunk/visu/designs/structure_custom.js
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/edit/visuconfig_edit.js
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js
CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
CometVisu/trunk/visu/plugins/gweather/structure_plugin.js
CometVisu/trunk/visu/plugins/jqclock/structure_plugin.js
CometVisu/trunk/visu/plugins/jsonviewer/structure_plugin.js
CometVisu/trunk/visu/plugins/rss/structure_plugin.js
Modified: CometVisu/trunk/visu/designs/alaska/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska/basic.css 2011-12-16 23:02:51 UTC (rev 582)
+++ CometVisu/trunk/visu/designs/alaska/basic.css 2011-12-18 11:21:22 UTC (rev 583)
@@ -87,10 +87,17 @@
text-decoration: none;
}
+.widget_container {
+ width: 50%;
+ float: left;
+}
+
+.widget_container .widget_container {
+ width: 100%;
+}
+
.widget
{
- float:left;
- width:48%;
margin: 0.2em;
padding: 0.2em;
border-style: solid none none none; /* oben rechts unten links */
@@ -99,11 +106,6 @@
background: transparent;
}
-.widget .widget
-{
- width:98%;
-}
-
.text > div, .link > a
{
float:left;
Modified: CometVisu/trunk/visu/designs/alaska/mobile.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska/mobile.css 2011-12-16 23:02:51 UTC (rev 582)
+++ CometVisu/trunk/visu/designs/alaska/mobile.css 2011-12-18 11:21:22 UTC (rev 583)
@@ -1,14 +1,11 @@
-.widget
-{
- width:98%;
-}
-
-#bottom
-{
- display: none;
-}
-
-.page
-{
- overflow: visible;
-}
+.widget_container {
+ width: 98%;
+}
+
+#bottom {
+ display: none;
+}
+
+.page {
+ overflow: visible;
+}
Modified: CometVisu/trunk/visu/designs/alaska_slim/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska_slim/basic.css 2011-12-16 23:02:51 UTC (rev 582)
+++ CometVisu/trunk/visu/designs/alaska_slim/basic.css 2011-12-18 11:21:22 UTC (rev 583)
@@ -82,10 +82,17 @@
text-decoration: none;
}
+.widget_container {
+ width: 33%;
+ float: left;
+}
+
+.widget_container .widget_container {
+ width: 100%;
+}
+
.widget
{
- float:left;
- width:32%;
margin: 0.2em;
padding: 0.2em;
border-style: solid none none none; /* oben rechts unten links */
@@ -94,11 +101,6 @@
background: transparent;
}
-.widget .widget
-{
- width:98%;
-}
-
.text > div, .link > a {
float:left;
text-align:left;
Modified: CometVisu/trunk/visu/designs/alaska_slim/mobile.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska_slim/mobile.css 2011-12-16 23:02:51 UTC (rev 582)
+++ CometVisu/trunk/visu/designs/alaska_slim/mobile.css 2011-12-18 11:21:22 UTC (rev 583)
@@ -1,14 +1,11 @@
-.widget
-{
- width:98%;
-}
-
-#bottom
-{
- display: none;
-}
-
-.page
-{
- overflow: visible;
-}
+.widget_container {
+ width: 98%;
+}
+
+#bottom {
+ display: none;
+}
+
+.page {
+ overflow: visible;
+}
Modified: CometVisu/trunk/visu/designs/discreet/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet/basic.css 2011-12-16 23:02:51 UTC (rev 582)
+++ CometVisu/trunk/visu/designs/discreet/basic.css 2011-12-18 11:21:22 UTC (rev 583)
@@ -81,10 +81,17 @@
vertical-align: middle;
}
+.widget_container {
+ width: 50%;
+ float: left;
+}
+
+.widget_container .widget_container {
+ width: 100%;
+}
+
.widget
{
- float:left;
- width:48%;
margin: .2em;
padding: 0.3em;
/* border:yellow 1px solid; */
@@ -98,11 +105,6 @@
background-color: #101010;
}
-.widget .widget
-{
- width:98%;
-}
-
.text > div,
.link > a {
float:left;
Modified: CometVisu/trunk/visu/designs/discreet/mobile.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet/mobile.css 2011-12-16 23:02:51 UTC (rev 582)
+++ CometVisu/trunk/visu/designs/discreet/mobile.css 2011-12-18 11:21:22 UTC (rev 583)
@@ -1,12 +1,11 @@
-.widget
-{
- width:98%;
-}
-
-#bottom {
- display: none;
-}
-
-.page {
- overflow: visible;
-}
+.widget_container {
+ width: 98%;
+}
+
+#bottom {
+ display: none;
+}
+
+.page {
+ overflow: visible;
+}
Modified: CometVisu/trunk/visu/designs/discreet_sand/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet_sand/basic.css 2011-12-16 23:02:51 UTC (rev 582)
+++ CometVisu/trunk/visu/designs/discreet_sand/basic.css 2011-12-18 11:21:22 UTC (rev 583)
@@ -1,377 +1,383 @@
-@font-face { font-family: Liberation; src:url(fonts/liberationsans.ttf); }
-@font-face { font-family: Liberation; font-weight: bold; src:url(fonts/liberationsans-bold.ttf); }
-
-body
-{
- color: #453420; /*#2F2A20;*/
- font-family: Arial, Liberation;
- font-size: 5.5mm;
- overflow: hidden;
- margin:0;
- background: #CFC8B5; /* url(images/body_bg.png) repeat-x; */
-}
-
-h1
-{
- font-size: 2em;
- padding-left: 15px;
-}
-
-body hr
-{
- clear:both;
- color: #7F735F;
- background-color: #7F735F;
- height: 1px;
- border:none;
- padding:0px;
- margin:0.1em;
-}
-
-#pages hr {
- border: 0; height: 30px; margin: 0 .5%;
- background: transparent url(images/hr_bg.png) 50% repeat-x;
- clear: both;
-}
-
-
-body br
-{
- clear:both;
-}
-
-div#top {
- padding-top: 8px;
- border-top: 3px solid #BAAF98;
- background: #165D7E url(images/nav_bg.png) bottom repeat-x;
- padding-bottom: 8px;
-}
-
-.page h1 {
- margin-top: 0;
- padding-top: .1em;
- background: #CFC8B5;
- color: #2F2A20;
- /*background: #7F735F url(images/head_bg.png) scroll repeat-x bottom;*/
-}
-
-.nav_path
-{
- color: #EFEBE0; /*#81664b;*/
- margin-left: 15px;
-}
-.nav_path a
-{
- color: #EFEBE0; /*#3F3327;*/
- text-decoration:none;
-}
-
-.footer,
-.footer *
-{
- color: #000000;
- font-size: 0.9em;
- vertical-align: middle;
-}
-
-.widget
-{
- float:left;
- width:48%;
- margin: .2em;
- padding: 0.3em;
- /* border:yellow 1px solid; */
- border-color: #7F735F;
- border-style: solid;
- border-width: 2px 0px 0px 2px;
- -moz-border-radius: 8px;
- -webkit-border-radius: 8px;
- border-radius: 8px;
- min-height: 2em;
- background-color: #BAAF98;
-}
-
-.text > div,
-.link > a {
- float:left;
- text-align:left;
- padding-left: 1em;
-}
-
-.widget .label,
-.widget.info .actor,
-.text > div,
-.link > a {
- line-height: 2em;
-}
-
-.widget .label
-{
- float:left;
- width:49%;
-/* color:red; */
-/* padding-right:0.25em; */
- text-align:left;
- padding-left: 1em;
-/* border:blue 1px solid; */
-}
-.widget .actor
-{
- float:left;
- margin-left:1em;
- text-align:left;
-}
-.widget .actor div
-{
- float:left;
- white-space: pre-wrap;
-}
-
-
-.green.switchPressed div, .green.switchUnpressed div{
- background: transparent url(images/dot_green.png) no-repeat center center;
- color: #3F2F1F !important;
-}
-.red.switchPressed div, .red.switchUnpressed div{
- background: transparent url(images/dot_red.png) no-repeat center center;
- color: #3F2F1F !important;
-}
-
-
-.red
-{
- color:#f44;
- font-weight:bold;
-}
-
-.green
-{
- color:#4f4;
-}
-
-.blue
-{
- color:#44f;
-}
-
-.purple
-{
- color:#f4f;
-}
-
-.link a
-{
- color: #165d7e; /*#3F2F1F;*/
- width: 49%;
-}
-
-.page
-{
- float:left;
- width: 900px;
- overflow: auto;
- position: relative;
-}
-
-.switchPressed, .switchUnpressed {
- border-style: solid;
- -moz-border-radius: 12px;
- -webkit-border-radius: 12px;
- border-radius: 12px;
- padding: 1px;
- background: url(images/button_bg.png) #A79367 repeat-x;
-}
-
-.switchUnpressed
-{
- border-width: 1px 2px 2px 1px;
- border-color: #6C6251 #4F483B #4F483B #6C6251;
- margin-top: 0px;
- background-color: #EFE6D1;
- background-position: center +2px;
-}
-.switchUnpressed div, .switchPressed div
-{
- padding: 5px;
- width: 5em;
- float: left;
- background: transparent;
- text-align: center;
- cursor: pointer;
-}
-
-.switchPressed
-{
- border-width: 2px 1px 1px 2px;
- border-color: #4F483B #6C6251 #6C6251 #4F483B;
- margin-top: 1px;
- background-position: center -2px;
-}
-
-.switchUnpressed div {
- margin-left: -1px;
-}
-
-.switchPressed div {
- margin-top: -1px;
-}
-
-.ui-slider { position: relative; text-align: left; }
-.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.6em; height: 1.6em; cursor: default; }
-.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
-
-.ui-slider-horizontal { height: .8em; }
-.ui-slider-horizontal .ui-slider-handle { top: -.5em; margin-left: -.8em; }
-.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
-.ui-slider-horizontal .ui-slider-range-min { left: 0; }
-.ui-slider-horizontal .ui-slider-range-max { right: 0; }
-
-.ui-slider-vertical { width: .8em; height: 100px; }
-.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
-.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
-.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
-.ui-slider-vertical .ui-slider-range-max { top: 0; }
-.ui-widget-content { border: 1px solid #dddddd; background: #000 ; color: #000; }
-.ui-widget-content a { color: #333333; }
-.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #000 ; font-weight: bold; color: #1c94c4; }
-.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; }
-.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
-
-.dim .actor
-{
- width: 3em;
-}
-.widget .ui-slider
-{
- width: 30%;
- float: left;
- margin-left: 10px;
- margin-left: 1em;
- margin-top: 0.5em;
- border-color: #4F483B #6C6251 #6C6251 #4F483B;
- background: url(images/gradient.png) #F8EFC6 repeat-y;
-}
-
-.widget .ui-slider-handle
-{
- border-style: solid;
- -moz-border-radius: 12px;
- -webkit-border-radius: 12px;
- border-radius: 12px;
- padding: 1px;
- background: url(images/button_bg.png) #A79367 repeat-x;
- border-width: 1px 2px 2px 1px;
- border-color: #6C6251 #4F483B #4F483B #6C6251;
-}
-/* Clearfix */
-.clearfix:after {
- content: ".";
- display: block;
- clear: both;
- visibility: hidden;
- line-height: 0;
- height: 0;
-}
-
-.clearfix {
- display: inline-block;
-}
-
-html[xmlns] .clearfix {
- display: block;
-}
-
-*:first-child+html .clearfix {
- min-height: 0;
-}
-
-* html .clearfix {
- height: 1%;
-}
-
-* html>body .clearfix {
- display: inline-block;
- width: 100%;
-}
-
-* html .clearfix {
- /* Hides from IE-mac \*/
- height: 1%;
- /* End hide from IE-mac */
-}
-
-.loading {
- display: block !important;
-}
-
-div#loading {
- display: none !important;
-}
-
-
-.popup,
-.popup_background {
- position: absolute;
- width: 90%;
- height: 90%;
- top: 5%;
- left: 5%;
-}
-
-.popup {
- z-index: 101;
- background: transparent;
-}
-
-
-.popup_background {
- z-index: 100;
- border-color: #7F735F;
- border-style: solid;
- border-width: 2px 0px 0px 2px;
- -moz-border-radius: 8px;
- -webkit-border-radius: 8px;
- border-radius: 8px;
- background: #BAAF98;
- opacity: .98;
-}
-
-.popup div {
- margin: 4px;
-}
-
-.popup div.head {
- border-bottom: 1px solid;
-}
-
-.popup_background.error {
- background: #800000;
- border: #f00;
-}
-
-.clickable {
- cursor: pointer;
-}
-
-.diagram_inline {
- width: 320px;
- height: 180px;
-}
-
-.diagram_preview {
- width: 320px;
- height: 2em;
-}
-
-.tickLabel {
- color: #453420;
-}
-
-#diagramTooltip {
- z-index: 1000;
- color: black;
- border: 1px solid #fdd;
- padding: 2px;
- background-color: #fee;
- opacity: 0.80;
+@font-face { font-family: Liberation; src:url(fonts/liberationsans.ttf); }
+@font-face { font-family: Liberation; font-weight: bold; src:url(fonts/liberationsans-bold.ttf); }
+
+body
+{
+ color: #453420; /*#2F2A20;*/
+ font-family: Arial, Liberation;
+ font-size: 5.5mm;
+ overflow: hidden;
+ margin:0;
+ background: #CFC8B5; /* url(images/body_bg.png) repeat-x; */
+}
+
+h1
+{
+ font-size: 2em;
+ padding-left: 15px;
+}
+
+body hr
+{
+ clear:both;
+ color: #7F735F;
+ background-color: #7F735F;
+ height: 1px;
+ border:none;
+ padding:0px;
+ margin:0.1em;
+}
+
+#pages hr {
+ border: 0; height: 30px; margin: 0 .5%;
+ background: transparent url(images/hr_bg.png) 50% repeat-x;
+ clear: both;
+}
+
+
+body br
+{
+ clear:both;
+}
+
+div#top {
+ padding-top: 8px;
+ border-top: 3px solid #BAAF98;
+ background: #165D7E url(images/nav_bg.png) bottom repeat-x;
+ padding-bottom: 8px;
+}
+
+.page h1 {
+ margin-top: 0;
+ padding-top: .1em;
+ background: #CFC8B5;
+ color: #2F2A20;
+ /*background: #7F735F url(images/head_bg.png) scroll repeat-x bottom;*/
+}
+
+.nav_path
+{
+ color: #EFEBE0; /*#81664b;*/
+ margin-left: 15px;
+}
+.nav_path a
+{
+ color: #EFEBE0; /*#3F3327;*/
+ text-decoration:none;
+}
+
+.footer,
+.footer *
+{
+ color: #000000;
+ font-size: 0.9em;
+ vertical-align: middle;
+}
+
+.widget_container {
+ width: 50%;
+ float: left;
+}
+
+.widget_container .widget_container {
+ width: 100%;
+}
+
+.widget
+{
+ margin: .2em;
+ padding: 0.3em;
+ border-color: #7F735F;
+ border-style: solid;
+ border-width: 2px 0px 0px 2px;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ border-radius: 8px;
+ min-height: 2em;
+ background-color: #BAAF98;
+}
+
+.text > div,
+.link > a {
+ float:left;
+ text-align:left;
+ padding-left: 1em;
+}
+
+.widget .label,
+.widget.info .actor,
+.text > div,
+.link > a {
+ line-height: 2em;
+}
+
+.widget .label
+{
+ float:left;
+ width:49%;
+/* color:red; */
+/* padding-right:0.25em; */
+ text-align:left;
+ padding-left: 1em;
+/* border:blue 1px solid; */
+}
+.widget .actor
+{
+ float:left;
+ margin-left:1em;
+ text-align:left;
+}
+.widget .actor div
+{
+ float:left;
+ white-space: pre-wrap;
+}
+
+
+.green.switchPressed div, .green.switchUnpressed div{
+ background: transparent url(images/dot_green.png) no-repeat center center;
+ color: #3F2F1F !important;
+}
+.red.switchPressed div, .red.switchUnpressed div{
+ background: transparent url(images/dot_red.png) no-repeat center center;
+ color: #3F2F1F !important;
+}
+
+
+.red
+{
+ color:#f44;
+ font-weight:bold;
+}
+
+.green
+{
+ color:#4f4;
+}
+
+.blue
+{
+ color:#44f;
+}
+
+.purple
+{
+ color:#f4f;
+}
+
+.link a
+{
+ color: #165d7e; /*#3F2F1F;*/
+ width: 49%;
+}
+
+.page
+{
+ float:left;
+ width: 900px;
+ overflow: auto;
+ position: relative;
+}
+
+.switchPressed, .switchUnpressed {
+ border-style: solid;
+ -moz-border-radius: 12px;
+ -webkit-border-radius: 12px;
+ border-radius: 12px;
+ padding: 1px;
+ background: url(images/button_bg.png) #A79367 repeat-x;
+}
+
+.switchUnpressed
+{
+ border-width: 1px 2px 2px 1px;
+ border-color: #6C6251 #4F483B #4F483B #6C6251;
+ margin-top: 0px;
+ background-color: #EFE6D1;
+ background-position: center +2px;
+}
+.switchUnpressed div, .switchPressed div
+{
+ padding: 5px;
+ width: 5em;
+ float: left;
+ background: transparent;
+ text-align: center;
+ cursor: pointer;
+}
+
+.switchPressed
+{
+ border-width: 2px 1px 1px 2px;
+ border-color: #4F483B #6C6251 #6C6251 #4F483B;
+ margin-top: 1px;
+ background-position: center -2px;
+}
+
+.switchUnpressed div {
+ margin-left: -1px;
+}
+
+.switchPressed div {
+ margin-top: -1px;
+}
+
+.ui-slider { position: relative; text-align: left; }
+.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.6em; height: 1.6em; cursor: default; }
+.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
+
+.ui-slider-horizontal { height: .8em; }
+.ui-slider-horizontal .ui-slider-handle { top: -.5em; margin-left: -.8em; }
+.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
+.ui-slider-horizontal .ui-slider-range-min { left: 0; }
+.ui-slider-horizontal .ui-slider-range-max { right: 0; }
+
+.ui-slider-vertical { width: .8em; height: 100px; }
+.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
+.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
+.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
+.ui-slider-vertical .ui-slider-range-max { top: 0; }
+.ui-widget-content { border: 1px solid #dddddd; background: #000 ; color: #000; }
+.ui-widget-content a { color: #333333; }
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #000 ; font-weight: bold; color: #1c94c4; }
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; }
+.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
+
+.dim .actor
+{
+ width: 3em;
+}
+.widget .ui-slider
+{
+ width: 30%;
+ float: left;
+ margin-left: 10px;
+ margin-left: 1em;
+ margin-top: 0.5em;
+ border-color: #4F483B #6C6251 #6C6251 #4F483B;
+ background: url(images/gradient.png) #F8EFC6 repeat-y;
+}
+
+.widget .ui-slider-handle
+{
+ border-style: solid;
+ -moz-border-radius: 12px;
+ -webkit-border-radius: 12px;
+ border-radius: 12px;
+ padding: 1px;
+ background: url(images/button_bg.png) #A79367 repeat-x;
+ border-width: 1px 2px 2px 1px;
+ border-color: #6C6251 #4F483B #4F483B #6C6251;
+}
+/* Clearfix */
+.clearfix:after {
+ content: ".";
+ display: block;
+ clear: both;
+ visibility: hidden;
+ line-height: 0;
+ height: 0;
+}
+
+.clearfix {
+ display: inline-block;
+}
+
+html[xmlns] .clearfix {
+ display: block;
+}
+
+*:first-child+html .clearfix {
+ min-height: 0;
+}
+
+* html .clearfix {
+ height: 1%;
+}
+
+* html>body .clearfix {
+ display: inline-block;
+ width: 100%;
+}
+
+* html .clearfix {
+ /* Hides from IE-mac \*/
+ height: 1%;
+ /* End hide from IE-mac */
+}
+
+.loading {
+ display: block !important;
+}
+
+div#loading {
+ display: none !important;
+}
+
+
+.popup,
+.popup_background {
+ position: absolute;
+ width: 90%;
+ height: 90%;
+ top: 5%;
+ left: 5%;
+}
+
+.popup {
+ z-index: 101;
+ background: transparent;
+}
+
+
+.popup_background {
+ z-index: 100;
+ border-color: #7F735F;
+ border-style: solid;
+ border-width: 2px 0px 0px 2px;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ border-radius: 8px;
+ background: #BAAF98;
+ opacity: .98;
+}
+
+.popup div {
+ margin: 4px;
+}
+
+.popup div.head {
+ border-bottom: 1px solid;
+}
+
+.popup_background.error {
+ background: #800000;
+ border: #f00;
+}
+
+.clickable {
+ cursor: pointer;
+}
+
+.diagram_inline {
+ width: 320px;
+ height: 180px;
+}
+
+.diagram_preview {
+ width: 320px;
+ height: 2em;
+}
+
+.tickLabel {
+ color: #453420;
+}
+
+#diagramTooltip {
+ z-index: 1000;
+ color: black;
+ border: 1px solid #fdd;
+ padding: 2px;
+ background-color: #fee;
+ opacity: 0.80;
}
\ No newline at end of file
Modified: CometVisu/trunk/visu/designs/discreet_sand/mobile.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet_sand/mobile.css 2011-12-16 23:02:51 UTC (rev 582)
+++ CometVisu/trunk/visu/designs/discreet_sand/mobile.css 2011-12-18 11:21:22 UTC (rev 583)
@@ -1,12 +1,11 @@
-.widget
-{
- width:98%;
-}
-
-#bottom {
- display: none;
-}
-
-.page {
- overflow: visible;
-}
+.widget_container {
+ width: 98%;
+}
+
+#bottom {
+ display: none;
+}
+
+.page {
+ overflow: visible;
+}
Modified: CometVisu/trunk/visu/designs/discreet_slim/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet_slim/basic.css 2011-12-16 23:02:51 UTC (rev 582)
+++ CometVisu/trunk/visu/designs/discreet_slim/basic.css 2011-12-18 11:21:22 UTC (rev 583)
@@ -74,10 +74,17 @@
vertical-align: middle;
}
+.widget_container {
+ width: 33%;
+ float: left;
+}
+
+.widget_container .widget_container {
+ width: 100%;
+}
+
.widget
{
- float:left;
- width:32%;
margin: .1em;
padding: 0.15em;
/* border:yellow 1px solid; */
@@ -88,11 +95,6 @@
background-color: #101010;
}
-.widget .widget
-{
- width:98%;
-}
-
.text > div,
.link > a {
float:left;
Modified: CometVisu/trunk/visu/designs/discreet_slim/mobile.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet_slim/mobile.css 2011-12-16 23:02:51 UTC (rev 582)
+++ CometVisu/trunk/visu/designs/discreet_slim/mobile.css 2011-12-18 11:21:22 UTC (rev 583)
@@ -1,12 +1,11 @@
-.widget
-{
- width:98%;
-}
-
-#bottom {
- display: none;
-}
-
-.page {
- overflow: visible;
-}
+.widget_container {
+ width: 98%;
+}
+
+#bottom {
+ display: none;
+}
+
+.page {
+ overflow: visible;
+}
Modified: CometVisu/trunk/visu/designs/pure/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/pure/basic.css 2011-12-16 23:02:51 UTC (rev 582)
+++ CometVisu/trunk/visu/designs/pure/basic.css 2011-12-18 11:21:22 UTC (rev 583)
@@ -1,475 +1,468 @@
-body
-{
- background-color: black;
- color: white;
- font-family: Verdana, Helvetica, sans-serif;
- font-family: 'URW Gothic L','Century Gothic','Apple Gothic',Arial,sans-serif;
- font-size: 5mm;
- overflow: hidden;
- margin:0;
- -moz-user-select: none;
- -khtml-user-select: none;
- -webkit-user-select: none;
- user-select: none;
-}
-
-h1
-{
- font-size: 2em;
- margin-left: 15px;
-}
-
-h2
-{
- font-size: 1.25em;
- margin-left: 15px;
- margin-top: 5px;
- margin-bottom: 5px;
-}
-
-body hr
-{
- clear:both;
- color: #ff8000;
- background-color: #ff8000;
- height: 1px;
- border:none;
- padding:0px;
- margin:0.1em;
-}
-
-body br
-{
- clear:both;
-}
-
-.nav_path
-{
- color: #ff8000;
- margin-left: 15px;
-}
-.nav_path a
-{
- color: white;
- text-decoration:none;
-}
-
-.footer,
-.footer *
-{
- color: #ff8000;
- font-size: 0.9em;
- vertical-align: middle;
-}
-
-.widget
-{
- float:left;
- width:48%; /* dumb fallback */
- width: -moz-calc(50% - 0.6em);
- width: -webkit-calc(50% - 0.6em);
- width: -o-calc(50% - 0.6em);
- width: calc(50% - 0.6em);
- margin:0.10em;
- padding:0.1em;
- /* border:yellow 1px solid; */
- border: none;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- min-height: 2em;
-}
-
-.editmode .widget
-{
- border: 1px solid #444;
-}
-
-.widget .widget
-{
- width:98%; /* dumb fallback */
- width: -moz-calc(100% - 0.6em);
- width: -webkit-calc(100% - 0.6em);
- width: -o-calc(100% - 0.6em);
- width: calc(100% - 0.6em);
-}
-
-.widget .label,
-.widget.info .actor,
-.text > div,
-.link > a {
- padding: 5px;
-}
-
-.widget .label
-{
- float:left;
- width:49%;
-/* color:red; */
-/* padding-right:0.25em; */
- text-align:right;
-/* border:blue 1px solid; */
-}
-
-.widget .actor
-{
- float:left;
- margin-left:1em;
-}
-
-.widget .actor div
-{
- float:left;
- white-space: pre-wrap;
-}
-
-.center
-{
- text-align:center;
-}
-
-.left
-{
- text-align:left;
-}
-
-.right
-{
- text-align:right;
-}
-
-.red
-{
- color:#f44;
-
-}
-
-.green
-{
- color:#4f4;
-}
-
-.blue
-{
- color:#44f;
-}
-
-.purple
-{
- color:#f4f;
-}
-
-.link a
-{
- color: #ff8000;
- text-align: right;
- width: 49%;
- padding: 5px;
-}
-
-.page
-{
- float:left;
- width: 900px;
- overflow: auto;
- position: relative;
-}
-
-.switchUnpressed
-{
- border-style: solid;
- border-width: 1px;
- border-color: #666 #444 #444 #666;
- -moz-border-radius: 7px;
- -webkit-border-radius: 7px;
- border-radius: 7px;
- padding: 1px;
-}
-.switchUnpressed div
-{
- border-style: solid;
- border-width: 1px;
- border-color: #fff #666 #666 #fff;
- padding: 3px;
- width: 5em;
- float: left;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
-}
-
-.switchPressed
-{
- border-style: solid;
- border-width: 1px;
- border-color: #666 #fff #fff #666;
- -moz-border-radius: 7px;
- -webkit-border-radius: 7px;
- border-radius: 7px;
- padding: 1px;
-}
-.switchPressed div
-{
- border-style: solid;
- border-width: 1px;
- border-color: #444 #666 #666 #444;
- padding: 3px;
- width: 5em;
- float: left;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
-}
-
-.switchInvisible
-{
- border: none;
- padding: 1px;
-}
-
-.switchInvisible div
-{
- border: none;
- padding: 5px;
- width: 5em;
- float: left;
-}
-
-.ui-slider { position: relative; text-align: left; }
-.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.6em; height: 1.6em; cursor: default; }
-.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
-
-.ui-slider-horizontal { height: .8em; }
-.ui-slider-horizontal .ui-slider-handle { top: -.5em; margin-left: -.8em; }
-.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
-.ui-slider-horizontal .ui-slider-range-min { left: 0; }
-.ui-slider-horizontal .ui-slider-range-max { right: 0; }
-
-.ui-slider-vertical { width: .8em; height: 100px; }
-.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
-.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
-.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
-.ui-slider-vertical .ui-slider-range-max { top: 0; }
-.ui-widget-content { border: 1px solid #dddddd; background: #000 ; color: #000; }
-.ui-widget-content a { color: #333333; }
-.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #000 ; font-weight: bold; color: #1c94c4; }
-.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; }
-.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
-
-.dim .actor
-{
- width: 3em;
-}
-.widget .ui-slider
-{
- width: 30%;
- float: left;
- margin-left: 10px;
- margin-left: 1em;
- margin-top: 0.5em;
- border-color: #666 #fff #fff #666;
-}
-
-.widget .ui-slider-handle
-{
- border-color: #fff #666 #666 #fff;
-}
-/* Clearfix */
-.clearfix:after {
- content: ".";
- display: block;
- clear: both;
- visibility: hidden;
- line-height: 0;
- height: 0;
-}
-
-.clearfix {
- display: inline-block;
-}
-
-html[xmlns] .clearfix {
- display: block;
-}
-
-*:first-child+html .clearfix {
- min-height: 0;
-}
-
-* html .clearfix {
- height: 1%;
-}
-
-* html>body .clearfix {
- display: inline-block;
- width: 100%;
-}
-
-* html .clearfix {
- /* Hides from IE-mac \*/
- height: 1%;
- /* End hide from IE-mac */
-}
-
-.loading {
- display: block !important;
-}
-
-div#loading {
- display: none !important;
-}
-
-.popup,
-.popup_background {
- position: absolute;
- width: 90%;
- height: 90%;
- top: 5%;
- left: 5%;
-}
-
-.popup {
- z-index: 101;
- background: transparent;
-}
-
-
-.popup_background {
- z-index: 100;
- -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;
- background: #000;
- border: 1px solid #fff;
- opacity: 0.75;
-}
-
-.popup div {
- margin: 4px;
-}
-
-.popup div.head {
- border-bottom: 1px solid;
-}
-
-.popup_background.error {
- background: #800000;
- border: #f00;
-}
-
-.clickable {
- cursor: pointer;
-}
-
-.diagram_inline {
- width: 320px;
- height: 180px;
-}
-
-.diagram_preview {
- width: 240px;
- height: 2em;
-}
-
-#diagramTooltip {
- z-index: 1000;
- color: black;
- border: 1px solid #fdd;
- padding: 2px;
- background-color: #fee;
- opacity: 0.80;
-}
-
-/*****************************************************************************/
-/* The definition of the flavours - overwrite the generic settings */
-/*****************************************************************************/
-
-.flavour_black hr
-{
- background-color: #000000;
-}
-.flavour_black .link a
-{
- color: #000000;
-}
-.flavour_black.group
-{
- border: #000000 1px solid;
-}
-
-.flavour_white hr
-{
- background-color: #ffffff;
-}
-.flavour_white .link a
-{
- color: #ffffff;
-}
-.flavour_white.group
-{
- border: #ffffff 1px solid;
-}
-
-.flavour_antimony hr
-{
- background-color: #00ddff;
-}
-.flavour_antimony .link a
-{
- color: #00ddff;
-}
-.flavour_antimony.group
-{
- border: #00ddff 1px solid;
-}
-
-.flavour_boron hr
-{
- background-color: #00ff11;
-}
-.flavour_boron .link a
-{
- color: #00ff11;
-}
-.flavour_boron.group
-{
- border: #00ff11 1px solid;
-}
-
-.flavour_lithium hr
-{
- background-color: #ff0000;
-}
-.flavour_lithium .link a
-{
- color: #ff0000;
-}
-.flavour_lithium.group
-{
- border: #ff0000 1px solid;
-}
-
-.flavour_potassium hr
-{
- background-color: #d00055;
-}
...
[truncated message content] |
|
From: <han...@us...> - 2012-01-05 23:16:19
|
Revision: 635
http://openautomation.svn.sourceforge.net/openautomation/?rev=635&view=rev
Author: hannesloehr
Date: 2012-01-05 23:16:13 +0000 (Thu, 05 Jan 2012)
Log Message:
-----------
Added jquery.ui.touch-punch.js; script simulates touch events as mouse events on jquery ui elements like a slider.
Modified Paths:
--------------
CometVisu/trunk/visu/index.html
Added Paths:
-----------
CometVisu/trunk/visu/lib/jquery.ui.touch-punch.js
CometVisu/trunk/visu/lib/jquery.ui.touch-punch.min.js
Modified: CometVisu/trunk/visu/index.html
===================================================================
--- CometVisu/trunk/visu/index.html 2012-01-05 16:25:17 UTC (rev 634)
+++ CometVisu/trunk/visu/index.html 2012-01-05 23:16:13 UTC (rev 635)
@@ -12,6 +12,7 @@
<script src="lib/compatibility.js" type="text/javascript"></script>
<script src="lib/jquery-ui.js" type="text/javascript"></script>
<script src="lib/scrollable.js" type="text/javascript"></script>
+ <script src="lib/jquery.ui.touch-punch.js" type="text/javascript"></script>
<script src="lib/cometvisu-client.js" type="text/javascript"></script>
<script src="lib/knx_decode.js" type="text/javascript"></script>
<script src="designs/structure_pure.js" type="text/javascript"></script>
Added: CometVisu/trunk/visu/lib/jquery.ui.touch-punch.js
===================================================================
--- CometVisu/trunk/visu/lib/jquery.ui.touch-punch.js (rev 0)
+++ CometVisu/trunk/visu/lib/jquery.ui.touch-punch.js 2012-01-05 23:16:13 UTC (rev 635)
@@ -0,0 +1,167 @@
+/*!
+ * jQuery UI Touch Punch 0.2.2
+ *
+ * Copyright 2011, Dave Furfero
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ *
+ * Depends:
+ * jquery.ui.widget.js
+ * jquery.ui.mouse.js
+ *
+ * https://github.com/furf/jquery-ui-touch-punch
+ *
+ */
+(function ($) {
+
+ // Detect touch support
+ $.support.touch = 'ontouchend' in document;
+
+ // Ignore browsers without touch support
+ if (!$.support.touch) {
+ console.log("Kein Touch Support");
+ return;
+ }
+ else {
+ console.log("MIT Touch Support");
+ }
+
+ var mouseProto = $.ui.mouse.prototype,
+ _mouseInit = mouseProto._mouseInit,
+ touchHandled;
+
+ /**
+ * Simulate a mouse event based on a corresponding touch event
+ * @param {Object} event A touch event
+ * @param {String} simulatedType The corresponding mouse event
+ */
+ function simulateMouseEvent (event, simulatedType) {
+
+ // Ignore multi-touch events
+ if (event.originalEvent.touches.length > 1) {
+ return;
+ }
+
+ event.preventDefault();
+
+ var touch = event.originalEvent.changedTouches[0],
+ simulatedEvent = document.createEvent('MouseEvents');
+
+ // Initialize the simulated mouse event using the touch event's coordinates
+ simulatedEvent.initMouseEvent(
+ simulatedType, // type
+ true, // bubbles
+ true, // cancelable
+ window, // view
+ 1, // detail
+ touch.screenX, // screenX
+ touch.screenY, // screenY
+ touch.clientX, // clientX
+ touch.clientY, // clientY
+ false, // ctrlKey
+ false, // altKey
+ false, // shiftKey
+ false, // metaKey
+ 0, // button
+ null // relatedTarget
+ );
+
+ // Dispatch the simulated event to the target element
+ event.target.dispatchEvent(simulatedEvent);
+ }
+
+ /**
+ * Handle the jQuery UI widget's touchstart events
+ * @param {Object} event The widget element's touchstart event
+ */
+ mouseProto._touchStart = function (event) {
+
+ var self = this;
+
+ // Ignore the event if another widget is already being handled
+ if (touchHandled || !self._mouseCapture(event.originalEvent.changedTouches[0])) {
+ return;
+ }
+
+ // Set the flag to prevent other widgets from inheriting the touch event
+ touchHandled = true;
+
+ // Track movement to determine if interaction was a click
+ self._touchMoved = false;
+
+ // Simulate the mouseover event
+ simulateMouseEvent(event, 'mouseover');
+
+ // Simulate the mousemove event
+ simulateMouseEvent(event, 'mousemove');
+
+ // Simulate the mousedown event
+ simulateMouseEvent(event, 'mousedown');
+ };
+
+ /**
+ * Handle the jQuery UI widget's touchmove events
+ * @param {Object} event The document's touchmove event
+ */
+ mouseProto._touchMove = function (event) {
+
+ // Ignore event if not handled
+ if (!touchHandled) {
+ return;
+ }
+
+ // Interaction was not a click
+ this._touchMoved = true;
+
+ // Simulate the mousemove event
+ simulateMouseEvent(event, 'mousemove');
+ };
+
+ /**
+ * Handle the jQuery UI widget's touchend events
+ * @param {Object} event The document's touchend event
+ */
+ mouseProto._touchEnd = function (event) {
+
+ // Ignore event if not handled
+ if (!touchHandled) {
+ return;
+ }
+
+ // Simulate the mouseup event
+ simulateMouseEvent(event, 'mouseup');
+
+ // Simulate the mouseout event
+ simulateMouseEvent(event, 'mouseout');
+
+ // If the touch interaction did not move, it should trigger a click
+ if (!this._touchMoved) {
+
+ // Simulate the click event
+ simulateMouseEvent(event, 'click');
+ }
+
+ // Unset the flag to allow other widgets to inherit the touch event
+ touchHandled = false;
+ };
+
+ /**
+ * A duck punch of the $.ui.mouse _mouseInit method to support touch events.
+ * This method extends the widget with bound touch event handlers that
+ * translate touch events to mouse events and pass them to the widget's
+ * original mouse event handling methods.
+ */
+ mouseProto._mouseInit = function () {
+
+ var self = this;
+
+ // Delegate the touch handlers to the widget's element
+ self.element
+ .bind('touchstart', $.proxy(self, '_touchStart'))
+ .bind('touchmove', $.proxy(self, '_touchMove'))
+ .bind('touchend', $.proxy(self, '_touchEnd'));
+
+ // Call the original $.ui.mouse init method
+ _mouseInit.call(self);
+ };
+
+})(jQuery);
\ No newline at end of file
Added: CometVisu/trunk/visu/lib/jquery.ui.touch-punch.min.js
===================================================================
--- CometVisu/trunk/visu/lib/jquery.ui.touch-punch.min.js (rev 0)
+++ CometVisu/trunk/visu/lib/jquery.ui.touch-punch.min.js 2012-01-05 23:16:13 UTC (rev 635)
@@ -0,0 +1,11 @@
+/*
+ * jQuery UI Touch Punch 0.2.2
+ *
+ * Copyright 2011, Dave Furfero
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ *
+ * Depends:
+ * jquery.ui.widget.js
+ * jquery.ui.mouse.js
+ */
+(function(b){b.support.touch="ontouchend" in document;if(!b.support.touch){return;}var c=b.ui.mouse.prototype,e=c._mouseInit,a;function d(g,h){if(g.originalEvent.touches.length>1){return;}g.preventDefault();var i=g.originalEvent.changedTouches[0],f=document.createEvent("MouseEvents");f.initMouseEvent(h,true,true,window,1,i.screenX,i.screenY,i.clientX,i.clientY,false,false,false,false,0,null);g.target.dispatchEvent(f);}c._touchStart=function(g){var f=this;if(a||!f._mouseCapture(g.originalEvent.changedTouches[0])){return;}a=true;f._touchMoved=false;d(g,"mouseover");d(g,"mousemove");d(g,"mousedown");};c._touchMove=function(f){if(!a){return;}this._touchMoved=true;d(f,"mousemove");};c._touchEnd=function(f){if(!a){return;}d(f,"mouseup");d(f,"mouseout");if(!this._touchMoved){d(f,"click");}a=false;};c._mouseInit=function(){var f=this;f.element.bind("touchstart",b.proxy(f,"_touchStart")).bind("touchmove",b.proxy(f,"_touchMove")).bind("touchend",b.proxy(f,"_touchEnd"));e.call(f);};})(jQuery);
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j-...@us...> - 2012-01-15 17:36:12
|
Revision: 655
http://openautomation.svn.sourceforge.net/openautomation/?rev=655&view=rev
Author: j-n-k
Date: 2012-01-15 17:36:05 +0000 (Sun, 15 Jan 2012)
Log Message:
-----------
Fix css/ design issues for rss-plugin
Modified Paths:
--------------
CometVisu/trunk/visu/designs/alaska/basic.css
CometVisu/trunk/visu/designs/alaska_slim/basic.css
CometVisu/trunk/visu/designs/discreet/basic.css
CometVisu/trunk/visu/designs/discreet_sand/basic.css
CometVisu/trunk/visu/designs/discreet_slim/basic.css
CometVisu/trunk/visu/designs/pure/basic.css
CometVisu/trunk/visu/plugins/rss/structure_plugin.js
Modified: CometVisu/trunk/visu/designs/alaska/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska/basic.css 2012-01-15 17:09:04 UTC (rev 654)
+++ CometVisu/trunk/visu/designs/alaska/basic.css 2012-01-15 17:36:05 UTC (rev 655)
@@ -385,6 +385,10 @@
text-decoration: none;
}
+.rss_inline>ul {
+ padding-left:1em;
+ margin: 0px;
+}
/* styles for the preview */
div#demo_1, div#demo_2, div#demo_3 {
Modified: CometVisu/trunk/visu/designs/alaska_slim/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska_slim/basic.css 2012-01-15 17:09:04 UTC (rev 654)
+++ CometVisu/trunk/visu/designs/alaska_slim/basic.css 2012-01-15 17:36:05 UTC (rev 655)
@@ -330,6 +330,11 @@
cursor: pointer;
}
+.rss_inline>ul {
+ padding-left:1em;
+ margin: 0px;
+}
+
.diagram_inline
{
width: 320px;
Modified: CometVisu/trunk/visu/designs/discreet/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet/basic.css 2012-01-15 17:09:04 UTC (rev 654)
+++ CometVisu/trunk/visu/designs/discreet/basic.css 2012-01-15 17:36:05 UTC (rev 655)
@@ -389,6 +389,11 @@
opacity: 0.80;
}
+.rss_inline>ul {
+ padding-left:1em;
+ margin: 0px;
+}
+
/* styles for the preview */
div#demo_1, div#demo_2 {
width: 100%;
Modified: CometVisu/trunk/visu/designs/discreet_sand/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet_sand/basic.css 2012-01-15 17:09:04 UTC (rev 654)
+++ CometVisu/trunk/visu/designs/discreet_sand/basic.css 2012-01-15 17:36:05 UTC (rev 655)
@@ -169,6 +169,8 @@
{
color: #165d7e; /*#3F2F1F;*/
width: 49%;
+ line-height: 2em;
+ padding-left: 1em;
}
.page
@@ -373,6 +375,10 @@
color: #453420;
}
+.rss_inline>ul {
+ padding-left:1em;
+ margin: 0px;
+}
#diagramTooltip {
z-index: 1000;
color: black;
Modified: CometVisu/trunk/visu/designs/discreet_slim/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet_slim/basic.css 2012-01-15 17:09:04 UTC (rev 654)
+++ CometVisu/trunk/visu/designs/discreet_slim/basic.css 2012-01-15 17:36:05 UTC (rev 655)
@@ -336,7 +336,6 @@
display: none !important;
}
-
.popup,
.popup_background {
position: absolute;
@@ -369,6 +368,11 @@
border-bottom: 1px solid;
}
+.rss_inline>ul {
+ padding-left:1em;
+ margin: 0px;
+}
+
.popup_background.error {
background: #800000;
border: #f00;
Modified: CometVisu/trunk/visu/designs/pure/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/pure/basic.css 2012-01-15 17:09:04 UTC (rev 654)
+++ CometVisu/trunk/visu/designs/pure/basic.css 2012-01-15 17:36:05 UTC (rev 655)
@@ -371,6 +371,11 @@
opacity: 0.80;
}
+.rss_inline>ul {
+ padding-left:1em;
+ margin: 0px;
+}
+
/*****************************************************************************/
/* The definition of the flavours - overwrite the generic settings */
/*****************************************************************************/
Modified: CometVisu/trunk/visu/plugins/rss/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/rss/structure_plugin.js 2012-01-15 17:09:04 UTC (rev 654)
+++ CometVisu/trunk/visu/plugins/rss/structure_plugin.js 2012-01-15 17:36:05 UTC (rev 655)
@@ -42,7 +42,7 @@
var ret_val = $('<div class="widget clearfix" />');
ret_val.addClass( 'rss' );
var label = '<div class="label">' + page.textContent + '</div>';
- var actor = $("<div class=\"actor\"><div class=\"rss_inline\" id=\"" + id + "\"></div></div>");
+ var actor = $("<div class=\"actor\"><div class=\"rss_inline\" id=\"" + id + "\"><div class='ul'></div></div></div>");
var rss = $("#" + id, actor);
if ($p.attr("width")) {
@@ -103,32 +103,32 @@
if (src.match(/^http/)) {
//use zrssfeed
jQuery(function() {
- $(rss).rssfeed(src, {
- limit: rss.data("limit"),
- header: eval(rss.data("header")),
- date: eval(rss.data("date")),
- content: rss.data("content"),
- snippet: eval(rss.data("snippet")),
- showerror: eval(rss.data("showerror")),
- ssl: eval(rss.data("ssl")),
- linktarget: rss.data("linktarget"),
- });
+ $(rss).rssfeed(src, {
+ limit: rss.data("limit"),
+ header: eval(rss.data("header")),
+ date: eval(rss.data("date")),
+ content: rss.data("content"),
+ snippet: eval(rss.data("snippet")),
+ showerror: eval(rss.data("showerror")),
+ ssl: eval(rss.data("ssl")),
+ linktarget: rss.data("linktarget"),
+ });
});
} else {
jQuery(function() {
- $(rss).rssfeedlocal({
- src: src,
- limit: rss.data("limit"),
- header: eval(rss.data("header")),
- date: eval(rss.data("date")),
- content: rss.data("content"),
- snippet: eval(rss.data("snippet")),
- showerror: eval(rss.data("showerror")),
- ssl: eval(rss.data("ssl")),
- linktarget: rss.data("linktarget"),
- link: eval(rss.data("link")),
- title: eval(rss.data("title"))
- });
+ $(rss).rssfeedlocal({
+ src: src,
+ limit: rss.data("limit"),
+ header: eval(rss.data("header")),
+ date: eval(rss.data("date")),
+ content: rss.data("content"),
+ snippet: eval(rss.data("snippet")),
+ showerror: eval(rss.data("showerror")),
+ ssl: eval(rss.data("ssl")),
+ linktarget: rss.data("linktarget"),
+ link: eval(rss.data("link")),
+ title: eval(rss.data("title"))
+ });
});
}
if (typeof (refresh) != "undefined" && refresh) {
@@ -177,6 +177,7 @@
},
success: function(feed){
jQuery(c).html('');
+
/* FIXME: Header gets added on each refresh, unsupported in rssfeedlocal for now..
if (options.header)
jQuery(c).parent().parent().prepend( '<p><div class="rssHeader">' +
@@ -185,9 +186,10 @@
+'" target="' + o.linktarget + '">'
+ jQuery(feed).find('title:first').text()
+'</a>' + '</div></p>');
-*/
- jQuery(feed).find('item').each(function(i){
- var row = 'odd';
+*/
+ var row = 'odd';
+ jQuery(feed).find('item').each(function(i) {
+
var itemHtml;
if (o.link)
itemHtml = o.html.replace(/{title}/, '<a href="'
@@ -201,7 +203,7 @@
itemHtml = o.html.replace(/{title}/, '');
itemHtml = itemHtml.replace(/{text}/, jQuery(this).find('description').text());
- var entryDate = new Date(jQuery(this).find('pubDate').text());
+ var entryDate = new Date($(this).find('pubDate').text());
if (o.date && entryDate)
itemHtml = itemHtml.replace(/{date}/, entryDate.toLocaleDateString() + ' ' + entryDate.toLocaleTimeString() + ' ');
else
@@ -209,17 +211,18 @@
jQuery(c).append(jQuery('<' + o.wrapper + ' class="rssRow ' + row + '">').append(itemHtml));
- // Alternate row classes
- if (row == 'odd') {
- row = 'even';
- } else {
- row = 'odd';
- }
+ // Alternate row classes
+ if (row == 'odd') {
+ row = 'even';
+ } else {
+ row = 'odd';
+ }
if (i == o.limit-1) {
return false;
}
- });
+ });
+ $('li').wrapAll("<ul>");
}
});
});
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j-...@us...> - 2012-01-18 19:10:52
|
Revision: 661
http://openautomation.svn.sourceforge.net/openautomation/?rev=661&view=rev
Author: j-n-k
Date: 2012-01-18 19:10:46 +0000 (Wed, 18 Jan 2012)
Log Message:
-----------
Added seperate Plugin-CSS for rsslog-plugin. Design-CSS can overwrite
default styles by redefining them
Modified Paths:
--------------
CometVisu/trunk/visu/designs/alaska/basic.css
CometVisu/trunk/visu/designs/alaska_slim/basic.css
CometVisu/trunk/visu/designs/discreet/basic.css
CometVisu/trunk/visu/designs/discreet_sand/basic.css
CometVisu/trunk/visu/designs/discreet_slim/basic.css
CometVisu/trunk/visu/designs/pure/basic.css
CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js
Added Paths:
-----------
CometVisu/trunk/visu/plugins/rsslog/rsslog.css
Modified: CometVisu/trunk/visu/designs/alaska/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska/basic.css 2012-01-18 17:57:12 UTC (rev 660)
+++ CometVisu/trunk/visu/designs/alaska/basic.css 2012-01-18 19:10:46 UTC (rev 661)
@@ -385,11 +385,6 @@
text-decoration: none;
}
-.rss_inline>ul {
- padding-left:1em;
- margin: 0px;
-}
-
/* styles for the preview */
div#demo_1, div#demo_2, div#demo_3 {
width: 100%;
Modified: CometVisu/trunk/visu/designs/alaska_slim/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska_slim/basic.css 2012-01-18 17:57:12 UTC (rev 660)
+++ CometVisu/trunk/visu/designs/alaska_slim/basic.css 2012-01-18 19:10:46 UTC (rev 661)
@@ -330,11 +330,6 @@
cursor: pointer;
}
-.rss_inline>ul {
- padding-left:1em;
- margin: 0px;
-}
-
.diagram_inline
{
width: 320px;
Modified: CometVisu/trunk/visu/designs/discreet/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet/basic.css 2012-01-18 17:57:12 UTC (rev 660)
+++ CometVisu/trunk/visu/designs/discreet/basic.css 2012-01-18 19:10:46 UTC (rev 661)
@@ -389,11 +389,6 @@
opacity: 0.80;
}
-.rss_inline>ul {
- padding-left:1em;
- margin: 0px;
-}
-
/* styles for the preview */
div#demo_1, div#demo_2 {
width: 100%;
Modified: CometVisu/trunk/visu/designs/discreet_sand/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet_sand/basic.css 2012-01-18 17:57:12 UTC (rev 660)
+++ CometVisu/trunk/visu/designs/discreet_sand/basic.css 2012-01-18 19:10:46 UTC (rev 661)
@@ -375,10 +375,6 @@
color: #453420;
}
-.rss_inline>ul {
- padding-left:1em;
- margin: 0px;
-}
#diagramTooltip {
z-index: 1000;
color: black;
Modified: CometVisu/trunk/visu/designs/discreet_slim/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet_slim/basic.css 2012-01-18 17:57:12 UTC (rev 660)
+++ CometVisu/trunk/visu/designs/discreet_slim/basic.css 2012-01-18 19:10:46 UTC (rev 661)
@@ -368,11 +368,6 @@
border-bottom: 1px solid;
}
-.rss_inline>ul {
- padding-left:1em;
- margin: 0px;
-}
-
.popup_background.error {
background: #800000;
border: #f00;
Modified: CometVisu/trunk/visu/designs/pure/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/pure/basic.css 2012-01-18 17:57:12 UTC (rev 660)
+++ CometVisu/trunk/visu/designs/pure/basic.css 2012-01-18 19:10:46 UTC (rev 661)
@@ -363,19 +363,14 @@
}
#diagramTooltip {
- z-index: 1000;
- color: black;
- border: 1px solid #fdd;
- padding: 2px;
- background-color: #fee;
- opacity: 0.80;
+ z-index: 1000;
+ color: black;
+ border: 1px solid #fdd;
+ padding: 2px;
+ background-color: #fee;
+ opacity: 0.80;
}
-.rss_inline>ul {
- padding-left:1em;
- margin: 0px;
-}
-
/*****************************************************************************/
/* The definition of the flavours - overwrite the generic settings */
/*****************************************************************************/
Added: CometVisu/trunk/visu/plugins/rsslog/rsslog.css
===================================================================
--- CometVisu/trunk/visu/plugins/rsslog/rsslog.css (rev 0)
+++ CometVisu/trunk/visu/plugins/rsslog/rsslog.css 2012-01-18 19:10:46 UTC (rev 661)
@@ -0,0 +1,10 @@
+.rssBody, .rsslog_inline {
+ padding-left:0.15em;
+}
+
+.rssBody>ul, .rsslog_inline>ul {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+
+}
Property changes on: CometVisu/trunk/visu/plugins/rsslog/rsslog.css
___________________________________________________________________
Added: svn:executable
+ *
Modified: CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js 2012-01-18 17:57:12 UTC (rev 660)
+++ CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js 2012-01-18 19:10:46 UTC (rev 661)
@@ -26,6 +26,10 @@
* <rss src="/visu/plugins/rss/tagesschau-rss2.xml" refresh="300" header="true" date="true"></rss>
*/
+$.get("plugins/rsslog/rsslog.css", function(css) {
+ $("head").append("<style>"+css+"</style>");
+ });
+
VisuDesign_Custom.prototype.addCreator("rsslog", {
create: function( page, path ) {
var $p = $(page);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j-...@us...> - 2012-01-23 17:59:52
|
Revision: 665
http://openautomation.svn.sourceforge.net/openautomation/?rev=665&view=rev
Author: j-n-k
Date: 2012-01-23 17:59:41 +0000 (Mon, 23 Jan 2012)
Log Message:
-----------
Added support for colspan, usage: colspan="x" in widget-defintion
Each design has to implement all possible multi-columncolspan-classes:
single-column-designs: none
two-column-designs: colspan2
three-column-designs: colspan2, colspan3
etc.
Basic support: currently only in rsslog-plugin
Modified Paths:
--------------
CometVisu/trunk/visu/designs/alaska/basic.css
CometVisu/trunk/visu/designs/alaska_slim/basic.css
CometVisu/trunk/visu/designs/discreet/basic.css
CometVisu/trunk/visu/designs/discreet_sand/basic.css
CometVisu/trunk/visu/designs/discreet_slim/basic.css
CometVisu/trunk/visu/designs/pure/basic.css
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js
Modified: CometVisu/trunk/visu/designs/alaska/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska/basic.css 2012-01-21 17:23:16 UTC (rev 664)
+++ CometVisu/trunk/visu/designs/alaska/basic.css 2012-01-23 17:59:41 UTC (rev 665)
@@ -92,6 +92,10 @@
float: left;
}
+.colspan2 {
+ width:100%;
+}
+
.widget_container .widget_container {
width: 100%;
}
Modified: CometVisu/trunk/visu/designs/alaska_slim/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska_slim/basic.css 2012-01-21 17:23:16 UTC (rev 664)
+++ CometVisu/trunk/visu/designs/alaska_slim/basic.css 2012-01-23 17:59:41 UTC (rev 665)
@@ -87,6 +87,14 @@
float: left;
}
+.colspan2 {
+ width:66%;
+}
+
+.colspan3 {
+ width:99%;
+}
+
.widget_container .widget_container {
width: 100%;
}
Modified: CometVisu/trunk/visu/designs/discreet/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet/basic.css 2012-01-21 17:23:16 UTC (rev 664)
+++ CometVisu/trunk/visu/designs/discreet/basic.css 2012-01-23 17:59:41 UTC (rev 665)
@@ -86,6 +86,10 @@
float: left;
}
+.colspan2 {
+ width:100%;
+}
+
.widget_container .widget_container {
width: 100%;
}
Modified: CometVisu/trunk/visu/designs/discreet_sand/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet_sand/basic.css 2012-01-21 17:23:16 UTC (rev 664)
+++ CometVisu/trunk/visu/designs/discreet_sand/basic.css 2012-01-23 17:59:41 UTC (rev 665)
@@ -79,6 +79,10 @@
float: left;
}
+.colspan2 {
+ width:100%;
+}
+
.widget_container .widget_container {
width: 100%;
}
Modified: CometVisu/trunk/visu/designs/discreet_slim/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet_slim/basic.css 2012-01-21 17:23:16 UTC (rev 664)
+++ CometVisu/trunk/visu/designs/discreet_slim/basic.css 2012-01-23 17:59:41 UTC (rev 665)
@@ -79,6 +79,14 @@
float: left;
}
+.colspan2 {
+ width:66%;
+}
+
+.colspan3 {
+ width:99%;
+}
+
.widget_container .widget_container {
width: 100%;
}
Modified: CometVisu/trunk/visu/designs/pure/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/pure/basic.css 2012-01-21 17:23:16 UTC (rev 664)
+++ CometVisu/trunk/visu/designs/pure/basic.css 2012-01-23 17:59:41 UTC (rev 665)
@@ -67,6 +67,10 @@
float: left;
}
+.colspan2 {
+ width:100%;
+}
+
.widget_container .widget_container {
width: 100%;
}
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-01-21 17:23:16 UTC (rev 664)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-01-23 17:59:41 UTC (rev 665)
@@ -173,12 +173,16 @@
$(elem).remove();
}
- $('head').append('<style>.rowspan' + rowspan + ' { height: ' + totalHeight + 'px; } </style>');
+ $('head').append('<style>.rowspan' + rowspan + ' { height: ' + totalHeight + 'px; overflow:hidden;} </style>');
}
return className;
}
+function colspanClass(colspan, elem) {
+ var className = 'colspan'+ colspan; // mostly dummy, has to be defined in design-CSS
+ return className;
+}
function parseXML(xml) {
// erst mal den Cache für AJAX-Requests wieder aktivieren
$.ajaxSetup({cache: true});
@@ -384,7 +388,7 @@
.data("textContent", page.textContent);
if (jQuery(retval).is(".widget")) {
- retval = jQuery("<div class='widget_container' />").append(retval);
+ retval = jQuery("<div class='widget_container "+retval.data("colspanClass")+"' />").append(retval);
}
return retval;
Modified: CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js 2012-01-21 17:23:16 UTC (rev 664)
+++ CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js 2012-01-23 17:59:41 UTC (rev 665)
@@ -48,6 +48,9 @@
ret_val.addClass(rowspanClass($p.attr("rowspan")));
}
+ if ($p.attr("colspan")) { // add colspan only if not default
+ ret_val.data("colspanClass", colspanClass($p.attr("colspan")));
+ }
var labelElement = $p.find('label')[0];
var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
@@ -152,15 +155,6 @@
success: function(feed){
jQuery(c).html('');
-/* FIXME: Header gets added on each refresh, unsupported in rssfeedlocal for now..
- if (options.header)
- jQuery(c).parent().parent().prepend( '<p><div class="rssHeader">' +
- '<a href="' + jQuery(feed).find('link:first').text()
- +'" title="'+ jQuery(feed).find('description:first').text()
- +'" target="' + o.linktarget + '">'
- + jQuery(feed).find('title:first').text()
- +'</a>' + '</div></p>');
-*/
// get height of one entry, calc max num of display items in widget
var dummyDiv = $('<' + o.wrapper + ' class="rssRow odd" id="dummydiv">').append('<li />').appendTo($(c));
var itemheight = dummyDiv.height();
@@ -203,7 +197,7 @@
var entryDate = new Date($(item).find('pubDate').text());
if (entryDate) {
itemHtml = (o.timeformat) ?
- (itemHtml.replace(/{date}/, entryDate.toLocaleFormat(o.timeformat) + ' ')) :
+ (itemHtml.replace(/{date}/, entryDate.strftime(o.timeformat) + ' ')) :
(itemHtml.replace(/{date}/, entryDate.toLocaleDateString() + ' ' + entryDate.toLocaleTimeString() + ' '));
} else {
itemHtml = itemHtml.replace(/{date}/, '');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j-...@us...> - 2012-01-25 17:16:25
|
Revision: 667
http://openautomation.svn.sourceforge.net/openautomation/?rev=667&view=rev
Author: j-n-k
Date: 2012-01-25 17:16:18 +0000 (Wed, 25 Jan 2012)
Log Message:
-----------
Changed colspan-calculation, CSS-Entries no longer needed,
added colspan-support fot jqclock-Plugin
Modified Paths:
--------------
CometVisu/trunk/visu/designs/alaska/basic.css
CometVisu/trunk/visu/designs/alaska_slim/basic.css
CometVisu/trunk/visu/designs/discreet/basic.css
CometVisu/trunk/visu/designs/discreet_sand/basic.css
CometVisu/trunk/visu/designs/discreet_slim/basic.css
CometVisu/trunk/visu/designs/pure/basic.css
CometVisu/trunk/visu/designs/structure_custom.js
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/designs/alaska/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska/basic.css 2012-01-24 17:18:10 UTC (rev 666)
+++ CometVisu/trunk/visu/designs/alaska/basic.css 2012-01-25 17:16:18 UTC (rev 667)
@@ -92,10 +92,6 @@
float: left;
}
-.colspan2 {
- width:100%;
-}
-
.widget_container .widget_container {
width: 100%;
}
Modified: CometVisu/trunk/visu/designs/alaska_slim/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska_slim/basic.css 2012-01-24 17:18:10 UTC (rev 666)
+++ CometVisu/trunk/visu/designs/alaska_slim/basic.css 2012-01-25 17:16:18 UTC (rev 667)
@@ -87,14 +87,6 @@
float: left;
}
-.colspan2 {
- width:66%;
-}
-
-.colspan3 {
- width:99%;
-}
-
.widget_container .widget_container {
width: 100%;
}
Modified: CometVisu/trunk/visu/designs/discreet/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet/basic.css 2012-01-24 17:18:10 UTC (rev 666)
+++ CometVisu/trunk/visu/designs/discreet/basic.css 2012-01-25 17:16:18 UTC (rev 667)
@@ -86,10 +86,6 @@
float: left;
}
-.colspan2 {
- width:100%;
-}
-
.widget_container .widget_container {
width: 100%;
}
Modified: CometVisu/trunk/visu/designs/discreet_sand/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet_sand/basic.css 2012-01-24 17:18:10 UTC (rev 666)
+++ CometVisu/trunk/visu/designs/discreet_sand/basic.css 2012-01-25 17:16:18 UTC (rev 667)
@@ -79,10 +79,6 @@
float: left;
}
-.colspan2 {
- width:100%;
-}
-
.widget_container .widget_container {
width: 100%;
}
Modified: CometVisu/trunk/visu/designs/discreet_slim/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet_slim/basic.css 2012-01-24 17:18:10 UTC (rev 666)
+++ CometVisu/trunk/visu/designs/discreet_slim/basic.css 2012-01-25 17:16:18 UTC (rev 667)
@@ -79,14 +79,6 @@
float: left;
}
-.colspan2 {
- width:66%;
-}
-
-.colspan3 {
- width:99%;
-}
-
.widget_container .widget_container {
width: 100%;
}
Modified: CometVisu/trunk/visu/designs/pure/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/pure/basic.css 2012-01-24 17:18:10 UTC (rev 666)
+++ CometVisu/trunk/visu/designs/pure/basic.css 2012-01-25 17:16:18 UTC (rev 667)
@@ -67,10 +67,6 @@
float: left;
}
-.colspan2 {
- width:100%;
-}
-
.widget_container .widget_container {
width: 100%;
}
Modified: CometVisu/trunk/visu/designs/structure_custom.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_custom.js 2012-01-24 17:18:10 UTC (rev 666)
+++ CometVisu/trunk/visu/designs/structure_custom.js 2012-01-25 17:16:18 UTC (rev 667)
@@ -61,20 +61,19 @@
var designs = [ 'pure', 'discreet', 'discreet_sand', 'discreet_slim', 'alaska', 'alaska_slim' ];
var oldDesign = $('.value',this).text();
var newDesign = designs[ (designs.indexOf(oldDesign) + 1) % designs.length ];
- $('.value',this).text(newDesign);
- $('link[href*="designs"]').each(function(){
- this.href = this.href.replace( oldDesign, newDesign );
- });
-
- setTimeout(function() {
- $('style').each(function(style) {
- var txt = this.textContent;
- var idx = txt.search('rowspan');
- if (idx>0) {
- rowspanClass(parseInt(txt[idx+7]), this);
- }
- });
- }, 100);
+
+ var URL = window.location.href;
+ var regexp = new RegExp("design="+oldDesign)
+ if (URL.search(regexp) != -1) { // has URL-parameter design
+ window.location.href=URL.replace(regexp, "design="+newDesign);
+ } else {
+ if (URL.indexOf("?") != -1) { // has other parameters, append design
+ window.location.href=URL+"&design="+newDesign;
+ } else { // has now parameters
+ window.location.href=URL+"?design="+newDesign;
+ }
+ }
+
})
);
return ret_val;
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-01-24 17:18:10 UTC (rev 666)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-01-25 17:16:18 UTC (rev 667)
@@ -143,10 +143,10 @@
}
$( window ).bind( 'resize', handleResize );
-function rowspanClass(rowspan, elem) {
+function rowspanClass(rowspan) {
var className = 'rowspan'+ rowspan;
- if (( $('<div class="' + className + '" />').height() == 0 ) || elem ) {
+ if ( $('<div class="' + className + '" />').height() == 0 ) {
var dummyDiv = $('<div id="calcrowspan" ><div class="widget clearfix text" id="innerDiv" /></div>')
.appendTo(document.body).show();
@@ -169,20 +169,48 @@
// append css style
- if (elem) {
- $(elem).remove();
- }
-
$('head').append('<style>.rowspan' + rowspan + ' { height: ' + totalHeight + 'px; overflow:hidden;} </style>');
}
return className;
}
-function colspanClass(colspan, elem) {
- var className = 'colspan'+ colspan; // mostly dummy, has to be defined in design-CSS
+function colspanClass(colspan) {
+ var className = 'colspan'+ colspan;
+
+ if ( $('<div class="' + className + '" />').width() == 0 ) { // only if not defined
+ var singleWidth=0;
+
+ // loop over all stylesheets and classes and find .widget_container
+ $.each(document.styleSheets, function(idx, sheet) {
+ if (sheet.href ? (sheet.href.search(/basic.css/) > 0) : false) {
+ $.each(sheet.cssRules, function(idx, cssclass) {
+ if (cssclass.selectorText=='.widget_container') {
+ singleWidth = parseInt((cssclass.style.width).match(/[0-9]*/)[0]);
+ return;
+ }
+ });
+ }
+ if (singleWidth > 0) { // match already found
+ return;
+ }
+ });
+
+ var totalWidth = singleWidth * colspan;
+
+ if (totalWidth>100) { // check if totalWidth is <=100
+ alert('colspan="'+colspan+'" leads to width:' + totalWidth +
+ '% which is >100% and not allowed. Corrected to 100%');
+ totalWidth=100;
+ }
+
+ $('head').append('<style>.colspan' + colspan + ' { width: ' + totalWidth +
+ '%; overflow:hidden;} </style>');
+ }
+
return className;
}
+
function parseXML(xml) {
// erst mal den Cache für AJAX-Requests wieder aktivieren
$.ajaxSetup({cache: true});
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mr...@us...> - 2012-01-28 21:33:16
|
Revision: 669
http://openautomation.svn.sourceforge.net/openautomation/?rev=669&view=rev
Author: mrremy
Date: 2012-01-28 21:33:09 +0000 (Sat, 28 Jan 2012)
Log Message:
-----------
initial version of upnpcontroller
Modified Paths:
--------------
CometVisu/trunk/visu/visu_config.xml
Added Paths:
-----------
CometVisu/trunk/visu/plugins/upnpcontroller/
CometVisu/trunk/visu/plugins/upnpcontroller/mute.php
CometVisu/trunk/visu/plugins/upnpcontroller/next.php
CometVisu/trunk/visu/plugins/upnpcontroller/pause.php
CometVisu/trunk/visu/plugins/upnpcontroller/play.php
CometVisu/trunk/visu/plugins/upnpcontroller/prev.php
CometVisu/trunk/visu/plugins/upnpcontroller/status.php
CometVisu/trunk/visu/plugins/upnpcontroller/structure_plugin.js
CometVisu/trunk/visu/plugins/upnpcontroller/upnpcontroller.css
CometVisu/trunk/visu/plugins/upnpcontroller/upnpctrl_util.php
CometVisu/trunk/visu/plugins/upnpcontroller/volume.php
Added: CometVisu/trunk/visu/plugins/upnpcontroller/mute.php
===================================================================
--- CometVisu/trunk/visu/plugins/upnpcontroller/mute.php (rev 0)
+++ CometVisu/trunk/visu/plugins/upnpcontroller/mute.php 2012-01-28 21:33:09 UTC (rev 669)
@@ -0,0 +1,50 @@
+<?php
+/* mute.php (c) 2012 by Mark K. [mr dot remy at gmx dot de]
+ *
+ * This program 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 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+*/
+
+require 'upnpctrl_util.php';
+
+header("content-type: text/html");
+//header("content-type: text/json");
+$mute = $_GET['mute'];
+
+$cmd_setmute='POST /MediaRenderer/RenderingControl/Control HTTP/1.1
+CONNECTION: close
+HOST: '.$address.':1400
+CONTENT-LENGTH: 314
+CONTENT-TYPE: text/xml; charset="utf-8"
+SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#SetMute"
+
+<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:SetMute xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><Channel>Master</Channel><DesiredMute>'.$mute.'</DesiredMute></u:SetMute></s:Body></s:Envelope>';
+
+$actionResponse = sendUpnpAction($cmd_setmute, $address, $port);
+
+//echo "actionResponse xml: ";
+//print_r($actionResponse);
+//echo "</br>'";
+
+$xmlParser = xml_parser_create("UTF-8");
+xml_parser_set_option($xmlParser, XML_OPTION_TARGET_ENCODING, "UTF-8");
+xml_parse_into_struct($xmlParser, $actionResponse, $actionResponseArray, $index);
+xml_parser_free($xmlParser);
+
+//print_r($actionResponseArray);
+//print_r($index);
+
+print_r("{\"actionstatus\" : 'OK'}");
+
+?>
\ No newline at end of file
Added: CometVisu/trunk/visu/plugins/upnpcontroller/next.php
===================================================================
--- CometVisu/trunk/visu/plugins/upnpcontroller/next.php (rev 0)
+++ CometVisu/trunk/visu/plugins/upnpcontroller/next.php 2012-01-28 21:33:09 UTC (rev 669)
@@ -0,0 +1,49 @@
+<?php
+/* next.php (c) 2012 by Mark K. [mr dot remy at gmx dot de]
+ *
+ * This program 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 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+*/
+
+require 'upnpctrl_util.php';
+
+//header("content-type: text/html");
+header("content-type: text/json");
+
+$cmd_next='POST /MediaRenderer/AVTransport/Control HTTP/1.1
+CONNECTION: close
+HOST: '.$address.':1400
+CONTENT-LENGTH: 250
+CONTENT-TYPE: text/xml; charset="utf-8"
+SOAPACTION: "urn:schemas-upnp-org:service:AVTransport:1#Next"
+
+<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:Next xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID>0</InstanceID></u:Next></s:Body></s:Envelope>';
+
+$actionResponse = sendUpnpAction($cmd_next, $address, $port);
+
+//echo "actionResponse xml: ";
+//print_r($actionResponse);
+//echo "</br>'";
+
+$xmlParser = xml_parser_create("UTF-8");
+xml_parser_set_option($xmlParser, XML_OPTION_TARGET_ENCODING, "UTF-8");
+xml_parse_into_struct($xmlParser, $actionResponse, $actionResponseArray, $index);
+xml_parser_free($xmlParser);
+
+//print_r($actionResponseArray);
+//print_r($index);
+
+print_r("{\"actionstatus\" : 'OK'}");
+
+?>
\ No newline at end of file
Added: CometVisu/trunk/visu/plugins/upnpcontroller/pause.php
===================================================================
--- CometVisu/trunk/visu/plugins/upnpcontroller/pause.php (rev 0)
+++ CometVisu/trunk/visu/plugins/upnpcontroller/pause.php 2012-01-28 21:33:09 UTC (rev 669)
@@ -0,0 +1,49 @@
+<?php
+/* pause.php (c) 2012 by Mark K. [mr dot remy at gmx dot de]
+ *
+ * This program 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 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+*/
+
+require 'upnpctrl_util.php';
+
+//header("content-type: text/html");
+header("content-type: text/json");
+
+$cmd_pause='POST /MediaRenderer/AVTransport/Control HTTP/1.1
+CONNECTION: close
+HOST: '.$address.':1400
+CONTENT-LENGTH: 252
+CONTENT-TYPE: text/xml; charset="utf-8"
+SOAPACTION: "urn:schemas-upnp-org:service:AVTransport:1#Pause"
+
+<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:Pause xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID>0</InstanceID></u:Pause></s:Body></s:Envelope>';
+
+$actionResponse = sendUpnpAction($cmd_pause, $address, $port);
+
+//echo "actionResponse xml: ";
+//print_r($actionResponse);
+//echo "</br>'";
+
+$xmlParser = xml_parser_create("UTF-8");
+xml_parser_set_option($xmlParser, XML_OPTION_TARGET_ENCODING, "UTF-8");
+xml_parse_into_struct($xmlParser, $actionResponse, $actionResponseArray, $index);
+xml_parser_free($xmlParser);
+
+//print_r($actionResponseArray);
+//print_r($index);
+
+print_r("{\"actionstatus\" : 'OK'}");
+
+?>
\ No newline at end of file
Added: CometVisu/trunk/visu/plugins/upnpcontroller/play.php
===================================================================
--- CometVisu/trunk/visu/plugins/upnpcontroller/play.php (rev 0)
+++ CometVisu/trunk/visu/plugins/upnpcontroller/play.php 2012-01-28 21:33:09 UTC (rev 669)
@@ -0,0 +1,49 @@
+<?php
+/* play.php (c) 2012 by Mark K. [mr dot remy at gmx dot de]
+ *
+ * This program 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 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+*/
+
+require 'upnpctrl_util.php';
+
+//header("content-type: text/html");
+header("content-type: text/json");
+
+$cmd_play='POST /MediaRenderer/AVTransport/Control HTTP/1.1
+CONNECTION: close
+HOST: '.$address.':1400
+CONTENT-LENGTH: 266
+CONTENT-TYPE: text/xml; charset="utf-8"
+SOAPACTION: "urn:schemas-upnp-org:service:AVTransport:1#Play"
+
+<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:Play xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID>0</InstanceID><Speed>1</Speed></u:Play></s:Body></s:Envelope>';
+
+$actionResponse = sendUpnpAction($cmd_play, $address, $port);
+
+//echo "actionResponse xml: ";
+//print_r($actionResponse);
+//echo "</br>'";
+
+$xmlParser = xml_parser_create("UTF-8");
+xml_parser_set_option($xmlParser, XML_OPTION_TARGET_ENCODING, "UTF-8");
+xml_parse_into_struct($xmlParser, $actionResponse, $actionResponseArray, $index);
+xml_parser_free($xmlParser);
+
+//print_r($actionResponseArray);
+//print_r($index);
+
+print_r("{\"actionstatus\" : 'OK'}");
+
+?>
\ No newline at end of file
Added: CometVisu/trunk/visu/plugins/upnpcontroller/prev.php
===================================================================
--- CometVisu/trunk/visu/plugins/upnpcontroller/prev.php (rev 0)
+++ CometVisu/trunk/visu/plugins/upnpcontroller/prev.php 2012-01-28 21:33:09 UTC (rev 669)
@@ -0,0 +1,49 @@
+<?php
+/* prev.php (c) 2012 by Mark K. [mr dot remy at gmx dot de]
+ *
+ * This program 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 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+*/
+
+require 'upnpctrl_util.php';
+
+//header("content-type: text/html");
+header("content-type: text/json");
+
+$cmd_prev = 'POST /MediaRenderer/AVTransport/Control HTTP/1.1
+CONNECTION: close
+HOST: '.$address.':1400
+CONTENT-LENGTH: 258
+CONTENT-TYPE: text/xml; charset="utf-8"
+SOAPACTION: "urn:schemas-upnp-org:service:AVTransport:1#Previous"
+
+<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:Previous xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID>0</InstanceID></u:Previous></s:Body></s:Envelope>';
+
+$actionResponse = sendUpnpAction($cmd_prev, $address, $port);
+
+//echo "actionResponse xml: ";
+//print_r($actionResponse);
+//echo "</br>'";
+
+$xmlParser = xml_parser_create("UTF-8");
+xml_parser_set_option($xmlParser, XML_OPTION_TARGET_ENCODING, "UTF-8");
+xml_parse_into_struct($xmlParser, $actionResponse, $actionResponseArray, $index);
+xml_parser_free($xmlParser);
+
+//print_r($actionResponseArray);
+//print_r($index);
+
+print_r("{\"actionstatus\" : 'OK'}");
+
+?>
\ No newline at end of file
Added: CometVisu/trunk/visu/plugins/upnpcontroller/status.php
===================================================================
--- CometVisu/trunk/visu/plugins/upnpcontroller/status.php (rev 0)
+++ CometVisu/trunk/visu/plugins/upnpcontroller/status.php 2012-01-28 21:33:09 UTC (rev 669)
@@ -0,0 +1,144 @@
+<?php
+/* status.php (c) 2012 by Mark K. [mr dot remy at gmx dot de]
+ *
+ * This program 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 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+*/
+
+require 'upnpctrl_util.php';
+
+//header("content-type: text/html");
+header("content-type: text/json");
+
+$cmd_getvolume='POST /MediaRenderer/RenderingControl/Control HTTP/1.1
+CONNECTION: close
+HOST: '.$address.':1400
+CONTENT-LENGTH: 296
+CONTENT-TYPE: text/xml; charset="utf-8"
+SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#GetVolume"
+
+<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><ns0:GetVolume xmlns:ns0="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><Channel>Master</Channel></ns0:GetVolume></s:Body></s:Envelope>';
+
+$cmd_getmute='POST /MediaRenderer/RenderingControl/Control HTTP/1.1
+CONNECTION: close
+HOST: '.$address.':1400
+CONTENT-LENGTH: 288
+CONTENT-TYPE: text/xml; charset="utf-8"
+SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#GetMute"
+
+<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetMute xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><Channel>Master</Channel></ns0:GetMute></s:Body></s:Envelope>';
+
+$cmd_getpositioninfo='POST /MediaRenderer/AVTransport/Control HTTP/1.1
+CONNECTION: close
+HOST: '.$address.':1400
+CONTENT-LENGTH: 299
+CONTENT-TYPE: text/xml; charset="utf-8"
+SOAPACTION: "urn:schemas-upnp-org:service:AVTransport:1#GetPositionInfo"
+
+<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetPositionInfo xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID>0</InstanceID><Channel>Master</Channel></ns0:GetPositionInfo></s:Body></s:Envelope>';
+
+$cmd_gettransportinfo='POST /MediaRenderer/AVTransport/Control HTTP/1.1
+CONNECTION: close
+HOST: '.$address.':1400
+CONTENT-LENGTH: 274
+CONTENT-TYPE: text/xml; charset="utf-8"
+SOAPACTION: "urn:schemas-upnp-org:service:AVTransport:1#GetTransportInfo"
+
+<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetTransportInfo xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID>0</InstanceID></u:GetTransportInfo></s:Body></s:Envelope>';
+
+
+ $actionResponse = sendUpnpAction($cmd_getvolume, $address, $port);
+
+ //echo "actionResponse xml: ";
+ //print_r($actionResponse);
+ //echo "</br>'";
+
+ $xmlParser = xml_parser_create("UTF-8");
+ xml_parser_set_option($xmlParser, XML_OPTION_TARGET_ENCODING, "UTF-8");
+ xml_parse_into_struct($xmlParser, $actionResponse, $actionResponseArray, $index);
+ xml_parser_free($xmlParser);
+
+ //print_r($actionResponseArray);
+ //print_r($index);
+
+ $volume = getValueOfResponse($actionResponseArray, "CURRENTVOLUME");
+
+ $actionResponse = sendUpnpAction($cmd_getmute, $address, $port);
+ $xmlParser = xml_parser_create("UTF-8");
+ xml_parser_set_option($xmlParser, XML_OPTION_TARGET_ENCODING, "UTF-8");
+ xml_parse_into_struct($xmlParser, $actionResponse, $actionResponseArray, $index);
+ xml_parser_free($xmlParser);
+
+ //print_r($actionResponseArray);
+
+ $muteState = getValueOfResponse($actionResponseArray, "CURRENTMUTE");
+
+ $actionResponse = sendUpnpAction($cmd_gettransportinfo, $address, $port);
+ $xmlParser = xml_parser_create("UTF-8");
+ xml_parser_set_option($xmlParser, XML_OPTION_TARGET_ENCODING, "UTF-8");
+ xml_parse_into_struct($xmlParser, $actionResponse, $actionResponseArray, $index);
+ xml_parser_free($xmlParser);
+
+// print_r($actionResponseArray);
+
+ $transportStateResponse = getValueOfResponse($actionResponseArray, "CURRENTTRANSPORTSTATE");
+
+ if($transportStateResponse == "PAUSED_PLAYBACK"){
+ $transportState = 'Pause';
+ }else if($transportStateResponse == "PLAYING"){
+ $transportState = 'Play';
+ }else if($transportStateResponse == "STOPPED"){
+ $transportState = 'Stop';
+ }else{
+ $transportState = 'unknown';
+ }
+
+ $actionResponse = sendUpnpAction($cmd_getpositioninfo, $address, $port);
+ $xmlParser = xml_parser_create("UTF-8");
+ xml_parser_set_option($xmlParser, XML_OPTION_TARGET_ENCODING, "UTF-8");
+ xml_parse_into_struct($xmlParser, $actionResponse, $actionResponseArray, $index);
+ xml_parser_free($xmlParser);
+
+// print_r($actionResponseArray);
+
+ $reltimeResponse = getValueOfResponse($actionResponseArray, "RELTIME");
+ $durationResponse = getValueOfResponse($actionResponseArray, "TRACKDURATION");
+ $trackMetaDataResponse = getValueOfResponse($actionResponseArray, "TRACKMETADATA");
+
+// print_r($trackMetaDataResponse);
+
+ $xmlParser = xml_parser_create("UTF-8");
+ xml_parser_set_option($xmlParser, XML_OPTION_TARGET_ENCODING, "UTF-8");
+ xml_parse_into_struct($xmlParser, $trackMetaDataResponse, $actionResponseArray, $index);
+ xml_parser_free($xmlParser);
+
+// print_r($actionResponseArray);
+
+ $title = getValueOfResponse($actionResponseArray, "TITLE");
+ $artist = getValueOfResponse($actionResponseArray, "ALBUMARTIST");
+ $album = getValueOfResponse($actionResponseArray, "ALBUM");
+
+ //
+ // create JSON response
+ //
+ print_r("{\"volume\" : " . $volume . ", \"muteState\" : " . $muteState
+ . ", \"transportState\" : \"" . $transportState
+ . "\" , \"reltimeResponse\" : \"" . $reltimeResponse
+ . "\" , \"durationResponse\" : \"" . $durationResponse
+ . "\" , \"title\" : \"" . $title
+ . "\" , \"artist\" : \"" . $artist
+ . "\" , \"album\" : \"" . $album
+ . "\" , \"error_msg\" : \"" . $error_msg . "\"}");
+
+?>
\ No newline at end of file
Added: CometVisu/trunk/visu/plugins/upnpcontroller/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/upnpcontroller/structure_plugin.js (rev 0)
+++ CometVisu/trunk/visu/plugins/upnpcontroller/structure_plugin.js 2012-01-28 21:33:09 UTC (rev 669)
@@ -0,0 +1,299 @@
+/* structure_plugin.js (c) 2012 by Mark K. [mr dot remy at gmx dot de]
+ *
+ * This program 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 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+*/
+
+
+$( 'head' ).append( '<link rel="stylesheet" href="plugins/upnpcontroller/upnpcontroller.css" type="text/css" />' );
+
+var upnpcontroller_uid;
+
+
+VisuDesign_Custom.prototype.addCreator("upnpcontroller", {
+ create: function( page, path ) {
+ var $p = $(page);
+
+ function uniqid() {
+ var newDate = new Date;
+ return newDate.getTime();
+ }
+
+ var id = "upnpcontroller_" + uniqid();
+ upnpcontroller_uid = id;
+
+ var ret_val = $('<div class="widget" />');
+ ret_val.addClass( 'upnpcontroller' );
+ var label = '<div class="label">' + $p.attr("label") + '</div>';
+ var actor = $("<div class=\"actor\"><div class=\"upnpcontroller\" id=\"" + id + "\">loading</div></div>");
+ var upnpcontroller = $("#" + id, actor);
+
+ controller = $("<div></div>");
+
+ controller.append( "<div id='" + id + "_title' class='upnplabelgroup'><div class='upnplabel'>Title</div><div class='value'>-</div></div>");
+ controller.append( "<div id='" + id + "_artist' class='upnplabelgroup'><div class='upnplabel'>Artist</div><div class='value'>-</div></div>");
+ controller.append( "<div id='" + id + "_album' class='upnplabelgroup'><div class='upnplabel'>Album</div><div class='value'>-</div></div>");
+ controller.append( "<div id='" + id + "_time' class='upnplabelgroup'><div class='upnplabel'></div><div class='value'>-</div></div>");
+ controller.append( "<div style='float: left;'><div id='" + id + "_volumedown' class='actor center switchUnpressed'><div class='value'>-</div></div>"
+ + "<div id='" + id + "_volume' class='actor center switchInvisible' style='text-align: center;'><div class='value'>20</div></div>"
+ + "<div id='" + id + "_volumeup' class='actor center switchUnpressed'><div class='value'>+</div></div></div>" );
+ controller.append( "<div style='float: left;'><div id='" + id + "_playButton' class='actor switchUnpressed center'><div class='value'>-</div></div>"
+ + "<div id='" + id + "_muteButton' class='actor switchUnpressed center'><div class='value'>-</div></div>" );
+ controller.append( "<div style='float: left;'><div id='" + id + "_prev' class='actor switchUnpressed center'><div class='value'>prev</div></div>"
+ + "<div id='" + id + "_next' class='actor switchUnpressed center'><div class='value'>next</div></div></div>" );
+
+ upnpcontroller.html(controller);
+
+ ret_val.append(label).append(actor);
+// console.log("loaded plugin upnpcontroller");
+
+ upnpcontroller.data("id", id);
+ upnpcontroller.data("eventsRegistered", 0);
+ upnpcontroller.data("label", $p.attr("label"));
+ upnpcontroller.data("refresh", $p.attr("refresh"));
+ upnpcontroller.data("player_ip", $p.attr("player_ip_addr"));
+ upnpcontroller.data("debug", $p.attr("debug"));
+
+ refreshUpnpcontroller(upnpcontroller, {}, false);
+
+ return ret_val;
+ },
+ attributes: {
+ label: {type: "string", required: true},
+ player_ip_addr: {type: "string", required: true},
+ refresh: {type: "numeric", required: true},
+ debug: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
+ },
+ content: false
+});
+
+
+function refreshUpnpcontroller(upnpcontroller, data, oneTimeCall) {
+ var upnpcontroller = $(upnpcontroller);
+
+ var playerIp = upnpcontroller.data("player_ip");
+ var id = upnpcontroller.data("id");
+ var debug = upnpcontroller.data("debug");
+ var eventsRegistered = upnpcontroller.data("eventsRegistered");
+ var label = upnpcontroller.data("label");
+ var refresh = upnpcontroller.data("refresh");
+
+ console.log("debug: " + debug);
+
+ if(debug == 'true'){
+ console.log("playerIp: " + playerIp);
+ }
+
+ function updateContoller( volume, mute, playMode, title, reltime, duration, artist, album){
+
+ if(mute == 0){
+ $('#' + upnpcontroller_uid + '_muteButton').removeClass('switchPressed');
+ $('#' + upnpcontroller_uid + '_muteButton').addClass('switchUnpressed');
+ }else{
+ $('#' + upnpcontroller_uid + '_muteButton').removeClass('switchUnpressed');
+ $('#' + upnpcontroller_uid + '_muteButton').addClass('switchPressed');
+ }
+
+ if(playMode == 'Play'){
+ $('#' + upnpcontroller_uid + '_playButton').removeClass('switchUnpressed');
+ $('#' + upnpcontroller_uid + '_playButton').addClass('switchPressed');
+ }else{
+ $('#' + upnpcontroller_uid + '_playButton').removeClass('switchPressed');
+ $('#' + upnpcontroller_uid + '_playButton').addClass('switchUnpressed');
+ }
+
+ $('#' + id + '_muteButton div.value').text(mute);
+ $('#' + id + '_playButton div.value').text(playMode);
+ $('#' + id + '_volume div.value').text(volume);
+ $('#' + id + '_title div.value').text(title);
+ $('#' + id + '_artist div.value').text(artist);
+ $('#' + id + '_album div.value').text(album);
+ $('#' + id + '_time div.value').text(reltime + ' of ' + duration);
+
+ }
+
+ $.ajax({
+ type: "GET",
+ datatype: "JSON",
+ url: "plugins/upnpcontroller/status.php?player_ip_addr=" + playerIp,
+ success: function(data){
+
+ if(debug == 'true'){
+ console.log("volume : " + data.volume);
+ console.log("reltime : " + data.reltimeResponse);
+ console.log("durationResponse: " + data.durationResponse);
+ console.log("title : " + data.title);
+ }
+
+ updateContoller(data.volume, data.muteState, data.transportState, data.title
+ , data.reltimeResponse, data.durationResponse, data.artist, data.album);
+ }
+ });
+
+ if(eventsRegistered < 2) {
+// console.log("eventsRegistered: " + eventsRegistered);
+
+ $('#' + upnpcontroller_uid + '_muteButton').bind('click', toggleMute);
+ $('#' + upnpcontroller_uid + '_playButton').bind('click', togglePlay);
+ $('#' + upnpcontroller_uid + '_next').bind('click', callNext);
+ $('#' + upnpcontroller_uid + '_prev').bind('click', callPrev);
+ $('#' + upnpcontroller_uid + '_volumedown').bind('click', callvolumedown);
+ $('#' + upnpcontroller_uid + '_volumeup').bind('click', callvolumeup);
+
+ upnpcontroller.data("eventsRegistered", eventsRegistered + 1);
+ }
+
+ //refresh regularly
+ if (typeof (refresh) != "undefined" && refresh && oneTimeCall == false) {
+ // reload regularly
+ window.setTimeout(function(upnpcontroller, data) {
+ refreshUpnpcontroller(upnpcontroller, data, false)
+ }, refresh * 1000, upnpcontroller, data);
+ }
+
+ return false;
+}
+
+function callvolumedown() {
+ console.log("click callvolumedown");
+ var upnpctrl = $("#" + upnpcontroller_uid);
+ var playerIp = upnpctrl.data("player_ip");
+ var currentVolume = $('#' + upnpcontroller_uid + '_volume div.value').text();
+
+ console.log("currentVolume: " + currentVolume);
+
+ var volume = Number(currentVolume) - 5;
+
+ $.ajax({
+ type: "GET",
+ datatype: "JSON",
+ url: "plugins/upnpcontroller/volume.php?player_ip_addr=" + playerIp + "&volume=" + volume,
+ success: function(data){
+ console.log("data: " + data);
+ }
+ });
+}
+
+function callvolumeup() {
+ console.log("click callvolumeup");
+ var upnpctrl = $("#" + upnpcontroller_uid);
+ var playerIp = upnpctrl.data("player_ip");
+ var currentVolume = $('#' + upnpcontroller_uid + '_volume div.value').text();
+
+ console.log("currentVolume: " + currentVolume);
+
+ var volume = Number(currentVolume) + 5;
+
+ $.ajax({
+ type: "GET",
+ datatype: "JSON",
+ url: "plugins/upnpcontroller/volume.php?player_ip_addr=" + playerIp + "&volume=" + volume,
+ success: function(data){
+ console.log("data: " + data);
+ }
+ });
+}
+
+function callNext() {
+ console.log("click next");
+ var upnpctrl = $("#" + upnpcontroller_uid);
+ var playerIp = upnpctrl.data("player_ip");
+
+ $.ajax({
+ type: "GET",
+ datatype: "JSON",
+ url: "plugins/upnpcontroller/next.php?player_ip_addr=" + playerIp,
+ success: function(data){
+ console.log("data: " + data);
+ }
+ });
+}
+
+function callPrev() {
+ console.log("click prev");
+ var upnpctrl = $("#" + upnpcontroller_uid);
+ var playerIp = upnpctrl.data("player_ip");
+
+ $.ajax({
+ type: "GET",
+ datatype: "JSON",
+ url: "plugins/upnpcontroller/prev.php?player_ip_addr=" + playerIp,
+ success: function(data){
+ console.log("data: " + data);
+ }
+ });
+}
+
+function toggleMute() {
+ console.log("click mute");
+ var upnpctrl = $("#" + upnpcontroller_uid);
+ var playerIp = upnpctrl.data("player_ip");
+
+ var muteValue = $('#' + upnpcontroller_uid + '_muteButton div.value').text();
+
+ console.log("current muteValue: " + muteValue);
+
+ if(muteValue == 0){
+ muteValue = 1;
+ $('#' + upnpcontroller_uid + '_muteButton').removeClass('switchUnpressed');
+ $('#' + upnpcontroller_uid + '_muteButton').addClass('switchPressed');
+ }else{
+ muteValue = 0;
+ $('#' + upnpcontroller_uid + '_muteButton').removeClass('switchPressed');
+ $('#' + upnpcontroller_uid + '_muteButton').addClass('switchUnpressed');
+ }
+
+ $.ajax({
+ type: "GET",
+ datatype: "JSON",
+ url: "plugins/upnpcontroller/mute.php?mute=" + muteValue + "&player_ip_addr=" + playerIp,
+ success: function(data){
+ console.log("data: " + data);
+ }
+ });
+
+ refreshUpnpcontroller(upnpctrl, {}, true);
+}
+
+function togglePlay() {
+ console.log("click play");
+ var upnpctrl = $("#" + upnpcontroller_uid);
+ var playerIp = upnpctrl.data("player_ip");
+ var playValue = $('#' + upnpcontroller_uid + '_playButton div.value').text();
+ var cmd;
+
+ console.log("current playValue: " + playValue);
+
+ if(playValue == 'Play'){
+ cmd = 'pause';
+ $('#' + upnpcontroller_uid + '_playButton').removeClass('switchUnpressed');
+ $('#' + upnpcontroller_uid + '_playButton').addClass('');
+ }else{
+ cmd = 'play';
+ $('#' + upnpcontroller_uid + '_playButton').removeClass('switchPressed');
+ $('#' + upnpcontroller_uid + '_playButton').addClass('switchUnpressed');
+ }
+
+ $.aj...
[truncated message content] |
|
From: <ma...@us...> - 2012-02-12 14:07:11
|
Revision: 699
http://openautomation.svn.sourceforge.net/openautomation/?rev=699&view=rev
Author: mayerch
Date: 2012-02-12 14:07:04 +0000 (Sun, 12 Feb 2012)
Log Message:
-----------
New Plugin: clock
This is an analog clock that can be used to show and change a time.
As it is implemented with SVG this plugin is also an example of how to include SVGs, change them through JavaScript (including bus updates) and make parts of the SVG react to user interaction.
TODO:
- make scalable and use colspan + rowspan
- implement the knx_encode for the DPT
- better design of the SVG
- change UI and SVG to show a little clock ("preview") and on click pop up a bigger one for changing the setting
- change SVG design based on visu design (e.g. dynamically recolor parts)
- visually hide the handles
- add digital time to clock (to distinguish AM/PM, but also for those that prefer that and to show the exact time)
Modified Paths:
--------------
CometVisu/trunk/visu/index.html
Added Paths:
-----------
CometVisu/trunk/visu/lib/jquery.svg.min.js
CometVisu/trunk/visu/plugins/clock/
CometVisu/trunk/visu/plugins/clock/clock_pure.svg
CometVisu/trunk/visu/plugins/clock/structure_plugin.js
Modified: CometVisu/trunk/visu/index.html
===================================================================
--- CometVisu/trunk/visu/index.html 2012-02-11 20:53:50 UTC (rev 698)
+++ CometVisu/trunk/visu/index.html 2012-02-12 14:07:04 UTC (rev 699)
@@ -14,6 +14,7 @@
<script src="lib/strftime.js" type="text/javascript"></script>
<script src="lib/scrollable.js" type="text/javascript"></script>
<script src="lib/jquery.ui.touch-punch.js" type="text/javascript"></script>
+ <script src="lib/jquery.svg.min.js" type="text/javascript"></script>
<script src="lib/cometvisu-client.js" type="text/javascript"></script>
<script src="lib/knx_decode.js" type="text/javascript"></script>
<script src="designs/structure_pure.js" type="text/javascript"></script>
Added: CometVisu/trunk/visu/lib/jquery.svg.min.js
===================================================================
--- CometVisu/trunk/visu/lib/jquery.svg.min.js (rev 0)
+++ CometVisu/trunk/visu/lib/jquery.svg.min.js 2012-02-12 14:07:04 UTC (rev 699)
@@ -0,0 +1,7 @@
+/* http://keith-wood.name/svg.html
+ SVG for jQuery v1.4.4.
+ Written by Keith Wood (kbwood{at}iinet.com.au) August 2007.
+ Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and
+ MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
+ Please attribute the author if you use it. */
+(function($){function SVGManager(){this._settings=[];this._extensions=[];this.regional=[];this.regional['']={errorLoadingText:'Error loading',notSupportedText:'This browser does not support SVG'};this.local=this.regional[''];this._uuid=new Date().getTime();this._renesis=detectActiveX('RenesisX.RenesisCtrl')}function detectActiveX(a){try{return!!(window.ActiveXObject&&new ActiveXObject(a))}catch(e){return false}}var q='svgwrapper';$.extend(SVGManager.prototype,{markerClassName:'hasSVG',svgNS:'http://www.w3.org/2000/svg',xlinkNS:'http://www.w3.org/1999/xlink',_wrapperClass:SVGWrapper,_attrNames:{class_:'class',in_:'in',alignmentBaseline:'alignment-baseline',baselineShift:'baseline-shift',clipPath:'clip-path',clipRule:'clip-rule',colorInterpolation:'color-interpolation',colorInterpolationFilters:'color-interpolation-filters',colorRendering:'color-rendering',dominantBaseline:'dominant-baseline',enableBackground:'enable-background',fillOpacity:'fill-opacity',fillRule:'fill-rule',floodColor:'flood-color',floodOpacity:'flood-opacity',fontFamily:'font-family',fontSize:'font-size',fontSizeAdjust:'font-size-adjust',fontStretch:'font-stretch',fontStyle:'font-style',fontVariant:'font-variant',fontWeight:'font-weight',glyphOrientationHorizontal:'glyph-orientation-horizontal',glyphOrientationVertical:'glyph-orientation-vertical',horizAdvX:'horiz-adv-x',horizOriginX:'horiz-origin-x',imageRendering:'image-rendering',letterSpacing:'letter-spacing',lightingColor:'lighting-color',markerEnd:'marker-end',markerMid:'marker-mid',markerStart:'marker-start',stopColor:'stop-color',stopOpacity:'stop-opacity',strikethroughPosition:'strikethrough-position',strikethroughThickness:'strikethrough-thickness',strokeDashArray:'stroke-dasharray',strokeDashOffset:'stroke-dashoffset',strokeLineCap:'stroke-linecap',strokeLineJoin:'stroke-linejoin',strokeMiterLimit:'stroke-miterlimit',strokeOpacity:'stroke-opacity',strokeWidth:'stroke-width',textAnchor:'text-anchor',textDecoration:'text-decoration',textRendering:'text-rendering',underlinePosition:'underline-position',underlineThickness:'underline-thickness',vertAdvY:'vert-adv-y',vertOriginY:'vert-origin-y',wordSpacing:'word-spacing',writingMode:'writing-mode'},_attachSVG:function(a,b){var c=(a.namespaceURI==this.svgNS?a:null);var a=(c?null:a);if($(a||c).hasClass(this.markerClassName)){return}if(typeof b=='string'){b={loadURL:b}}else if(typeof b=='function'){b={onLoad:b}}$(a||c).addClass(this.markerClassName);try{if(!c){c=document.createElementNS(this.svgNS,'svg');c.setAttribute('version','1.1');if(a.clientWidth>0){c.setAttribute('width',a.clientWidth)}if(a.clientHeight>0){c.setAttribute('height',a.clientHeight)}a.appendChild(c)}this._afterLoad(a,c,b||{})}catch(e){if($.browser.msie){if(!a.id){a.id='svg'+(this._uuid++)}this._settings[a.id]=b;a.innerHTML='<embed type="image/svg+xml" width="100%" '+'height="100%" src="'+(b.initPath||'')+'blank.svg" '+'pluginspage="http://www.adobe.com/svg/viewer/install/main.html"/>'}else{a.innerHTML='<p class="svg_error">'+this.local.notSupportedText+'</p>'}}},_registerSVG:function(){for(var i=0;i<document.embeds.length;i++){var a=document.embeds[i].parentNode;if(!$(a).hasClass($.svg.markerClassName)||$.data(a,q)){continue}var b=null;try{b=document.embeds[i].getSVGDocument()}catch(e){setTimeout($.svg._registerSVG,250);return}b=(b?b.documentElement:null);if(b){$.svg._afterLoad(a,b)}}},_afterLoad:function(a,b,c){var c=c||this._settings[a.id];this._settings[a?a.id:'']=null;var d=new this._wrapperClass(b,a);$.data(a||b,q,d);try{if(c.loadURL){d.load(c.loadURL,c)}if(c.settings){d.configure(c.settings)}if(c.onLoad&&!c.loadURL){c.onLoad.apply(a||b,[d])}}catch(e){alert(e)}},_getSVG:function(a){a=(typeof a=='string'?$(a)[0]:(a.jquery?a[0]:a));return $.data(a,q)},_destroySVG:function(a){var b=$(a);if(!b.hasClass(this.markerClassName)){return}b.removeClass(this.markerClassName);if(a.namespaceURI!=this.svgNS){b.empty()}$.removeData(a,q)},addExtension:function(a,b){this._extensions.push([a,b])},isSVGElem:function(a){return(a.nodeType==1&&a.namespaceURI==$.svg.svgNS)}});function SVGWrapper(a,b){this._svg=a;this._container=b;for(var i=0;i<$.svg._extensions.length;i++){var c=$.svg._extensions[i];this[c[0]]=new c[1](this)}}$.extend(SVGWrapper.prototype,{_width:function(){return(this._container?this._container.clientWidth:this._svg.width)},_height:function(){return(this._container?this._container.clientHeight:this._svg.height)},root:function(){return this._svg},configure:function(a,b,c){if(!a.nodeName){c=b;b=a;a=this._svg}if(c){for(var i=a.attributes.length-1;i>=0;i--){var d=a.attributes.item(i);if(!(d.nodeName=='onload'||d.nodeName=='version'||d.nodeName.substring(0,5)=='xmlns')){a.attributes.removeNamedItem(d.nodeName)}}}for(var e in b){a.setAttribute($.svg._attrNames[e]||e,b[e])}return this},getElementById:function(a){return this._svg.ownerDocument.getElementById(a)},change:function(a,b){if(a){for(var c in b){if(b[c]==null){a.removeAttribute($.svg._attrNames[c]||c)}else{a.setAttribute($.svg._attrNames[c]||c,b[c])}}}return this},_args:function(b,c,d){c.splice(0,0,'parent');c.splice(c.length,0,'settings');var e={};var f=0;if(b[0]!=null&&b[0].jquery){b[0]=b[0][0]}if(b[0]!=null&&!(typeof b[0]=='object'&&b[0].nodeName)){e['parent']=null;f=1}for(var i=0;i<b.length;i++){e[c[i+f]]=b[i]}if(d){$.each(d,function(i,a){if(typeof e[a]=='object'){e.settings=e[a];e[a]=null}})}return e},title:function(a,b,c){var d=this._args(arguments,['text']);var e=this._makeNode(d.parent,'title',d.settings||{});e.appendChild(this._svg.ownerDocument.createTextNode(d.text));return e},describe:function(a,b,c){var d=this._args(arguments,['text']);var e=this._makeNode(d.parent,'desc',d.settings||{});e.appendChild(this._svg.ownerDocument.createTextNode(d.text));return e},defs:function(a,b,c){var d=this._args(arguments,['id'],['id']);return this._makeNode(d.parent,'defs',$.extend((d.id?{id:d.id}:{}),d.settings||{}))},symbol:function(a,b,c,d,e,f,g){var h=this._args(arguments,['id','x1','y1','width','height']);return this._makeNode(h.parent,'symbol',$.extend({id:h.id,viewBox:h.x1+' '+h.y1+' '+h.width+' '+h.height},h.settings||{}))},marker:function(a,b,c,d,e,f,g,h){var i=this._args(arguments,['id','refX','refY','mWidth','mHeight','orient'],['orient']);return this._makeNode(i.parent,'marker',$.extend({id:i.id,refX:i.refX,refY:i.refY,markerWidth:i.mWidth,markerHeight:i.mHeight,orient:i.orient||'auto'},i.settings||{}))},style:function(a,b,c){var d=this._args(arguments,['styles']);var e=this._makeNode(d.parent,'style',$.extend({type:'text/css'},d.settings||{}));e.appendChild(this._svg.ownerDocument.createTextNode(d.styles));if($.browser.opera){$('head').append('<style type="text/css">'+d.styles+'</style>')}return e},script:function(a,b,c,d){var e=this._args(arguments,['script','type'],['type']);var f=this._makeNode(e.parent,'script',$.extend({type:e.type||'text/javascript'},e.settings||{}));f.appendChild(this._svg.ownerDocument.createTextNode(e.script));if(!$.browser.mozilla){$.globalEval(e.script)}return f},linearGradient:function(a,b,c,d,e,f,g,h){var i=this._args(arguments,['id','stops','x1','y1','x2','y2'],['x1']);var j=$.extend({id:i.id},(i.x1!=null?{x1:i.x1,y1:i.y1,x2:i.x2,y2:i.y2}:{}));return this._gradient(i.parent,'linearGradient',$.extend(j,i.settings||{}),i.stops)},radialGradient:function(a,b,c,d,e,r,f,g,h){var i=this._args(arguments,['id','stops','cx','cy','r','fx','fy'],['cx']);var j=$.extend({id:i.id},(i.cx!=null?{cx:i.cx,cy:i.cy,r:i.r,fx:i.fx,fy:i.fy}:{}));return this._gradient(i.parent,'radialGradient',$.extend(j,i.settings||{}),i.stops)},_gradient:function(a,b,c,d){var e=this._makeNode(a,b,c);for(var i=0;i<d.length;i++){var f=d[i];this._makeNode(e,'stop',$.extend({offset:f[0],stopColor:f[1]},(f[2]!=null?{stopOpacity:f[2]}:{})))}return e},pattern:function(a,b,x,y,c,d,e,f,g,h,i){var j=this._args(arguments,['id','x','y','width','height','vx','vy','vwidth','vheight'],['vx']);var k=$.extend({id:j.id,x:j.x,y:j.y,width:j.width,height:j.height},(j.vx!=null?{viewBox:j.vx+' '+j.vy+' '+j.vwidth+' '+j.vheight}:{}));return this._makeNode(j.parent,'pattern',$.extend(k,j.settings||{}))},clipPath:function(a,b,c,d){var e=this._args(arguments,['id','units']);e.units=e.units||'userSpaceOnUse';return this._makeNode(e.parent,'clipPath',$.extend({id:e.id,clipPathUnits:e.units},e.settings||{}))},mask:function(a,b,x,y,c,d,e){var f=this._args(arguments,['id','x','y','width','height']);return this._makeNode(f.parent,'mask',$.extend({id:f.id,x:f.x,y:f.y,width:f.width,height:f.height},f.settings||{}))},createPath:function(){return new SVGPath()},createText:function(){return new SVGText()},svg:function(a,x,y,b,c,d,e,f,g,h){var i=this._args(arguments,['x','y','width','height','vx','vy','vwidth','vheight'],['vx']);var j=$.extend({x:i.x,y:i.y,width:i.width,height:i.height},(i.vx!=null?{viewBox:i.vx+' '+i.vy+' '+i.vwidth+' '+i.vheight}:{}));return this._makeNode(i.parent,'svg',$.extend(j,i.settings||{}))},group:function(a,b,c){var d=this._args(arguments,['id'],['id']);return this._makeNode(d.parent,'g',$.extend({id:d.id},d.settings||{}))},use:function(a,x,y,b,c,d,e){var f=this._args(arguments,['x','y','width','height','ref']);if(typeof f.x=='string'){f.ref=f.x;f.settings=f.y;f.x=f.y=f.width=f.height=null}var g=this._makeNode(f.parent,'use',$.extend({x:f.x,y:f.y,width:f.width,height:f.height},f.settings||{}));g.setAttributeNS($.svg.xlinkNS,'href',f.ref);return g},link:function(a,b,c){var d=this._args(arguments,['ref']);var e=this._makeNode(d.parent,'a',d.settings);e.setAttributeNS($.svg.xlinkNS,'href',d.ref);return e},image:function(a,x,y,b,c,d,e){var f=this._args(arguments,['x','y','width','height','ref']);var g=this._makeNode(f.parent,'image',$.extend({x:f.x,y:f.y,width:f.width,height:f.height},f.settings||{}));g.setAttributeNS($.svg.xlinkNS,'href',f.ref);return g},path:function(a,b,c){var d=this._args(arguments,['path']);return this._makeNode(d.parent,'path',$.extend({d:(d.path.path?d.path.path():d.path)},d.settings||{}))},rect:function(a,x,y,b,c,d,e,f){var g=this._args(arguments,['x','y','width','height','rx','ry'],['rx']);return this._makeNode(g.parent,'rect',$.extend({x:g.x,y:g.y,width:g.width,height:g.height},(g.rx?{rx:g.rx,ry:g.ry}:{}),g.settings||{}))},circle:function(a,b,c,r,d){var e=this._args(arguments,['cx','cy','r']);return this._makeNode(e.parent,'circle',$.extend({cx:e.cx,cy:e.cy,r:e.r},e.settings||{}))},ellipse:function(a,b,c,d,e,f){var g=this._args(arguments,['cx','cy','rx','ry']);return this._makeNode(g.parent,'ellipse',$.extend({cx:g.cx,cy:g.cy,rx:g.rx,ry:g.ry},g.settings||{}))},line:function(a,b,c,d,e,f){var g=this._args(arguments,['x1','y1','x2','y2']);return this._makeNode(g.parent,'line',$.extend({x1:g.x1,y1:g.y1,x2:g.x2,y2:g.y2},g.settings||{}))},polyline:function(a,b,c){var d=this._args(arguments,['points']);return this._poly(d.parent,'polyline',d.points,d.settings)},polygon:function(a,b,c){var d=this._args(arguments,['points']);return this._poly(d.parent,'polygon',d.points,d.settings)},_poly:function(a,b,c,d){var e='';for(var i=0;i<c.length;i++){e+=c[i].join()+' '}return this._makeNode(a,b,$.extend({points:$.trim(e)},d||{}))},text:function(a,x,y,b,c){var d=this._args(arguments,['x','y','value']);if(typeof d.x=='string'&&arguments.length<4){d.value=d.x;d.settings=d.y;d.x=d.y=null}return this._text(d.parent,'text',d.value,$.extend({x:(d.x&&isArray(d.x)?d.x.join(' '):d.x),y:(d.y&&isArray(d.y)?d.y.join(' '):d.y)},d.settings||{}))},textpath:function(a,b,c,d){var e=this._args(arguments,['path','value']);var f=this._text(e.parent,'textPath',e.value,e.settings||{});f.setAttributeNS($.svg.xlinkNS,'href',e.path);return f},_text:function(a,b,c,d){var e=this._makeNode(a,b,d);if(typeof c=='string'){e.appendChild(e.ownerDocument.createTextNode(c))}else{for(var i=0;i<c._parts.length;i++){var f=c._parts[i];if(f[0]=='tspan'){var g=this._makeNode(e,f[0],f[2]);g.appendChild(e.ownerDocument.createTextNode(f[1]));e.appendChild(g)}else if(f[0]=='tref'){var g=this._makeNode(e,f[0],f[2]);g.setAttributeNS($.svg.xlinkNS,'href',f[1]);e.appendChild(g)}else if(f[0]=='textpath'){var h=$.extend({},f[2]);h.href=null;var g=this._makeNode(e,f[0],h);g.setAttributeNS($.svg.xlinkNS,'href',f[2].href);g.appendChild(e.ownerDocument.createTextNode(f[1]));e.appendChild(g)}else{e.appendChild(e.ownerDocument.createTextNode(f[1]))}}}return e},other:function(a,b,c){var d=this._args(arguments,['name']);return this._makeNode(d.parent,d.name,d.settings||{})},_makeNode:function(a,b,c){a=a||this._svg;var d=this._svg.ownerDocument.createElementNS($.svg.svgNS,b);for(var b in c){var e=c[b];if(e!=null&&e!=null&&(typeof e!='string'||e!='')){d.setAttribute($.svg._attrNames[b]||b,e)}}a.appendChild(d);return d},add:function(b,c){var d=this._args((arguments.length==1?[null,b]:arguments),['node']);var f=this;d.parent=d.parent||this._svg;d.node=(d.node.jquery?d.node:$(d.node));try{if($.svg._renesis){throw'Force traversal';}d.parent.appendChild(d.node.cloneNode(true))}catch(e){d.node.each(function(){var a=f._cloneAsSVG(this);if(a){d.parent.appendChild(a)}})}return this},clone:function(b,c){var d=this;var e=this._args((arguments.length==1?[null,b]:arguments),['node']);e.parent=e.parent||this._svg;e.node=(e.node.jquery?e.node:$(e.node));var f=[];e.node.each(function(){var a=d._cloneAsSVG(this);if(a){a.id='';e.parent.appendChild(a);f.push(a)}});return f},_cloneAsSVG:function(a){var b=null;if(a.nodeType==1){b=this._svg.ownerDocument.createElementNS($.svg.svgNS,this._checkName(a.nodeName));for(var i=0;i<a.attributes.length;i++){var c=a.attributes.item(i);if(c.nodeName!='xmlns'&&c.nodeValue){if(c.prefix=='xlink'){b.setAttributeNS($.svg.xlinkNS,c.localName||c.baseName,c.nodeValue)}else{b.setAttribute(this._checkName(c.nodeName),c.nodeValue)}}}for(var i=0;i<a.childNodes.length;i++){var d=this._cloneAsSVG(a.childNodes[i]);if(d){b.appendChild(d)}}}else if(a.nodeType==3){if($.trim(a.nodeValue)){b=this._svg.ownerDocument.createTextNode(a.nodeValue)}}else if(a.nodeType==4){if($.trim(a.nodeValue)){try{b=this._svg.ownerDocument.createCDATASection(a.nodeValue)}catch(e){b=this._svg.ownerDocument.createTextNode(a.nodeValue.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'))}}}return b},_checkName:function(a){a=(a.substring(0,1)>='A'&&a.substring(0,1)<='Z'?a.toLowerCase():a);return(a.substring(0,4)=='svg:'?a.substring(4):a)},load:function(j,k){k=(typeof k=='boolean'?{addTo:k}:(typeof k=='function'?{onLoad:k}:(typeof k=='string'?{parent:k}:(typeof k=='object'&&k.nodeName?{parent:k}:(typeof k=='object'&&k.jquery?{parent:k}:k||{})))));if(!k.parent&&!k.addTo){this.clear(false)}var l=[this._svg.getAttribute('width'),this._svg.getAttribute('height')];var m=this;var n=function(a){a=$.svg.local.errorLoadingText+': '+a;if(k.onLoad){k.onLoad.apply(m._container||m._svg,[m,a])}else{m.text(null,10,20,a)}};var o=function(a){var b=new ActiveXObject('Microsoft.XMLDOM');b.validateOnParse=false;b.resolveExternals=false;b.async=false;b.loadXML(a);if(b.parseError.errorCode!=0){n(b.parseError.reason);return null}return b};var p=function(a){if(!a){return}if(a.documentElement.nodeName!='svg'){var b=a.getElementsByTagName('parsererror');var c=(b.length?b[0].getElementsByTagName('div'):[]);n(!b.length?'???':(c.length?c[0]:b[0]).firstChild.nodeValue);return}var d=(k.parent?$(k.parent)[0]:m._svg);var f={};for(var i=0;i<a.documentElement.attributes.length;i++){var g=a.documentElement.attributes.item(i);if(!(g.nodeName=='version'||g.nodeName.substring(0,5)=='xmlns')){f[g.nodeName]=g.nodeValue}}m.configure(d,f,!k.parent);var h=a.documentElement.childNodes;for(var i=0;i<h.length;i++){try{if($.svg._renesis){throw'Force traversal';}d.appendChild(m._svg.ownerDocument.importNode(h[i],true));if(h[i].nodeName=='script'){$.globalEval(h[i].textContent)}}catch(e){m.add(d,h[i])}}if(!k.changeSize){m.configure(d,{width:l[0],height:l[1]})}if(k.onLoad){k.onLoad.apply(m._container||m._svg,[m])}};if(j.match('<svg')){p($.browser.msie?o(j):new DOMParser().parseFromString(j,'text/xml'))}else{$.ajax({url:j,dataType:($.browser.msie?'text':'xml'),success:function(a){p($.browser.msie?o(a):a)},error:function(a,b,c){n(b+(c?' '+c.message:''))}})}return this},remove:function(a){a=(a.jquery?a[0]:a);a.parentNode.removeChild(a);return this},clear:function(a){if(a){this.configure({},true)}while(this._svg.firstChild){this._svg.removeChild(this._svg.firstChild)}return this},toSVG:function(a){a=a||this._svg;return(typeof XMLSerializer=='undefined'?this._toSVG(a):new XMLSerializer().serializeToString(a))},_toSVG:function(a){var b='';if(!a){return b}if(a.nodeType==3){b=a.nodeValue}else if(a.nodeType==4){b='<![CDATA['+a.nodeValue+']]>'}else{b='<'+a.nodeName;if(a.attributes){for(var i=0;i<a.attributes.length;i++){var c=a.attributes.item(i);if(!($.trim(c.nodeValue)==''||c.nodeValue.match(/^\[object/)||c.nodeValue.match(/^function/))){b+=' '+(c.namespaceURI==$.svg.xlinkNS?'xlink:':'')+c.nodeName+'="'+c.nodeValue+'"'}}}if(a.firstChild){b+='>';var d=a.firstChild;while(d){b+=this._toSVG(d);d=d.nextSibling}b+='</'+a.nodeName+'>'}else{b+='/>'}}return b}});function SVGPath(){this._path=''}$.extend(SVGPath.prototype,{reset:function(){this._path='';return this},move:function(x,y,a){a=(isArray(x)?y:a);return this._coords((a?'m':'M'),x,y)},line:function(x,y,a){a=(isArray(x)?y:a);return this._coords((a?'l':'L'),x,y)},horiz:function(x,a){this._path+=(a?'h':'H')+(isArray(x)?x.join(' '):x);return this},vert:function(y,a){this._path+=(a?'v':'V')+(isArray(y)?y.join(' '):y);return this},curveC:function(a,b,c,d,x,y,e){e=(isArray(a)?b:e);return this._coords((e?'c':'C'),a,b,c,d,x,y)},smoothC:function(a,b,x,y,c){c=(isArray(a)?b:c);return this._coords((c?'s':'S'),a,b,x,y)},curveQ:function(a,b,x,y,c){c=(isArray(a)?b:c);return this._coords((c?'q':'Q'),a,b,x,y)},smoothQ:function(x,y,a){a=(isArray(x)?y:a);return this._coords((a?'t':'T'),x,y)},_coords:function(a,b,c,d,e,f,g){if(isArray(b)){for(var i=0;i<b.length;i++){var h=b[i];this._path+=(i==0?a:' ')+h[0]+','+h[1]+(h.length<4?'':' '+h[2]+','+h[3]+(h.length<6?'':' '+h[4]+','+h[5]))}}else{this._path+=a+b+','+c+(d==null?'':' '+d+','+e+(f==null?'':' '+f+','+g))}return this},arc:function(a,b,c,d,e,x,y,f){f=(isArray(a)?b:f);this._path+=(f?'a':'A');if(isArray(a)){for(var i=0;i<a.length;i++){var g=a[i];this._path+=(i==0?'':' ')+g[0]+','+g[1]+' '+g[2]+' '+(g[3]?'1':'0')+','+(g[4]?'1':'0')+' '+g[5]+','+g[6]}}else{this._path+=a+','+b+' '+c+' '+(d?'1':'0')+','+(e?'1':'0')+' '+x+','+y}return this},close:function(){this._path+='z';return this},path:function(){return this._path}});SVGPath.prototype.moveTo=SVGPath.prototype.move;SVGPath.prototype.lineTo=SVGPath.prototype.line;SVGPath.prototype.horizTo=SVGPath.prototype.horiz;SVGPath.prototype.vertTo=SVGPath.prototype.vert;SVGPath.prototype.curveCTo=SVGPath.prototype.curveC;SVGPath.prototype.smoothCTo=SVGPath.prototype.smoothC;SVGPath.prototype.curveQTo=SVGPath.prototype.curveQ;SVGPath.prototype.smoothQTo=SVGPath.prototype.smoothQ;SVGPath.prototype.arcTo=SVGPath.prototype.arc;function SVGText(){this._parts=[]}$.extend(SVGText.prototype,{reset:function(){this._parts=[];return this},string:function(a){this._parts[this._parts.length]=['text',a];return this},span:function(a,b){this._parts[this._parts.length]=['tspan',a,b];return this},ref:function(a,b){this._parts[this._parts.length]=['tref',a,b];return this},path:function(a,b,c){this._parts[this._parts.length]=['textpath',b,$.extend({href:a},c||{})];return this}});$.fn.svg=function(a){var b=Array.prototype.slice.call(arguments,1);if(typeof a=='string'&&a=='get'){return $.svg['_'+a+'SVG'].apply($.svg,[this[0]].concat(b))}return this.each(function(){if(typeof a=='string'){$.svg['_'+a+'SVG'].apply($.svg,[this].concat(b))}else{$.svg._attachSVG(this,a||{})}})};function isArray(a){return(a&&a.constructor==Array)}$.svg=new SVGManager()})(jQuery);
\ No newline at end of file
Added: CometVisu/trunk/visu/plugins/clock/clock_pure.svg
===================================================================
--- CometVisu/trunk/visu/plugins/clock/clock_pure.svg (rev 0)
+++ CometVisu/trunk/visu/plugins/clock/clock_pure.svg 2012-02-12 14:07:04 UTC (rev 699)
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="100"
+ height="100"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.2 r9819"
+ sodipodi:docname="clock_pure.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="2.8"
+ inkscape:cx="44.568338"
+ inkscape:cy="48.518422"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer3"
+ showgrid="false"
+ inkscape:window-width="1920"
+ inkscape:window-height="1143"
+ inkscape:window-x="-2"
+ inkscape:window-y="-3"
+ inkscape:window-maximized="1"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:groupmode="layer"
+ id="layer3"
+ inkscape:label="Background">
+ <path
+ transform="translate(0.03125,-952.40625)"
+ id="Hintergrund"
+ style="fill:none;stroke:#808080;stroke-width:0.98233086000000003px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 74.321962,959.2342 -4.509945,7.81145 m -62.438896,10.12744 7.811454,4.50995 m 84.325395,20.17806 -9.01989,0 m -83.616959,24.822 7.811454,-4.51 m 60.503413,22.8148 -4.509945,-7.8114 M 49.5,1051.8711 l 0,-9.0199 m -23.821962,2.6367 4.509945,-7.8114 m 62.438896,-10.1275 -7.811454,-4.5099 m -84.325375,-20.178 9.01989,0 m 83.616939,-24.82198 -7.811454,4.50994 m -60.503413,-22.81486 4.509945,7.81145 M 50.5,952.85113 l 0,9.01989 m 0,-9.01989 0,9.01989 m 49.055278,40.49118 c 0,27.3686 -22.186656,49.5553 -49.555277,49.5553 -27.368622,0 -49.5552734,-22.1867 -49.5552734,-49.5553 0,-27.36865 22.1866514,-49.55529 49.5552734,-49.55529 27.368621,0 49.555277,22.18664 49.555277,49.55529 z"
+ inkscape:connector-curvature="0" />
+ <g
+ id="Hour"
+ inkscape:label="#g9002">
+ <path
+ transform="matrix(1.1005583,0,0,1.1005583,-5.8332726,-1051.5177)"
+ d="m 59.346463,978.11597 a 8.586297,8.586297 0 1 1 -17.172594,0 8.586297,8.586297 0 1 1 17.172594,0 z"
+ sodipodi:ry="8.586297"
+ sodipodi:rx="8.586297"
+ sodipodi:cy="978.11597"
+ sodipodi:cx="50.760166"
+ id="HotSpotHour"
+ style="color:#000000;fill:#0000ff;stroke:#0000ff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:type="arc" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path2991"
+ d="M 50,50 50,25"
+ style="fill:none;stroke:#ff0000;stroke-width:1.45699584px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ </g>
+ <g
+ id="Minute"
+ inkscape:label="#g9008">
+ <path
+ transform="matrix(1.0789434,0,0,0.79610074,-4.1911507,-758.75808)"
+ d="m 59.093924,962.45862 a 8.8388348,8.8388348 0 1 1 -17.67767,0 8.8388348,8.8388348 0 1 1 17.67767,0 z"
+ sodipodi:ry="8.8388348"
+ sodipodi:rx="8.8388348"
+ sodipodi:cy="962.45862"
+ sodipodi:cx="50.255089"
+ id="HotSpotMinute"
+ style="color:#000000;fill:#0000ff;stroke:#0000ff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:type="arc" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path2989"
+ d="M 50,50 50,5"
+ style="fill:none;stroke:#ff0000;stroke-width:0.92645031px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ </g>
+ </g>
+</svg>
Added: CometVisu/trunk/visu/plugins/clock/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/clock/structure_plugin.js (rev 0)
+++ CometVisu/trunk/visu/plugins/clock/structure_plugin.js 2012-02-12 14:07:04 UTC (rev 699)
@@ -0,0 +1,136 @@
+/* structure_plugin.js (c) 2010 by Christian Mayer [CometVisu at ChristianMayer dot de]
+ *
+ * This program 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 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+*/
+
+/**
+ * This is a custom function that extends the available widgets.
+ * It's purpose is to change the design of the visu during runtime
+ * to demonstrate all available
+ */
+VisuDesign_Custom.prototype.addCreator("clock", {
+ that: this,
+ create: function( page, path ) {
+ var that = this;
+ var $p = $(page);
+ var ret_val = $('<div class="widget clearfix clock" />');
+ ret_val.setWidgetLayout($p);
+ var labelElement = $p.find('label')[0];
+ var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
+ var address = {};
+ $p.find('address').each( function(){
+ var src = this.textContent;
+ var transform = this.getAttribute('transform');
+ var color = this.getAttribute('variant' );
+ var readonly = this.getAttribute('readonly' );
+ ga_list.push( src );
+ address[ '_' + src ] = [ transform, color, readonly=='true' ];
+ });
+
+ var actor = '<div class="actor" style="width:200px;">';
+ actor += '</div>';
+ var datatype = $(page).attr('datatype');
+ var $actor = $(actor)
+ .data({
+ 'address' : address,
+ 'type' : 'clock'
+ });
+ $actor.svg({loadURL:'plugins/clock/clock_pure.svg',onLoad:function(svg){
+ $( svg.getElementById('HotSpotHour' ) )
+ .draggable()
+ .bind('drag', {type: 'hour' ,actor:$actor}, that.dragHelper )
+ .bind('dragstop', {actor:$actor}, that.action );
+ $( svg.getElementById('HotSpotMinute') )
+ .draggable()
+ .bind('drag', {type: 'minute',actor:$actor}, that.dragHelper )
+ .bind('dragstop', {actor:$actor}, that.action );
+ }});
+
+ for( var addr in address )
+ {
+ if( !address[addr][2] ) $act...
[truncated message content] |