|
From: <ma...@us...> - 2010-11-01 16:42:50
|
Revision: 59
http://openautomation.svn.sourceforge.net/openautomation/?rev=59&view=rev
Author: mayerch
Date: 2010-11-01 16:42:44 +0000 (Mon, 01 Nov 2010)
Log Message:
-----------
New Feature: tag for "line" break
Modified Paths:
--------------
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/lib/visudesign_pure.js
CometVisu/trunk/visu/style_orange.css
CometVisu/trunk/visu/visu_config.xml
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2010-11-01 11:06:39 UTC (rev 58)
+++ CometVisu/trunk/visu/lib/templateengine.js 2010-11-01 16:42:44 UTC (rev 59)
@@ -221,6 +221,8 @@
return design.createPage( page, path );
case 'line':
return design.createLine();
+ case 'break':
+ return design.createBreak();
case 'text':
return design.createText( page );
case 'info':
Modified: CometVisu/trunk/visu/lib/visudesign_pure.js
===================================================================
--- CometVisu/trunk/visu/lib/visudesign_pure.js 2010-11-01 11:06:39 UTC (rev 58)
+++ CometVisu/trunk/visu/lib/visudesign_pure.js 2010-11-01 16:42:44 UTC (rev 59)
@@ -44,6 +44,11 @@
return $( '<hr />' );
}
+ this.createBreak = function()
+ {
+ return $( '<br />' );
+ }
+
this.createText = function( page )
{
var ret_val = $('<div class="widget" />');
Modified: CometVisu/trunk/visu/style_orange.css
===================================================================
--- CometVisu/trunk/visu/style_orange.css 2010-11-01 11:06:39 UTC (rev 58)
+++ CometVisu/trunk/visu/style_orange.css 2010-11-01 16:42:44 UTC (rev 59)
@@ -25,6 +25,11 @@
margin:0.1em;
}
+body br
+{
+ clear:both;
+}
+
.nav_path
{
color: #ff8000;
Modified: CometVisu/trunk/visu/visu_config.xml
===================================================================
--- CometVisu/trunk/visu/visu_config.xml 2010-11-01 11:06:39 UTC (rev 58)
+++ CometVisu/trunk/visu/visu_config.xml 2010-11-01 16:42:44 UTC (rev 59)
@@ -38,6 +38,7 @@
<trigger address="2/2/5" datatype="5.001" value="0" >Rolladen Licht 0</trigger>
<trigger address="2/2/5" datatype="5.001" value="100" >Rolladen Licht 100</trigger>
<switch address="1/0/50" datatype="1.001" response_address="1/4/50" mapping="OnOff">Schalt Schiebetüre Licht</switch>
+ <break />
<dim address="1/2/51" datatype="5.010" response_address="1/3/51" response_datatype="5.010">Dim Esstisch</dim>
<shade address="2/4/5" datatype="5.001">Rollladen links</shade>
<slide address="12/4/250" datatype="9" min="-18" max="26">Slide</slide>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
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.
|
|
From: <ma...@us...> - 2010-11-20 18:23:47
|
Revision: 145
http://openautomation.svn.sourceforge.net/openautomation/?rev=145&view=rev
Author: mayerch
Date: 2010-11-20 18:23:39 +0000 (Sat, 20 Nov 2010)
Log Message:
-----------
* Changed location (and name) of the structure files (i.e. the JS that defines the HTML of the widgets)
* renamed visuclient.js to cometvisu-client.js
Modified Paths:
--------------
CometVisu/trunk/visu/edit_config.html
CometVisu/trunk/visu/index.html
Added Paths:
-----------
CometVisu/trunk/visu/designs/structure_custom.js
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/lib/cometvisu-client.js
Removed Paths:
-------------
CometVisu/trunk/visu/lib/visuclient.js
CometVisu/trunk/visu/lib/visudesign_custom.js
CometVisu/trunk/visu/lib/visudesign_pure.js
Copied: CometVisu/trunk/visu/designs/structure_custom.js (from rev 144, CometVisu/trunk/visu/lib/visudesign_custom.js)
===================================================================
--- CometVisu/trunk/visu/designs/structure_custom.js (rev 0)
+++ CometVisu/trunk/visu/designs/structure_custom.js 2010-11-20 18:23:39 UTC (rev 145)
@@ -0,0 +1,75 @@
+/* visudesign_custom.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 class defines all the custom changes to the visu
+ */
+function VisuDesign_Custom() {}; // do NOT change here
+VisuDesign_Custom.prototype = new VisuDesign(); // do NOT chagen here
+
+/**
+ * Custom changes could go here and look e.g. like
+****************************************
+VisuDesign_Custom.prototype.addCreator("line", {
+ create: function( page, path ) {
+ return $( '<hr />' );
+ },
+ attributes: {
+ },
+ content: false
+});
+****************************************
+ */
+
+/**
+ * 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("designtoggle", {
+ create: function( page, path ) {
+ var ret_val = $('<div class="widget" />');
+ ret_val.addClass( 'switch' );
+ var label = '<div class="label">' + page.textContent + '</div>';
+ var actor = '<div class="actor switchUnpressed">';
+ var value = $('link[href*="designs"]').attr('href').split('/')[1];
+ actor += '<div class="value">' + value + '</div>';
+ actor += '</div>';
+ ret_val.append(label).append($(actor)
+ .data({
+ 'mapping' : $(page).attr('mapping'),
+ 'styling' : $(page).attr('styling'),
+ 'value' : value,
+ 'type' : 'toggle'
+ })
+ .bind('click', function() {
+ var designs = [ 'pure', 'discreet' ];
+ 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 );
+ });
+ })
+ );
+ return ret_val;
+ },
+ attributes: {
+ },
+ content: {type: "string", required: true}
+});
+
Copied: CometVisu/trunk/visu/designs/structure_pure.js (from rev 144, CometVisu/trunk/visu/lib/visudesign_pure.js)
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js (rev 0)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2010-11-20 18:23:39 UTC (rev 145)
@@ -0,0 +1,334 @@
+/* visudesign_pure.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 class defines all the building blocks for a Visu in the "Pure" design
+ */
+function VisuDesign() {
+ this.creators = {};
+
+ this.addCreator = function (name, object) {
+ this.creators[name] = object;
+ }
+
+ this.getCreator = function(name) {
+ if (typeof this.creators[name] == undefined) {
+ return this.creators.unknown;
+ }
+ return this.creators[name];
+ }
+
+ /**
+ * The creators object contians all widgets creators and their mappin to the
+ * XML config file tags
+ */
+ this.addCreator("page", {
+ create: function( page, path ) {
+ var ret_val = $('<div class="widget" />');
+ var style = ( '0' != path ) ? 'display:none' : '';
+ var name = $(page).attr('name'); //path += '_' + name;
+ var type = $(page).attr('type'); //text, 2d or 3d
+ ret_val.addClass( 'link' ).addClass("pagelink");
+ ret_val.append( '<a href="javascript:scrollToPage(\''+path+'\')">' + name + '</a>' );
+ var childs = $(page).children();
+ var container = $( '<div class="clearfix"/>' );
+
+ container.append( '<h1>' + name + '</h1>' );
+ $( childs ).each( function(i){
+ container.append( create_pages(childs[i], path + '_' + i ) );
+ } );
+ $('#pages').prepend( $( '<div class="page" id="' + path + '" style="'+style+';"/>' ).append(container) );
+ return ret_val;
+ },
+ attributes: {
+ name: {type: "string", required: true}
+ },
+ content: true
+ });
+
+ this.addCreator("line", {
+ create: function( page, path ) {
+ return $( '<hr />' );
+ },
+ attributes: {
+ },
+ content: false
+ });
+
+ this.addCreator("break", {
+ create: function( page, path ) {
+ return $( '<br />' );
+ },
+ attributes: {
+ },
+ content: false
+ });
+
+
+ this.addCreator("text", {
+ create: function( page, path ) {
+ var ret_val = $('<div class="widget" />');
+ ret_val.addClass( 'text' );
+ var style = '';
+ if( $(page).attr('align') ) style += 'text-align:' + $(page).attr('align') + ';';
+ if( style != '' ) style = 'style="' + style + '"';
+ ret_val.append( '<div ' + style + '>' + page.textContent + '</div>' );
+ return ret_val;
+ },
+ attributes: {
+ align: {type: "string", required: false}
+ },
+ content: {type: "string", required: true}
+ });
+
+ this.addCreator("info", {
+ create: function( page, path ) {
+ var ret_val = $('<div class="widget" />');
+ ret_val.addClass( 'info' );
+ var label = '<div class="label">' + page.textContent + '</div>';
+ ga_list.push( $(page).attr('address') );
+ var actor = '<div class="actor GA' + $(page).attr('address').split('/').join('_') + '">';
+ if( $(page).attr('pre') ) actor += '<div>' + $(page).attr('pre') + '</div>';
+ actor += '<div class="value">-</div>';
+ if( $(page).attr('post') ) actor += '<div>' + $(page).attr('post') + '</div>';
+ actor += '</div>';
+ ret_val.append( label ).append( $(actor).data( {
+ 'GA': $(page).attr('address'),
+ 'datatype': $(page).attr('datatype'),
+ 'mapping' : $(page).attr('mapping'),
+ 'styling' : $(page).attr('styling')
+ } ) );
+ return ret_val;
+ },
+ attributes: {
+ address: {type: "address", required: true},
+ datatype: {type: "datatype", required: true},
+ pre: {type: "string", required: false},
+ post: {type: "string", required: false},
+ mapping: {type: "mapping", required: false},
+ styling: {type: "styling", required: false}
+ },
+ content: {type: "string", required: true}
+ });
+
+ this.addCreator("shade", this.getCreator("info"));
+
+
+ this.addCreator("dim", {
+ create: function( page, path ) {
+ var ret_val = $('<div class="widget" />');
+ ret_val.addClass( 'dim' );
+ var label = '<div class="label">' + page.textContent + '</div>';
+ ga_list.push( $(page).attr('address') );
+ var actor = $('<div class="actor GA' + $(page).attr('address').split('/').join('_') + '" />');
+ ret_val.append( label ).append( actor );
+ var min = parseFloat( $(page).attr('min') || 0 );
+ var max = parseFloat( $(page).attr('max') || 100 );
+ var step = parseFloat( $(page).attr('step') || 0.5 );
+ ret_val.find('.actor').data( {
+ 'events': $(actor).data( 'events' ),
+ 'GA': $(page).attr('address'),
+ 'datatype': $(page).attr('datatype'),
+ 'mapping' : $(page).attr('mapping'),
+ 'styling' : $(page).attr('styling'),
+ 'min' : min,
+ 'max' : max,
+ 'step' : step,
+ 'type' : 'dim'
+ }).slider({step:step,min:min,max:max, animate: true,start:slideStart,change:slideChange});//slide:slideAction});
+
+ return ret_val;
+ },
+ attributes: {
+ address: {type: "address", required: true},
+ datatype: {type: "datatype", required: true},
+ response_address: {type: "address", required: true},
+ response_datatype: {type: "datatype", required: true},
+ min: {type: "numeric", required: false},
+ max: {type: "numeric", required: false},
+ step: {type: "numeric", required: false},
+ mapping: {type: "mapping", required: false},
+ styling: {type: "styling", required: false}
+ },
+ content: {type: "string", required: true}
+ });
+
+ this.addCreator("slide", this.getCreator("dim"));
+
+ this.addCreator("switch", {
+ create: function( page, path ) {
+ var ret_val = $('<div class="widget" />');
+ ret_val.addClass( 'switch' );
+ var label = '<div class="label">' + page.textContent + '</div>';
+ var response_address = $(page).attr('response_address');
+ ga_list.push( response_address );
+ var actor = '<div class="actor GA' + response_address.split('/').join('_') + ' switchUnpressed">';
+ if( $(page).attr('pre') ) actor += $(page).attr('pre');
+ actor += '<div class="value">-</div>';
+ if( $(page).attr('post') ) actor += $(page).attr('post');
+ actor += '</div>';
+ ret_val.append( label ).append( $(actor).data( {
+ 'GA': $(page).attr('address'),
+ 'datatype': $(page).attr('datatype'),
+ 'mapping' : $(page).attr('mapping'),
+ 'styling' : $(page).attr('styling'),
+ 'type' : 'toggle'
+ } ).bind('click',switchAction) );
+ return ret_val;
+ },
+ attributes: {
+ address: {type: "address", required: true},
+ datatype: {type: "datatype", required: true},
+ response_address: {type: "address", required: true},
+ response_datatype: {type: "datatype", required: true},
+ pre: {type: "string", required: false},
+ post: {type: "string", required: false},
+ mapping: {type: "mapping", required: false},
+ styling: {type: "styling", required: false}
+ },
+ content: {type: "string", required: true}
+ });
+
+ this.addCreator("toggle", this.getCreator("switch"));
+
+ this.addCreator("trigger", {
+ create: function( page, path ) {
+ var value = $(page).attr('value') ? $(page).attr('value') : 0;
+ var ret_val = $('<div class="widget" />');
+ ret_val.addClass( 'switch' );
+ var label = '<div class="label">' + page.textContent + '</div>';
+ var address = $(page).attr('address');
+ var actor = '<div class="actor switchUnpressed">';
+ if( $(page).attr('pre') ) actor += $(page).attr('pre');
+ var map = $(page).attr('mapping');
+ if( mappings[map] && mappings[map][value] )
+ actor += '<div class="value">' + mappings[map][value] + '</div>';
+ else
+ actor += '<div class="value">' + value + '</div>';
+ if( $(page).attr('post') ) actor += $(page).attr('post');
+ actor += '</div>';
+ ret_val.append( label ).append( $(actor).data( {
+ 'GA' : $(page).attr('address'),
+ 'datatype': $(page).attr('datatype'),
+ 'mapping' : $(page).attr('mapping'),
+ 'styling' : $(page).attr('styling'),
+ 'type' : 'trigger',
+ 'sendValue': value
+ } ).bind('click',triggerAction) );
+
+ return ret_val;
+ },
+ attributes: {
+ address: {type: "address", required: true},
+ datatype: {type: "datatype", required: true},
+ value: {type: "string", required: true},
+ pre: {type: "string", required: false},
+ post: {type: "string", required: false},
+ mapping: {type: "mapping", required: false},
+ styling: {type: "styling", required: false}
+ },
+ content: {type: "string", required: true}
+ });
+
+ this.addCreator("image", {
+ create: function( page, path ) {
+ 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 + '"';
+ var actor = '<div class="actor"><img src="' +$(page).attr('src') + '" ' + style + ' /></div>';
+ var refresh = $(page).attr('refresh') ? $(page).attr('refresh')*1000 : 0;
+ ret_val.append( $(actor).data( {
+ 'refresh': refresh
+ } ).each(setupRefreshAction) ); // 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},
+ refresh: {type: "numeric", required: false}
+ },
+ content: {type: "string", required: false}
+ });
+
+ this.addCreator("video", {
+ create: function( page, path ) {
+ var ret_val = $('<div class="widget" />');
+ ret_val.addClass( 'video' );
+ 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"><video src="' +$(page).attr('src') + '" ' + style + ' controls="controls" /></div>';
+ var refresh = $(page).attr('refresh') ? $(page).attr('refresh')*1000 : 0;
+ ret_val.append( $(actor).data( {
+ 'refresh': refresh
+ } ).each(setupRefreshAction) ); // 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},
+ refresh: {type: "numeric", required: false}
+ },
+ content: {type: "string", required: true}
+ });
+
+ this.addCreator("unknown", {
+ create: function( page, path ) {
+ var ret_val = $('<div class="widget" />');
+ ret_val.append( '<pre>' + page.textContent + '</pre>' );
+ return ret_val;
+ },
+ attributes: {
+ },
+ content: {type: "string", required: true}
+ });
+
+ this.switchAction = function() {
+ var data = $(this).data();
+ // alert( data.GA + ' = ' + data.value );
+ visu.write( data.GA, data.value=='1' ? '0' : '1', data.datatype );
+ }
+
+ this.slideAction = function(event,ui) {
+ //alert(ui.value);
+ var now = new Date().getTime();
+ var data = $( '.actor', $(this).parent() ).data();
+ if( data.last && (now - data.last) < 1000 ) return; // too fast => early exit
+ $( '.actor', $(this).parent() ).data( 'last', now );
+ //$(this).parent().data();
+ // alert( data.GA + ' = ' + data.value );
+ //visu.write( data.GA, data.value=='1' ? '0' : '1', data.datatype );
+ //FIXME eigentlich richtig... visu.write( data.GA, ui.value, data.datatype );
+ }
+
+ /**
+ * Setup a refresh interval in seconds if the 'refresh' in the .data()
+ * ist bigger than 0
+ */
+ this.refreshAction = function(that) {
+ var data = $(this).data();
+ alert('this.refreshAction');
+ }
+};
Modified: CometVisu/trunk/visu/edit_config.html
===================================================================
--- CometVisu/trunk/visu/edit_config.html 2010-11-20 11:38:10 UTC (rev 144)
+++ CometVisu/trunk/visu/edit_config.html 2010-11-20 18:23:39 UTC (rev 145)
@@ -10,10 +10,10 @@
<script src="lib/jquery.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/visuclient.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="lib/visudesign_pure.js" type="text/javascript"></script>
- <script src="lib/visudesign_custom.js" type="text/javascript"></script>
+ <script src="designs/structure_pure.js" type="text/javascript"></script>
+ <script src="designs/structure_custom.js" type="text/javascript"></script>
<script src="lib/templateengine.js" type="text/javascript"></script>
<script src="edit/visuconfig_edit.js" type="text/javascript"></script>
<script src="edit/json2.js" type="text/javascript"></script>
Modified: CometVisu/trunk/visu/index.html
===================================================================
--- CometVisu/trunk/visu/index.html 2010-11-20 11:38:10 UTC (rev 144)
+++ CometVisu/trunk/visu/index.html 2010-11-20 18:23:39 UTC (rev 145)
@@ -8,10 +8,10 @@
<script src="lib/jquery.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/visuclient.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="lib/visudesign_pure.js" type="text/javascript"></script>
- <script src="lib/visudesign_custom.js" type="text/javascript"></script>
+ <script src="designs/structure_pure.js" type="text/javascript"></script>
+ <script src="designs/structure_custom.js" type="text/javascript"></script>
<script src="lib/templateengine.js" type="text/javascript"></script>
</head>
<body>
Copied: CometVisu/trunk/visu/lib/cometvisu-client.js (from rev 144, CometVisu/trunk/visu/lib/visuclient.js)
===================================================================
--- CometVisu/trunk/visu/lib/cometvisu-client.js (rev 0)
+++ CometVisu/trunk/visu/lib/cometvisu-client.js 2010-11-20 18:23:39 UTC (rev 145)
@@ -0,0 +1,145 @@
+/* cometvisu.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
+*/
+
+/**
+ * Class that handles the communicaton of the client
+ */
+function CometVisu( urlPrefix )
+{
+ this.urlPrefix = (null == urlPrefix) ? '' : urlPrefix; // the address of the service
+ this.addresses = []; // the subscribed addresses
+ this.filters = []; // the subscribed filters
+ this.user = ''; // the current user
+ this.pass = ''; // the current password
+ this.device = ''; // the current device ID
+ this.running = false; // is the communication running at the moment?
+
+ /**
+ * This function gets called once the communication is established and session information is available
+ */
+ this.handleSession = function( json )
+ {
+ this.session = json.s;
+ this.version = json.v.split( '.', 3 );
+
+ if( 0 < parseInt(this.version[0]) || 1 < parseInt(this.version[1]) )
+ alert( 'ERROR CometVisu Client: too new protocoll version (' + json.v + ') used!' );
+
+ // send first request
+ this.running = true;
+ $.ajax( {url:this.urlPrefix + 'r',dataType: 'json',context:this,data:this.buildRequest()+'&t=0', success:this.handleRead ,error:this.handleError/*,complete:this.handleComplete*/ } );
+ };
+
+ /**
+ * This function gets called once the communication is established and session information is available
+ */
+ this.handleRead = function( json )
+ {
+ if( !json )
+ {
+ if( this.running )
+ { // retry initial request
+ $.ajax( {url:this.urlPrefix + 'r',dataType: 'json',context:this,data:this.buildRequest()+'&t=0', success:this.handleRead ,error:this.handleError/*,complete:this.handleComplete*/ } );
+ }
+ return;
+ }
+
+ var lastIndex = json.i;
+ var data = json.d;
+ this.update( data );
+
+ if( this.running )
+ { // keep the requests going
+ $.ajax( {url:this.urlPrefix + 'r',dataType: 'json',context:this,data:this.buildRequest()+'&i='+lastIndex, success:this.handleRead ,error:this.handleError/*,complete:this.handleComplete*/ } );
+ }
+ };
+
+ /**
+ * This function gets called on an error
+ * FIXME: this should be a prototype, so that the application developer can override it
+ */
+ this.handleError=function(xhr,str,excptObj)
+ {
+ alert('Error! "'+str+'"');
+ }
+ this.handleComplete=function(xhr,str)
+ {
+ // alert('Complete:"'+str+'"');
+ }
+
+ /**
+ * Build the URL part that contains the addresses and filters
+ */
+ this.buildRequest = function()
+ {
+ var requestAddresses = (this.addresses.length)?'a=' + this.addresses.join( '&a=' ):'';
+ var requestFilters = (this.filters.length )?'f=' + this.filters.join( '&f=' ):'';
+ return requestAddresses + ( (this.addresses.length&&this.filters.length)?'&':'' ) + requestFilters;
+ }
+
+ /**
+ * Subscribe to the addresses in the parameter
+ * The second parameter (filter) is optional
+ */
+ this.subscribe = function( addresses, filters )
+ {
+ var startCommunication = !this.addresses.length; // start when addresses were empty
+ this.addresses = addresses;
+ this.filters = filters ? filters : [] ;
+
+ if( !addresses.length ) this.stop(); // stop when new addresses are empty
+ else if( startCommunication ) this.login();
+ }
+
+ /**
+ * This function starts the communication by a login and then runs the
+ * ongoing communication task
+ */
+ this.login = function()
+ {
+ var request = {};
+ if( '' != this.user ) request.u = this.user;
+ if( '' != this.pass ) request.p = this.pass;
+ if( '' != this.device ) request.d = this.device;
+ $.ajax( {url:this.urlPrefix + 'l',dataType: 'json',context:this,data:request, success:this.handleSession} );
+ };
+
+ /**
+ * This function stops an ongoing connection
+ */
+ this.stop = function()
+ {
+ this.running = false;
+ };
+
+ /**
+ * This function sends a value
+ */
+ this.write = function( address, value, datatype ) // FIXME datatype not in spec!!!
+ {
+ //var request = {};
+ //request.a = address; // FIXME the spec allows multiple addresses
+ //request.v = value;
+var request = 'a=' + address + '&v=' + value;
+datatype = datatype.split('.');
+request += '&d=' + datatype[0]; // FIXME datatype not in spec!!!
+ $.ajax( {url:this.urlPrefix + 'w',dataType: 'json',context:this,data:request} );
+//alert( 'write to "' + address + '" value "' + value + '"' );
+ }
+};
+
+CometVisu.prototype.update = function( json ) {}
Deleted: CometVisu/trunk/visu/lib/visuclient.js
===================================================================
--- CometVisu/trunk/visu/lib/visuclient.js 2010-11-20 11:38:10 UTC (rev 144)
+++ CometVisu/trunk/visu/lib/visuclient.js 2010-11-20 18:23:39 UTC (rev 145)
@@ -1,145 +0,0 @@
-/* cometvisu.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
-*/
-
-/**
- * Class that handles the communicaton of the client
- */
-function CometVisu( urlPrefix )
-{
- this.urlPrefix = (null == urlPrefix) ? '' : urlPrefix; // the address of the service
- this.addresses = []; // the subscribed addresses
- this.filters = []; // the subscribed filters
- this.user = ''; // the current user
- this.pass = ''; // the current password
- this.device = ''; // the current device ID
- this.running = false; // is the communication running at the moment?
-
- /**
- * This function gets called once the communication is established and session information is available
- */
- this.handleSession = function( json )
- {
- this.session = json.s;
- this.version = json.v.split( '.', 3 );
-
- if( 0 < parseInt(this.version[0]) || 1 < parseInt(this.version[1]) )
- alert( 'ERROR CometVisu Client: too new protocoll version (' + json.v + ') used!' );
-
- // send first request
- this.running = true;
- $.ajax( {url:this.urlPrefix + 'r',dataType: 'json',context:this,data:this.buildRequest()+'&t=0', success:this.handleRead ,error:this.handleError/*,complete:this.handleComplete*/ } );
- };
-
- /**
- * This ...
[truncated message content] |
|
From: <net...@us...> - 2010-11-28 17:26:10
|
Revision: 171
http://openautomation.svn.sourceforge.net/openautomation/?rev=171&view=rev
Author: netzkind
Date: 2010-11-28 17:26:04 +0000 (Sun, 28 Nov 2010)
Log Message:
-----------
activated "loading"-layout for editor too, changed bug reported by Bodo, added input for address (in case someone does have an out-of-date eibga.conf)
Modified Paths:
--------------
CometVisu/trunk/visu/designs/discreet/basic.css
CometVisu/trunk/visu/designs/pure/basic.css
CometVisu/trunk/visu/edit/style_edit.css
CometVisu/trunk/visu/edit/visuconfig_edit.js
CometVisu/trunk/visu/edit_config.html
CometVisu/trunk/visu/index.html
Modified: CometVisu/trunk/visu/designs/discreet/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet/basic.css 2010-11-28 16:39:42 UTC (rev 170)
+++ CometVisu/trunk/visu/designs/discreet/basic.css 2010-11-28 17:26:04 UTC (rev 171)
@@ -289,7 +289,7 @@
/* End hide from IE-mac */
}
-div#top, div#main, div#bottom {
+.loading {
display: block !important;
}
Modified: CometVisu/trunk/visu/designs/pure/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/pure/basic.css 2010-11-28 16:39:42 UTC (rev 170)
+++ CometVisu/trunk/visu/designs/pure/basic.css 2010-11-28 17:26:04 UTC (rev 171)
@@ -252,7 +252,7 @@
/* End hide from IE-mac */
}
-div#top, div#main, div#bottom {
+.loading {
display: block !important;
}
Modified: CometVisu/trunk/visu/edit/style_edit.css
===================================================================
--- CometVisu/trunk/visu/edit/style_edit.css 2010-11-28 16:39:42 UTC (rev 170)
+++ CometVisu/trunk/visu/edit/style_edit.css 2010-11-28 17:26:04 UTC (rev 171)
@@ -82,11 +82,12 @@
.addwidget .editcontrols label {
float: left;
- width: 220px;
+ width: 180px;
}
-.addwidget .editcontrols input, .addwidget .editcontrols select {
+.addwidget .editcontrols .input {
+ padding-left: 200px;
}
div.line {
Modified: CometVisu/trunk/visu/edit/visuconfig_edit.js
===================================================================
--- CometVisu/trunk/visu/edit/visuconfig_edit.js 2010-11-28 16:39:42 UTC (rev 170)
+++ CometVisu/trunk/visu/edit/visuconfig_edit.js 2010-11-28 17:26:04 UTC (rev 171)
@@ -210,7 +210,9 @@
var element = $("<div />").addClass("add_input").addClass("content")
.append($("<label />").attr("for", "add_textContent").html("text-content"))
- .append($("<input type=\"text\" id=\"add_textContent\"/>"));
+ .append($("<div class=\"input\" />")
+ .append($("<input type=\"text\" id=\"add_textContent\"/>"))
+ );
if (typeof values["textContent"] != "undefined") {
element.find("input").val(values["textContent"]);
}
@@ -223,25 +225,41 @@
$.each(attributes, function (index, e) {
var element = $("<div />").addClass("add_input").addClass("attribute")
- .append($("<label />").attr("for", "add_" + index).html(index));
+ .append($("<label />").attr("for", "add_" + index).html(index))
+ .append($("<div class=\"input\" />"));
+ var myElement = element.find("div.input");
switch (e.type) {
case "address":
- if (typeof addressesCache == undefined || addressesCache == false) {
- // appearantly we were unable to load the list of addresses from the server
- // we will provide an input-field instead
- element.append($("<input id=\"add_" + index + "\" />"));
- if (typeof values[index] != "undefined") {
- // pre-set the value
- element.find(":input").val(values[index]);
- }
- } else {
- element.append($("<select id=\"add_" + index + "\" />")
+ // appearantly we were unable to load the list of addresses from the server
+ // we will provide an input-field instead
+ myElement.append($("<input id=\"add_" + index + "\" />"));
+ if (typeof values[index] != "undefined") {
+ // pre-set the value
+ myElement.find(":input").val(values[index]);
+ }
+
+ if (typeof addressesCache != undefined && addressesCache != false) {
+ var input = myElement.find("input");
+ input.attr("disabled", "disabled");
+ myElement.append($("<input type=\"checkbox\" name=\"enable_" + e.type + "\" checked=\"checked\" />")
+ .change(function() {
+ if ($(this).attr("checked")) {
+ input.attr("disabled", "disabled");
+ myElement.find("select").show();
+ } else {
+ input.removeAttr("disabled");
+ myElement.find("select").hide();
+ }
+ })
+ );
+ myElement.append($("<br />"));
+ myElement.append($("<select id=\"add_" + index + "\" />")
.append($("<option />").attr("value", "").html("-")));
- element.find("select:first").append(getAddressesObject());
+ myElement.find("select:first").append(getAddressesObject());
- element.find("select").bind("change", function() {
+ myElement.find("select").bind("change", function() {
// on changing the address, the coresponding datatype-field is
// automagically set
var name = $(this).attr("id");
@@ -255,7 +273,7 @@
});
if (typeof values[index] != "undefined") {
- element.find("option[value=" + values[index] + "]").attr("selected", "selected");
+ myElement.find("option[value=" + values[index] + "]").attr("selected", "selected");
}
}
@@ -264,61 +282,69 @@
if (typeof dptCache == undefined || dptCache == false) {
// appearantly we were unable to load the list of datatypes from the server
// we will provide an input-field instead
- element.append($("<input id=\"add_" + index + "\" />"));
+ myElement.append($("<input id=\"add_" + index + "\" />"));
if (typeof values[index] != "undefined") {
// pre-set the value
- element.find(":input").val(values[index]);
+ myElement.find(":input").val(values[index]);
}
} else {
- element.append($("<select id=\"add_" + index + "\" />")
+ myElement.append($("<select id=\"add_" + index + "\" />")
.append($("<option />").attr("value", "").html("-")));
- element.find("select:first").append(getDPTObject());
+ myElement.find("select:first").append(getDPTObject());
if (typeof values[index] != "undefined") {
- element.find("option[value=" + values[index] + "]").attr("selected", "selected");
+ myElement.find("option[value=" + values[index] + "]").attr("selected", "selected");
}
}
break;
case "mapping":
- element.append($("<select id=\"add_mapping\" />")
+ myElement.append($("<select id=\"add_mapping\" />")
.append($("<option />").attr("value", "").html("-")));
jQuery.each(mappings, function(i, tmp) {
- element.find("select#add_mapping").append($("<option />").attr("value", i).html(i));
+ myElement.find("select#add_mapping").append($("<option />").attr("value", i).html(i));
});
if (typeof values[index] != "undefined") {
- element.find("option[value=" + values[index] + "]").attr("selected", "selected");
+ myElement.find("option[value=" + values[index] + "]").attr("selected", "selected");
}
break;
case "styling":
- element.append($("<select id=\"add_styling\" />")
+ myElement.append($("<select id=\"add_styling\" />")
.append($("<option />").attr("value", "").html("-")));
jQuery.each(stylings, function(i, tmp) {
- element.find("select#add_styling").append($("<option />").attr("value", i).html(i));
+ myElement.find("select#add_styling").append($("<option />").attr("value", i).html(i));
});
if (typeof values[index] != "undefined") {
- element.find("option[value=" + values[index] + "]").attr("selected", "selected");
+ myElement.find("option[value=" + values[index] + "]").attr("selected", "selected");
}
break;
case "datatype":
break;
default:
- element.append($("<input type=\"text\" id=\"add_" + index + "\" />"));
+ myElement.append($("<input type=\"text\" id=\"add_" + index + "\" />"));
if (typeof values[index] != "undefined") {
- element.find("input").val(values[index]);
+ myElement.find("input").val(values[index]);
}
break;
}
+ if (element.find("select")[0]) {
+ var select = element.find("select");
+ select.change(function() {
+ // update the input-field
+ jQuery(this).parent().find("input").val(jQuery(this).val());
+ })
+ }
+
element.find(":input")
.data("name", index)
.data("required", e.required)
@@ -365,7 +391,7 @@
var error = false;
// alte Werte zwischenspeichern
- container.find(":input").each(function() {
+ container.find(":input:visible").not("[name^=enable_]").each(function() {
var name;
if ($(this).closest("div.add_input").hasClass("attribute")) {
name = $(this).data("name");
Modified: CometVisu/trunk/visu/edit_config.html
===================================================================
--- CometVisu/trunk/visu/edit_config.html 2010-11-28 16:39:42 UTC (rev 170)
+++ CometVisu/trunk/visu/edit_config.html 2010-11-28 17:26:04 UTC (rev 171)
@@ -5,7 +5,6 @@
<head>
<title>Visu - Editor-Modus</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<!-- <link rel="stylesheet" type="text/css" href="style_discreet.css" /> -->
<link rel="stylesheet" type="text/css" href="edit/style_edit.css" />
<script src="lib/jquery.js" type="text/javascript"></script>
<script src="lib/jquery-ui.js" type="text/javascript"></script>
@@ -17,17 +16,20 @@
<script src="lib/templateengine.js" type="text/javascript"></script>
<script src="edit/visuconfig_edit.js" type="text/javascript"></script>
<script src="edit/json2.js" type="text/javascript"></script>
+ <style type="text/css">
+ .loading { display: none; }
+ </style>
</head>
<body>
- <div id="top">
+ <div id="top" class="loading">
<div class="nav_path">-</div>
<hr />
</div>
- <div id="main" style="width:900px;position:relative; overflow: hidden; z-index: 1;">
+ <div id="main" style="width:900px;position:relative; overflow: hidden; z-index: 1;" class="loading">
<div id="pages" class="clearfix" style="width:20000em; position:relative;clear:both;"><!-- all pages will be inserted here -->
</div>
</div>
- <div id="bottom">
+ <div id="bottom" class="loading">
<hr />
<div class="footer">
<img src="icon/comet_64_ff8000.png" alt="CometVisu" />
@@ -43,9 +45,11 @@
<h2 class="edit">Edit widget</h2>
<div class="editcontrols">
<label for="add_type">Typ</label>
- <select id="add_type">
- <option>-</option>
- </select>
+ <div class="input">
+ <select id="add_type">
+ <option>-</option>
+ </select>
+ </div>
<div class="inputs">
@@ -60,9 +64,12 @@
</div>
</form>
</div>
- <div id="controlcontainer">
+ <div id="controlcontainer" class="loading">
<div id="saveconfigcontrol">save</div>
<div id="addwidgetcontrol">+</div>
</div>
+ <div id="loading" style="text-align: center; width: 200px; height: 30px; margin: auto;">
+ Loading ...
+ </div>
</body>
</html>
Modified: CometVisu/trunk/visu/index.html
===================================================================
--- CometVisu/trunk/visu/index.html 2010-11-28 16:39:42 UTC (rev 170)
+++ CometVisu/trunk/visu/index.html 2010-11-28 17:26:04 UTC (rev 171)
@@ -13,16 +13,19 @@
<script src="designs/structure_pure.js" type="text/javascript"></script>
<script src="designs/structure_custom.js" type="text/javascript"></script>
<script src="lib/templateengine.js" type="text/javascript"></script>
+ <style type="text/css">
+ .loading { display: none; }
+ </style>
</head>
<body>
- <div id="top" style="display: none;">
+ <div id="top" class="loading">
<div class="nav_path">-</div>
</div>
- <div id="main" style="width:900px;position:relative; overflow: hidden;" style="display: none;">
+ <div id="main" style="width:900px;position:relative; overflow: hidden;" class="loading">
<div id="pages" class="clearfix" style="width:20000em; position:relative;clear:both;"><!-- all pages will be inserted here -->
</div>
</div>
- <div id="bottom" style="display: none;">
+ <div id="bottom" class="loading">
<hr />
<div class="footer">
<img src="icon/comet_64_000000.png" alt="CometVisu" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2010-12-03 13:59:28
|
Revision: 180
http://openautomation.svn.sourceforge.net/openautomation/?rev=180&view=rev
Author: mayerch
Date: 2010-12-03 13:59:22 +0000 (Fri, 03 Dec 2010)
Log Message:
-----------
- corrected error in visu_config.xsd
- added PHP that checks the config file against the schema/XSD
- added link to status bar to make config file check easily accessable
Note: the config in the repository is currently not valid against the current schema!
Modified Paths:
--------------
CometVisu/trunk/visu/visu_config.xml
CometVisu/trunk/visu/visu_config.xsd
Added Paths:
-----------
CometVisu/trunk/visu/check_config.php
Added: CometVisu/trunk/visu/check_config.php
===================================================================
--- CometVisu/trunk/visu/check_config.php (rev 0)
+++ CometVisu/trunk/visu/check_config.php 2010-12-03 13:59:22 UTC (rev 180)
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CometVisu-Client: Config file check</title>
+ </head>
+ <body>
+<?php
+
+$dom = new DomDocument();
+$dom->load("visu_config.xml");
+
+if ($dom->schemaValidate("visu_config.xsd")) {
+ print ("config is valid XML");
+} else {
+ print ("config is NOT valid XML");
+}
+
+?>
+ </body>
+</html>
Modified: CometVisu/trunk/visu/visu_config.xml
===================================================================
--- CometVisu/trunk/visu/visu_config.xml 2010-12-02 12:19:36 UTC (rev 179)
+++ CometVisu/trunk/visu/visu_config.xml 2010-12-03 13:59:22 UTC (rev 180)
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<pages design="pure">
+<pages design="pure"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="visu_config.xsd">
<meta>
<plugins>
<plugin name="colorchooser" />
@@ -51,6 +53,11 @@
- <a href=".">normal Mode</a>
]]>
</status>
+ <status type="html">
+ <![CDATA[
+ - <a href="check_config.php">Check Config</a>
+ ]]>
+ </status>
</statusbar>
</meta>
<page name="Übersicht" flavour="orange">
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2010-12-02 12:19:36 UTC (rev 179)
+++ CometVisu/trunk/visu/visu_config.xsd 2010-12-03 13:59:22 UTC (rev 180)
@@ -71,7 +71,7 @@
</xsd:choice>
</xsd:complexType>
</xsd:element>
-^
+
<xsd:element name="plugin">
<xsd:complexType>
<xsd:attribute name="name" type="xsd:string" use="required" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
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.
|
|
From: <ma...@us...> - 2010-12-03 23:44:26
|
Revision: 183
http://openautomation.svn.sourceforge.net/openautomation/?rev=183&view=rev
Author: mayerch
Date: 2010-12-03 23:44:20 +0000 (Fri, 03 Dec 2010)
Log Message:
-----------
initial (= experimental) support for popups
Modified Paths:
--------------
CometVisu/trunk/visu/designs/pure/basic.css
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/designs/pure/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/pure/basic.css 2010-12-03 16:03:14 UTC (rev 182)
+++ CometVisu/trunk/visu/designs/pure/basic.css 2010-12-03 23:44:20 UTC (rev 183)
@@ -258,4 +258,30 @@
div#loading {
display: none !important;
+}
+
+.popup {
+ position: absolute;
+ width: 90%;
+ height: 90%;
+ top: 5%;
+ left: 5%;
+ 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.error {
+ background: #800000;
+ border: #f00;
}
\ No newline at end of file
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2010-12-03 16:03:14 UTC (rev 182)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2010-12-03 23:44:20 UTC (rev 183)
@@ -32,6 +32,22 @@
return this.creators[name];
}
+ this.popups = {};
+
+ this.addPopup = function (name, object) {
+ this.popups[name] = object;
+ this.popups[name].type = name;
+console.log( name );
+console.log( this.popups[name] );
+ }
+
+ this.getPopup = function(name) {
+ if (typeof this.popups[name] == undefined) {
+ return this.popups.unknown;
+ }
+ return this.popups[name];
+ }
+
/**
* The creators object contians all widgets creators and their mappin to the
* XML config file tags
@@ -326,6 +342,28 @@
content: {type: "string", required: true}
});
+ this.addPopup('unknown', {
+ create: function( attributes ) {
+ var ret_val = $('<div class="popup" />');
+ ret_val.addClass( this.type );
+ if( attributes['title'] ) ret_val.append( $('<div class="head">' + attributes['title'] + '</div>') );
+ var content = '';
+ if( attributes['content'] ) content = attributes['content'];
+ ret_val.append( '<div class="main">' + content + '</div>' );
+ return ret_val;
+ },
+ attributes: {
+ title: {type: 'string', required: false},
+ content: {type: 'string', required: false},
+ width: {type: 'string', required: false},
+ height: {type: 'string', required: false}
+ }
+ });
+
+ this.addPopup('info' , this.getPopup('unknown') );
+ this.addPopup('warning', this.getPopup('unknown') );
+ this.addPopup('error' , this.getPopup('unknown') ) ;
+
this.switchAction = function() {
var data = $(this).data();
// alert( data.GA + ' = ' + data.value );
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2010-12-03 16:03:14 UTC (rev 182)
+++ CometVisu/trunk/visu/lib/templateengine.js 2010-12-03 23:44:20 UTC (rev 183)
@@ -296,6 +296,28 @@
}
}
+/**
+ * Show a popup of type "type".
+ * The attributes is an type dependend object
+ * This function returnes a jQuery object that points to the whole popup,
+ * so it's content can be easily extended
+ */
+function showPopup( type, attributes )
+{
+ //var retval = design.popups[ type ].create( attributes ); //page, path );
+ //return retval;
+ return design.popups[ type ].create( attributes ).appendTo('body');
+}
+
+/**
+ * Remove the popup.
+ * The parameter is the jQuery object returned by the showPopup function
+ */
+function removePopup( jQuery_object )
+{
+ jQuery_object.remove();
+}
+
/****************************************************************************/
/* FIXME - Question: should this belong to the VisuDesign object so that it */
/* is possible to overload?!? */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2010-12-09 15:24:05
|
Revision: 187
http://openautomation.svn.sourceforge.net/openautomation/?rev=187&view=rev
Author: mayerch
Date: 2010-12-09 15:23:58 +0000 (Thu, 09 Dec 2010)
Log Message:
-----------
- remove debug code
- remove popup from DOM on close
- default to unknown popup type
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2010-12-05 16:43:23 UTC (rev 186)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2010-12-09 15:23:58 UTC (rev 187)
@@ -37,8 +37,6 @@
this.addPopup = function (name, object) {
this.popups[name] = object;
this.popups[name].type = name;
-console.log( name );
-console.log( this.popups[name] );
}
this.getPopup = function(name) {
@@ -356,7 +354,7 @@
}
ret_val.bind("click", function() {
- ret_val.hide();
+ ret_val.remove();
return false;
})
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2010-12-05 16:43:23 UTC (rev 186)
+++ CometVisu/trunk/visu/lib/templateengine.js 2010-12-09 15:23:58 UTC (rev 187)
@@ -306,6 +306,8 @@
{
//var retval = design.popups[ type ].create( attributes ); //page, path );
//return retval;
+ if( !design.popups[ type ] ) type = 'unknown';
+
return design.popups[ type ].create( attributes ).appendTo('body');
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2010-12-09 20:37:33
|
Revision: 188
http://openautomation.svn.sourceforge.net/openautomation/?rev=188&view=rev
Author: mayerch
Date: 2010-12-09 20:37:27 +0000 (Thu, 09 Dec 2010)
Log Message:
-----------
Make Popup resizeable and allow it to be fixed to a position ({x:<>, y:<>[, w:<>, h:<>]} or an jQuery Object like $('.target')) with an optional alignment parameter
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2010-12-09 15:23:58 UTC (rev 187)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2010-12-09 20:37:27 UTC (rev 188)
@@ -342,7 +342,8 @@
this.addPopup('unknown', {
create: function( attributes ) {
- var ret_val = $('<div class="popup" /><div class=\"popup_background\" />');
+ var repositon = false;
+ var ret_val = $('<div class="popup" style="display:none"/><div class="popup_background" style="display:none" />').appendTo('body');
ret_val.addClass( this.type );
if (attributes.title) {
@@ -353,18 +354,59 @@
ret_val.filter(".popup").append( $('<div class="main" />').append(attributes.content));
}
+ if( attributes.width ) {
+ ret_val.width( attributes.width );
+ reposition = true;
+ }
+
+ if( attributes.height ) {
+ ret_val.height( attributes.height );
+ reposition = true;
+ }
+
+ var anchor = {x: -1, y: -1, w: 0, h: 0};
+ var align;
+ if( attributes.position )
+ {
+ if( attributes.position.offset )
+ {
+ var offset = attributes.position.offset();
+ anchor.x = offset.left;
+ anchor.y = offset.top;
+ anchor.w = attributes.position.width();
+ anchor.h = attributes.position.height();
+ } else {
+ if( attributes.position.hasOwnProperty('x') ) anchor.x = attributes.position.x;
+ if( attributes.position.hasOwnProperty('y') ) anchor.y = attributes.position.y;
+ if( attributes.position.hasOwnProperty('w') ) anchor.w = attributes.position.w;
+ if( attributes.position.hasOwnProperty('h') ) anchor.h = attributes.position.h;
+ if( anchor.w == 0 && anchor.h == 0 ) align = 5;
+ }
+ }
+ if( attributes.align !== undefined ) align = attributes.align;
+ var placement = placementStrategy(
+ anchor,
+ { w:ret_val.outerWidth(), h:ret_val.outerHeight() },
+ { w:$(window).width() , h:$(window).height() },
+ align
+ );
+ ret_val.css( 'left', placement.x );
+ ret_val.css( 'top' , placement.y );
+
ret_val.bind("click", function() {
ret_val.remove();
return false;
})
+ ret_val.css( 'display', 'block' );
return ret_val;
},
attributes: {
title: {type: 'string', required: false},
content: {type: 'string', required: false},
width: {type: 'string', required: false},
- height: {type: 'string', required: false}
+ height: {type: 'string', required: false},
+ position: {type: 'object', required: false} // either {x:,y:} or an jQuery object
}
});
@@ -399,3 +441,76 @@
alert('this.refreshAction');
}
};
+
+/**
+ * Figure out best placement of popup.
+ * A preference can optionally be passed. The position is that of the numbers
+ * on the numeric keypad. I.e. a value of "6" means centered above the anchor.
+ * A value of "0" means centered to the page
+ */
+function placementStrategy( anchor, popup, page, preference )
+{
+ var position_order = [ 8, 2, 6, 4, 9, 3, 7, 1, 5, 0 ];
+ if( preference !== undefined ) position_order.unshift( preference );
+
+ for( pos in position_order )
+ {
+ var xy = {};
+ switch(position_order[pos])
+ {
+ case 0: // page center - will allways work
+ return { x: (page.w-popup.w)/2, y: (page.h-popup.h)/2 };
+
+ case 1:
+ xy.x = anchor.x - popup.w;
+ xy.y = anchor.y + anchor.h;
+ break;
+
+ case 2:
+ xy.x = anchor.x + anchor.w/2 - popup.w/2;
+ xy.y = anchor.y + anchor.h;
+ break;
+
+ case 3:
+ xy.x = anchor.x + anchor.w;
+ xy.y = anchor.y + anchor.h;
+ break;
+
+ case 4:
+ xy.x = anchor.x - popup.w;
+ xy.y = anchor.y + anchor.h/2 - popup.h/2;
+ break;
+
+ case 5:
+ xy.x = anchor.x + anchor.w/2 - popup.w/2;
+ xy.y = anchor.y + anchor.h/2 - popup.h/2;
+ break;
+
+ case 6:
+ xy.x = anchor.x + anchor.w;
+ xy.y = anchor.y + anchor.h/2 - popup.h/2;
+ break;
+
+ case 7:
+ xy.x = anchor.x - popup.w;
+ xy.y = anchor.y - popup.h;
+ break;
+
+ case 8:
+ xy.x = anchor.x + anchor.w/2 - popup.w/2;
+ xy.y = anchor.y - popup.h;
+ break;
+
+ case 9:
+ xy.x = anchor.x + anchor.w;
+ xy.y = anchor.y - popup.h;
+ break;
+ }
+
+ // test if that solution is valid
+ if( xy.x >= 0 && xy.y >= 0 && xy.x+popup.w<=page.w && xy.y+popup.h<=page.h )
+ return xy;
+ }
+
+ return { x: 0, y: 0 }; // sanity return
+}
\ No newline at end of file
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2010-12-09 15:23:58 UTC (rev 187)
+++ CometVisu/trunk/visu/lib/templateengine.js 2010-12-09 20:37:27 UTC (rev 188)
@@ -308,7 +308,7 @@
//return retval;
if( !design.popups[ type ] ) type = 'unknown';
- return design.popups[ type ].create( attributes ).appendTo('body');
+ return design.popups[ type ].create( attributes );
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2010-12-12 15:06:06
|
Revision: 207
http://openautomation.svn.sourceforge.net/openautomation/?rev=207&view=rev
Author: mayerch
Date: 2010-12-12 15:06:00 +0000 (Sun, 12 Dec 2010)
Log Message:
-----------
First step towards moving addesses from the attributes to own elements (-> feature whish #3133031).
Also inital step towards feature whish #3134595 (Change data types to transfer functions)
As this will break all existing config files and as this is only the first step, that converted the info widget, there's a new config file (visu_config_neu.xml) that can be called by adding "?config=neu" to the visu URL. This file contains the new config syntax and will be extended by each widget that gets transformed.
NOTE: this will also break the editor!
So if you aren't perfectly sure about what you are doing, DO NOT update to the latest SVN version yet!
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
Added Paths:
-----------
CometVisu/trunk/visu/visu_config_neu.xml
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2010-12-12 13:22:42 UTC (rev 206)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2010-12-12 15:06:00 UTC (rev 207)
@@ -110,34 +110,40 @@
});
this.addCreator("info", {
- create: function( page, path ) {
- var ret_val = $('<div class="widget" />');
- ret_val.addClass( 'info' );
- var label = '<div class="label">' + page.textContent + '</div>';
- ga_list.push( $(page).attr('address') );
- var actor = '<div class="actor">';
- if( $(page).attr('pre') ) actor += '<div>' + $(page).attr('pre') + '</div>';
- actor += '<div class="value">-</div>';
- if( $(page).attr('post') ) actor += '<div>' + $(page).attr('post') + '</div>';
- actor += '</div>';
- ret_val.append( label ).append( $(actor).data( {
- 'GA': $(page).attr('address'),
- 'datatype': $(page).attr('datatype'),
- 'mapping' : $(page).attr('mapping'),
- 'styling' : $(page).attr('styling')
- } ).bind('_'+$(page).attr('address'), this.update ) );
- return ret_val;
- },
- update: defaultUpdate,
- attributes: {
- address: {type: "address", required: true},
- datatype: {type: "datatype", required: true},
- pre: {type: "string", required: false},
- post: {type: "string", required: false},
- mapping: {type: "mapping", required: false},
- styling: {type: "styling", required: false}
- },
- content: {type: "string", required: true}
+ create: function( page, path ) {
+ var $p = $(page);
+ var ret_val = $('<div class="widget info" />');
+ 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.getAttribute('src');
+ var transform = this.getAttribute('transform');
+ ga_list.push( src )
+ address[ '_' + src ] = transform;
+ });
+ var actor = '<div class="actor">';
+ if( $p.attr('pre') ) actor += '<div>' + $p.attr('pre') + '</div>';
+ actor += '<div class="value">-</div>';
+ if( $p.attr('post') ) actor += '<div>' + $p.attr('post') + '</div>';
+ actor += '</div>';
+ var $actor = $(actor).data({
+ 'address' : address,
+ 'mapping' : $p.attr('mapping'),
+ 'styling' : $p.attr('styling')
+ });
+ for( var addr in address ) $actor.bind( addr, this.update );
+ ret_val.append( label ).append( $actor );
+ return ret_val;
+ },
+ update: defaultUpdate,
+ attributes: {
+ pre: {type: "string", required: false},
+ post: {type: "string", required: false},
+ mapping: {type: "mapping", required: false},
+ styling: {type: "styling", required: false}
+ },
+ content: {type: "string", required: true}
});
this.addCreator("shade", this.getCreator("info"));
@@ -529,11 +535,20 @@
return { x: 0, y: 0 }; // sanity return
}
+/**
+ * temporary function till the transformation framework is implemented
+ */
+function transform( raw, type )
+{
+ return decodeDPT( raw, type.substr(4) ); // filter away the 'DPT:'
+}
function defaultUpdate( e, data, passedElement )
{
var element = passedElement || $(this);
- var value = decodeDPT( data, element.data('datatype') );
+ //var datatype = element.data().address[ e.type ];
+ //var value = decodeDPT( data, element.data('datatype') );
+ var value = transform( data, element.data().address[ e.type ] );
element.data( 'value', value );
element.find('.value').text( map( value, element ) );
Added: CometVisu/trunk/visu/visu_config_neu.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_neu.xml (rev 0)
+++ CometVisu/trunk/visu/visu_config_neu.xml 2010-12-12 15:06:00 UTC (rev 207)
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<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="OpenClose">
+ <entry value="0">zu</entry>
+ <entry value="1">offen</entry>
+ </mapping>
+ <mapping name="OnOff">
+ <entry value="0">Aus</entry>
+ <entry value="1">An</entry>
+ </mapping>
+ <mapping name="Sign">
+ <entry range_min="-1e99" range_max="0">Negativ</entry>
+ <entry value="0">Null</entry>
+ <entry range_min="0" range_max="1e99">Positiv</entry>
+ </mapping>
+ </mappings>
+ <stylings>
+ <styling name="RedGreen">
+ <entry value="0">red</entry>
+ <entry value="1">green</entry>
+ </styling>
+ <styling name="GreenRed">
+ <entry value="0">green</entry>
+ <entry value="1">red</entry>
+ </styling>
+ <styling name="BluePurpleRed">
+ <entry range_min="-100" range_max="0">blue</entry>
+ <entry value="0">purple</entry>
+ <entry range_min="0" range_max="100">red</entry>
+ </styling>
+ </stylings>
+ <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=neu">Reload</a>
+ - <a href=".">Default Config</a>
+ ]]></status>
+ <status type="html" condition="!edit"><![CDATA[
+ - <a href="edit_config.html">Edit</a>
+ ]]></status>
+ <status type="html" condition="edit"><![CDATA[
+ - <a href=".">normal Mode</a>
+ ]]></status>
+ <status type="html"><![CDATA[
+ - <a href="check_config.php">Check Config</a>
+ ]]></status>
+ </statusbar>
+ </meta>
+ <page name="Übersicht">
+ <text align="center">CometVisu format neu</text>
+ <info styling="BluePurpleRed">
+ <label>Slide Info</label>
+ <address src="12/4/250" transform="DPT:9" />
+ <address src="12/4/251" transform="DPT:9.001" />
+ </info>
+ <line />
+ <designtoggle>Change design</designtoggle>
+ </page>
+</pages>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2010-12-12 21:34:01
|
Revision: 215
http://openautomation.svn.sourceforge.net/openautomation/?rev=215&view=rev
Author: mayerch
Date: 2010-12-12 21:33:55 +0000 (Sun, 12 Dec 2010)
Log Message:
-----------
Transformed colorChooser
Modified Paths:
--------------
CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js
CometVisu/trunk/visu/visu_config_neu.xml
Modified: CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js 2010-12-12 20:22:10 UTC (rev 214)
+++ CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js 2010-12-12 21:33:55 UTC (rev 215)
@@ -21,77 +21,109 @@
* to demonstrate all available
*/
VisuDesign_Custom.prototype.addCreator("colorchooser", {
- create: function( page, path ) {
- var ret_val = $('<div class="widget" />');
- ret_val.addClass( 'colorChooser' );
- var label = '<div class="label">' + page.textContent + '</div>';
- var actor = '<div class="actor">';
- actor += '</div>';
- var a_r = $(page).attr('address_r'); ga_list.push( a_r );
- var a_g = $(page).attr('address_g'); ga_list.push( a_g );
- var a_b = $(page).attr('address_b'); ga_list.push( a_b );
- var datatype = $(page).attr('datatype');
- ret_val.append(label)
- .append($(actor)
- .data({
- //'mapping' : $(page).attr('mapping'),
- //'styling' : $(page).attr('styling'),
- 'datatype': datatype, //jQuery(page).attr('datatype'), // use jQuery as '$' dosn't work here?!?
- 'value_r' : 0,
- 'value_g' : 0,
- 'value_b' : 0,
- 'type' : 'colorChooser'
- })
- .farbtastic( function(color){
- var r = parseInt(color.substring(1, 3), 16) * 100 / 255;
- var g = parseInt(color.substring(3, 5), 16) * 100 / 255;
- var b = parseInt(color.substring(5, 7), 16) * 100 / 255;
- visu.write( a_r, r, datatype );
- visu.write( a_g, g, datatype );
- visu.write( a_b, b, datatype );
- })
- .bind('_'+$(page).attr('address_r'), this.update_r )
- .bind('_'+$(page).attr('address_g'), this.update_g )
- .bind('_'+$(page).attr('address_b'), this.update_b ) );
- return ret_val;
- },
- update_r: function(e,d) {
- var element = $(this);
- var value = decodeDPT( d, element.data('datatype') );
- element.data( 'value_r', value );
- function toHex( x ) { var r = parseInt( x ).toString(16); return r.length == 1 ? '0'+r : r; }
- var color = toHex( element.data( 'value_r' )*255/100 )
- + toHex( element.data( 'value_g' )*255/100 )
- + toHex( element.data( 'value_b' )*255/100 );
- jQuery.farbtastic( element ).setColor( '#' + color );
- },
- update_g: function(e,d) {
- var element = $(this);
- var value = decodeDPT( d, element.data('datatype') );
- element.data( 'value_g', value );
- function toHex( x ) { var r = parseInt( x ).toString(16); return r.length == 1 ? '0'+r : r; }
- var color = toHex( element.data( 'value_r' )*255/100 )
- + toHex( element.data( 'value_g' )*255/100 )
- + toHex( element.data( 'value_b' )*255/100 );
- jQuery.farbtastic( element ).setColor( '#' + color );
- },
- update_b: function(e,d) {
- var element = $(this);
- var value = decodeDPT( d, element.data('datatype') );
- element.data( 'value_b', value );
- function toHex( x ) { var r = parseInt( x ).toString(16); return r.length == 1 ? '0'+r : r; }
- var color = toHex( element.data( 'value_r' )*255/100 )
- + toHex( element.data( 'value_g' )*255/100 )
- + toHex( element.data( 'value_b' )*255/100 );
- jQuery.farbtastic( element ).setColor( '#' + color );
- },
- attributes: {
- address_r: {type: "address", required: true},
- address_g: {type: "address", required: true},
- address_b: {type: "address", required: true},
- datatype: {type: "datatype", required: true},
- },
- content: {type: "string", required: true}
+ create: function( page, path ) {
+ var $p = $(page);
+ var ret_val = $('<div class="widget" />');
+ ret_val.addClass( 'colorChooser' );
+
+ 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.getAttribute('src');
+ var transform = this.getAttribute('transform');
+ var color = this.getAttribute('color' );
+ var readonly = this.getAttribute('readonly' );
+ ga_list.push( src )
+ address[ '_' + src ] = [ transform, color, readonly=='true' ];
+ });
+
+ var actor = '<div class="actor">';
+ actor += '</div>';
+ var datatype = $(page).attr('datatype');
+ var $actor = $(actor)
+ .data({
+ 'address' : address,
+ 'value_r' : 0,
+ 'value_g' : 0,
+ 'value_b' : 0,
+ 'type' : 'colorChooser'
+ })
+ .farbtastic( function(color){
+ var r = parseInt(color.substring(1, 3), 16) * 100 / 255;
+ var g = parseInt(color.substring(3, 5), 16) * 100 / 255;
+ var b = parseInt(color.substring(5, 7), 16) * 100 / 255;
+ for( var addr in address )
+ {
+ if( address[addr][2] == true ) continue; // skip read only
+ switch( address[addr][1] )
+ {
+ case 'r':
+ visu.write( addr.substr(1), r, address[addr][0].substr(4) );
+ break;
+ case 'g':
+ visu.write( addr.substr(1), g, address[addr][0].substr(4) );
+ break;
+ case 'b':
+ visu.write( addr.substr(1), b, address[addr][0].substr(4) );
+ break;
+ }
+ }
+ });
+ for( var addr in address ) {
+ switch( address[addr][1] ) {
+ case 'r':
+ $actor.bind( addr, this.update_r );
+ break;
+ case 'g':
+ $actor.bind( addr, this.update_g );
+ break;
+ case 'b':
+ $actor.bind( addr, this.update_b );
+ break;
+ }
+ }
+
+ ret_val.append(label).append( $actor );
+ return ret_val;
+ },
+ update_r: function( e, data ) {
+ var element = $(this);
+ var value = transform( data, element.data().address[ e.type ][0] );
+ element.data( 'value_r', value );
+ function toHex( x ) { var r = parseInt( x ).toString(16); return r.length == 1 ? '0'+r : r; }
+ var color = toHex( element.data( 'value_r' )*255/100 )
+ + toHex( element.data( 'value_g' )*255/100 )
+ + toHex( element.data( 'value_b' )*255/100 );
+ jQuery.farbtastic( element ).setColor( '#' + color );
+ },
+ update_g: function( e, data ) {
+ var element = $(this);
+ var value = transform( data, element.data().address[ e.type ][0] );
+ element.data( 'value_g', value );
+ function toHex( x ) { var r = parseInt( x ).toString(16); return r.length == 1 ? '0'+r : r; }
+ var color = toHex( element.data( 'value_r' )*255/100 )
+ + toHex( element.data( 'value_g' )*255/100 )
+ + toHex( element.data( 'value_b' )*255/100 );
+ jQuery.farbtastic( element ).setColor( '#' + color );
+ },
+ update_b: function( e, data ) {
+ var element = $(this);
+ var value = transform( data, element.data().address[ e.type ][0] );
+ element.data( 'value_b', value );
+ function toHex( x ) { var r = parseInt( x ).toString(16); return r.length == 1 ? '0'+r : r; }
+ var color = toHex( element.data( 'value_r' )*255/100 )
+ + toHex( element.data( 'value_g' )*255/100 )
+ + toHex( element.data( 'value_b' )*255/100 );
+ jQuery.farbtastic( element ).setColor( '#' + color );
+ },
+ attributes: {
+ address_r: { type: 'address' , required: true },
+ address_g: { type: 'address' , required: true },
+ address_b: { type: 'address' , required: true },
+ datatype: { type: 'datatype', required: true },
+ },
+ content: { type: 'string', required: true }
});
/**
Modified: CometVisu/trunk/visu/visu_config_neu.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_neu.xml 2010-12-12 20:22:10 UTC (rev 214)
+++ CometVisu/trunk/visu/visu_config_neu.xml 2010-12-12 21:33:55 UTC (rev 215)
@@ -2,8 +2,8 @@
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" design="pure" xsi:noNamespaceSchemaLocation="visu_config.xsd">
<meta>
<plugins>
+ <plugin name="colorchooser"/>
<!--
- <plugin name="colorchooser"/>
<plugin name="diagram"/>
-->
</plugins>
@@ -88,5 +88,15 @@
<page name="iframe Test">
<iframe src="http://www.cometvisu.org" width="500px" height="500px"/>
</page>
+ <colorchooser>
+ <label>A colorChooser</label>
+ <address src="1/2/59" transform="DPT:5.001" color="r" />
+ <address src="1/2/60" transform="DPT:5.001" color="g" />
+ <address src="1/2/61" transform="DPT:5.001" color="b" />
+ </colorchooser>
+ <info><label>R</label><address src="1/2/59" transform="DPT:5.001" /></info>
+ <info><label>G</label><address src="1/2/60" transform="DPT:5.001" /></info>
+ <info><label>B</label><address src="1/2/61" transform="DPT:5.001" /></info>
+ <slide><label>B</label><address src="1/2/61" transform="DPT:5.001" /></slide>
</page>
</pages>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2010-12-13 21:50:31
|
Revision: 217
http://openautomation.svn.sourceforge.net/openautomation/?rev=217&view=rev
Author: mayerch
Date: 2010-12-13 21:50:25 +0000 (Mon, 13 Dec 2010)
Log Message:
-----------
Initial commit for setting up the transform infrastructure
Added Paths:
-----------
CometVisu/trunk/visu/transforms/
CometVisu/trunk/visu/transforms/transform_default.js
CometVisu/trunk/visu/transforms/transform_knx.js
Added: CometVisu/trunk/visu/transforms/transform_default.js
===================================================================
--- CometVisu/trunk/visu/transforms/transform_default.js (rev 0)
+++ CometVisu/trunk/visu/transforms/transform_default.js 2010-12-13 21:50:25 UTC (rev 217)
@@ -0,0 +1,77 @@
+/* transform_default.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 class defines the default transforms:
+ * encode: transform JavaScript to bus value
+ * decode: transform bus to JavaScript value
+ */
+Transform = {
+ 'raw': {
+ name : 'Only the RAW value',
+ encode: function( i ){
+ return i;
+ },
+ decode: function( i ){
+ return i;
+ }
+ },
+ 'int': {
+ name : 'Cast to Int',
+ encode: function( i ){
+ return i.toString();
+ },
+ decode: function( i ){
+ return parseInt( i );
+ }
+ },
+ 'float': {
+ name : 'Cast to Float',
+ encode: function( i ){
+ return i.toString();
+ },
+ decode: function( i ){
+ return parseFloat( i );
+ }
+ }
+}
+
+/****************************************************************************
+ * All functions below are only in this, i.e. the default, file.
+ * All further transforms will only have the above data structure.
+ ***************************************************************************/
+
+function addTransform( prefix, transforms )
+{
+ for( trans in transforms )
+ {
+ if( transforms[trans].link )
+ {
+ Transform[ trans ] = transforms[ transforms[trans].link ];
+ } else {
+ Transform[ trans ] = transforms[ trans ];
+ }
+ }
+}
+
+/**
+ * The universal decoding function.
+ */
+function decode( raw, type )
+{
+ return decodeDPT( raw, type.substr(4) ); // filter away the 'DPT:'
+}
Added: CometVisu/trunk/visu/transforms/transform_knx.js
===================================================================
--- CometVisu/trunk/visu/transforms/transform_knx.js (rev 0)
+++ CometVisu/trunk/visu/transforms/transform_knx.js 2010-12-13 21:50:25 UTC (rev 217)
@@ -0,0 +1,36 @@
+/* transform_knx.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 class defines the default transforms:
+ * encode: transform JavaScript to bus value
+ * decode: transform bus to JavaScript value
+ */
+addTransform( 'DPT', {
+ '1.001': {
+ name : 'DPT_Switch',
+ encode: function( i ){
+ return i.toSting( 16 );
+ },
+ decode: function( i ){
+ return parseInt( i , 16 );
+ }
+ },
+ '1': {
+ link : '1.001'
+ }
+} );
\ 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: <ma...@us...> - 2010-12-27 23:12:35
|
Revision: 232
http://openautomation.svn.sourceforge.net/openautomation/?rev=232&view=rev
Author: mayerch
Date: 2010-12-27 23:12:29 +0000 (Mon, 27 Dec 2010)
Log Message:
-----------
Remove debug output
(And add additional sliders to debug the colorChooser)
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/visu_config_neu.xml
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2010-12-27 22:53:32 UTC (rev 231)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2010-12-27 23:12:29 UTC (rev 232)
@@ -224,7 +224,6 @@
if( data.value != ui.value )
for( var addr in data.address )
{
- console.log('change send');
if( data.address[addr][1] == true ) continue; // skip read only
//visu.write( addr.substr(1), ui.value, data.address[addr][0].substr(4) );
visu.write( addr.substr(1), Transform[data.address[addr][0]].encode( ui.value ) );
Modified: CometVisu/trunk/visu/visu_config_neu.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_neu.xml 2010-12-27 22:53:32 UTC (rev 231)
+++ CometVisu/trunk/visu/visu_config_neu.xml 2010-12-27 23:12:29 UTC (rev 232)
@@ -93,7 +93,9 @@
<address transform="DPT:5.001" color="b">1/2/61</address>
</colorchooser>
<info><label>R</label><address transform="DPT:5.001">1/2/59</address></info>
+ <slide><label>R</label><address transform="DPT:5.001">1/2/59</address></slide>
<info><label>G</label><address transform="DPT:5.001">1/2/60</address></info>
+ <slide><label>G</label><address transform="DPT:5.001">1/2/60</address></slide>
<info><label>B</label><address transform="DPT:5.001">1/2/61</address></info>
<slide><label>B</label><address transform="DPT:5.001">1/2/61</address></slide>
<diagram_popup undefined="DALI Strom L1" rrd="200_DALI_Linie_1_Strom" unit="mA" series="day" refresh="300">DALI Strom L1</diagram_popup>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-02-05 22:51:32
|
Revision: 282
http://openautomation.svn.sourceforge.net/openautomation/?rev=282&view=rev
Author: mayerch
Date: 2011-02-05 22:51:25 +0000 (Sat, 05 Feb 2011)
Log Message:
-----------
Patch by Julian Hartmann:
hacked editor to work with new config-layout
colorchooser-editor DOES NOT WORK YET
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/edit/save_config.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
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2011-02-05 22:21:56 UTC (rev 281)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-02-05 22:51:25 UTC (rev 282)
@@ -71,6 +71,8 @@
attributes: {
name: { type: 'string', required: true }
},
+ elements: {
+ },
content: true
});
@@ -89,6 +91,8 @@
},
attributes: {
},
+ elements: {
+ },
content: false
});
@@ -105,6 +109,8 @@
attributes: {
align: { type: 'string', required: false }
},
+ elements: {
+ },
content: { type: 'string', required: true }
});
@@ -137,13 +143,17 @@
},
update: defaultUpdate,
attributes: {
- pre: { type: 'string' , required: false },
- post: { type: 'string' , required: false },
+ pre: { type: 'string', required: false },
+ post: { type: 'string', required: false },
precision: { type: 'precision', required: false },
- mapping: { type: 'mapping' , required: false },
- styling: { type: 'styling' , required: false }
+ mapping: { type: 'mapping', required: false },
+ styling: { type: 'styling', required: false }
},
- content: { type: 'string' , required: true }
+ elements: {
+ label: { type: 'string', required: true, multi: false },
+ address: { type: 'address', required: true, multi: true }
+ },
+ content: false
});
this.addCreator('slide', {
@@ -238,7 +248,11 @@
mapping: { type: 'mapping', required: false },
styling: { type: 'styling', required: false }
},
- content: { type: 'string', required: true }
+ elements: {
+ label: { type: 'string', required: true, multi: false },
+ address: { type: 'address', required: true, multi: true }
+ },
+ content: false
});
this.addCreator('switch', {
@@ -290,7 +304,11 @@
mapping: { type: 'mapping' , required: false },
styling: { type: 'styling' , required: false }
},
- content: { type: 'string', required: true }
+ elements: {
+ label: { type: 'string', required: true, multi: false },
+ address: { type: 'address', required: true, multi: true }
+ },
+ content: false
});
this.addCreator('trigger', {
@@ -336,15 +354,17 @@
}
},
attributes: {
- address: { type: 'address' , required: true },
- datatype: { type: 'datatype', required: true },
value: { type: 'string' , required: true },
pre: { type: 'string' , required: false },
post: { type: 'string' , required: false },
mapping: { type: 'mapping' , required: false },
styling: { type: 'styling' , required: false }
},
- content: { type: 'string' , required: true }
+ elements: {
+ label: { type: 'string', required: true, multi: false },
+ address: { type: 'address', required: true, multi: true }
+ },
+ content: false
});
this.addCreator('image', {
@@ -370,7 +390,10 @@
height: { type: 'string' , required: false },
refresh: { type: 'numeric', required: false }
},
- content: { type: 'string', required: false }
+ elements: {
+ label: { type: 'string', required: false, multi: false }
+ },
+ content: false
});
this.addCreator('video', {
@@ -396,7 +419,10 @@
height: { type: 'string' , required: false },
refresh: { type: 'numeric', required: false }
},
- content: { type: 'string', required: true }
+ elements: {
+ label: { type: 'string', required: false, multi: false }
+ },
+ content: false
});
this.addCreator('iframe', {
@@ -418,7 +444,10 @@
width: { type: 'string', required: false },
height: { type: 'string', required: false }
},
- content: { type: 'string', required: false }
+ elements: {
+ label: { type: 'string', required: false, multi: false }
+ },
+ content: false
});
this.addCreator('unknown', {
Modified: CometVisu/trunk/visu/edit/save_config.php
===================================================================
--- CometVisu/trunk/visu/edit/save_config.php 2011-02-05 22:21:56 UTC (rev 281)
+++ CometVisu/trunk/visu/edit/save_config.php 2011-02-05 22:51:25 UTC (rev 282)
@@ -1,4 +1,9 @@
<?php
+//// Report all PHP errors
+//// debugging:
+//error_reporting(-1);
+//header("content-type: text/plain");
+
define("CONFIG_FILENAME", "../visu_config%s.xml");
define("CONFIG_BASE_XML", "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><pages />");
define("CONFIG_PAGE_XML", "<page />");
@@ -58,6 +63,8 @@
$handle = fopen($strConfig, "w");
fputs($handle, $objXML->saveXML());
fclose($handle);
+// debugging:
+//print $objXML->saveXML();
echo 1;
exit;
@@ -73,13 +80,11 @@
*/
function createDOMFromJSON($objJSON) {
- global $objDOM;
-
if (false === isset($objJSON->_type) || "page" != $objJSON->_type) {
throw new Exception("Malformed config received!");
}
- $objXML = $objDOM->createElement("page");
+ $objXML = $GLOBALS['objDOM']->createElement("page");
if (false === empty($objJSON->name)) {
// den Namen der Seite festlegen
@@ -90,12 +95,20 @@
return $objXML;
}
- foreach ($objJSON->_elements as $objElement) {
- if ("page" == $objElement->_type) {
- $objXML->appendChild(createDOMFromJSON($objElement));
- } else {
- $objXML->appendChild(createChildFromJSON($objElement));
+ foreach ($objJSON->_elements as $strKey => $arrElements) {
+ // create an array - sometimes we have one, sometimes not
+ // so just make sure we have one every single time
+ if (false === is_array($arrElements)) {
+ $arrElements = array($arrElements);
}
+
+ foreach ($arrElements as $objElement) {
+ if ("page" == $objElement->_type) {
+ $objXML->appendChild(createDOMFromJSON($objElement));
+ } else {
+ $objXML->appendChild(createChildFromJSON($objElement));
+ }
+ }
}
return $objXML;
@@ -108,31 +121,60 @@
* @param object $obj Ein Objekt das aus dem JSON gewonnen wurde
* @returns object DOM-Objekt
*/
-function createChildFromJSON($objJSON) {
- global $objDOM;
+function createChildFromJSON($objJSON, $debug = false) {
if (true === empty($objJSON->_type)) {
return null;
}
- $objXML = $objDOM->createElement($objJSON->_type);
+ $objXML = $GLOBALS['objDOM']->createElement($objJSON->_type);
if (false === empty($objJSON->_text)) {
$objXML->nodeValue = $objJSON->_text;
}
+
+ if (false === empty($objJSON->_attributes)) {
+ // some attributes are in a sub-element - it's easier to get them out of there
+ // into our main namespace
+ foreach ($objJSON->_attributes as $strKey => $strValue) {
+ $objJSON->$strKey = $strValue;
+ }
+ }
- foreach ($objJSON as $strAttribute => $strValue) {
+
+
+ foreach ($objJSON as $strAttribute => $mixValue) {
if (0 === strpos($strAttribute, "_")) {
// Parameter die mit "_" beginnen sind special purpose
continue;
}
if ($strAttribute === "textContent") {
- $objXML->nodeValue = $strValue;
+ $objXML->nodeValue = $mixValue;
continue;
}
- $objXML->setAttribute($strAttribute, $strValue);
+ $objXML->setAttribute($strAttribute, $mixValue);
}
+
+ // elements AFTER attributes, as they might be overwritten by nodeValue!
+ if (false === empty($objJSON->_elements)) {
+ // sub-elements - we needs thems
+ $arrElements = array();
+ foreach ($objJSON->_elements as $arrSubElements) {
+ foreach ($arrSubElements as $objSubElement) {
+ $arrChildren[] = createChildFromJSON($objSubElement);
+ }
+ }
+
+ if (false === empty($arrChildren)) {
+ // unset the node-value - we have either text OR sub-nodes
+ $objXML->nodeValue = "";
+ foreach ($arrChildren as $objChildNode) {
+ $objXML->appendChild($objChildNode);
+ }
+ }
+ }
+
return $objXML;
}
Modified: CometVisu/trunk/visu/edit/style_edit.css
===================================================================
--- CometVisu/trunk/visu/edit/style_edit.css 2011-02-05 22:21:56 UTC (rev 281)
+++ CometVisu/trunk/visu/edit/style_edit.css 2011-02-05 22:51:25 UTC (rev 282)
@@ -74,14 +74,75 @@
background-color: grey;
display: none;
position: absolute;
- width: 48%;
+ width: 97%;
margin: auto;
top: 2em;
- left: 2em;
+ left: .5em;
padding: .5em;
- z-index: 2;
+ z-index: 4;
}
+#addMaster .multi_element {
+ width: 90%;
+ height: 8em;
+ overflow: auto;
+ border: 1px solid #444;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+ padding: 2px;
+}
+
+#addMaster fieldset {
+ border: none;
+ padding: 0;
+ margin: 0;
+}
+
+.multi_element .element {
+ min-height: 2em;
+ border: 1px solid #5A5A5A;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+ margin-bottom: 2px;
+ cursor: pointer;
+}
+
+.input .add_element {
+ cursor: pointer;
+}
+
+.element .edit {
+ clear: both;
+}
+
+.element .title {
+ font-weight: bold;
+ height: 1em;
+}
+
+.element .value, .element .transform, .element .readonly {
+ font-weight: normal;
+ height: 1em;
+ font-size: small;
+}
+
+.element .value, .element .readonly {
+ float: left;
+}
+
+.element .transform {
+ float: right;
+}
+
+.element .readonly {
+ margin-left: .4em;
+}
+
+.multi_element .element .edit {
+}
+
.addwidget .editcontrols label {
float: left;
width: 180px;
@@ -92,6 +153,17 @@
padding-left: 200px;
}
+.addwidget .editcontrols .multi_element label {
+ float: left;
+ width: 100px;
+ font-size: smaller;
+}
+
+
+.addwidget .editcontrols .multi_element .input {
+ padding-left: 120px;
+}
+
div.line {
width: 97%;
}
@@ -99,3 +171,7 @@
div.line hr {
margin-top: .9em;
}
+
+#addMaster button {
+ margin: .4em;
+}
\ No newline at end of file
Modified: CometVisu/trunk/visu/edit/visuconfig_edit.js
===================================================================
--- CometVisu/trunk/visu/edit/visuconfig_edit.js 2011-02-05 22:21:56 UTC (rev 281)
+++ CometVisu/trunk/visu/edit/visuconfig_edit.js 2011-02-05 22:51:25 UTC (rev 282)
@@ -146,6 +146,152 @@
$("#addMaster").triggerHandler("show");
});
+
+ jQuery(".multi_element .element").live("click", function() {
+ $this = jQuery(this);
+ if ($this.is(".inedit")) {
+ // edit-Feld schon vorhanden, leave it alone
+ return;
+ }
+ $this.addClass("inedit");
+ $edit = jQuery("<div class=\"clearfix edit\" />");
+ $this.append($edit);
+
+ $this.find(".editable").hide().each(function(index, e) {
+ $e = jQuery(e);
+
+ if ($this.closest(".multi_element").hasClass("address")) {
+ // we're editing addresses
+ var element = $("<div />").addClass("add_input").addClass("attribute")
+ .append($("<label />").attr("for", "add_" + index).html(index))
+ .append($("<div class=\"input\" />"));
+ var myElement = element.find("div.input");
+
+ if ($e.hasClass("value")) {
+ element.find("label").html("address");
+ // we will provide an input-field AND a select-list.
+ myElement.append($("<input class=\"add_address\" />"));
+ if (typeof $e.text() != "undefined") {
+ // pre-set the value
+ myElement.find(":input").val($e.text());
+ }
+
+ if (typeof addressesCache != undefined && addressesCache != false) {
+ var input = myElement.find("input");
+ input.attr("disabled", "disabled");
+ myElement.append($("<input type=\"checkbox\" name=\"enable_address\" checked=\"checked\" />")
+ .change(function() {
+ if ($(this).attr("checked")) {
+ input.attr("disabled", "disabled");
+ myElement.find("select").show();
+ } else {
+ input.removeAttr("disabled");
+ myElement.find("select").hide();
+ }
+ })
+ );
+ myElement.append($("<br />"));
+ myElement.append($("<select class=\"add_address\" />")
+ .append($("<option />").attr("value", "").html("-")));
+
+ myElement.find("select:first").append(getAddressesObject());
+
+ myElement.find("select").bind("change", function() {
+ // on changing the address, the coresponding datatype-field is
+ // automagically set
+ $dptField = $(this).closest(".edit").find(".add_transform:input");
+ var dpt = $(this).find("option:selected").attr("class").replace(/[^dpt_\d+\.\d+]*/, "").replace(/^dpt_/, "");
+ if ($dptField.is("input")) {
+ $dptField.val(dpt);
+ } else if ($dptField.is("select")) {
+ $dptField.find("option[value=" + dpt + "]").attr("selected", "selected");
+ }
+ });
+
+ if (typeof $e.text() != "undefined") {
+ myElement.find("option[value=" + $e.text() + "]").attr("selected", "selected");
+ }
+
+ }
+ }
+ if ($e.hasClass("transform")) {
+ element.find("label").html("transform");
+ if (typeof dptCache == undefined || dptCache == false) {
+ // appearantly we were unable to load the list of datatypes from the server
+ // we will provide an input-field instead
+ myElement.append($("<input class=\"add_transform\" />"));
+ if (typeof $e.val() != "undefined") {
+ // pre-set the value
+ myElement.find(":input").val($e.val());
+ }
+ } else {
+ myElement.append($("<select class=\"add_transform\" />")
+ .append($("<option />").attr("value", "").html("-")));
+
+ myElement.find("select:first").append(getDPTObject());
+
+ if (typeof $e.text() != "undefined") {
+ myElement.find("option[value=" + $e.text() + "]").attr("selected", "selected");
+ }
+
+ }
+ }
+ if ($e.hasClass("readonly")) {
+ element.find("label").html("readonly");
+ myElement.append($("<input type=\"checkbox\" name=\"add_readonly\" class=\"add_readonly\" value=\"true\" />"));
+ if (typeof $e.text() != "undefined" && $e.text() != "") {
+ myElement.find("input").attr("checked", "checked");
+ }
+ }
+
+ if (element.find("select")[0]) {
+ var select = element.find("select");
+ select.change(function() {
+ // update the input-field
+ jQuery(this).parent().find("input").val(jQuery(this).val());
+ })
+ }
+
+ element.find(":input")
+ .data("name", index)
+
+ $edit.append(element);
+ delete element;
+ }
+ });
+ $edit.append(jQuery("<div class=\"clearfix\" />")
+ .append(jQuery("<button type=\"button\" class=\"save\">save</button>").click(function() {
+ // save sub-element
+ // todo: validate
+ $this = jQuery(this);
+ $e = $this.closest(".element");
+
+ var objData = {};
+ // don't try to hide it: this is hardcoded and works for addresses only
+ objData.type = "address";
+ objData.textContent = $e.find("input.add_address").val();
+ objData._attributes = {};
+ objData._attributes.transform = $e.find(".add_transform").val();
+ objData._attributes.readonly = $e.find(".add_readonly:checked").val();
+
+ // remove this item and insert a new one instead
+ var elementDiv = createAddressEditorElement(objData);
+ $this.closest(".element").replaceWith(elementDiv);
+
+ }))
+ .append(jQuery("<button type=\"button\" class=\"cancel\">cancel</button>").click(function() {
+ // cancel edit of sub-element and return to previous values
+ $this = jQuery(this);
+ $this.closest(".element").removeClass("inedit").find(".editable").show();
+ $this.closest("div.edit").remove();
+ }))
+ .append(jQuery("<button type=\"button\" class=\"remove\">remove</button>").click(function() {
+ // remove this sub-element
+ $this = jQuery(this);
+ $this.closest(".element").remove();
+ }))
+ );
+ });
});
@@ -189,17 +335,19 @@
// we need to change the input-field accordingly to match
// what attributes we need
var val = jQuery(this).val();
+
+ // get all the info we need to edit this piece of work
var creator = design.getCreator(val);
- var attributes = creator.attributes;
- if (typeof attributes == "undefined") {
- alert("there's something wrong with the cable");
- return;
- }
+ 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() != "") {
@@ -210,6 +358,8 @@
}
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")
@@ -227,138 +377,148 @@
delete element;
}
- $.each(attributes, function (index, e) {
- var element = $("<div />").addClass("add_input").addClass("attribute")
- .append($("<label />").attr("for", "add_" + index).html(index))
- .append($("<div class=\"input\" />"));
- var myElement = element.find("div.input");
+ 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":
- // appearantly we were unable to load the list of addresses from the server
- // we will provide an input-field instead
- myElement.append($("<input id=\"add_" + index + "\" />"));
- if (typeof values[index] != "undefined") {
- // pre-set the value
- myElement.find(":input").val(values[index]);
- }
+ 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\" />"));
- if (typeof addressesCache != undefined && addressesCache != false) {
- var input = myElement.find("input");
- input.attr("disabled", "disabled");
- myElement.append($("<input type=\"checkbox\" name=\"enable_" + e.type + "\" checked=\"checked\" />")
- .change(function() {
- if ($(this).attr("checked")) {
- input.attr("disabled", "disabled");
- myElement.find("select").show();
- } else {
- input.removeAttr("disabled");
- myElement.find("select").hide();
- }
- })
- );
- myElement.append($("<br />"));
- myElement.append($("<select id=\"add_" + index + "\" />")
- .append($("<option />").attr("value", "").html("-")));
+ // 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.readonly = false;
- myElement.find("select:first").append(getAddressesObject());
-
- myElement.find("select").bind("change", function() {
- // on changing the address, the coresponding datatype-field is
- // automagically set
- var name = $(this).attr("id");
- var dptFieldName = name.replace(/_?address$/i, "_datatype");
- var dpt = $(this).find("option:selected").attr("class").replace(/[^dpt_\d+\.\d+]*/, "").replace(/^dpt_/, "");
- if ($("#addMaster #" + dptFieldName).is("input")) {
- $("#addMaster div.inputs #" + dptFieldName).val(dpt);
- } else if ($("#addMaster #" + dptFieldName).is("select")) {
- $("#addMaster #" + dptFieldName).find("option[value=" + dpt + "]").attr("selected", "selected");
- }
+ var elementDiv = createAddressEditorElement(objData);
+ $input.find("div.multi_element").append(elementDiv);
});
- if (typeof values[index] != "undefined") {
- myElement.find("option[value=" + values[index] + "]").attr("selected", "selected");
+ if (typeof values._elements != "undefined"
+ && typeof values._elements[index] != "undefined") {
+ $.each(values._elements[index], function(i, e) {
+ var elementDiv = 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 + "\" />"));
- }
- break;
- case "datatype":
- if (typeof dptCache == undefined || dptCache == false) {
- // appearantly we were unable to load the list of datatypes from the server
- // we will provide an input-field instead
- myElement.append($("<input id=\"add_" + index + "\" />"));
- if (typeof values[index] != "undefined") {
- // pre-set the value
- myElement.find(":input").val(values[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 :)
}
- } else {
- myElement.append($("<select id=\"add_" + index + "\" />")
+ 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));
+ });
- ...
[truncated message content] |
|
From: <net...@us...> - 2011-02-11 21:59:04
|
Revision: 290
http://openautomation.svn.sourceforge.net/openautomation/?rev=290&view=rev
Author: netzkind
Date: 2011-02-11 21:58:58 +0000 (Fri, 11 Feb 2011)
Log Message:
-----------
added attribute "type" for addresses
Modified Paths:
--------------
CometVisu/trunk/visu/edit/style_edit.css
CometVisu/trunk/visu/edit/visuconfig_edit.js
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/edit/style_edit.css
===================================================================
--- CometVisu/trunk/visu/edit/style_edit.css 2011-02-06 18:53:51 UTC (rev 289)
+++ CometVisu/trunk/visu/edit/style_edit.css 2011-02-11 21:58:58 UTC (rev 290)
@@ -84,7 +84,7 @@
#addMaster .multi_element {
width: 90%;
- height: 8em;
+ height: 10em;
overflow: auto;
border: 1px solid #444;
-moz-border-radius: 3px;
@@ -122,7 +122,7 @@
height: 1em;
}
-.element .value, .element .transform, .element .readonly {
+.element .value, .element .transform, .element .readonly, .element .addresstype {
font-weight: normal;
height: 1em;
font-size: small;
@@ -138,8 +138,25 @@
.element .readonly {
margin-left: .4em;
+ font-style: italic;
}
+.element .addresstype {
+ float: left;
+ margin-left: .4em;
+ font-weight: bold;
+}
+
+.element .addresstype:before {
+ content: "(";
+}
+
+.element .addresstype:after {
+ content: ")";
+}
+
+
+
.multi_element .element .edit {
}
Modified: CometVisu/trunk/visu/edit/visuconfig_edit.js
===================================================================
--- CometVisu/trunk/visu/edit/visuconfig_edit.js 2011-02-06 18:53:51 UTC (rev 289)
+++ CometVisu/trunk/visu/edit/visuconfig_edit.js 2011-02-11 21:58:58 UTC (rev 290)
@@ -244,6 +244,16 @@
}
}
+ if ($e.hasClass("addresstype")) {
+ element.find("label").html("addresstype");
+ myElement.append($("<input class=\"add_addresstype\" />"));
+ if (typeof $e.text() != "undefined") {
+ // pre-set the value
+ myElement.find(":input").val($e.text());
+ }
+
+ }
+
if (element.find("select")[0]) {
var select = element.find("select");
select.change(function() {
@@ -272,6 +282,7 @@
objData.textContent = $e.find("input.add_address").val();
objData._attributes = {};
objData._attributes.transform = $e.find(".add_transform").val();
+ objData._attributes.type = $e.find(".add_addresstype").val();
objData._attributes.readonly = $e.find(".add_readonly:checked").val();
// remove this item and insert a new one instead
@@ -401,6 +412,7 @@
objData.textContent = "";
objData._attributes = {};
objData._attributes.transform = "";
+ objData._attributes.type = "";
objData._attributes.readonly = false;
var elementDiv = createAddressEditorElement(objData);
@@ -578,6 +590,7 @@
$elements.each(function (index, e) {
$address = $("<address />")
.attr("transform", $(e).data("transform"))
+ .attr("addresstype", $(e).data("addresstype"))
.attr("readonly", $(e).data("readonly") == true ? "true" : "false")
.append($(e).data("address"));
dataObject.append($address);
@@ -730,6 +743,7 @@
myElement._attributes.transform = jQuery(element).attr("transform");
myElement._attributes.readonly = jQuery(element).attr("readonly");
+ myElement._attributes.type = jQuery(element).attr("type") || "";
break;
default:
// mostly labels
@@ -884,15 +898,22 @@
elementDiv.append("<div class=\"title\" />")
.append("<div class=\"value editable\" />")
.append("<div class=\"transform editable\" />")
+ .append("<div class=\"addresstype editable\" />")
.append("<div class=\"readonly editable\" />");
//myDiv.find(".title").append();
var t = getAddressesObject();
elementDiv.find(".title").append(t.find("option[value=" + element.textContent + "]").text());
elementDiv.find(".value").append(element.textContent);
elementDiv.find(".transform").append(element._attributes.transform);
+ if (element._attributes.type != "undefined" && element._attributes.type != "") {
+ elementDiv.find(".addresstype").append(element._attributes.type).show();
+ } else {
+ elementDiv.find(".addresstype").hide();
+ }
elementDiv.find(".readonly").append(element._attributes.readonly == "true" ? "readonly" : "")
elementDiv.data("transform", element._attributes.transform)
+ .data("addresstype", element._attributes.type)
.data("readonly", element._attributes.readonly == "true" ? true : false)
.data("address", element.textContent);
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2011-02-06 18:53:51 UTC (rev 289)
+++ CometVisu/trunk/visu/lib/templateengine.js 2011-02-11 21:58:58 UTC (rev 290)
@@ -115,11 +115,10 @@
$( 'head' ).append( '<style type="text/css">.page{width:' + (width-0) + 'px;}</style>' );
// do nothing
} else {
- var width = $( window ).width();
- var height = $( window ).height() - $( '#top' ).outerHeight(true) - $( '#bottom' ).outerHeight(true) - 2;
- $( '#main' ).css( 'width', width ).css( 'height', height );
- $( 'head' ).append( '<style type="text/css">.page{width:' + (width-0) + 'px;height:' + height + 'px;}</style>' );
-
+ var width = $( window ).width();
+ var height = $( window ).height() - $( '#top' ).outerHeight(true) - $( '#bottom' ).outerHeight(true) - 2;
+ $( '#main' ).css( 'width', width ).css( 'height', height );
+ $( 'head' ).append( '<style type="text/css">.page{width:' + (width-0) + 'px;height:' + height + 'px;}</style>' );
}
main_scroll != undefined && main_scroll.seekTo( main_scroll.getIndex(), 0 ); // fix scroll
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-02-20 14:29:52
|
Revision: 298
http://openautomation.svn.sourceforge.net/openautomation/?rev=298&view=rev
Author: mayerch
Date: 2011-02-20 14:29:46 +0000 (Sun, 20 Feb 2011)
Log Message:
-----------
New Feature: Multitrigger widget, e.g. usefull for selecting scenes
(And tidied up the widget demo configuration)
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-02-20 12:53:15 UTC (rev 297)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-02-20 14:29:46 UTC (rev 298)
@@ -311,6 +311,117 @@
content: false
});
+ this.addCreator('multitrigger', {
+ create: function( page, path ) {
+ var $p = $(page);
+ var ret_val = $('<div class="widget switch" />');
+ 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' ];
+ });
+ ret_val.append( label );
+ if( $p.attr('button1label') )
+ {
+ var actor = '<div class="actor switchUnpressed">';
+ actor += '<div class="value">' + $p.attr('button1label') + '</div>';
+ actor += '</div>';
+ var $actor = $(actor).data( {
+ 'address' : address,
+ 'mapping' : $p.attr('mapping'),
+ 'styling' : $p.attr('styling'),
+ 'value' : $p.attr('button1value'),
+ 'type' : 'switch'
+ } ).bind( 'click', this.action );
+ ret_val.append( $actor );
+ }
+ if( $p.attr('button2label') )
+ {
+ var actor = '<div class="actor switchUnpressed">';
+ actor += '<div class="value">' + $p.attr('button2label') + '</div>';
+ actor += '</div>';
+ var $actor = $(actor).data( {
+ 'address' : address,
+ 'mapping' : $p.attr('mapping'),
+ 'styling' : $p.attr('styling'),
+ 'value' : $p.attr('button2value'),
+ 'type' : 'switch'
+ } ).bind( 'click', this.action );
+ ret_val.append( $actor );
+ }
+ if( $p.attr('button3label') )
+ {
+ var actor = '<div class="actor switchUnpressed">';
+ actor += '<div class="value">' + $p.attr('button3label') + '</div>';
+ actor += '</div>';
+ var $actor = $(actor).data( {
+ 'address' : address,
+ 'mapping' : $p.attr('mapping'),
+ 'styling' : $p.attr('styling'),
+ 'value' : $p.attr('button3value'),
+ 'type' : 'switch'
+ } ).bind( 'click', this.action );
+ ret_val.append( $actor );
+ }
+ if( $p.attr('button4label') )
+ {
+ var actor = '<div class="actor switchUnpressed">';
+ actor += '<div class="value">' + $p.attr('button4label') + '</div>';
+ actor += '</div>';
+ var $actor = $(actor).data( {
+ 'address' : address,
+ 'mapping' : $p.attr('mapping'),
+ 'styling' : $p.attr('styling'),
+ 'value' : $p.attr('button4value'),
+ 'type' : 'switch'
+ } ).bind( 'click', this.action );
+ ret_val.append( $actor );
+ }
+ //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.removeClass( value == 0 ? 'switchPressed' : 'switchUnpressed' );
+ element.addClass( value == 0 ? 'switchUnpressed' : 'switchPressed' );
+ },
+ action: function() {
+ var data = $(this).data();
+ for( var addr in data.address )
+ {
+ if( data.address[addr][1] == true ) continue; // skip read only
+ var a = visu.write;
+ var b = addr.substr(1);
+ var c = Transform[data.address[addr][0]].encode( data.value );
+ visu.write( addr.substr(1), Transform[data.address[addr][0]].encode( data.value ) );
+ }
+ },
+ attributes: {
+ button1label: { type: 'string' , required: false },
+ button1value: { type: 'string' , required: false },
+ button2label: { type: 'string' , required: false },
+ button2value: { type: 'string' , required: false },
+ button3label: { type: 'string' , required: false },
+ button3value: { type: 'string' , required: false },
+ button4label: { type: 'string' , required: false },
+ button4value: { type: 'string' , required: false },
+ mapping: { type: 'mapping' , required: false },
+ styling: { type: 'styling' , required: false }
+ },
+ elements: {
+ label: { type: 'string', required: false, multi: false },
+ address: { type: 'address', required: true, multi: true }
+ },
+ content: false
+ });
+
this.addCreator('trigger', {
create: function( page, path ) {
var $p = $(page);
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2011-02-20 12:53:15 UTC (rev 297)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2011-02-20 14:29:46 UTC (rev 298)
@@ -53,31 +53,35 @@
</statusbar>
</meta>
<page name="Übersicht">
- <text align="center">CometVisu format neu</text>
+ <text align="center">CometVisu Widget Demo</text>
<info styling="BluePurpleRed">
<label>Slide Info</label>
- <address transform="DPT:9">12/4/250</address>
- <address transform="DPT:9.001">12/4/251</address>
+ <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>Terrase Licht</label>
- <address transform="DPT:1.001">1/0/2</address>
- <address transform="DPT:9.001" readonly="true">12/4/253</address>
+ <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">12/4/250</address>
- <address transform="DPT:9.001" readonly="true">12/4/253</address>
+ <address transform="DPT:9" type="">12/4/250</address>
+ <address transform="DPT:9.001" readonly="true" type="">12/4/253</address>
</slide>
<break/>
<trigger value="0" mapping="OnOff">
- <label>Terrase Licht 0</label>
- <address transform="DPT:1.001">1/0/2</address>
+ <label>Trigger - Terrase Licht</label>
+ <address transform="DPT:1.001" readonly="false" type="">1/0/2</address>
</trigger>
<trigger value="1" mapping="OnOff">
- <label>Terrase Licht 1</label>
- <address transform="DPT:1.001">1/0/2</address>
+ <label>Trigger - Terrase Licht</label>
+ <address transform="DPT:1.001" readonly="false" type="">1/0/2</address>
</trigger>
+ <multitrigger 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>
+ </multitrigger>
<line/>
<image src="icon/comet_128_ff8000.png" width="500px" height="46px"/>
<image src="http://www.e-zeeinternet.com/count.php?page=546016&style=default&nbdigits=9&reloads=1" refresh="10">
@@ -95,29 +99,30 @@
</colorchooser>
<info precision="4">
<label>R</label>
- <address transform="DPT:5.001">1/2/59</address>
+ <address transform="DPT:5.001" type="">1/2/59</address>
</info>
<slide>
<label>R</label>
- <address transform="DPT:5.001">1/2/59</address>
+ <address transform="DPT:5.001" type="">1/2/59</address>
</slide>
<info precision="4">
<label>G</label>
- <address transform="DPT:5.001">1/2/60</address>
+ <address transform="DPT:5.001" type="">1/2/60</address>
</info>
<slide>
<label>G</label>
- <address transform="DPT:5.001">1/2/60</address>
+ <address transform="DPT:5.001" type="">1/2/60</address>
</slide>
<info precision="4">
<label>B</label>
- <address transform="DPT:5.001">1/2/61</address>
+ <address transform="DPT:5.001" type="">1/2/61</address>
</info>
<slide>
<label>B</label>
- <address transform="DPT:5.001">1/2/61</address>
+ <address transform="DPT:5.001" type="">1/2/61</address>
</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"/>
+ <designtoggle/>
</page>
</pages>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-02-20 15:52:50
|
Revision: 300
http://openautomation.svn.sourceforge.net/openautomation/?rev=300&view=rev
Author: mayerch
Date: 2011-02-20 15:52:44 +0000 (Sun, 20 Feb 2011)
Log Message:
-----------
New Feature: Allow the page links to be aligned (e.g. centered).
Note: This feature isn't supported by the editor yet, it has to be set manually in the config file
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-02-20 14:48:44 UTC (rev 299)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-02-20 15:52:44 UTC (rev 300)
@@ -57,8 +57,11 @@
var style = ( '0' != path ) ? 'display:none' : '';
var name = $p.attr('name');
var type = $p.attr('type'); //text, 2d or 3d
+ var style = '';
+ if( $p.attr('align') ) style += 'text-align:' + $p.attr('align') + ';';
+ if( style != '' ) style = 'style="' + style + '"';
ret_val.addClass( 'link' ).addClass('pagelink');
- ret_val.append( '<a href="javascript:scrollToPage(\''+path+'\')">' + name + '</a>' );
+ ret_val.append( '<div ' + style + '><a href="javascript:scrollToPage(\''+path+'\')">' + name + '</a></div>' );
var childs = $p.children();
var container = $( '<div class="clearfix"/>' );
container.append( '<h1>' + name + '</h1>' );
@@ -69,6 +72,7 @@
return ret_val;
},
attributes: {
+ align:{ type: 'string', required: false },
name: { type: 'string', required: true }
},
elements: {
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2011-02-20 14:48:44 UTC (rev 299)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2011-02-20 15:52:44 UTC (rev 300)
@@ -88,7 +88,7 @@
<label>Update every 10 sec</label>
</image>
<designtoggle>Change design</designtoggle>
- <page name="iframe Test">
+ <page name="iframe Test" align="center" >
<iframe src="http://www.cometvisu.org" width="500px" height="500px"/>
</page>
<colorchooser>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-02-27 21:26:36
|
Revision: 310
http://openautomation.svn.sourceforge.net/openautomation/?rev=310&view=rev
Author: mayerch
Date: 2011-02-27 21:26:29 +0000 (Sun, 27 Feb 2011)
Log Message:
-----------
Clean up and unify the tranform
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2011-02-27 21:00:50 UTC (rev 309)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-02-27 21:26:29 UTC (rev 310)
@@ -207,7 +207,7 @@
},
update: function( e, data ) {
var element = $(this);
- var value = Transform[ element.data().address[ e.type ][0] ].decode( data );
+ var value = transformDecode( element.data().address[ e.type ][0], data );
if( element.data( 'value' ) != value )
{
element.data( 'value', value );
@@ -227,8 +227,8 @@
for( var addr in data.address )
{
if( data.address[addr][1] == true ) continue; // skip read only
- var dv = Transform[data.address[addr][0]].encode( asv );
- if( dv != Transform[data.address[addr][0]].encode( data.value ) )
+ var dv = transformEncode( data.address[addr][0], asv );
+ if( dv != transformEncode( data.address[addr][0], data.value ) )
visu.write( addr.substr(1), dv );
}
data.value = actor.slider('value');
@@ -245,8 +245,8 @@
for( var addr in data.address )
{
if( data.address[addr][1] == true ) continue; // skip read only
- var uv = Transform[data.address[addr][0]].encode( ui.value );
- if( uv != Transform[data.address[addr][0]].encode( data.value ) )
+ var uv = transformEncode( data.address[addr][0], ui.value );
+ if( uv != transformEncode( data.address[addr][0], data.value ) )
visu.write( addr.substr(1), uv );
}
},
@@ -304,7 +304,7 @@
for( var addr in data.address )
{
if( data.address[addr][1] == true ) continue; // skip read only
- visu.write( addr.substr(1), Transform[data.address[addr][0]].encode( data.value == 0 ) );
+ visu.write( addr.substr(1), transformEncode( data.address[addr][0], data.value == 0 ) );
}
},
attributes: {
@@ -406,10 +406,7 @@
for( var addr in data.address )
{
if( data.address[addr][1] == true ) continue; // skip read only
- var a = visu.write;
- var b = addr.substr(1);
- var c = Transform[data.address[addr][0]].encode( data.value );
- visu.write( addr.substr(1), Transform[data.address[addr][0]].encode( data.value ) );
+ visu.write( addr.substr(1), transformEncode( data.address[addr][0], data.value ) );
}
},
attributes: {
@@ -470,7 +467,7 @@
for( var addr in data.address )
{
if( data.address[addr][1] == true ) continue; // skip read only
- visu.write( addr.substr(1), Transform[data.address[addr][0]].encode( data.sendValue ) );
+ visu.write( addr.substr(1), transformEncode( data.address[addr][0], data.sendValue ) );
}
},
attributes: {
@@ -754,9 +751,7 @@
{
var element = passedElement || $(this);
var thisTransform = element.data().address[ e.type ][0];
- var value = thisTransform in Transform ?
- Transform[ element.data().address[ e.type ][0] ].decode( data ) :
- data; // fall back - no Transform defined...
+ var value = transformDecode( element.data().address[ e.type ][0], data );
if( element.data( 'precision' ) )
value = Number( value ).toPrecision( element.data( 'precision' ) );
if( element.data( 'format' ) )
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2011-02-27 21:00:50 UTC (rev 309)
+++ CometVisu/trunk/visu/lib/templateengine.js 2011-02-27 21:26:29 UTC (rev 310)
@@ -85,6 +85,20 @@
visu.stop();
});
+function transformEncode( transformation, value )
+{
+ return transformation in Transform ?
+ Transform[ transformation ].encode( value ) :
+ value;
+}
+
+function transformDecode( transformation, value )
+{
+ return transformation in Transform ?
+ Transform[ transformation ].decode( value ) :
+ value;
+}
+
function map( value, element )
{
var map = element.data('mapping');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-03-05 14:45:04
|
Revision: 313
http://openautomation.svn.sourceforge.net/openautomation/?rev=313&view=rev
Author: mayerch
Date: 2011-03-05 14:44:58 +0000 (Sat, 05 Mar 2011)
Log Message:
-----------
New Feature: automatically set the range of a slider to the possible range of it's addresses datatype.
This will e.g. set the slider range for a integer value to 0..255 instead of the default 0..100.
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/transforms/transform_knx.js
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2011-03-05 11:52:31 UTC (rev 312)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-03-05 14:44:58 UTC (rev 313)
@@ -172,16 +172,25 @@
var labelElement = $p.find('label')[0];
var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
var address = {};
+ var datatype_min = undefined;
+ var datatype_max = undefined;
$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' ];
+ if( Transform[ transform ] && Transform[ transform ].range )
+ {
+ if( !( datatype_min > Transform[ transform ].range.min ) )
+ datatype_min = Transform[ transform ].range.min;
+ if( !( datatype_max < Transform[ transform ].range.max ) )
+ datatype_max = Transform[ transform ].range.max;
+ }
});
var actor = $('<div class="actor">');
- var min = parseFloat( $p.attr('min') || 0 );
- var max = parseFloat( $p.attr('max') || 100 );
+ var min = parseFloat( $p.attr('min') || datatype_min || 0 );
+ var max = parseFloat( $p.attr('max') || datatype_max || 100 );
var step = parseFloat( $p.attr('step') || 0.5 );
var $actor = $(actor).data({
'events': $(actor).data( 'events' ),
Modified: CometVisu/trunk/visu/transforms/transform_knx.js
===================================================================
--- CometVisu/trunk/visu/transforms/transform_knx.js 2011-03-05 11:52:31 UTC (rev 312)
+++ CometVisu/trunk/visu/transforms/transform_knx.js 2011-03-05 14:44:58 UTC (rev 313)
@@ -59,6 +59,10 @@
'5.001' : {
name : 'DPT_Scaling',
unit : '%',
+ range : {
+ min: 0.0,
+ max: 100.0
+ },
encode: function( phy ){
var val = parseInt( phy * 255 / 100 ).toString( 16 );
return (val.length == 1 ? '800' : '80') + val;
@@ -70,6 +74,10 @@
'5.003' : {
name : 'DPT_Angle',
unit : '°',
+ range : {
+ min: 0.0,
+ max: 360.0
+ },
encode: function( phy ){
var val = parseInt( phy * 255 / 360 ).toString( 16 );
return (val.length == 1 ? '800' : '80') + val;
@@ -81,6 +89,10 @@
'5.004' : {
name : 'DPT_Percent_U8',
unit : '%',
+ range : {
+ min: 0.0,
+ max: 255.0
+ },
encode: function( phy ){
var val = parseInt( phy ).toString( 16 );
return (val.length == 1 ? '800' : '80') + val;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j-...@us...> - 2011-05-14 07:17:20
|
Revision: 335
http://openautomation.svn.sourceforge.net/openautomation/?rev=335&view=rev
Author: j-n-k
Date: 2011-05-14 07:17:13 +0000 (Sat, 14 May 2011)
Log Message:
-----------
Fix bug #3301566
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-05-14 06:42:23 UTC (rev 334)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-05-14 07:17:13 UTC (rev 335)
@@ -135,11 +135,7 @@
ga_list.push( src )
address[ '_' + src ] = [ this.getAttribute('transform') ];
});
- var actor = '<div class="actor">';
- if( $p.attr('pre') ) actor += '<div>' + $p.attr('pre') + '</div>';
- actor += '<div class="value">-</div>';
- if( $p.attr('post') ) actor += '<div>' + $p.attr('post') + '</div>';
- actor += '</div>';
+ var actor = '<div class="actor"><div class="value">-</div></div>';
var $actor = $(actor).data({
'address' : address,
'format' : $p.attr('format'),
@@ -152,8 +148,6 @@
},
update: defaultUpdate,
attributes: {
- pre: { type: 'string', required: false },
- post: { type: 'string', required: false },
format: { type: 'format', required: false },
mapping: { type: 'mapping', required: false },
styling: { type: 'styling', required: false }
@@ -287,11 +281,7 @@
ga_list.push( src )
address[ '_' + src ] = [ transform, readonly=='true' ];
});
- var actor = '<div class="actor switchUnpressed">';
- if( $p.attr('pre') ) actor += $p.attr('pre');
- actor += '<div class="value">-</div>';
- if( $p.attr('post') ) actor += $p.attr('post');
- actor += '</div>';
+ var actor = '<div class="actor switchUnpressed"><div class="value">-</div></div>';
var $actor = $(actor).data( {
'address' : address,
'mapping' : $p.attr('mapping'),
@@ -322,8 +312,6 @@
attributes: {
on_value: { type: 'string' , required: false },
off_value: { type: 'string' , required: false },
- pre: { type: 'string' , required: false },
- post: { type: 'string' , required: false },
mapping: { type: 'mapping' , required: false },
styling: { type: 'styling' , required: false }
},
@@ -465,13 +453,11 @@
address[ '_' + src ] = [ transform, readonly=='true' ];
});
var actor = '<div class="actor switchUnpressed">';
- if( $p.attr('pre') ) actor += $p.attr('pre');
var map = $p.attr('mapping');
if( mappings[map] && mappings[map][value] )
actor += '<div class="value">' + mappings[map][value] + '</div>';
else
actor += '<div class="value">' + value + '</div>';
- if( $p.attr('post') ) actor += $p.attr('post');
actor += '</div>';
var $actor = $(actor).data( {
'address' : address,
@@ -493,8 +479,6 @@
},
attributes: {
value: { type: 'string' , required: true },
- pre: { type: 'string' , required: false },
- post: { type: 'string' , required: false },
mapping: { type: 'mapping' , required: false },
styling: { type: 'styling' , required: false }
},
@@ -583,7 +567,7 @@
height: { type: 'string', required: false }
},
elements: {
- label: { type: 'string', required: false, multi: false }
+ label: { type: 'string', required: false, multi: false }
},
content: false
});
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2011-05-14 06:42:23 UTC (rev 334)
+++ CometVisu/trunk/visu/visu_config.xsd 2011-05-14 07:17:13 UTC (rev 335)
@@ -213,8 +213,12 @@
</xsd:choice>
<xsd:attribute ref="styling" use="optional" />
<xsd:attribute ref="mapping" use="optional" />
- </xsd:complexType>
+ <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:complexType>
<xsd:complexType name="trigger">
<xsd:choice maxOccurs="unbounded" minOccurs="1">
@@ -224,6 +228,8 @@
<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="multitrigger">
@@ -245,7 +251,7 @@
<xsd:complexType name="slide">
<xsd:choice maxOccurs="unbounded" minOccurs="1">
- <xsd:element name="label" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="label" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="address" type="address" minOccurs="1" />
</xsd:choice>
<xsd:attribute ref="min" />
@@ -256,15 +262,15 @@
</xsd:complexType>
<xsd:complexType name="info">
- <xsd:choice maxOccurs="unbounded" minOccurs="0">
- <xsd:element name="label" type="xsd:string" />
- <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" />
+ <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="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" />
</xsd:complexType>
<xsd:complexType name="image">
@@ -278,36 +284,42 @@
</xsd:complexType>
<xsd:complexType name="video">
- <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: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="width" type="dimension" />
+ <xsd:attribute name="height" type="dimension" />
+ </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: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="width" type="dimension" />
+ <xsd:attribute name="height" type="dimension" />
</xsd:complexType>
<xsd:complexType name="colorchooser" >
<xsd:choice maxOccurs="unbounded" minOccurs="0" >
- <xsd:element name="label" type="xsd:string" />
+ <xsd:element name="label" type="xsd:string" maxOccurs="1" />
<xsd:element name="address" type="address" minOccurs="3" maxOccurs="3"/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="diagram_inline">
- <xsd:attribute name="rrd" type="xsd:string" use="required" />
- <xsd:attribute name="width" type="dimension" use="optional"/>
- <xsd:attribute name="height" type="dimension" use="optional"/>
+ <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:extension>
+ </xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="diagram_popup" >
@@ -317,6 +329,9 @@
<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:complexType>
@@ -329,6 +344,4 @@
<!-- shade is not yet implemented -->
-
-
</xsd:schema>
\ 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: <ma...@us...> - 2011-05-21 16:32:00
|
Revision: 341
http://openautomation.svn.sourceforge.net/openautomation/?rev=341&view=rev
Author: makki1
Date: 2011-05-21 16:31:52 +0000 (Sat, 21 May 2011)
Log Message:
-----------
Add jnotify statusbar instead of alerts in editor
Modified Paths:
--------------
CometVisu/trunk/visu/edit/style_edit.css
CometVisu/trunk/visu/edit/visuconfig_edit.js
CometVisu/trunk/visu/edit_config.html
CometVisu/trunk/visu/visu_config.xsd
Added Paths:
-----------
CometVisu/trunk/visu/edit/jquery-ui.css
CometVisu/trunk/visu/lib/jquery.jnotify.js
Property Changed:
----------------
CometVisu/trunk/visu/
Property changes on: CometVisu/trunk/visu
___________________________________________________________________
Added: svn:ignore
+ visu_config.xml
Added: CometVisu/trunk/visu/edit/jquery-ui.css
===================================================================
--- CometVisu/trunk/visu/edit/jquery-ui.css (rev 0)
+++ CometVisu/trunk/visu/edit/jquery-ui.css 2011-05-21 16:31:52 UTC (rev 341)
@@ -0,0 +1,572 @@
+/*
+ * jQuery UI CSS Framework 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ */
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden { display: none; }
+.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
+.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
+.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
+.ui-helper-clearfix { display: inline-block; }
+/* required comment for clearfix to work in Opera \*/
+* html .ui-helper-clearfix { height:1%; }
+.ui-helper-clearfix { display:block; }
+/* end clearfix */
+.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled { cursor: default !important; }
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
+
+
+/*
+ * jQuery UI CSS Framework 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ *
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
+ */
+
+
+/* Component containers
+----------------------------------*/
+.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
+.ui-widget .ui-widget { font-size: 1em; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
+.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
+.ui-widget-content a { color: #222222; }
+.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
+.ui-widget-header a { color: #222222; }
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
+.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
+.ui-widget :active { outline: none; }
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
+.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
+.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
+.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
+
+/* positioning */
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-off { background-position: -96px -144px; }
+.ui-icon-radio-on { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
+.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
+.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
+.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
+.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
+.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
+.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
+.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
+.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
+
+/* Overlays */
+.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
+.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
+ * jQuery UI Resizable 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Resizable#theming
+ */
+.ui-resizable { position: relative;}
+.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
+.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
+.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
+.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
+.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
+.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
+.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
+.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
+.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
+.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
+ * jQuery UI Selectable 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Selectable#theming
+ */
+.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
+/*
+ * jQuery UI Accordion 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Accordion#theming
+ */
+/* IE/Win - Fix animation bug - #4615 */
+.ui-accordion { width: 100%; }
+.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
+.ui-accordion .ui-accordion-li-fix { display: inline; }
+.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
+.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
+.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
+.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
+.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
+.ui-accordion .ui-accordion-content-active { display: block; }/*
+ * jQuery UI Autocomplete 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Autocomplete#theming
+ */
+.ui-autocomplete { position: absolute; cursor: default; }
+
+/* workarounds */
+* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
+
+/*
+ * jQuery UI Menu 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu#theming
+ */
+.ui-menu {
+ list-style:none;
+ padding: 2px;
+ margin: 0;
+ display:block;
+ float: left;
+}
+.ui-menu .ui-menu {
+ margin-top: -3px;
+}
+.ui-menu .ui-menu-item {
+ margin:0;
+ padding: 0;
+ zoom: 1;
+ float: left;
+ clear: left;
+ width: 100%;
+}
+.ui-menu .ui-menu-item a {
+ text-decoration:none;
+ display:block;
+ padding:.2em .4em;
+ line-height:1.5;
+ zoom:1;
+}
+.ui-menu .ui-menu-item a.ui-state-hover,
+.ui-menu .ui-menu-item a.ui-state-active {
+ font-weight: normal;
+ margin: -1px;
+}
+/*
+ * jQuery UI Button 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Button#theming
+ */
+.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
+.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
+button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
+.ui-button-icons-only { width: 3.4em; }
+button.ui-button-icons-only { width: 3.7em; }
+
+/*button text element */
+.ui-button .ui-button-text { display: block; line-height: 1.4; }
+.ui-button-text-only .ui-button-text { padding: .4em 1em; }
+.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
+.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
+.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
+.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
+/* no icon support for input elements, provide padding by default */
+input.ui-button { padding: .4em 1em; }
+
+/*button icon element(s) */
+.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
+.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
+.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
+.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+
+/*button sets*/
+.ui-buttonset { margin-right: 7px; }
+.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
+
+/* workarounds */
+button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
+/*
+ * jQuery UI Dialog 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Dialog#theming
+ */
+.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
+.ui-dialog .ui-dialog-titlebar { padding: .5em 1em .3em; position: relative; }
+.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; }
+.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
+.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
+.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
+.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
+.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
+.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
+.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
+.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
+.ui-draggable .ui-dialog-titlebar { cursor: move; }
+/*
+ * jQuery UI Slider 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Slider#theming
+ */
+.ui-slider { position: relative; text-align: left; }
+.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; 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: -.3em; margin-left: -.6em; }
+.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; }/*
+ * jQuery UI Tabs 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Tabs#theming
+ */
+.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
+.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
+.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: now...
[truncated message content] |
|
From: <ma...@us...> - 2011-05-22 20:06:27
|
Revision: 343
http://openautomation.svn.sourceforge.net/openautomation/?rev=343&view=rev
Author: mayerch
Date: 2011-05-22 20:06:21 +0000 (Sun, 22 May 2011)
Log Message:
-----------
polished the groups
Modified Paths:
--------------
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/pure/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/pure/basic.css 2011-05-22 16:17:43 UTC (rev 342)
+++ CometVisu/trunk/visu/designs/pure/basic.css 2011-05-22 20:06:21 UTC (rev 343)
@@ -367,11 +367,14 @@
{
background-color: #000000;
}
-
.flavour_black .link a
{
color: #000000;
}
+.flavour_black.group
+{
+ border: #000000 1px solid;
+}
.flavour_white hr
{
@@ -381,16 +384,23 @@
{
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
{
@@ -400,6 +410,10 @@
{
color: #00ff11;
}
+.flavour_boron.group
+{
+ border: #00ff11 1px solid;
+}
.flavour_lithium hr
{
@@ -409,6 +423,10 @@
{
color: #ff0000;
}
+.flavour_lithium.group
+{
+ border: #ff0000 1px solid;
+}
.flavour_potassium hr
{
@@ -418,6 +436,10 @@
{
color: #d00055;
}
+.flavour_potassium.group
+{
+ border: #d00055 1px solid;
+}
.flavour_sodium hr
{
@@ -427,4 +449,8 @@
{
color: #ff8000;
}
+.flavour_sodium.group
+{
+ border: #ff8000 1px solid;
+}
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2011-05-22 16:17:43 UTC (rev 342)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-05-22 20:06:21 UTC (rev 343)
@@ -88,22 +88,19 @@
this.addCreator('group', {
create: function( page, path, flavour ) {
var $p = $(page);
- var ret_val = $('<div class="widget" />');
- var name = $p.attr('name');
+ var ret_val = $('<div class="widget group" />');
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 hstyle = ''; // heading style
+ if( $p.attr('align') ) hstyle += 'text-align:' + $p.attr('align') + ';';
+ if( hstyle != '' ) hstyle = 'style="' + hstyle + '"';
var childs = $p.children();
var container = $( '<div class="clearfix"/>' );
- container.append( '<h2>' + name + '</h2>' );
+ if( $p.attr('name') ) container.append( '<h2 ' + hstyle + '>' + $p.attr('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 );
+ if( flavour ) ret_val.addClass( 'flavour_' + flavour );
+ ret_val.append( container );
return ret_val;
},
attributes: {
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2011-05-22 16:17:43 UTC (rev 342)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2011-05-22 20:06:21 UTC (rev 343)
@@ -75,13 +75,12 @@
<label>Trigger - Terrasse Licht</label>
<address transform="DPT:1.001" readonly="false" type="">1/0/2</address>
</trigger>
- <group name="Slide group" flavour="potassium">
+ <group name="Slide group" flavour="potassium" align="center">
<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>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-06-05 16:48:06
|
Revision: 354
http://openautomation.svn.sourceforge.net/openautomation/?rev=354&view=rev
Author: mayerch
Date: 2011-06-05 16:48:00 +0000 (Sun, 05 Jun 2011)
Log Message:
-----------
Change the ColorChooser plugin from using <address ... color="..."> to the new common attribute "variant"
Modified Paths:
--------------
CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js 2011-06-04 22:21:46 UTC (rev 353)
+++ CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js 2011-06-05 16:48:00 UTC (rev 354)
@@ -32,7 +32,7 @@
$p.find('address').each( function(){
var src = this.textContent;
var transform = this.getAttribute('transform');
- var color = this.getAttribute('color' );
+ var color = this.getAttribute('variant' );
var readonly = this.getAttribute('readonly' );
ga_list.push( src );
address[ '_' + src ] = [ transform, color, readonly=='true' ];
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2011-06-04 22:21:46 UTC (rev 353)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2011-06-05 16:48:00 UTC (rev 354)
@@ -239,9 +239,9 @@
</page>
<colorchooser>
<label>A colorChooser</label>
- <address transform="DPT:5.001" color="r">1/2/59</address>
- <address transform="DPT:5.001" color="g">1/2/60</address>
- <address transform="DPT:5.001" color="b">1/2/61</address>
+ <address transform="DPT:5.001" variant="r">1/2/59</address>
+ <address transform="DPT:5.001" variant="g">1/2/60</address>
+ <address transform="DPT:5.001" variant="b">1/2/61</address>
</colorchooser>
<break/>
<info format="%.2f">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-06-24 21:26:47
|
Revision: 371
http://openautomation.svn.sourceforge.net/openautomation/?rev=371&view=rev
Author: mayerch
Date: 2011-06-24 21:26:40 +0000 (Fri, 24 Jun 2011)
Log Message:
-----------
Refinement of the "pure" design
Modified Paths:
--------------
CometVisu/trunk/visu/designs/pure/basic.css
CometVisu/trunk/visu/edit_config.html
Modified: CometVisu/trunk/visu/designs/pure/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/pure/basic.css 2011-06-21 20:50:30 UTC (rev 370)
+++ CometVisu/trunk/visu/designs/pure/basic.css 2011-06-24 21:26:40 UTC (rev 371)
@@ -4,7 +4,7 @@
color: white;
font-family: Verdana, Helvetica, sans-serif;
font-family: 'URW Gothic L','Century Gothic','Apple Gothic',Arial,sans-serif;
- font-size: 6mm;
+ font-size: 5mm;
overflow: hidden;
margin:0;
-moz-user-select: none;
@@ -65,27 +65,40 @@
.widget
{
float:left;
- width:48%;
+ 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: 1px solid #444;
+ 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%;
+ 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 {
- line-height: 2em;
+ padding: 5px;
}
.widget .label
@@ -151,6 +164,7 @@
color: #ff8000;
text-align: right;
width: 49%;
+ padding: 5px;
}
.page
@@ -176,7 +190,7 @@
border-style: solid;
border-width: 1px;
border-color: #fff #666 #666 #fff;
- padding: 5px;
+ padding: 3px;
width: 5em;
float: left;
-moz-border-radius: 5px;
@@ -186,13 +200,6 @@
.switchPressed
{
- border-top: 1px solid #666;
- border-left: 1px solid #666;
- border-right: 1px solid #ccc;
- border-bottom: 1px solid #ccc;
-}
-.switchPressed
-{
border-style: solid;
border-width: 1px;
border-color: #666 #fff #fff #666;
@@ -206,7 +213,7 @@
border-style: solid;
border-width: 1px;
border-color: #444 #666 #666 #444;
- padding: 5px;
+ padding: 3px;
width: 5em;
float: left;
-moz-border-radius: 5px;
Modified: CometVisu/trunk/visu/edit_config.html
===================================================================
--- CometVisu/trunk/visu/edit_config.html 2011-06-21 20:50:30 UTC (rev 370)
+++ CometVisu/trunk/visu/edit_config.html 2011-06-24 21:26:40 UTC (rev 371)
@@ -25,7 +25,7 @@
.loading { display: none; }
</style>
</head>
- <body>
+ <body class="editmode">
<div id="top" class="loading">
<div class="nav_path">-</div>
<hr />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-16 21:39:24
|
Revision: 521
http://openautomation.svn.sourceforge.net/openautomation/?rev=521&view=rev
Author: mayerch
Date: 2011-11-16 21:39:18 +0000 (Wed, 16 Nov 2011)
Log Message:
-----------
Update video element: remove Copy&Paster error "refresh" and add the more sensible "autoplay"
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-16 13:41:25 UTC (rev 520)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-11-16 21:39:18 UTC (rev 521)
@@ -659,22 +659,20 @@
var ret_val = $('<div class="widget video" />');
var labelElement = $p.find('label')[0];
ret_val.append( labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '' );
+ var autoplay = ($p.attr('autoplay') && $p.attr('autoplay')=='true') ? ' autoplay="autoplay"' : '';
var style = '';
if( $p.attr('width' ) ) style += 'width:' + $p.attr('width' ) + ';';
if( $p.attr('height') ) style += 'height:' + $p.attr('height') + ';';
if( style != '' ) style = 'style="' + style + '"';
- var actor = '<div class="actor"><video src="' +$p.attr('src') + '" ' + style + ' controls="controls" /></div>';
- 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...
+ var actor = '<div class="actor"><video src="' +$p.attr('src') + '" ' + style + autoplay + ' controls="controls" /></div>';
+ ret_val.append( $(actor).data( {} ) );
return ret_val;
},
attributes: {
src: { type: 'uri' , required: true },
width: { type: 'string' , required: false },
height: { type: 'string' , required: false },
- refresh: { type: 'numeric', required: false }
+ autoplay:{ type: 'list' , required: true, list: {'true': "yes", 'false': "no"} }
},
elements: {
label: { type: 'string', required: false, multi: false }
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2011-11-16 13:41:25 UTC (rev 520)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2011-11-16 21:39:18 UTC (rev 521)
@@ -178,6 +178,14 @@
<label>Image: mit Größenangabe</label>
</image>
</page>
+ <break/>
+ <page name="Video..." align="center">
+ <text>In dem Video-Element lassen sich Videos nach dem HTML5 Standard einbinden</text>
+ <break/>
+ <video src="https://upload.wikimedia.org/wikipedia/commons/b/b5/I-15bis.ogg" autoplay="false">
+ <label>Polikarpov I-15bis - Ogg Theora</label>
+ </video>
+ </page>
<line/>
<page name="iframe Test" align="center" >
<iframe src="http://www.cometvisu.org" width="500px" height="500px"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|