From: <ma...@us...> - 2010-11-01 17:17:24
|
Revision: 61 http://openautomation.svn.sourceforge.net/openautomation/?rev=61&view=rev Author: mayerch Date: 2010-11-01 17:17:16 +0000 (Mon, 01 Nov 2010) Log Message: ----------- Initial implementation of new Feature: <image> tag Modified Paths: -------------- CometVisu/trunk/visu/lib/templateengine.js CometVisu/trunk/visu/lib/visudesign_pure.js CometVisu/trunk/visu/visu_config.xml Modified: CometVisu/trunk/visu/lib/templateengine.js =================================================================== --- CometVisu/trunk/visu/lib/templateengine.js 2010-11-01 16:44:27 UTC (rev 60) +++ CometVisu/trunk/visu/lib/templateengine.js 2010-11-01 17:17:16 UTC (rev 61) @@ -237,6 +237,8 @@ return design.createSwitch( page ); case 'trigger': return design.createTrigger( page ); + case 'image': + return design.createImage( page ); } return design.createUnknown( page ); } Modified: CometVisu/trunk/visu/lib/visudesign_pure.js =================================================================== --- CometVisu/trunk/visu/lib/visudesign_pure.js 2010-11-01 16:44:27 UTC (rev 60) +++ CometVisu/trunk/visu/lib/visudesign_pure.js 2010-11-01 17:17:16 UTC (rev 61) @@ -156,6 +156,19 @@ return ret_val; } + this.createImage = function( page ) + { + var ret_val = $('<div class="widget" />'); + ret_val.addClass( 'image' ); + 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 + '"'; + ret_val.append( '<div class="actor"><img src="' +$(page).attr('src') + '" ' + style + ' /></div>' ); + return ret_val; + } + this.createUnknown = function( page ) { var ret_val = $('<div class="widget" />'); Modified: CometVisu/trunk/visu/visu_config.xml =================================================================== --- CometVisu/trunk/visu/visu_config.xml 2010-11-01 16:44:27 UTC (rev 60) +++ CometVisu/trunk/visu/visu_config.xml 2010-11-01 17:17:16 UTC (rev 61) @@ -45,6 +45,10 @@ <info address="12/4/250" datatype="9" style="BluePurpleRed">Slide Info</info> <info address="12/4/250" datatype="9" style="BluePurpleRed" mapping="Sign">Slide Info</info> <line /> + <image src="icon/comet_128_ff8000.png" >Ein Bild</image> + <image src="icon/comet_128_ff8000.png" /> + <image src="icon/comet_128_ff8000.png" width="500px" height="46px" /> + <line /> <info address="1/0/41" datatype="1.000" mapping="OnOff">Treppenlicht</info> <page name="Fenster Kontakte"> <info address="4/3/10" datatype="1" mapping="OpenClose" style="GreenRed">Bad EG Reed Fenster</info> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |