|
From: <ma...@us...> - 2012-01-06 19:01:41
|
Revision: 637
http://openautomation.svn.sourceforge.net/openautomation/?rev=637&view=rev
Author: mayerch
Date: 2012-01-06 19:01:35 +0000 (Fri, 06 Jan 2012)
Log Message:
-----------
Initial implementation of the writeonly attribute
=> To check if it's a solution to bug http://knx-user-forum.de/cometvisu/17655-bug-cometvisu-vergisst-manchmal-status.html
=> ONLY implemented for switch widget. (If it's a solution, the other widgets have to follow)
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2012-01-06 00:17:44 UTC (rev 636)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2012-01-06 19:01:35 UTC (rev 637)
@@ -380,8 +380,9 @@
var src = this.textContent;
var transform = this.getAttribute('transform');
var readonly = this.getAttribute('readonly');
+ var writeonly = this.getAttribute('writeonly');
ga_list.push( src )
- address[ '_' + src ] = [ transform, readonly=='true' ];
+ address[ '_' + src ] = [ transform, readonly=='true', writeonly=='true' ];
});
var actor = '<div class="actor switchUnpressed"><div class="value">-</div></div>';
var $actor = $(actor).data( {
@@ -393,7 +394,10 @@
'align' : $p.attr('align'),
'type' : 'switch'
} ).bind( 'click', this.action );
- for( var addr in address ) $actor.bind( addr, this.update );
+ for( var addr in address )
+ {
+ if( !address[addr][2] ) $actor.bind( addr, this.update ); // no writeonly
+ }
ret_val.append( label ).append( $actor );
return ret_val;
},
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|