|
From: <ma...@us...> - 2010-12-03 16:01:57
|
Revision: 181
http://openautomation.svn.sourceforge.net/openautomation/?rev=181&view=rev
Author: mayerch
Date: 2010-12-03 16:01:50 +0000 (Fri, 03 Dec 2010)
Log Message:
-----------
New Feature:iframe widget
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/visu_config.xml
CometVisu/trunk/visu/visu_config.xsd
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2010-12-03 13:59:22 UTC (rev 180)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2010-12-03 16:01:50 UTC (rev 181)
@@ -294,6 +294,27 @@
content: {type: "string", required: true}
});
+ this.addCreator("iframe", {
+ create: function( page, path ) {
+ var ret_val = $('<div class="widget" />');
+ ret_val.addClass( 'iframe' );
+ ret_val.append( '<div class="label">' + page.textContent + '</div>' );
+ var style = '';
+ if( $(page).attr('width') ) style += 'width:' + $(page).attr('width') + ';';
+ if( $(page).attr('height') ) style += 'height:' + $(page).attr('height') + ';';
+ if( style != '' ) style = 'style="' + style + '"';
+ var actor = '<div class="actor"><iframe src="' +$(page).attr('src') + '" ' + style + '></iframe></div>';
+ ret_val.append( $(actor) ); // abuse "each" to call in context...
+ return ret_val;
+ },
+ attributes: {
+ src: {type: "uri", required: true},
+ width: {type: "string", required: false},
+ height: {type: "string", required: false},
+ },
+ content: {type: "string", required: false}
+ });
+
this.addCreator("unknown", {
create: function( page, path ) {
var ret_val = $('<div class="widget" />');
Modified: CometVisu/trunk/visu/visu_config.xml
===================================================================
--- CometVisu/trunk/visu/visu_config.xml 2010-12-03 13:59:22 UTC (rev 180)
+++ CometVisu/trunk/visu/visu_config.xml 2010-12-03 16:01:50 UTC (rev 181)
@@ -87,6 +87,9 @@
<break />
<image src="http://www.yr.no/place/Germany/Bavaria/Holzkirchen~2899676/meteogram.png" refresh="1800" />
<line />
+ <page name="iframe Test">
+ <iframe src="http://www.cometvisu.org" width="500px" height="500px"></iframe>
+ </page>
<info address="1/0/41" datatype="1.000" mapping="OnOff">Treppenlicht</info>
<page name="Fenster Kontakte" flavour="blue">
<info address="4/3/10" datatype="1" mapping="OpenClose" styling="GreenRed">Bad EG Reed Fenster</info>
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2010-12-03 13:59:22 UTC (rev 180)
+++ CometVisu/trunk/visu/visu_config.xsd 2010-12-03 16:01:50 UTC (rev 181)
@@ -218,6 +218,16 @@
</xsd:simpleContent>
</xsd:complexType>
+<xsd:complexType name="iframe">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="src" type="uri" use="required" />
+ <xsd:attribute name="width" type="dimension" />
+ <xsd:attribute name="height" type="dimension" />
+ </xsd:extension>
+ </xsd:simpleContent>
+</xsd:complexType>
+
<xsd:complexType name="break" />
<xsd:complexType name="line" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|