|
From: <j-...@us...> - 2011-11-04 17:22:47
|
Revision: 499
http://openautomation.svn.sourceforge.net/openautomation/?rev=499&view=rev
Author: j-n-k
Date: 2011-11-04 17:22:40 +0000 (Fri, 04 Nov 2011)
Log Message:
-----------
Solving FR 3362154 (refresh for iframe-widget)
Fixed refresh for video-widget
Modified Paths:
--------------
CometVisu/tags/post_0.6.0/visu/designs/structure_pure.js
CometVisu/tags/post_0.6.0/visu/lib/templateengine.js
CometVisu/tags/post_0.6.0/visu/visu_config.xsd
Modified: CometVisu/tags/post_0.6.0/visu/designs/structure_pure.js
===================================================================
--- CometVisu/tags/post_0.6.0/visu/designs/structure_pure.js 2011-11-03 20:25:14 UTC (rev 498)
+++ CometVisu/tags/post_0.6.0/visu/designs/structure_pure.js 2011-11-04 17:22:40 UTC (rev 499)
@@ -715,8 +715,12 @@
if( $p.attr('frameborder') == "false" ) 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) );
+ 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: {
@@ -724,7 +728,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/tags/post_0.6.0/visu/lib/templateengine.js
===================================================================
--- CometVisu/tags/post_0.6.0/visu/lib/templateengine.js 2011-11-03 20:25:14 UTC (rev 498)
+++ CometVisu/tags/post_0.6.0/visu/lib/templateengine.js 2011-11-04 17:22:40 UTC (rev 499)
@@ -397,7 +397,7 @@
var refresh = $(this).data('refresh');
if( refresh && refresh > 0 )
{
- var target = $('img', $(this) )[0];
+ var target = $('img', $(this) )[0] || $('video', $(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/tags/post_0.6.0/visu/visu_config.xsd
===================================================================
--- CometVisu/tags/post_0.6.0/visu/visu_config.xsd 2011-11-03 20:25:14 UTC (rev 498)
+++ CometVisu/tags/post_0.6.0/visu/visu_config.xsd 2011-11-04 17:22:40 UTC (rev 499)
@@ -323,7 +323,7 @@
<xsd:complexType name="image">
<xsd:choice maxOccurs="unbounded" minOccurs="0">
- <xsd:element name="label" type="xsd:string" />
+ <xsd:element name="label" type="xsd:string" />
</xsd:choice>
<xsd:attribute name="src" type="uri" use="required" />
<xsd:attribute name="width" type="dimension" />
@@ -333,22 +333,24 @@
<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" />
<xsd:attribute name="height" type="dimension" />
+ <xsd:attribute name="refresh" type="xsd:decimal" />
</xsd:complexType>
<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" >
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|