|
From: <ma...@us...> - 2012-06-11 17:35:05
|
Revision: 877
http://openautomation.svn.sourceforge.net/openautomation/?rev=877&view=rev
Author: mayerch
Date: 2012-06-11 17:34:58 +0000 (Mon, 11 Jun 2012)
Log Message:
-----------
demo config: show all predefined colors
planet design: format <line/> widget
Modified Paths:
--------------
CometVisu/trunk/visu/designs/planet/basic.css
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/designs/planet/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/planet/basic.css 2012-06-11 06:42:16 UTC (rev 876)
+++ CometVisu/trunk/visu/designs/planet/basic.css 2012-06-11 17:34:58 UTC (rev 877)
@@ -160,6 +160,10 @@
margin-right: 2rem;
}
+#navbarLeft hr {
+ width: 11rem;
+}
+
#navbarLeft .switch, #navbarLeft .trigger, #navbarLeft .multitrigger {
margin-right: 1rem;
}
@@ -529,12 +533,20 @@
line-height: 1.5rem;
}
-body hr, body br, #pages hr {
+body br {
+ clear: both;
+}
+
+body hr {
margin: .1rem .0rem 0.0rem .1rem;
clear: both;
border: none;
background: #9cf;
- height: 0.2rem;
+ height: 1.0rem;
+ border-top-right-radius: 1rem;
+ border-bottom-right-radius: 1rem;
+ float: left;
+ width: 100%;
}
.popup, .widget.image, .widget.video, .widget.diagram {
@@ -641,3 +653,93 @@
border: #f00;
}
+.actor.red
+{
+ background-color:#FF0000;
+ color: #000;
+}
+.actor.white
+{
+ background-color:#FFFFFF;
+ color: #000;
+}
+.actor.cyan
+{
+ background-color:#00FFFF;
+ color: #000;
+}
+.actor.silver
+{
+ background-color:#C0C0C0;
+ color: #000;
+}
+.actor.blue
+{
+ background-color:#0000FF;
+ color: #000;
+}
+.actor.grey
+{
+ background-color:#808080;
+ color: #000;
+}
+.actor.darkblue
+{
+ background-color:#0000A0;
+ color: #000;
+}
+.actor.black
+{
+ background-color:#000000;
+ color: #555;
+}
+.actor.lightblue
+{
+ background-color:#ADD8E6;
+ color: #000;
+}
+.actor.orange
+{
+ background-color:#FFA500;
+ color: #000;
+}
+.actor.purple
+{
+ background-color:#800080;
+ color: #000;
+}
+.actor.brown
+{
+ background-color:#A52A2A;
+ color: #000;
+}
+.actor.yellow
+{
+ background-color:#FFFF00;
+ color: #000;
+}
+.actor.maroon
+{
+ background-color:#800000;
+ color: #000;
+}
+.actor.lime
+{
+ background-color:#00FF00;
+ color: #000;
+}
+.actor.green
+{
+ background-color:#008000;
+ color: #000;
+}
+.actor.fuchsia
+{
+ background-color:#FF00FF;
+ color: #000;
+}
+.actor.olive
+{
+ background-color:#808000;
+ color: #000;
+}
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2012-06-11 06:42:16 UTC (rev 876)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2012-06-11 17:34:58 UTC (rev 877)
@@ -92,6 +92,26 @@
<entry range_min="18" range_max="24">purple</entry>
<entry range_min="24" range_max="32">red</entry>
</styling>
+ <styling name="All_Colors">
+ <entry value="0">red</entry>
+ <entry value="1">white</entry>
+ <entry value="2">cyan</entry>
+ <entry value="3">silver</entry>
+ <entry value="4">blue</entry>
+ <entry value="5">grey</entry>
+ <entry value="6">darkblue</entry>
+ <entry value="7">black</entry>
+ <entry value="8">lightblue</entry>
+ <entry value="9">orange</entry>
+ <entry value="10">purple</entry>
+ <entry value="11">brown</entry>
+ <entry value="12">yellow</entry>
+ <entry value="13">maroon</entry>
+ <entry value="14">lime</entry>
+ <entry value="15">green</entry>
+ <entry value="16">fuchsia</entry>
+ <entry value="17">olive</entry>
+ </styling>
</stylings>
<statusbar>
<status type="html"><![CDATA[
@@ -428,6 +448,63 @@
<label>Slider to show ranges in styling</label>
<address transform="DPT:9" type="">12/7/10</address>
</slide>
+ <line/>
+ <text>All predefined colors:</text>
+ <break/>
+ <trigger value="0" styling="All_Colors">
+ <label>red</label>
+ </trigger>
+ <trigger value="1" styling="All_Colors">
+ <label>white</label>
+ </trigger>
+ <trigger value="2" styling="All_Colors">
+ <label>cyan</label>
+ </trigger>
+ <trigger value="3" styling="All_Colors">
+ <label>silver</label>
+ </trigger>
+ <trigger value="4" styling="All_Colors">
+ <label>blue</label>
+ </trigger>
+ <trigger value="5" styling="All_Colors">
+ <label>grey</label>
+ </trigger>
+ <trigger value="6" styling="All_Colors">
+ <label>darkblue</label>
+ </trigger>
+ <trigger value="7" styling="All_Colors">
+ <label>black</label>
+ </trigger>
+ <trigger value="8" styling="All_Colors">
+ <label>lightblue</label>
+ </trigger>
+ <trigger value="9" styling="All_Colors">
+ <label>orange</label>
+ </trigger>
+ <trigger value="10" styling="All_Colors">
+ <label>purple</label>
+ </trigger>
+ <trigger value="11" styling="All_Colors">
+ <label>brown</label>
+ </trigger>
+ <trigger value="12" styling="All_Colors">
+ <label>yellow</label>
+ </trigger>
+ <trigger value="13" styling="All_Colors">
+ <label>maroon</label>
+ </trigger>
+ <trigger value="14" styling="All_Colors">
+ <label>lime</label>
+ </trigger>
+ <trigger value="15" styling="All_Colors">
+ <label>green</label>
+ </trigger>
+ <trigger value="16" styling="All_Colors">
+ <label>fuchsia</label>
+ </trigger>
+ <trigger value="17" styling="All_Colors">
+ <label>olive</label>
+ </trigger>
</page>
<page name="Icon Test" align="center">
<text><icon name="CometVisu" type="64" /> Icon links vom Text</text>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-06-15 21:37:27
|
Revision: 885
http://openautomation.svn.sourceforge.net/openautomation/?rev=885&view=rev
Author: mayerch
Date: 2012-06-15 21:37:21 +0000 (Fri, 15 Jun 2012)
Log Message:
-----------
Bug fix: correct <pagejump> widget so that it's using its own CSS class
Modified Paths:
--------------
CometVisu/trunk/visu/designs/planet/basic.css
CometVisu/trunk/visu/structure/pure/pagejump.js
Modified: CometVisu/trunk/visu/designs/planet/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/planet/basic.css 2012-06-15 08:03:36 UTC (rev 884)
+++ CometVisu/trunk/visu/designs/planet/basic.css 2012-06-15 21:37:21 UTC (rev 885)
@@ -164,7 +164,7 @@
width: 11rem;
}
-#navbarLeft .switch, #navbarLeft .trigger, #navbarLeft .multitrigger {
+#navbarLeft .switch, #navbarLeft .pagejump, #navbarLeft .trigger, #navbarLeft .multitrigger {
margin-right: 1rem;
}
@@ -255,7 +255,7 @@
display: block;
}
-.switch > .actor {
+.switch > .actor, .pagejump > .actor {
border-top-right-radius: 1rem;
border-bottom-right-radius: 1rem;
}
Modified: CometVisu/trunk/visu/structure/pure/pagejump.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/pagejump.js 2012-06-15 08:03:36 UTC (rev 884)
+++ CometVisu/trunk/visu/structure/pure/pagejump.js 2012-06-15 21:37:21 UTC (rev 885)
@@ -21,7 +21,7 @@
var layout = $e.children('layout')[0];
var style = layout ? 'style="' + extractLayout( layout, type ) + '"' : '';
var target = $e.attr('target') ? $e.attr('target') : '0';
- var ret_val = $('<div class="widget clearfix switch" ' + style + ' />');
+ var ret_val = $('<div class="widget clearfix pagejump" ' + style + ' />');
ret_val.setWidgetLayout($e);
var label = extractLabel( $e.find('label')[0] );
var address = makeAddressList($e);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pe...@us...> - 2012-08-09 19:59:31
|
Revision: 931
http://openautomation.svn.sourceforge.net/openautomation/?rev=931&view=rev
Author: peuter
Date: 2012-08-09 19:59:24 +0000 (Thu, 09 Aug 2012)
Log Message:
-----------
necessary changes for the new metal-design:
- add active-class to pagejumps if the referred page is currently shown
- possibility to use the page-name for the pagejump target
- possiblility to set the navbar width in the config file
Modified Paths:
--------------
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/structure/pure/navbar.js
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-08-09 19:54:52 UTC (rev 930)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-08-09 19:59:24 UTC (rev 931)
@@ -549,6 +549,15 @@
function scrollToPage( page_id, speed ) {
$('.activePage').removeClass('activePage');
+ $('.pagejump.active').removeClass('active');
+ if (page_id.match(/^[0-9_]+$/)==null) {
+ // find Page-ID by name
+ $('.page h1').each(function(i) {
+ if ($(this).text()==page_id) {
+ page_id = $(this).closest(".page").attr('id');
+ }
+ });
+ }
$('#'+page_id).addClass('pageActive activePage'); // show new page
$('#'+page_id+'_navbar').addClass('navbarActive');
@@ -577,6 +586,19 @@
refreshDiagram(pagedivs[i]);
}
}
+ // set pagejump for this page to active if it exists
+ $(".pagejump > .actor").each(function (i) {
+ var data = $(this).data();
+ if (data.target.match(/^[0-9_]+$/)==null) {
+ // get page id by name
+ if ($('#'+page_id+' h1').text()==data.target) {
+ $(this).parent().addClass("active");
+ }
+ }
+ else if (page_id==data.target) {
+ $(this).parent().addClass("active");
+ }
+ });
}
function updateTopNavigation() {
Modified: CometVisu/trunk/visu/structure/pure/navbar.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/navbar.js 2012-08-09 19:54:52 UTC (rev 930)
+++ CometVisu/trunk/visu/structure/pure/navbar.js 2012-08-09 19:59:24 UTC (rev 931)
@@ -28,6 +28,7 @@
var dynamic = $n.attr('dynamic') == 'true' ? true : false;
var position = $n.attr('position') || 'left';
+ var size = $n.attr('width') || 300;
switch( position )
{
case 'top':
@@ -36,13 +37,13 @@
case 'left':
$('#navbarLeft').append( container );
- var thisSize = $('#navbarLeft').data('size') || 300; // FIXME - only a temporal solution
+ var thisSize = $('#navbarLeft').data('size') || size; // FIXME - only a temporal solution
if( dynamic ) navbarSetSize( 'left', thisSize );
break;
case 'right':
$('#navbarRight').append( container );
- var thisSize = $('#navbarRight').data('size') || 300; // FIXME - only a temporal solution
+ var thisSize = $('#navbarRight').data('size') || size; // FIXME - only a temporal solution
if( dynamic ) navbarSetSize( 'right', thisSize );
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pe...@us...> - 2012-08-12 12:41:54
|
Revision: 939
http://openautomation.svn.sourceforge.net/openautomation/?rev=939&view=rev
Author: peuter
Date: 2012-08-12 12:41:47 +0000 (Sun, 12 Aug 2012)
Log Message:
-----------
- added possiblity to hide the top-navigation, footer and navbars page-wise by setting showtopnavigation,showfooter,shownavbar to false. These settings were inherited to subpages if not defined otherwise
Modified Paths:
--------------
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/structure/pure/page.js
CometVisu/trunk/visu/visu_config.xsd
CometVisu/trunk/visu/visu_config_metal.xml
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-08-11 19:55:44 UTC (rev 938)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-08-12 12:41:47 UTC (rev 939)
@@ -343,8 +343,9 @@
{
// and now setup the pages
var page = $( 'pages > page', xml )[0]; // only one page element allowed...
-
+
create_pages(page, 'id_0');
+
// all containers
if (!/(android|blackberry|iphone|ipod|series60|symbian|windows ce|palm)/i.test(navigator.userAgent.toLowerCase())) {
@@ -554,18 +555,17 @@
// find Page-ID by name
page_id = $('.page h1:contains('+page_id+')').closest(".page").attr("id");
}
+ updatePageParts($('#'+page_id));
$('#'+page_id).addClass('pageActive activePage'); // show new page
$('#'+page_id+'_navbar').addClass('navbarActive');
-
+
// which is the parent of target page_id?
// => set this id as lastpage in url for window.onpopstate handling
var path = page_id.split( '_' );
- if (path.length > 1) {
- // above top level
- // everything besides the last number is the parent id
- path.pop();
- // store lastpage in body.data
- $('body').data("lastpage", path.join("_"));
+ if (path.length > 2) {
+ var parentPage=getParentPage($('#'+page_id));
+ if (parentPage!=null)
+ $('body').data("lastpage", parentPage.attr("id"));
}
else {
// top level
@@ -740,3 +740,110 @@
}
handleResize();
}
+
+/**
+ * update the visibility ob top-navigation, footer and navbar for this page
+ * @param page
+ */
+function updatePageParts(page) {
+ // default values
+ var showtopnavigation=true;
+ var showfooter=true;
+ var shownavbar=true;
+
+ if (page.data()!=null) {
+ if (page.data().showtopnavigation!=undefined) {
+ showtopnavigation = page.data().showtopnavigation!="false";
+ }
+ else {
+ // traverse up the page tree
+ var parentPage = getParentPage(page);
+ while (parentPage!=null) {
+ if (parentPage.data().showtopnavigation!=undefined) {
+ showtopnavigation = parentPage.data().showtopnavigation!="false";
+ break;
+ }
+ parentPage = getParentPage(parentPage);
+ }
+ }
+ if (page.data().showfooter!=undefined) {
+ showfooter = page.data().showfooter!="false";
+ }
+ else {
+ // traverse up the page tree
+ var parentPage = getParentPage(page);
+ while (parentPage!=null) {
+ if (parentPage.data().showfooter!=undefined) {
+ showfooter = parentPage.data().showfooter!="false";
+ break;
+ }
+ parentPage = getParentPage(parentPage);
+ }
+ }
+ if (page.data().shownavbar!=undefined) {
+ shownavbar = page.data().shownavbar!="false";
+ }
+ else {
+ // traverse up the page tree
+ var parentPage = getParentPage(page);
+ while (parentPage!=null) {
+ if (parentPage.data().shownavbar!=undefined) {
+ shownavbar = parentPage.data().shownavbar!="false";
+ break;
+ }
+ parentPage = getParentPage(parentPage);
+ }
+ }
+ }
+ if (showtopnavigation) {
+ $('#top, #top > *').css("display","block");
+ }
+ else {
+ $('#top, #top > *').css("display","none");
+ }
+ if (showfooter) {
+ $('#bottom, #bottom > *').css("display","block");
+ }
+ else {
+ $('#bottom, #bottom > *').css("display","none");
+ }
+ if (shownavbar) {
+ $.each(['Left','Top','Right','Bottom'], function (index, value) {
+ var size = $('#navbar'+value).data('size');
+ var cssSize = size + (isFinite( size ) ? 'px' : '');
+ $('#navbar'+value).css('width',cssSize);
+ });
+ // for some reason the handleResize() method has to be called here, without it the Navbar looks strange (has scrollbars even if they wouldn´t be neccessary)
+ handleResize();
+ $('.navbar').css("display","block");
+ }
+ else {
+ // store the navbar sizes
+ $.each(['Left','Top','Right','Bottom'], function (index, value) {
+ if ($('#navbar'+value).data('size')==undefined) {
+ $('#navbar'+value).data('size',$('#navbar'+value).css('width'));
+ }
+ $('#navbar'+value).css({
+ 'display': 'none',
+ 'width': 0
+ });
+ });
+ $('.navbar').css("display","none");
+ }
+ handleResize();
+}
+
+function getParentPage(page) {
+ var pathParts = page.attr('id').split('_');
+ if (pathParts.length==2) {
+ // top-level (id_x)-> no parent pages
+ return null;
+ }
+ while (pathParts.length>1) {
+ pathParts.pop();
+ var path = pathParts.join('_');
+ if ($('.page[id="'+path+'"]').size()==1) {
+ return $('.page[id="'+path+'"]');
+ }
+ }
+}
Modified: CometVisu/trunk/visu/structure/pure/page.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/page.js 2012-08-11 19:55:44 UTC (rev 938)
+++ CometVisu/trunk/visu/structure/pure/page.js 2012-08-12 12:41:47 UTC (rev 939)
@@ -29,6 +29,9 @@
var name = $p.attr('name');
var type = $p.attr('type') || 'text'; //text, 2d or 3d
var backdrop = $p.attr('backdrop');
+ var showtopnavigation = $p.attr('showtopnavigation');
+ var showfooter = $p.attr('showfooter');
+ var shownavbar = $p.attr('shownavbar');
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') + ';';
@@ -52,6 +55,9 @@
//var container = $( '<div class="clearfix" />' );
var subpage = $( '<div class="page" id="' + path + '"/>' );
+ subpage.data('showtopnavigation',showtopnavigation);
+ subpage.data('showfooter',showfooter);
+ subpage.data('shownavbar',shownavbar);
var $container = $( '<div class="clearfix" path="'+path+'" style="height:100%;position:relative;" />');
for( var addr in address ) $container.bind( addr, this.update );
var container=$container;
@@ -123,7 +129,10 @@
backdrop: { type: 'string' , required: false },
azimut: { type: 'addr' , required: false },
elevation: { type: 'addr' , required: false },
- floor: { type: 'addr' , required: false }
+ floor: { type: 'addr' , required: false },
+ topnavigation: { type: 'string', required: false},
+ footer: { type: 'string', required: false},
+ navbar: { type: 'string', required: false},
},
elements: {
layout: { type: 'layout' , required: false, multi: false }
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2012-08-11 19:55:44 UTC (rev 938)
+++ CometVisu/trunk/visu/visu_config.xsd 2012-08-12 12:41:47 UTC (rev 939)
@@ -233,6 +233,9 @@
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="backdrop" type="uri" use="optional" />
+ <xsd:attribute name="showtopnavigation" type="xsd:boolean" use="optional"/>
+ <xsd:attribute name="showfooter" type="xsd:boolean" use="optional"/>
+ <xsd:attribute name="shownavbar" type="xsd:boolean" use="optional"/>
</xsd:complexType>
</xsd:element>
Modified: CometVisu/trunk/visu/visu_config_metal.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_metal.xml 2012-08-11 19:55:44 UTC (rev 938)
+++ CometVisu/trunk/visu/visu_config_metal.xml 2012-08-12 12:41:47 UTC (rev 939)
@@ -100,7 +100,7 @@
type="html" hrefextend="config"><![CDATA[ - <a href="check_config.php">Check
Config</a> ]]></status> </statusbar>
</meta>
- <page name="Übersicht">
+ <page name="Übersicht" showtopnavigation="false" showfooter="false">
<navbar position="left" dynamic="true" width="200px">
<group nowidget="true">
<pagejump target="Übersicht">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pe...@us...> - 2012-08-12 13:20:36
|
Revision: 940
http://openautomation.svn.sourceforge.net/openautomation/?rev=940&view=rev
Author: peuter
Date: 2012-08-12 13:20:28 +0000 (Sun, 12 Aug 2012)
Log Message:
-----------
- fixed pagejump targets in demo config (id_ prefix was missing)
- fixed some design errors to corrent the look of the demo config in the metal-design
- correct the metal-design rendering of "nowidget"-groups -> border removed
Modified Paths:
--------------
CometVisu/trunk/visu/designs/metal/basic.css
CometVisu/trunk/visu/designs/metal/design_setup.js
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/designs/metal/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/metal/basic.css 2012-08-12 12:41:47 UTC (rev 939)
+++ CometVisu/trunk/visu/designs/metal/basic.css 2012-08-12 13:20:28 UTC (rev 940)
@@ -166,11 +166,12 @@
iframe { border: none; }
-.navbar .widget { border-width: 0 0 1px 0; }
.navbar .widget .label {
float: none;
width: auto;
+}
+.navbar .widget .label > img {
position: absolute;
left: 0.2em;
}
@@ -271,22 +272,40 @@
text-align: left;
margin-left: 0.2em;
}
-.group {
+.group {
margin: 0.2em 0.5em;
+}
+.group.widget {
border: 2px solid #B3B3B3;
border-radius: 1em;
+ -moz-border-radius: 1em;
+ -webkit-border-radius: 1em;
overflow: hidden;
}
.navbar .group {
margin: 0.2em 0 0.1em 0;
border-radius: 0;
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+
border-top-right-radius: 1em;
+ -moz-border-top-right-radius: 1em;
+ -webkit-border-top-right-radius: 1em;
+
border-bottom-right-radius: 1em;
+ -moz-border-bottom-right-radius: 1em;
+ -webkit-border-bottom-right-radius: 1em;
+
border-left: none;
}
.navbar .group.root {
border-top-right-radius: 0;
+ -moz-border-top-right-radius: 0;
+ -webkit-border-top-right-radius: 0;
+
border-bottom-left-radius: 1em;
+ -moz-border-bottom-left-radius: 1em;
+ -webkit-border-bottom-left-radius: 1em;
margin-top: 0;
border-top: none;
border-left: 2px solid #B3B3B3;
@@ -299,9 +318,18 @@
padding: 0 1em;
margin: 0;
border: none;
- border-radius: 1.1em;
+ border-radius: 1em;
+ -moz-border-radius: 1em;
+ -webkit-border-radius: 1em;
+
border-bottom-left-radius: 0;
+ -moz-border-bottom-left-radius: 0;
+ -webkit-border-bottom-left-radius: 0;
+
border-bottom-right-radius: 0;
+ -moz-border-bottom-right-radius: 0;
+ -webkit-border-bottom-right-radius: 0;
+
color: #FFF;
font-weight: bold;
background-image: -webkit-gradient(linear, left top, left bottom, from(#999), to(#666)); /* Saf4+, Chrome */
@@ -313,7 +341,11 @@
}
.navbar .group > div > h2 {
border-radius: 0;
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
border-top-right-radius: 1em;
+ -moz-border-top-right-radius: 1em;
+ -webkit-border-top-right-radius: 1em;
text-shadow: none;
background-color: #eeeeee;
color: #3E3E3E;
Modified: CometVisu/trunk/visu/designs/metal/design_setup.js
===================================================================
--- CometVisu/trunk/visu/designs/metal/design_setup.js 2012-08-12 12:41:47 UTC (rev 939)
+++ CometVisu/trunk/visu/designs/metal/design_setup.js 2012-08-12 13:20:28 UTC (rev 940)
@@ -23,26 +23,30 @@
//$(".value < img").css("padding", "0");
$('#navbarLeft').data({'columns': 6} );
+var started=true;
+
$(window).resize(function() {
- if ($('.navbar').size()>0) {
- // hide top navigation
- if ($('#top').css('display')!='none') {
- $('#top').css("display","none");
- $('#top > .nav_path').css("display","none");
- // because the #top bar is missing now we have to reposition the elements in order to fit the new page height
- handleResize();
+ // only execute on start
+ if (started) {
+ if ($('.navbar').size()>0) {
+ $('.navbar > .widget_container:first-child .group:not(.root) .pagejump:first-child .actor').each(function(i) {
+ var target = ($(this).data().target.match(/^id_[0-9_]+$/)==null) ? $('.page h1:contains('+$(this).data().target+')').closest(".page").attr("id") : $(this).data().target;
+ if (target=="id_0") {
+ // pagejump to root-page found
+ $(this).closest(".group").addClass("root");
+ }
+ });
}
- $('.navbar > .widget_container:first-child .group:not(.root) .pagejump:first-child .actor').each(function(i) {
- var target = ($(this).data().target.match(/^id_[0-9_]+$/)==null) ? $('.page h1:contains('+$(this).data().target+')').closest(".page").attr("id") : $(this).data().target;
- if (target=="id_0") {
- // pagejump to root-page found
- $(this).closest(".group").addClass("root");
+ if (/(iphone|ipod)/i.test(navigator.userAgent.toLowerCase())) {
+ $('#top').css('margin-top','1em');
+ }
+ $('.navbar .widget .label > img').each(function(i) {
+ if ($(this).parent().text().trim()) {
+ $(this).css("position","relative");
}
});
+ started=false;
}
- if (/(iphone|ipod)/i.test(navigator.userAgent.toLowerCase())) {
- $('#top').css('margin-top','1em');
- }
});
icons.insert({
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2012-08-12 12:41:47 UTC (rev 939)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2012-08-12 13:20:28 UTC (rev 940)
@@ -135,13 +135,13 @@
<navbar position="left" dynamic="true" width="200px">
<text>Test 1</text>
<line/>
- <pagejump target="0_34_7" name="Lithium">
+ <pagejump target="id_0_34_7" name="Lithium">
<label>Flavour</label>
</pagejump>
- <pagejump target="0_34_8" name="Potassium">
+ <pagejump target="id_0_34_8" name="Potassium">
<label>Flavour</label>
</pagejump>
- <pagejump target="0_36">
+ <pagejump target="id_0_36">
<label>2D</label>
</pagejump>
</navbar>
@@ -597,13 +597,13 @@
<navbar position="left" dynamic="true" width="200px">
<text>Test 2</text>
<line/>
- <pagejump target="0_34_7" name="Lithium">
+ <pagejump target="id_0_34_7" name="Lithium">
<label>Flavour</label>
</pagejump>
- <pagejump target="0_34_8" name="Potassium">
+ <pagejump target="id_0_34_8" name="Potassium">
<label>Flavour</label>
</pagejump>
- <pagejump target="0_36">
+ <pagejump target="id_0_36">
<label>2D</label>
</pagejump>
</navbar>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pe...@us...> - 2012-08-15 16:01:29
|
Revision: 964
http://openautomation.svn.sourceforge.net/openautomation/?rev=964&view=rev
Author: peuter
Date: 2012-08-15 16:01:23 +0000 (Wed, 15 Aug 2012)
Log Message:
-----------
* fading in/out navbars if their visibility changes
Modified Paths:
--------------
CometVisu/trunk/visu/designs/metal/design_setup.js
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/designs/metal/design_setup.js
===================================================================
--- CometVisu/trunk/visu/designs/metal/design_setup.js 2012-08-15 10:27:29 UTC (rev 963)
+++ CometVisu/trunk/visu/designs/metal/design_setup.js 2012-08-15 16:01:23 UTC (rev 964)
@@ -84,7 +84,7 @@
}
if (/(iphone|ipod|ipad)/i.test(navigator.userAgent.toLowerCase())) {
$('#top').css('margin-top','1em');
- handleResize();
+ handleResize(true);
}
$('#navbarLeft .navbar .widget .label,#navbarRight .navbar .widget .label').each(function(i) {
if ($(this).text().trim()!="") {
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-08-15 10:27:29 UTC (rev 963)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-08-15 16:01:23 UTC (rev 964)
@@ -574,16 +574,6 @@
main_scroll.seekTo( $('#'+page_id), speed ); // scroll to it
- // remove all navbars that do not belong to this page
- $('.navbar.navbarActive').each(function(i) {
- var navBarPath = $(this).attr('id').split('_');
- // skip last 2 elements e.g. '_top_navbar'
- navBarPath = navBarPath.slice(0,navBarPath.length-2).join('_');
- var expr = new RegExp("^"+navBarPath+".*","i");
- if (navBarPath!=page_id && !expr.test(page_id)) {
- $(this).removeClass('navbarActive');
- }
- });
// show the navbars for this page
$('#'+page_id+'_top_navbar').addClass('navbarActive');
$('#'+page_id+'_right_navbar').addClass('navbarActive');
@@ -916,17 +906,18 @@
}
}
$.each(['Left','Top','Right','Bottom'], function (index, value) {
- if (shownavbar[value.toLowerCase()]=="true") {
+ var key = value.toLowerCase();
+ if (shownavbar[key]=="true") {
if ($('#navbar'+value).css("display")=="none") {
- $('#navbar'+value).css('display','block');
+ fadeNavbar(value,"in");
resize=true;
}
}
- else if (shownavbar[value.toLowerCase()]=="false") {
+ else if (shownavbar[key]=="false") {
// the loading class prevents any element from beeing disabled, we have to remove it
$('#navbar'+value+'.loading').removeClass('loading');
if ($('#navbar'+value).css("display")!="none") {
- $('#navbar'+value).css("display","none");
+ fadeNavbar(value,"out");
resize=true;
}
}
@@ -936,8 +927,75 @@
handleResize(true);
handleResize(true);
}
+ else {
+ removeInactiveNavbars(page.attr('id'));
+ }
}
+/**
+ * fades in/out a navbar
+ * @param position [Top|Left|Right|Bottom]
+ * @param direction [in|out]
+ */
+function fadeNavbar(position,direction) {
+ var initCss={};
+ var targetCss={};
+ var navbar = $('#navbar'+position);
+ var key = position.toLowerCase();
+ var fn = null;
+ switch(direction) {
+ case "in":
+ if (navbar.css('display')=='none') {
+ initCss.display='block';
+ }
+ targetCss[key] = 0;
+ switch(position) {
+ case "Top":
+ case "Bottom":
+ initCss[key] = -navbar.height();
+ break;
+ case "Left":
+ case "Right":
+ initCss[key] = -navbar.width();
+ break;
+ }
+ break;
+ case "out":
+ if (navbar.css("display")!="none") {
+ fn = function() {
+ navbar.css("display","none");
+ };
+ }
+ switch(position) {
+ case "Top":
+ case "Bottom":
+ targetCss[key] = -navbar.height();
+ break;
+ case "Left":
+ case "Right":
+ targetCss[key] = -navbar.width();
+ break;
+ }
+ break;
+ }
+ navbar.css(initCss);
+ console.log(targetCss);
+ navbar.animate(targetCss,main_scroll.getConf().time,main_scroll.getConf().easing,fn);
+}
+
+function removeInactiveNavbars(page_id) {
+ // remove all navbars that do not belong to this page
+ $('.navbar.navbarActive').each(function(i) {
+ var navBarPath = $(this).attr('id').split('_');
+ // skip last 2 elements e.g. '_top_navbar'
+ navBarPath = navBarPath.slice(0,navBarPath.length-2).join('_');
+ var expr = new RegExp("^"+navBarPath+".*","i");
+ if (navBarPath!=page_id && !expr.test(page_id)) {
+ $(this).removeClass('navbarActive');
+ }
+ });
+}
+
function getParentPage(page) {
var pathParts = page.attr('id').split('_');
if (pathParts.length==2) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pe...@us...> - 2012-08-18 09:45:38
|
Revision: 977
http://openautomation.svn.sourceforge.net/openautomation/?rev=977&view=rev
Author: peuter
Date: 2012-08-18 09:45:32 +0000 (Sat, 18 Aug 2012)
Log Message:
-----------
* I*-Device top space fixed
* Scrolling for I*-Devices disabled
* Fix to enable scrolling again for every jump in the pagetree
Modified Paths:
--------------
CometVisu/trunk/visu/designs/metal/design_setup.js
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/designs/metal/design_setup.js
===================================================================
--- CometVisu/trunk/visu/designs/metal/design_setup.js 2012-08-18 08:49:22 UTC (rev 976)
+++ CometVisu/trunk/visu/designs/metal/design_setup.js 2012-08-18 09:45:32 UTC (rev 977)
@@ -1,5 +1,5 @@
//
-// Design setup for the pure design
+// Design setup for the metal design
//
// Copyright (C) 2012 by Christian Mayer
// cometvisu (at) ChristianMayer.de
@@ -83,7 +83,9 @@
});
}
if (/(iphone|ipod|ipad)/i.test(navigator.userAgent.toLowerCase())) {
- $('#top').css('margin-top','1em');
+ // disable scrolling
+ main_scroll.getConf().speed=0;
+ $('body').css('padding-top','1em');
handleResize(true);
}
$('#navbarLeft .navbar .widget .label,#navbarRight .navbar .widget .label').each(function(i) {
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-08-18 08:49:22 UTC (rev 976)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-08-18 09:45:32 UTC (rev 977)
@@ -35,6 +35,8 @@
var main_scroll;
var old_scroll = '';
+var resizeAfterScroll = false;
+
visu = new CometVisu('/cgi-bin/');
visu.update = function( json ) { // overload the handler
for( key in json ) {
@@ -147,9 +149,8 @@
*/
function handleResize(skipScrollFix) {
var uagent = navigator.userAgent.toLowerCase();
- var widthNavbarLeft = $( '#navbarLeft' ).css('display')!='none' ? $( '#navbarLeft' ).width() : 0;
+ var widthNavbarLeft = $( '#navbarLeft' ).css('display')!='none' ? $( '#navbarLeft' ).width(): 0;
var widthNavbarRight = $( '#navbarRight' ).css('display')!='none' ? $( '#navbarRight' ).width() : 0;
-
var width = $( 'body' ).width() - widthNavbarLeft - widthNavbarRight - 1; // remove an additional pixel for Firefox
if (/(android|blackberry|iphone|ipod|series60|symbian|windows ce|palm)/i.test(uagent)) {
@@ -553,10 +554,11 @@
}
function scrollToPage( page_id, speed, skipHistory ) {
- $('.activePage').removeClass('activePage');
+ $('.activePage','#pages').removeClass('activePage');
+ $('.pageActive','#pages').removeClass('pageActive');
$('.pagejump.active').removeClass('active');
$('.pagejump.active_ancestor').removeClass('active_ancestor');
-
+
if (page_id.match(/^id_[0-9_]+$/)==null) {
// find Page-ID by name
$('.page h1:contains('+page_id+')','#pages').each(function (i) {
@@ -565,23 +567,38 @@
}
});
}
+ var page = $('#'+page_id);
- $('#'+page_id).addClass('pageActive activePage');// show new page
+ page.addClass('pageActive activePage');// show new page
// update visibility ob navbars, top-navigation, footer
- updatePageParts($('#'+page_id));
- // remove unnecessary pageActive´s
- $('.pageActive','#pages').each(function(i) {
- var pagePath = this.id;
- var expr = new RegExp("^"+pagePath+".*","i");
- if (pagePath!=page_id && !expr.test(page_id)) {
- $(this).removeClass('pageActive');
+ updatePageParts(page);
+
+ if (main_scroll.getConf().speed>0) {
+ var scrollLeft = true;
+ if (skipHistory) {
+ // moving back in history -> scroll right
+ scrollLeft = false;
}
- });
- // push new state to history
+ else {
+ var expr = new RegExp("^"+page_id+".*","i");
+ if (expr.test(window.history.state)) {
+ // moving up the page tree -> scroll right
+ scrollLeft = false;
+ }
+ }
+ // jump to the page on the left of the page we need to scroll to
+ if (scrollLeft) {
+ $('#pages').css('left',-page.position().left+page.width());
+ }
+ else {
+ $('#pages').css('left',-page.position().left-page.width());
+ }
+ }
+ //push new state to history
if (skipHistory==undefined)
window.history.pushState(page_id, page_id, window.location.href);
- main_scroll.seekTo( $('#'+page_id), speed ); // scroll to it
+ main_scroll.seekTo( page, speed ); // scroll to it
// show the navbars for this page
$('#'+page_id+'_top_navbar').addClass('navbarActive');
@@ -598,10 +615,10 @@
// set pagejump for this page to active if it exists
$(".pagejump > .actor").each(function (i) {
var activePageJump=null;
- if ($(this).data().target.match(/^id_[0-9_]+$/)==null) {
+ var actor = $(this);
+ var target = actor.data().target;
+ if (target.match(/^id_[0-9_]+$/)==null) {
// get page id by name
- var actor = $(this);
- var target = $(this).data().target;
$('h1:contains('+target+')','#'+page_id).each(function(i) {
if ($(this).text()==target) {
activePageJump = actor.parent();
@@ -609,31 +626,31 @@
}
});
}
- else if (page_id==$(this).data().target) {
- activePageJump = $(this).parent();
+ else if (page_id==target) {
+ activePageJump = actor.parent();
}
if (activePageJump!=null) {
activePageJump.addClass('active');
- var parentPage = getParentPage($('#'+page_id));
+ var parentPage = getParentPage(page);
while (parentPage!=null) {
if (parentPage.attr('id')=="id_0") {
// root is always an active ancestor, no need to specify that
break;
}
$(".pagejump > .actor").each(function (i) {
- if ($(this).data().target.match(/^id_[0-9_]+$/)==null) {
+ var parentActor = $(this);
+ var parentTarget = parentActor.data().target;
+ if (parentTarget.match(/^id_[0-9_]+$/)==null) {
// get page id by name
- var actor = $(this);
- var target = $(this).data().target;
- $('h1:contains('+target+')','#'+parentPage.attr('id')).each(function(i) {
- if ($(this).text()==target) {
- actor.parent().addClass('active_ancestor');
+ $('h1:contains('+parentTarget+')','#'+parentPage.attr('id')).each(function(i) {
+ if ($(this).text()==parentTarget) {
+ parentActor.parent().addClass('active_ancestor');
return false;
}
});
}
- else if (parentPage.attr('id')==$(this).data().target) {
- $(this).parent().addClass('active_ancestor');
+ else if (parentPage.attr('id')==parentTarget) {
+ parentActor.parent().addClass('active_ancestor');
}
});
parentPage = getParentPage(parentPage);
@@ -641,7 +658,10 @@
}
});
$(window).trigger('scrolltopage',page_id);
-
+ if (resizeAfterScroll) {
+ handleResize(true);
+ resizeAfterScroll=false;
+ }
}
function updateTopNavigation() {
@@ -920,7 +940,7 @@
if ($('#navbar'+value).css("display")=="none") {
fadeNavbar(value,"in");
removeInactiveNavbars(page.attr('id'));
- resize=true;
+ //resize=true;
}
}
else if (shownavbar[key]=="false") {
@@ -928,14 +948,12 @@
$('#navbar'+value+'.loading').removeClass('loading');
if ($('#navbar'+value).css("display")!="none") {
fadeNavbar(value,"out");
- resize=true;
+ //resize=true;
}
}
});
if (resize) {
- // needs to be called twice to work
- handleResize(true);
- handleResize(true);
+ resizeAfterScroll=true;
}
else {
removeInactiveNavbars(page.attr('id'));
@@ -952,7 +970,9 @@
var targetCss={};
var navbar = $('#navbar'+position);
var key = position.toLowerCase();
- var fn = null;
+ var fn = function() {
+ handleResize(true);
+ };
switch(direction) {
case "in":
if (navbar.css('display')=='none') {
@@ -974,6 +994,7 @@
if (navbar.css("display")!="none") {
fn = function() {
navbar.css("display","none");
+ handleResize(true);
};
}
switch(position) {
@@ -989,7 +1010,7 @@
break;
}
navbar.css(initCss);
- navbar.animate(targetCss,main_scroll.getConf().time,main_scroll.getConf().easing,fn);
+ navbar.animate(targetCss,main_scroll.getConf().speed,main_scroll.getConf().easing,fn);
}
function removeInactiveNavbars(page_id) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pe...@us...> - 2012-08-22 19:16:09
|
Revision: 982
http://openautomation.svn.sourceforge.net/openautomation/?rev=982&view=rev
Author: peuter
Date: 2012-08-22 19:15:58 +0000 (Wed, 22 Aug 2012)
Log Message:
-----------
* additional attributes in pages element
* max_mobile_screen_width: defines the maximum screen width where the mobile.css is used
* scroll_speed: defines the page scrolling speed (setiing to 0 disables scrolling)
* XSD definition for label allows icon-subelements now
* default widget_container width removed
Modified Paths:
--------------
CometVisu/trunk/visu/designs/metal/basic.css
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/visu_config.xsd
Modified: CometVisu/trunk/visu/designs/metal/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/metal/basic.css 2012-08-22 18:20:23 UTC (rev 981)
+++ CometVisu/trunk/visu/designs/metal/basic.css 2012-08-22 19:15:58 UTC (rev 982)
@@ -90,8 +90,11 @@
.widget_container {
float: left;
- width: 100%;
}
+.navbar .widget_container {
+ width: 100%;
+ display: block;
+}
.widget
{
margin: 0;
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-08-22 18:20:23 UTC (rev 981)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-08-22 19:15:58 UTC (rev 982)
@@ -35,6 +35,8 @@
var main_scroll;
var old_scroll = '';
+var scrollSpeed;
+
var resizeAfterScroll = false;
visu = new CometVisu('/cgi-bin/');
@@ -205,6 +207,8 @@
// read predefined design in config
predefinedDesign = $( 'pages', xml ).attr("design");
+
+ scrollSpeed = $( 'pages', xml ).attr("scroll_speed");
// design by url
if ($.getUrlVar("design")) {
@@ -218,10 +222,11 @@
else {
selectDesign();
}
+ var maxMobileScreenWidth = $('pages',xml).attr('max_mobile_screen_width') || 480;
$( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/designglobals.css" />' );
$( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/' + clientDesign + '/basic.css" />' );
- $( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/' + clientDesign + '/mobile.css" media="only screen and (max-device-width: 480px)" />' );
+ $( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/' + clientDesign + '/mobile.css" media="only screen and (max-device-width: '+maxMobileScreenWidth+'px)" />' );
$( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/' + clientDesign + '/custom.css" />' );
$( 'head' ).append( '<script src="designs/' + clientDesign + '/design_setup.js" type="text/javascript" />' );
@@ -375,6 +380,9 @@
// setup the scrollable
main_scroll = $('#main').scrollable({keyboard: false, touch: false}).data('scrollable');
main_scroll.onSeek( updateTopNavigation );
+ if (scrollSpeed!=undefined) {
+ main_scroll.getConf().speed = scrollSpeed;
+ }
if ($.getUrlVar('startpage')) {
scrollToPage( 'id_'+$.getUrlVar('startpage'), 0 );
@@ -595,7 +603,7 @@
}
}
//push new state to history
- if (skipHistory==undefined)
+ if (skipHistory===undefined)
window.history.pushState(page_id, page_id, window.location.href);
main_scroll.seekTo( page, speed ); // scroll to it
@@ -706,7 +714,7 @@
/* FIXME - Question: should this belong to the VisuDesign object so that it */
/* is possible to overload?!? */
/** ************************************************************************* */
-function refreshAction( target, src ) {
+function refreshAction( target, src ) {
/* Special treatment for (external) iframes:
* we need to clear it and reload it in another thread as otherwise stays
* blank for some targets/sites and src = src doesnt work anyway on external
@@ -721,7 +729,7 @@
}, 0);
} else {
target.src = src + '&' + new Date().getTime();
- }
+ }
}
function setupRefreshAction() {
@@ -1025,7 +1033,13 @@
break;
}
navbar.css(initCss);
- navbar.animate(targetCss,main_scroll.getConf().speed,main_scroll.getConf().easing,fn);
+ if (main_scroll.getConf().speed==0) {
+ navbar.css(targetCss);
+ fn();
+ }
+ else {
+ navbar.animate(targetCss,main_scroll.getConf().speed,main_scroll.getConf().easing,fn);
+ }
}
function removeInactiveNavbars(page_id) {
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2012-08-22 18:20:23 UTC (rev 981)
+++ CometVisu/trunk/visu/visu_config.xsd 2012-08-22 19:15:58 UTC (rev 982)
@@ -97,6 +97,8 @@
<xsd:element ref="page" minOccurs="1" />
</xsd:choice>
<xsd:attribute name="design" type="xsd:string" use="required" />
+ <xsd:attribute name="scroll_speed" type="xsd:decimal" use="optional" />
+ <xsd:attribute name="max_mobile_screen_width" type="xsd:decimal" use="optional" />
</xsd:complexType>
</xsd:element>
@@ -349,7 +351,7 @@
<xsd:complexType name="toogle">
<xsd:choice maxOccurs="unbounded" minOccurs="1">
- <xsd:element name="label" type="xsd:string" />
+ <xsd:element name="label" type="label" />
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
<xsd:element name="address" type="address" minOccurs="1" />
</xsd:choice>
@@ -360,7 +362,7 @@
<xsd:complexType name="trigger">
<xsd:choice maxOccurs="unbounded" minOccurs="1">
- <xsd:element name="label" type="xsd:string" />
+ <xsd:element name="label" type="label" />
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
<xsd:element name="address" type="address" minOccurs="1" />
</xsd:choice>
@@ -371,7 +373,7 @@
<xsd:complexType name="infotrigger">
<xsd:choice maxOccurs="unbounded" minOccurs="1">
- <xsd:element name="label" type="xsd:string" />
+ <xsd:element name="label" type="label" />
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
<xsd:element name="address" type="address" minOccurs="1" maxOccurs="unbounded" />
</xsd:choice>
@@ -391,7 +393,7 @@
<xsd:complexType name="multitrigger">
<xsd:choice maxOccurs="unbounded" minOccurs="1">
- <xsd:element name="label" type="xsd:string" />
+ <xsd:element name="label" type="label" />
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
<xsd:element name="address" type="address" minOccurs="1" />
</xsd:choice>
@@ -410,7 +412,7 @@
<xsd:complexType name="slide">
<xsd:choice maxOccurs="unbounded" minOccurs="1">
- <xsd:element name="label" type="xsd:string" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="label" type="label" minOccurs="0" maxOccurs="1" />
<xsd:element name="address" type="address" minOccurs="1" />
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
</xsd:choice>
@@ -423,7 +425,7 @@
<xsd:complexType name="info">
<xsd:choice maxOccurs="unbounded" minOccurs="1">
- <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ <xsd:element name="label" type="label" maxOccurs="1" />
<xsd:element name="address" type="address" minOccurs="1" />
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
</xsd:choice>
@@ -435,7 +437,7 @@
<xsd:complexType name="image">
<xsd:choice maxOccurs="unbounded" minOccurs="0">
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
- <xsd:element name="label" type="xsd:string" />
+ <xsd:element name="label" type="label" />
</xsd:choice>
<xsd:attribute name="src" type="uri" use="required" />
<xsd:attribute name="width" type="dimension" />
@@ -445,7 +447,7 @@
<xsd:complexType name="imagetrigger">
<xsd:choice maxOccurs="unbounded" minOccurs="0">
- <xsd:element name="label" type="xsd:string" />
+ <xsd:element name="label" type="label" />
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
<xsd:element name="address" type="address" minOccurs="1" />
</xsd:choice>
@@ -462,7 +464,7 @@
<xsd:complexType name="video">
<xsd:choice maxOccurs="unbounded" minOccurs="0">
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
- <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ <xsd:element name="label" type="label" maxOccurs="1" />
</xsd:choice>
<xsd:attribute name="src" type="uri" use="required" />
<xsd:attribute name="width" type="dimension" />
@@ -473,7 +475,7 @@
<xsd:complexType name="iframe">
<xsd:choice maxOccurs="unbounded" minOccurs="0">
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
- <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ <xsd:element name="label" type="label" maxOccurs="1" />
</xsd:choice>
<xsd:attribute name="src" type="uri" use="required" />
<xsd:attribute name="width" type="dimension" />
@@ -486,7 +488,7 @@
<xsd:complexType name="pagejump">
<xsd:choice maxOccurs="unbounded" minOccurs="0">
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
- <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ <xsd:element name="label" type="label" maxOccurs="1" />
</xsd:choice>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="target" type="xsd:string" />
@@ -494,7 +496,7 @@
<xsd:complexType name="colorchooser">
<xsd:choice maxOccurs="unbounded" minOccurs="0">
- <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ <xsd:element name="label" type="label" maxOccurs="1" />
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
<xsd:element name="address" type="address" minOccurs="3" maxOccurs="3" />
</xsd:choice>
@@ -502,7 +504,7 @@
<xsd:complexType name="diagram_inline">
<xsd:choice maxOccurs="unbounded" minOccurs="0">
- <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ <xsd:element name="label" type="label" maxOccurs="1" />
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
<xsd:element name="axis" type="axis"></xsd:element>
<xsd:element name="rrd" type="rrd"></xsd:element>
@@ -523,7 +525,7 @@
<xsd:complexType name="diagram_popup">
<xsd:choice maxOccurs="unbounded" minOccurs="0">
- <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ <xsd:element name="label" type="label" maxOccurs="1" />
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
<xsd:element name="axis" type="axis"></xsd:element>
<xsd:element name="rrd" type="rrd"></xsd:element>
@@ -543,7 +545,7 @@
<xsd:complexType name="diagram_info">
<xsd:choice maxOccurs="unbounded" minOccurs="0">
- <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ <xsd:element name="label" type="label" maxOccurs="1" />
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
<xsd:element name="address" type="address" minOccurs="1" />
<xsd:element name="axis" type="axis"></xsd:element>
@@ -567,7 +569,7 @@
<xsd:complexType name="gweather">
<xsd:choice maxOccurs="unbounded" minOccurs="1">
- <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ <xsd:element name="label" type="label" maxOccurs="1" />
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
</xsd:choice>
<xsd:attribute name="width" type="dimension" use="optional" />
@@ -582,7 +584,7 @@
<xsd:complexType name="rss">
<xsd:choice maxOccurs="unbounded" minOccurs="1">
- <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ <xsd:element name="label" type="label" maxOccurs="1" />
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
</xsd:choice>
<xsd:attribute name="src" type="xsd:string" use="required" />
@@ -603,7 +605,7 @@
<xsd:complexType name="rsslog">
<xsd:choice maxOccurs="unbounded" minOccurs="1">
- <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ <xsd:element name="label" type="label" maxOccurs="1" />
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
</xsd:choice>
<xsd:attribute name="src" type="xsd:string" use="required" />
@@ -617,7 +619,7 @@
<xsd:complexType name="jqclock">
<xsd:choice maxOccurs="unbounded" minOccurs="1">
- <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ <xsd:element name="label" type="label" maxOccurs="1" />
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
</xsd:choice>
<xsd:attribute name="width" type="dimension" use="optional" />
@@ -637,6 +639,12 @@
<xsd:complexType name="break" />
<xsd:complexType name="line" />
+
+ <xsd:complexType name="label" mixed="true">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="icon" />
+ </xsd:choice>
+ </xsd:complexType>
<!-- toggle is not yet implemented -->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-09-04 19:22:09
|
Revision: 999
http://openautomation.svn.sourceforge.net/openautomation/?rev=999&view=rev
Author: mayerch
Date: 2012-09-04 19:22:03 +0000 (Tue, 04 Sep 2012)
Log Message:
-----------
Added new widget: wgpluging_info
This allows to show internal values of the wiregate plugins. The content is updated when a GA in the address-element is recieved.
Modified Paths:
--------------
CometVisu/trunk/visu/index.html
CometVisu/trunk/visu/visu_config_demo.xml
Added Paths:
-----------
CometVisu/trunk/visu/structure/pure/wgplugin_info.js
Modified: CometVisu/trunk/visu/index.html
===================================================================
--- CometVisu/trunk/visu/index.html 2012-09-03 07:11:58 UTC (rev 998)
+++ CometVisu/trunk/visu/index.html 2012-09-04 19:22:03 UTC (rev 999)
@@ -39,6 +39,7 @@
<script src="structure/pure/trigger.js" type="text/javascript"></script>
<script src="structure/pure/unknown.js" type="text/javascript"></script>
<script src="structure/pure/video.js" type="text/javascript"></script>
+ <script src="structure/pure/wgplugin_info.js" type="text/javascript"></script>
<script src="designs/structure_custom.js" type="text/javascript"></script>
<!-- Load the widgets: end -->
<script src="lib/templateengine.js" type="text/javascript"></script>
Added: CometVisu/trunk/visu/structure/pure/wgplugin_info.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/wgplugin_info.js (rev 0)
+++ CometVisu/trunk/visu/structure/pure/wgplugin_info.js 2012-09-04 19:22:03 UTC (rev 999)
@@ -0,0 +1,72 @@
+/* info.js (c) 2012 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
+ */
+
+basicdesign.addCreator('wgplugin_info', {
+ create: function( element, path, flavour, type ) {
+ var $e = $(element);
+ var layout = $e.children('layout')[0];
+ var style = layout ? 'style="' + extractLayout( layout, type ) + '"' : '';
+ var ret_val = $('<div class="widget clearfix info" ' + style + ' />');
+ //type == '3d' && ret_val.data( extractLayout3d( layout ) ).bind( 'update3d', this.update3d );
+ type == '3d' && $(document).bind( 'update3d', {element: ret_val, layout: extractLayout3d( layout )}, this.update3d );
+
+ ret_val.setWidgetLayout($e).makeWidgetLabel($e);
+ var address = makeAddressList($e);
+
+ var actor = '<div class="actor"><div class="value">-</div></div>';
+ var $actor = $(actor).data({
+ 'variable' : $e.attr('variable'),
+ 'address' : address,
+ 'format' : $e.attr('format'),
+ 'mapping' : $e.attr('mapping'),
+ 'styling' : $e.attr('styling')
+ });
+ for( var addr in address ) $actor.bind( addr, this.update );
+ ret_val.append( $actor );
+ return ret_val;
+ },
+ update: function( e, data, passedElement )
+ {
+ var element = passedElement || $(this);
+
+ var variable = element.data( 'variable' );
+ var valueElement = element.find('.value');
+ $.getJSON('/wg-plugindb.pl?name=' + variable, function(data) {
+ element.setWidgetStyling( element.data( 'basicvalue' ) );
+
+ if( element.data( 'align' ) )
+ element.addClass(element.data( 'align' ) );
+ valueElement.empty();
+ valueElement.append( data[variable] );
+ });
+ },
+ update3d: defaultUpdate3d,
+ attributes: {
+ variable:{ type: 'string' , required: true },
+ format: { type: 'format' , required: false },
+ mapping: { type: 'mapping', required: false },
+ styling: { type: 'styling', required: false },
+ colspan: { type: 'numeric', required: false },
+ rowspan: { type: 'numeric', required: false }
+ },
+ elements: {
+ label: { type: 'string' , required: true , multi: false },
+ address: { type: 'address', required: true , multi: true },
+ layout: { type: 'layout' , required: false, multi: false }
+ },
+ content: false
+});
\ No newline at end of file
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2012-09-03 07:11:58 UTC (rev 998)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2012-09-04 19:22:03 UTC (rev 999)
@@ -728,6 +728,14 @@
<address transform="DPT:9" type="">12/7/9</address>
</slide>
</group>
+ <wgplugin_info variable="KNX-Watchdog_last">
+ <label>WireGate Plugin Variable</label>
+ <address transform="DPT:1.001">12/7/1</address>
+ </wgplugin_info>
+ <trigger value="Trigger" mapping="On_Off">
+ <label>Update Value</label>
+ <address transform="DPT:1.001" type="">12/7/1</address>
+ </trigger>
</page>
</page>
</pages>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pe...@us...> - 2012-09-11 15:30:23
|
Revision: 1003
http://openautomation.svn.sourceforge.net/openautomation/?rev=1003&view=rev
Author: peuter
Date: 2012-09-11 15:30:12 +0000 (Tue, 11 Sep 2012)
Log Message:
-----------
- widgets with icons use the same height as widgets without icons now
- usage of colspan enabled in top/bottom-navbars, can be disabled by adding <layout colspan="0"/> to the elements in the navbars in order to achieve the "old" look (see visu_config_metal.xml how to use this)
** ADVICE: If you are using the Top-Navbar right now, you should add <layout colspan="0"/> to all elements in the navbar **
Modified Paths:
--------------
CometVisu/trunk/visu/designs/metal/basic.css
CometVisu/trunk/visu/designs/metal/design_setup.js
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/visu_config_metal.xml
Modified: CometVisu/trunk/visu/designs/metal/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/metal/basic.css 2012-09-09 18:57:08 UTC (rev 1002)
+++ CometVisu/trunk/visu/designs/metal/basic.css 2012-09-11 15:30:12 UTC (rev 1003)
@@ -146,7 +146,7 @@
text-align:left;
padding-left: 0.2em;
}
-.widget .label img { vertical-align: middle; }
+.widget .label img { vertical-align: middle; margin-top: -0.3em; }
.widget .switchPressed img.icon, .widget .switchUnpressed img.icon { height: 1.1em !important; }
/*.widget .actor img.icon { height: 1.1em !important; }*/
.widget_container > .pagejump > .label {
@@ -184,6 +184,9 @@
.navbar .switchPressed .value, .navbar .switchUnpressed .value {
padding-left: 2.2em;
}
+#navbarTop .navbar .switchPressed .value, #navbarTop .navbar .switchUnpressed .value, #navbarBottom .navbar .switchPressed .value, #navbarBottom .navbar .switchUnpressed .value {
+ padding-left: 2.5em;
+}
.green.switchPressed div, .green.switchUnpressed div {
background: transparent url(images/dot_green.png) no-repeat center center;
@@ -605,7 +608,7 @@
}
#navbarTop .navbar .widget_container, #navbarBottom .navbar .widget_container {
- width: auto !important;
+ width: auto;
}
#navbarTop, #navbarTop .navbar .widget{
@@ -630,7 +633,9 @@
margin: 0;
border-width:0;
padding: 0.3em 0.5em;
-
+ position: relative;
+ min-width: 2em;
+ min-height: 3em;
}
#navbarTop .navbar .widget:hover,#navbarTop .navbar .pagejump.active,#navbarTop .navbar .pagejump.active_ancestor {
background-color: #000;
@@ -662,7 +667,6 @@
}
#navbarTop { border-bottom: 2px solid #666; }
#navbarBottom { border-top: 2px solid #666; }
-#navbarTop .navbar .widget, #navbarBottom .navbar .widget { position: relative; min-width: 2em; min-height: 3em; }
.navbar .pagejump .label > img, .navbar .pagejump .label > img {
height: 44px !important;
}
@@ -670,15 +674,12 @@
display: block;
margin: 0 auto;
}
-.navbar .pagejump .label, .navbar .pagejump .label {
+.navbar .pagejump .label {
text-align: center;
font-size: 0.7em;
float: left;
margin: 0 auto;
}
-#navbarTop .navbar .pagejump .actor .value , #navbarBottom.navbar .pagejump .actor .value {
- display: none;
-}
#navbarTop .navbar .pagejump .actor, #navbarBottom.navbar .pagejump .actor {
width: 100%;
}
Modified: CometVisu/trunk/visu/designs/metal/design_setup.js
===================================================================
--- CometVisu/trunk/visu/designs/metal/design_setup.js 2012-09-09 18:57:08 UTC (rev 1002)
+++ CometVisu/trunk/visu/designs/metal/design_setup.js 2012-09-11 15:30:12 UTC (rev 1003)
@@ -73,7 +73,7 @@
$(window).resize(function() {
// only execute on start
if (started) {
- if ($('.navbar').size()>0) {
+ if ($('.navbar').size()>0) {
$('.navbar > .widget_container:first-child .group:not(.root) .pagejump:first-child .actor').each(function(i) {
var target = ($(this).data().target.match(/^id_[0-9_]+$/)==null) ? $('.page h1:contains('+$(this).data().target+')').closest(".page").attr("id") : $(this).data().target;
if (target=="id_0") {
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-09-09 18:57:08 UTC (rev 1002)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-09-11 15:30:12 UTC (rev 1003)
@@ -204,6 +204,7 @@
allContainer.each(function(i, e) {
var $e=$(e);
var ourColspan = $e.children('*:first-child').data('colspan');
+ if (ourColspan<=0) return;
var areaColspan = $e.parentsUntil('#centerContainer').last().data('columns') || defaultColumns;
var ourWidth = Math.min(100,ourColspan/areaColspan*100);
$e.css('width', ourWidth+'%');
@@ -212,9 +213,10 @@
var adjustableElements = $('.group .widget_container');
adjustableElements.each(function(i, e) {
var $e = $(e);
+ var ourColspan = $e.children('.widget').data('colspan');
+ if (ourColspan<=0) return;
var areaColspan = $e.parentsUntil('#centerContainer').last().data('columns') || defaultColumns;
var groupColspan = Math.min(areaColspan,$e.parentsUntil('.widget_container', '.group').data('colspan'));
- var ourColspan = $e.children('.widget').data('colspan');
var ourWidth = Math.min(100,ourColspan/groupColspan*100); // in percent
$e.css('width', ourWidth+'%');
});
@@ -424,6 +426,7 @@
allContainer.each(function(i, e) {
var $e = $(e);
var ourColspan = $e.children('*:first-child').data('colspan');
+ if (ourColspan<=0) return;
var areaColspan = $e.parentsUntil('#centerContainer').last().data('columns') || defaultColumns;
var ourWidth = Math.min(100,ourColspan/areaColspan*100);
$e.css('width', ourWidth+'%');
@@ -432,9 +435,10 @@
var adjustableElements = $('.group .widget_container');
adjustableElements.each(function(i, e) {
var $e = $(e);
+ var ourColspan = $e.children('.widget').data('colspan');
+ if (ourColspan<=0) return;
var areaColspan = $e.parentsUntil('#centerContainer').last().data('columns') || defaultColumns;
var groupColspan = Math.min(areaColspan,$e.parentsUntil('.widget_container', '.group').data('colspan'));
- var ourColspan = $e.children('.widget').data('colspan');
var ourWidth = Math.min(100,ourColspan/groupColspan*100); // in percent
$e.css('width', ourWidth+'%');
});
Modified: CometVisu/trunk/visu/visu_config_metal.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_metal.xml 2012-09-09 18:57:08 UTC (rev 1002)
+++ CometVisu/trunk/visu/visu_config_metal.xml 2012-09-11 15:30:12 UTC (rev 1003)
@@ -109,24 +109,30 @@
<page name="Übersicht" showtopnavigation="false" showfooter="false"
shownavbar="true false">
<navbar position="top">
- <pagejump target="Übersicht" name=" ">
- <label><icon name="steuer_home" />Start</label>
+ <pagejump target="Übersicht" name="Übersicht">
+ <layout colspan="1"/>
+ <label><icon name="steuer_home" /></label>
</pagejump>
<line />
<pagejump target="KNX" name=" ">
- <label><icon name="steuer_alles_ein_aus" />KNX</label>
+ <layout colspan="0"/>
+ <label><icon name="steuer_alles_ein_aus" />KNX</label>
</pagejump>
<pagejump target="Video" name=" ">
- <label><icon name="it_fernsehen" />Video</label>
+ <layout colspan="0"/>
+ <label><icon name="it_fernsehen" />Video</label>
</pagejump>
<pagejump target="Audio" name=" ">
+ <layout colspan="0"/>
<label><icon name="audio_audio" />Audio</label>
</pagejump>
<pagejump target="Web" name=" ">
+ <layout colspan="0"/>
<label><icon name="it_internet" />Web</label>
</pagejump>
<line />
<pagejump target="Wetter" name=" ">
+ <layout colspan="0"/>
<label><icon name="wetter_sonne" />Wetter</label>
</pagejump>
</navbar>
@@ -206,7 +212,7 @@
<layout colspan="12" />
<multitrigger button1label="↑" button1value="0"
button2label="↓" button2value="1" styling="GreyGreen" mapping="UpDown">
- <label><icon name="fts_rollo" /> Fenster</label>
+ <label>Fenster</label>
<address transform="DPT:1.001" variant="">13/0/3</address>
</multitrigger>
<multitrigger button1label="↑" button1value="0"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j-...@us...> - 2012-09-18 18:48:17
|
Revision: 1013
http://openautomation.svn.sourceforge.net/openautomation/?rev=1013&view=rev
Author: j-n-k
Date: 2012-09-18 18:48:10 +0000 (Tue, 18 Sep 2012)
Log Message:
-----------
Added "legend"-attribute to diagram-Plugin ("both", "popup", "inline", "none")
Fixed XSD for diagram-Plugin
Modified Paths:
--------------
CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
CometVisu/trunk/visu/visu_config.xsd
Modified: CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2012-09-18 16:06:39 UTC (rev 1012)
+++ CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2012-09-18 18:48:10 UTC (rev 1013)
@@ -35,7 +35,7 @@
* - rrd: required, name of RRD
* - unit: optional, unit for axis-labels
* - series: optional, "hour", "day" (default), "week", "month", "year"
- * - period: optional, ?
+ * - period: optional, number of "series" to be shown
* - datasource: optional, RRD-datasource, "MIN", "AVERAGE" (default), "MAX"
* - refresh: optional, refresh-rate in seconds, no refresh if missing
* - yaxismin, yaxismax: optional, limits for y-axis
@@ -43,6 +43,7 @@
* - width, height: optional, width and height of "inline"-diagram
* - previewlabels: optional, show labels on "inline"-diagram
* - popup: optional, make diagram clickable and open popup
+ * - legend: optional, "none", "both", "inline", "popup" select display of legend
* - title: optional, diagram title (overrides label-content)
*
* functions:
@@ -131,6 +132,7 @@
diagram.data("series", $p.attr("series") || "day");
diagram.data("period", $p.attr("period") || 1);
diagram.data("datasource", $p.attr("datasource") || "AVERAGE");
+ diagram.data("legend", $p.attr("legend") || "both");
if ($p.attr("title")) {
diagram.data("label", $p.attr("title"));
} else {
@@ -144,9 +146,12 @@
diagram.addClass("clickable");
var data = jQuery.extend({}, diagram.data());
+ diagram.data("ispopup", false);
+
if ((oldType=="popup") || ($p.attr("popup")=="true")) {
diagram.bind("click", function() {
bDiagram.data(data);
+ bDiagram.data("ispopup", true);
bDiagram.css({height: "90%"});
showPopup("unknown", {title: bDiagram.data('label'), content: bDiagram});
bDiagram.parent("div").css({height: "100%", width: "90%", margin: "auto"}); // define parent as 100%!
@@ -275,6 +280,7 @@
height: {type: "string", required: false},
previewlabels: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
popup: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
+ showlegend: {type: "list", required: false, list: {'both': "both", 'inline': "inline", 'popup': "popup", 'none': "none"}},
title: {type: "string", required: false}
},
elements: {
@@ -337,6 +343,7 @@
bDiagram.data("series", $p.attr("series") || "day");
bDiagram.data("period", $p.attr("period") || 1);
bDiagram.data("datasource", $p.attr("datasource") || "AVERAGE");
+ bDiagram.data("legend", $p.attr("legend") || "both");
if ($p.attr("title")) {
bDiagram.data("label", $p.attr("title"));
} else {
@@ -345,13 +352,15 @@
bDiagram.data("refresh", $p.attr("refresh"));
bDiagram.data("gridcolor", $p.attr("gridcolor") || "");
-
+
+
var data = jQuery.extend({}, bDiagram.data());
$actor.bind("click", function() {
bDiagram.data(data);
bDiagram.css({height: "90%"});
-
+ bDiagram.data("ispopup", true);
+
showPopup("unknown", {title: bDiagram.data('label'), content: bDiagram});
bDiagram.parent("div").css({height: "100%", width: "90%", margin: "auto"}); // define parent as 100%!
bDiagram.empty();
@@ -416,6 +425,7 @@
format: { type: 'format', required: false },
mapping: { type: 'mapping', required: false },
styling: { type: 'styling', required: false },
+ legend: {type: "list", required: false, list: {'both': "both", 'inline': "inline", 'popup': "popup", 'none': "none"}},
title: {type: "string", required: false}
},
elements: {
@@ -448,6 +458,10 @@
if (typeof (content) == "undefined") { // Fenster schon geschlossen oder keine Achsen und RRD konfiguriert
return;
}
+
+ var showlegend = !((diagram.data("legend")=="none")
+ || (diagram.data("ispopup") && (diagram.data("legend")=="inline"))
+ || (!diagram.data("ispopup") && (diagram.data("legend")=="popup")));
var label = diagram.data("label"); // title of diagram
var refresh = diagram.data("refresh");
@@ -470,7 +484,7 @@
mode: "time"
}],
legend: {
- show: 1,
+ show: showlegend,
backgroundColor: "#101010"
},
series: {
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2012-09-18 16:06:39 UTC (rev 1012)
+++ CometVisu/trunk/visu/visu_config.xsd 2012-09-18 18:48:10 UTC (rev 1013)
@@ -215,6 +215,7 @@
<xsd:element name="diagram_popup" type="diagram_popup" />
<xsd:element name="diagram_inline" type="diagram_inline" />
<xsd:element name="diagram_info" type="diagram_info" />
+ <xsd:element name="diagram" type="diagram" />
<xsd:element name="gweather" type="gweather" />
<xsd:element name="rss" type="rss" />
<xsd:element name="rsslog" type="rsslog" />
@@ -271,6 +272,7 @@
<xsd:element name="diagram_popup" type="diagram_popup" />
<xsd:element name="diagram_inline" type="diagram_inline" />
<xsd:element name="diagram_info" type="diagram_info" />
+ <xsd:element name="diagram" type="diagram" />
<xsd:element name="gweather" type="gweather" />
<xsd:element name="rss" type="rss" />
<xsd:element name="rsslog" type="rsslog" />
@@ -311,6 +313,7 @@
<xsd:element name="diagram_popup" type="diagram_popup" />
<xsd:element name="diagram_inline" type="diagram_inline" />
<xsd:element name="diagram_info" type="diagram_info" />
+ <xsd:element name="diagram" type="diagram" />
<xsd:element name="gweather" type="gweather" />
<xsd:element name="rss" type="rss" />
<xsd:element name="jqclock" type="jqclock" />
@@ -511,6 +514,31 @@
</xsd:choice>
</xsd:complexType>
+ <xsd:complexType name="diagram">
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
+ <xsd:element name="label" type="label" maxOccurs="1" />
+ <xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="axis" type="axis"></xsd:element>
+ <xsd:element name="rrd" type="rrd"></xsd:element>
+ </xsd:choice>
+ <xsd:attribute name="rrd" type="xsd:string" use="optional" />
+ <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:attribute name="datasource" type="xsd:string" use="optional" />
+ <xsd:attribute name="linecolor" type="xsd:string" use="optional" />
+ <xsd:attribute name="gridcolor" type="xsd:string" use="optional" />
+ <xsd:attribute name="yaxismin" type="xsd:string" use="optional" />
+ <xsd:attribute name="yaxismax" type="xsd:string" use="optional" />
+ <xsd:attribute name="legend" type="xsd:string" use="optional" />
+ <xsd:attribute name="popup" type="xsd:boolean" use="optional" />
+ <xsd:attribute name="previewlabels" type="xsd:boolean" use="optional" />
+ <xsd:attribute name="title" type="xsd:string" use="optional" />
+ </xsd:complexType>
+
<xsd:complexType name="diagram_inline">
<xsd:choice maxOccurs="unbounded" minOccurs="0">
<xsd:element name="label" type="label" maxOccurs="1" />
@@ -518,7 +546,7 @@
<xsd:element name="axis" type="axis"></xsd:element>
<xsd:element name="rrd" type="rrd"></xsd:element>
</xsd:choice>
- <xsd:attribute name="rrd" type="xsd:string" use="required" />
+ <xsd:attribute name="rrd" type="xsd:string" use="optional" />
<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" />
@@ -540,7 +568,7 @@
<xsd:element name="axis" type="axis"></xsd:element>
<xsd:element name="rrd" type="rrd"></xsd:element>
</xsd:choice>
- <xsd:attribute name="rrd" type="xsd:string" use="required" />
+ <xsd:attribute name="rrd" type="xsd:string" use="optional" />
<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" />
@@ -576,6 +604,7 @@
<xsd:attribute name="gridcolor" type="xsd:string" use="optional" />
<xsd:attribute name="yaxismin" type="xsd:string" use="optional" />
<xsd:attribute name="yaxismax" type="xsd:string" use="optional" />
+ <xsd:attribute name="legend" type="xsd:string" use="optional" />
<xsd:attribute name="title" type="xsd:string" use="optional" />
</xsd:complexType>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pe...@us...> - 2012-09-25 14:30:48
|
Revision: 1019
http://openautomation.svn.sourceforge.net/openautomation/?rev=1019&view=rev
Author: peuter
Date: 2012-09-25 14:30:37 +0000 (Tue, 25 Sep 2012)
Log Message:
-----------
* refactoring of navbar activation handling: all navbars in the current page tree should be visible now no matter which pages you visited in the past
* added scope-attribute to navbars which controls the inheritance level of navbars
scope="0" => no inheritance at all, the navbar in only visibly on the page it is defined for
scope="1" => the navbar is visible on the page is is defined for and the direct child-pages
...
default value scope="-1" => full inheritance (behaviour as it is currently implemented)
Modified Paths:
--------------
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/structure/pure/navbar.js
CometVisu/trunk/visu/visu_config.xsd
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-09-25 12:25:11 UTC (rev 1018)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-09-25 14:30:37 UTC (rev 1019)
@@ -47,7 +47,7 @@
for( key in json ) {
$.event.trigger( '_' + key, json[key] );
}
-}
+};
visu.user = 'demo_user'; // example for setting a user
var configSuffix;
@@ -314,14 +314,14 @@
setup_page(xml);
}
}
- }
+ };
js.onload = function () {
pluginsToLoad -= 1;
if (pluginsToLoad <= 0) {
setup_page(xml);
}
- }
+ };
} );
// then the mappings
@@ -451,11 +451,6 @@
}
if ($.getUrlVar('startpage')) {
- // show the global navbars
- $('#id_0_top_navbar').addClass('navbarActive');
- $('#id_0_right_navbar').addClass('navbarActive');
- $('#id_0_bottom_navbar').addClass('navbarActive');
- $('#id_0_left_navbar').addClass('navbarActive');
scrollToPage( 'id_'+$.getUrlVar('startpage'), 0 );
} else {
scrollToPage( 'id_0', 0 ); // simple solution to show page name on top at start
@@ -474,7 +469,7 @@
// browser back button takes back to the last page
scrollToPage(lastpage,0,true);
}
- }
+ };
$('embed').each( function () {
this.onload = function(){
@@ -680,10 +675,11 @@
main_scroll.seekTo( page, speed ); // scroll to it
// show the navbars for this page
- $('#'+page_id+'_top_navbar').addClass('navbarActive');
+ /*$('#'+page_id+'_top_navbar').addClass('navbarActive');
$('#'+page_id+'_right_navbar').addClass('navbarActive');
$('#'+page_id+'_bottom_navbar').addClass('navbarActive');
- $('#'+page_id+'_left_navbar').addClass('navbarActive');
+ $('#'+page_id+'_left_navbar').addClass('navbarActive');*/
+ initializeNavbars(page_id);
var pagedivs=$('div', '#'+page_id);
for( var i = 0; i<pagedivs.length; i++) { // check for inline diagrams & refresh
@@ -792,7 +788,7 @@
* This creates though some "flickering" so we avoid to use it on images,
* internal iframes and others
*/
- var parenthost = window.location.protocol + "//" + window.location.host
+ var parenthost = window.location.protocol + "//" + window.location.host;
if (target.nodeName == "IFRAME" && src.indexOf(parenthost) != 0) {
target.src = '';
setTimeout( function () {
@@ -1113,6 +1109,69 @@
}
}
+/**
+ * traverse down the page tree from root page id_0 -> .. -> page_id
+ * activate all navbars in that path
+ * deactivate all others
+ * @param page_id
+ */
+function initializeNavbars(page_id) {
+ removeInactiveNavbars(page_id);
+ var tree = [$('#id_0').get(0)];
+ if (page_id!="id_0") {
+ var parts = page_id.split("_");
+ parts = parts.slice(2,parts.length);
+ for (var i=0; i<parts.length; i++) {
+ var item = $('#id_0_'+parts.slice(0,i+1).join('_')+".page",'#pages');
+ if (item.size()==1) {
+ tree.push(item.get(0));
+ }
+ }
+ }
+ var level = 1;
+ $(tree).each(function (i) {
+ var id = $(this).attr('id');
+ var topNav = $('#'+id+'_top_navbar');
+ var rightNav = $('#'+id+'_right_navbar');
+ var bottomNav = $('#'+id+'_bottom_navbar');
+ var leftNav = $('#'+id+'_left_navbar');
+ //console.log(tree.length+"-"+level+"<="+topNav.data('scope'));
+ if (topNav.size()>0) {
+ if (topNav.data('scope')==undefined || topNav.data('scope')<0 || tree.length-level<=topNav.data('scope')) {
+ topNav.addClass('navbarActive');
+ }
+ else {
+ topNav.removeClass('navbarActive');
+ }
+ }
+ if (rightNav.size()>0) {
+ if (rightNav.data('scope')==undefined || rightNav.data('scope')<0 || tree.length-level<=rightNav.data('scope')) {
+ rightNav.addClass('navbarActive');
+ }
+ else {
+ rightNav.removeClass('navbarActive');
+ }
+ }
+ if (bottomNav.size()>0) {
+ if (bottomNav.data('scope')==undefined || bottomNav.data('scope')<0 || tree.length-level<=bottomNav.data('scope')) {
+ bottomNav.addClass('navbarActive');
+ }
+ else {
+ bottomNav.removeClass('navbarActive');
+ }
+ }
+ if (leftNav.size()>0) {
+ if (leftNav.data('scope')==undefined || leftNav.data('scope')<0 || tree.length-level<=leftNav.data('scope')) {
+ leftNav.addClass('navbarActive');
+ }
+ else {
+ leftNav.removeClass('navbarActive');
+ }
+ }
+ level++;
+ });
+}
+
function removeInactiveNavbars(page_id) {
// remove all navbars that do not belong to this page
$('.navbar.navbarActive').each(function(i) {
Modified: CometVisu/trunk/visu/structure/pure/navbar.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/navbar.js 2012-09-25 12:25:11 UTC (rev 1018)
+++ CometVisu/trunk/visu/structure/pure/navbar.js 2012-09-25 14:30:37 UTC (rev 1019)
@@ -21,15 +21,16 @@
var childs = $n.children();
var id = path.split('_'); id.pop();
var position = $n.attr('position') || 'left';
+ var scope = $n.attr('scope') || -1;
var container = $( '<div class="navbar clearfix" id="' + id.join('_')+'_'+ position + '_navbar" />' );
if( $n.attr('name') ) container.append( '<h2 ' + hstyle + '>' + $n.attr('name') + '</h2>' );
$( childs ).each( function(i){
container.append( create_pages( childs[i], path + '_' + i, flavour ) );
} );
-
+ container.data('scope',scope);
var dynamic = $n.attr('dynamic') == 'true' ? true : false;
- var size = $n.attr('width') || 300;
+ var size = $n.attr('width') || 300;
switch( position )
{
case 'top':
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2012-09-25 12:25:11 UTC (rev 1018)
+++ CometVisu/trunk/visu/visu_config.xsd 2012-09-25 14:30:37 UTC (rev 1019)
@@ -324,6 +324,7 @@
<xsd:attribute name="position" type="navbarPositionType" use="required" />
<xsd:attribute name="dynamic" type="true_false" use="optional" />
<xsd:attribute name="width" type="xsd:string" use="optional" />
+ <xsd:attribute name="scope" type="xsd:decimal" use="optional" />
</xsd:complexType>
<!-- more fun part - all widgets - if you add a new widget, you need to define it here -->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pe...@us...> - 2012-10-09 15:08:34
|
Revision: 1036
http://openautomation.svn.sourceforge.net/openautomation/?rev=1036&view=rev
Author: peuter
Date: 2012-10-09 15:08:23 +0000 (Tue, 09 Oct 2012)
Log Message:
-----------
- extended the xsd to allow nested groups
- fixed bug: element size of "nowidget-groups" was not set correct
- removed borders of widgets which are part of "nowidget-groups"
Modified Paths:
--------------
CometVisu/trunk/visu/designs/metal/basic.css
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/visu_config.xsd
Modified: CometVisu/trunk/visu/designs/metal/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/metal/basic.css 2012-10-09 14:12:40 UTC (rev 1035)
+++ CometVisu/trunk/visu/designs/metal/basic.css 2012-10-09 15:08:23 UTC (rev 1036)
@@ -113,11 +113,14 @@
}
.widget.iframe
{
- margin: -1px 0 0 -1px;
- padding: 0.3em;
border: none;
background-image: none;
}
+/* in nowidget groups disable the inner borders and enable a border around the group */
+.group:not(.widget) { border: 1px solid #666;}
+.group:not(.widget) .widget { border: none; margin: 0}
+.group:not(.widget) > div > h2 { border-radius: 0;}
+
.navbar .pagejump { position: relative; }
.pagejump:hover,.pagelink:hover,.pagejump.active {
background-color: #444444;
@@ -288,7 +291,7 @@
margin-left: 0.3em;
}
-.group.widget {
+.group.widget {
border: 1px solid #B3B3B3;
border-radius: 1em;
-moz-border-radius: 1em;
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-10-09 14:12:40 UTC (rev 1035)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-10-09 15:08:23 UTC (rev 1036)
@@ -215,6 +215,10 @@
var $e = $(e);
var ourColspan = $e.children('.widget').data('colspan');
if (ourColspan<=0) return;
+ if (ourColspan==undefined) {
+ // workaround for nowidget groups
+ ourColspan = $e.children('.group').data('colspan');
+ }
var areaColspan = $e.parentsUntil('#centerContainer').last().data('columns') || defaultColumns;
var groupColspan = Math.min(areaColspan,$e.parentsUntil('.widget_container', '.group').data('colspan'));
var ourWidth = Math.min(100,ourColspan/groupColspan*100); // in percent
@@ -435,8 +439,13 @@
var adjustableElements = $('.group .widget_container');
adjustableElements.each(function(i, e) {
var $e = $(e);
+ //console.log($e);
var ourColspan = $e.children('.widget').data('colspan');
if (ourColspan<=0) return;
+ if (ourColspan==undefined) {
+ // workaround for nowidget groups
+ ourColspan = $e.children('.group').data('colspan');
+ }
var areaColspan = $e.parentsUntil('#centerContainer').last().data('columns') || defaultColumns;
var groupColspan = Math.min(areaColspan,$e.parentsUntil('.widget_container', '.group').data('colspan'));
var ourWidth = Math.min(100,ourColspan/groupColspan*100); // in percent
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2012-10-09 14:12:40 UTC (rev 1035)
+++ CometVisu/trunk/visu/visu_config.xsd 2012-10-09 15:08:23 UTC (rev 1036)
@@ -278,6 +278,7 @@
<xsd:element name="jqclock" type="jqclock" />
<xsd:element name="upnpcontroller" type="upnpcontroller" />
<xsd:element name="page" type="page" />
+ <xsd:element name="group" type="group" />
</xsd:choice>
<xsd:attribute name="name" type="xsd:string" use="optional" />
<xsd:attribute name="nowidget" type="xsd:boolean" use="optional" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2012-10-11 16:40:58
|
Revision: 1050
http://openautomation.svn.sourceforge.net/openautomation/?rev=1050&view=rev
Author: hausl
Date: 2012-10-11 16:40:44 +0000 (Thu, 11 Oct 2012)
Log Message:
-----------
Fix: Replacing tabulators by space characters according to Code Style guide
Modified Paths:
--------------
CometVisu/trunk/visu/plugins/strftime/structure_plugin.js
CometVisu/trunk/visu/visu_config.xsd
Modified: CometVisu/trunk/visu/plugins/strftime/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/strftime/structure_plugin.js 2012-10-11 15:48:21 UTC (rev 1049)
+++ CometVisu/trunk/visu/plugins/strftime/structure_plugin.js 2012-10-11 16:40:44 UTC (rev 1050)
@@ -25,64 +25,64 @@
$('head').append('<link rel="stylesheet" href="plugins/strftime/strftime.css" type="text/css" />');
VisuDesign_Custom.prototype.addCreator("strftime", {
- create : function(page, path) {
- var $p = $(page);
- function uniqid() {
- var newDate = new Date;
- return newDate.getTime();
- }
- var id = "strftime_" + uniqid();
+ create : function(page, path) {
+ var $p = $(page);
+ function uniqid() {
+ var newDate = new Date;
+ return newDate.getTime();
+ }
+ var id = "strftime_" + uniqid();
- var ret_val = $('<div class="widget clearfix text strftime"/>');
- ret_val.setWidgetLayout($p);
+ var ret_val = $('<div class="widget clearfix text strftime"/>');
+ ret_val.setWidgetLayout($p);
- var actor = $('<div id="' + id + '"></div>');
- ret_val.append(actor);
+ var actor = $('<div id="' + id + '"></div>');
+ ret_val.append(actor);
- var locale = $p.attr('lang');
- var format = '%c';
- if ($p.attr('format')) {
- format = $p.attr('format');
- }
+ var locale = $p.attr('lang');
+ var format = '%c';
+ if ($p.attr('format')) {
+ format = $p.attr('format');
+ }
- // extend locales by German and French
- Date.ext.locales['de'] = {
- a: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
- A: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'],
- b: ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
- B: ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'],
- c: '%a %d %b %Y %T %Z',
- p: ['', ''],
- P: ['', ''],
- x: '%d.%m.%Y',
- X: '%T'
- };
- Date.ext.locales['fr'] = {
- a: ['dim', 'lun', 'mar', 'mer', 'jeu', 'ven', 'sam'],
- A: ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'],
- b: ['jan', 'fév', 'mar', 'avr', 'mai', 'jun', 'jui', 'aoû', 'sep', 'oct', 'nov', 'déc'],
- B: ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'],
- c: '%a %d %b %Y %T %Z',
- p: ['', ''],
- P: ['', ''],
- x: '%d.%m.%Y',
- X: '%T'
- };
+ // extend locales by German and French
+ Date.ext.locales['de'] = {
+ a: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
+ A: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'],
+ b: ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
+ B: ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'],
+ c: '%a %d %b %Y %T %Z',
+ p: ['', ''],
+ P: ['', ''],
+ x: '%d.%m.%Y',
+ X: '%T'
+ };
+ Date.ext.locales['fr'] = {
+ a: ['dim', 'lun', 'mar', 'mer', 'jeu', 'ven', 'sam'],
+ A: ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'],
+ b: ['jan', 'fév', 'mar', 'avr', 'mai', 'jun', 'jui', 'aoû', 'sep', 'oct', 'nov', 'déc'],
+ B: ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'],
+ c: '%a %d %b %Y %T %Z',
+ p: ['', ''],
+ P: ['', ''],
+ x: '%d.%m.%Y',
+ X: '%T'
+ };
- f = function() {
- var d = new Date();
- d.locale = locale;
- var iso = d.strftime(format);
- $("#" + id).html(iso);
- window.setTimeout(f, 1000);
- };
- f();
+ f = function() {
+ var d = new Date();
+ d.locale = locale;
+ var iso = d.strftime(format);
+ $("#" + id).html(iso);
+ window.setTimeout(f, 1000);
+ };
+ f();
- return ret_val;
- },
- attributes : {
- lang : {type : "list" , required : false, list : {en : "en", de : "de", fr : "fr"}},
- format : {type : "string", required : false},
- },
- content : false
+ return ret_val;
+ },
+ attributes : {
+ lang : {type : "list" , required : false, list : {en : "en", de : "de", fr : "fr"}},
+ format : {type : "string", required : false},
+ },
+ content : false
});
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2012-10-11 15:48:21 UTC (rev 1049)
+++ CometVisu/trunk/visu/visu_config.xsd 2012-10-11 16:40:44 UTC (rev 1050)
@@ -678,15 +678,15 @@
</xsd:complexType>
<xsd:complexType name="strftime">
- <xsd:attribute name="lang" use="optional">
- <xsd:simpleType>
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="en" />
- <xsd:enumeration value="de" />
- <xsd:enumeration value="fr" />
- </xsd:restriction>
- </xsd:simpleType>
- </xsd:attribute>
+ <xsd:attribute name="lang" use="optional">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="en" />
+ <xsd:enumeration value="de" />
+ <xsd:enumeration value="fr" />
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
<xsd:attribute name="format" type="xsd:string" use="optional" />
</xsd:complexType>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pe...@us...> - 2012-10-24 16:27:09
|
Revision: 1074
http://openautomation.svn.sourceforge.net/openautomation/?rev=1074&view=rev
Author: peuter
Date: 2012-10-24 16:27:03 +0000 (Wed, 24 Oct 2012)
Log Message:
-----------
* removed border from nowidget-group, which are direct children of page elements
* added workaround for correct height calculation of rowspans in metal-design
Modified Paths:
--------------
CometVisu/trunk/visu/designs/metal/basic.css
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/designs/metal/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/metal/basic.css 2012-10-24 15:23:22 UTC (rev 1073)
+++ CometVisu/trunk/visu/designs/metal/basic.css 2012-10-24 16:27:03 UTC (rev 1074)
@@ -131,7 +131,6 @@
background-image: -o-linear-gradient(#444444, #2d2d2d); /* Opera 11.10+ */
background-image: linear-gradient(#444444, #2d2d2d);
}
-.widget.innerrowspan { border-width: 0; }
.widget.iframe
{
border: none;
@@ -139,7 +138,8 @@
}
/* in nowidget groups disable the inner borders and enable a border around the group */
.group:not(.widget) { border: 1px solid #666; margin: -1px 0 0 -1px; }
-.group:not(.widget) .widget { border: none; margin: 0}
+.page > div > .widget_container > .group:not(.widget) { border: none; margin: 0; }
+.group:not(.widget) > div > .widget_container > .widget:not(.group) { border: none; margin: 0; }
.group:not(.widget) > div > h2 { border-radius: 0;}
.navbar .pagejump { position: relative; }
@@ -160,11 +160,15 @@
.widget .label
{
float:left;
- width:49%;
+ width:50%;
text-align:left;
padding-left: 0.2em;
line-height: 2em;
vertical-align: middle;
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ -ms-box-sizing: border-box;
}
.text > div { line-height: 2em; }
.widget .label img.icon, .text img.icon { vertical-align: middle; margin-top: -0.3em; }
@@ -180,14 +184,13 @@
.widget .actor
{
float:left;
- margin-left:0.2em;
text-align:left;
line-height: 2em;
}
.widget .switchPressed, .widget .switchUnpressed, .widget .ui-slider {
line-height: normal;
}
-.widget .actor:first-child { margin-left: 0; }
+.widget > .actor:first-child { margin-left: 0; }
.widget .actor div
{
float:left;
@@ -635,16 +638,6 @@
}
.iframe .actor { width: 98%; }
-.innerrowspan { /* test: Absolute Positionierung scheint in machen Browser das overflow: hidden der Group zu umgehen */
- position: relative;
- width: 100%;
- height: 100%;
- padding: 0;
-}
-.innerrowspan > div {
- margin: 0.3em;
-}
-
#navbarTop .navbar .widget_container, #navbarBottom .navbar .widget_container {
width: auto;
}
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-10-24 15:23:22 UTC (rev 1073)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-10-24 16:27:03 UTC (rev 1074)
@@ -242,10 +242,18 @@
var singleHeightMargin = $('#containerDiv').outerHeight(true );
$('#calcrowspan').remove();
-
- // append css style
- $('head').append('<style id="'+className+'Style">.rowspan' + rowspan + ' { height: ' + ((rowspan-1)*singleHeightMargin+singleHeight) + 'px; overflow:hidden; position:relative;} </style>').data(className, 1);
+ if (clientDesign=="metal") {
+ // Ugly workaround for the metal-design until someone comes up with a better solution
+ singleHeightMargin--;
+ singleHeight--;
+ // append css style
+ $('head').append('<style id="'+className+'Style">.rowspan' + rowspan + ' { height: ' + ((rowspan-1)*singleHeightMargin+singleHeight) + 'px; position:relative;} </style>').data(className, 1);
+ }
+ else {
+ // append css style
+ $('head').append('<style id="'+className+'Style">.rowspan' + rowspan + ' { height: ' + ((rowspan-1)*singleHeightMargin+singleHeight) + 'px; overflow:hidden; position:relative;} </style>').data(className, 1);
+ }
}
return className;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pe...@us...> - 2012-10-24 17:40:50
|
Revision: 1075
http://openautomation.svn.sourceforge.net/openautomation/?rev=1075&view=rev
Author: peuter
Date: 2012-10-24 17:40:41 +0000 (Wed, 24 Oct 2012)
Log Message:
-----------
* removed wrong parts of the rowspan workaround
* css code cleanup
Modified Paths:
--------------
CometVisu/trunk/visu/designs/metal/basic.css
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/designs/metal/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/metal/basic.css 2012-10-24 16:27:03 UTC (rev 1074)
+++ CometVisu/trunk/visu/designs/metal/basic.css 2012-10-24 17:40:41 UTC (rev 1075)
@@ -700,10 +700,8 @@
}
#navbarTop { border-bottom: 2px solid #666; }
#navbarBottom { border-top: 2px solid #666; }
-.navbar .pagejump .label > img, .navbar .pagejump .label > img {
+.navbar .pagejump .label > img {
height: 44px !important;
-}
-.navbar .pagejump .label > img, .navbar .pagejump .label > img {
display: block;
margin: 0 auto;
}
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-10-24 16:27:03 UTC (rev 1074)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-10-24 17:40:41 UTC (rev 1075)
@@ -244,9 +244,7 @@
$('#calcrowspan').remove();
if (clientDesign=="metal") {
- // Ugly workaround for the metal-design until someone comes up with a better solution
- singleHeightMargin--;
- singleHeight--;
+ // Workaround for the metal-design
// append css style
$('head').append('<style id="'+className+'Style">.rowspan' + rowspan + ' { height: ' + ((rowspan-1)*singleHeightMargin+singleHeight) + 'px; position:relative;} </style>').data(className, 1);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <net...@us...> - 2012-10-28 08:54:21
|
Revision: 1078
http://openautomation.svn.sourceforge.net/openautomation/?rev=1078&view=rev
Author: netzkind
Date: 2012-10-28 08:54:08 +0000 (Sun, 28 Oct 2012)
Log Message:
-----------
removed the old editor, hopefully without collateral damage
cleaned structure-files to no longer contain editor-only elements
move lists to xsd, change xsd-types to boolean where applicable
Modified Paths:
--------------
CometVisu/trunk/visu/index.html
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/plugins/clock/structure_plugin.js
CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js
CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
CometVisu/trunk/visu/plugins/gweather/structure_plugin.js
CometVisu/trunk/visu/plugins/jqclock/structure_plugin.js
CometVisu/trunk/visu/plugins/rss/structure_plugin.js
CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js
CometVisu/trunk/visu/plugins/strftime/structure_plugin.js
CometVisu/trunk/visu/plugins/svg/structure_plugin.js
CometVisu/trunk/visu/plugins/upnpcontroller/structure_plugin.js
CometVisu/trunk/visu/structure/pure/_common.js
CometVisu/trunk/visu/structure/pure/break.js
CometVisu/trunk/visu/structure/pure/group.js
CometVisu/trunk/visu/structure/pure/iframe.js
CometVisu/trunk/visu/structure/pure/image.js
CometVisu/trunk/visu/structure/pure/imagetrigger.js
CometVisu/trunk/visu/structure/pure/include.js
CometVisu/trunk/visu/structure/pure/info.js
CometVisu/trunk/visu/structure/pure/infotrigger.js
CometVisu/trunk/visu/structure/pure/line.js
CometVisu/trunk/visu/structure/pure/multitrigger.js
CometVisu/trunk/visu/structure/pure/navbar.js
CometVisu/trunk/visu/structure/pure/page.js
CometVisu/trunk/visu/structure/pure/pagejump.js
CometVisu/trunk/visu/structure/pure/slide.js
CometVisu/trunk/visu/structure/pure/switch.js
CometVisu/trunk/visu/structure/pure/text.js
CometVisu/trunk/visu/structure/pure/toggle.js
CometVisu/trunk/visu/structure/pure/trigger.js
CometVisu/trunk/visu/structure/pure/unknown.js
CometVisu/trunk/visu/structure/pure/video.js
CometVisu/trunk/visu/structure/pure/wgplugin_info.js
CometVisu/trunk/visu/visu_config.xml
CometVisu/trunk/visu/visu_config.xsd
CometVisu/trunk/visu/visu_config_2d3d.xml
CometVisu/trunk/visu/visu_config_demo.xml
CometVisu/trunk/visu/visu_config_metal.xml
Added Paths:
-----------
CometVisu/trunk/visu/get_designs.php
Removed Paths:
-------------
CometVisu/trunk/visu/edit_config.html
Deleted: CometVisu/trunk/visu/edit_config.html
===================================================================
--- CometVisu/trunk/visu/edit_config.html 2012-10-25 16:47:04 UTC (rev 1077)
+++ CometVisu/trunk/visu/edit_config.html 2012-10-28 08:54:08 UTC (rev 1078)
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!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>Visu - Editor-Modus</title>
- <link rel="icon" href="icon/comet_16x16_ff0000.png" type="image/png" />
- <meta name="viewport" content="width=device-width, initial-scale=1" />
- <link rel="stylesheet" type="text/css" href="edit/style_edit.css" />
- <link rel="stylesheet" type="text/css" href="edit/jquery-ui.css" />
- <script src="dependencies/jquery.js" type="text/javascript"></script>
- <script src="lib/compatibility.js" type="text/javascript"></script>
- <script src="dependencies/jquery-ui.js" type="text/javascript"></script>
- <script src="dependencies/scrollable.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/iconhandler.js" type="text/javascript"></script>
- <!-- Load the widgets: start -->
- <script src="structure/pure/_common.js" type="text/javascript"></script>
- <script src="structure/pure/break.js" type="text/javascript"></script>
- <script src="structure/pure/group.js" type="text/javascript"></script>
- <script src="structure/pure/iframe.js" type="text/javascript"></script>
- <script src="structure/pure/image.js" type="text/javascript"></script>
- <script src="structure/pure/imagetrigger.js" type="text/javascript"></script>
- <script src="structure/pure/include.js" type="text/javascript"></script>
- <script src="structure/pure/info.js" type="text/javascript"></script>
- <script src="structure/pure/infotrigger.js" type="text/javascript"></script>
- <script src="structure/pure/line.js" type="text/javascript"></script>
- <script src="structure/pure/multitrigger.js" type="text/javascript"></script>
- <script src="structure/pure/page.js" type="text/javascript"></script>
- <script src="structure/pure/slide.js" type="text/javascript"></script>
- <script src="structure/pure/switch.js" type="text/javascript"></script>
- <script src="structure/pure/text.js" type="text/javascript"></script>
- <script src="structure/pure/toggle.js" type="text/javascript"></script>
- <script src="structure/pure/trigger.js" type="text/javascript"></script>
- <script src="structure/pure/unknown.js" type="text/javascript"></script>
- <script src="structure/pure/video.js" type="text/javascript"></script>
- <script src="designs/structure_custom.js" type="text/javascript"></script>
- <!-- Load the widgets: end -->
- <script src="designs/structure_custom.js" type="text/javascript"></script>
- <script type="text/javascript">
- // always force Reload in Editor-Mode
- forceReload = true;
- </script>
- <script src="lib/templateengine.js" type="text/javascript"></script>
- <script src="transforms/transform_default.js" type="text/javascript"></script>
- <script src="transforms/transform_knx.js" type="text/javascript"></script>
- <script src="edit/cometeditor.js" type="text/javascript"></script>
- <script src="edit/visuconfig_edit.js" type="text/javascript"></script>
- <script src="dependencies/jquery.jnotify.js" type="text/javascript"></script>
- <script src="edit/json2.js" type="text/javascript"></script>
- <style type="text/css">
- .loading { display: none; }
- </style>
- </head>
- <body class="editmode">
- <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;" 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" class="loading">
- <hr />
- <div class="footer"></div>
- </div>
-
- <div id="addMaster">
- <form method="post" action="self">
- <div class="addwidget">
- <h2 class="create">Insert new widget</h2>
- <h2 class="edit">Edit widget</h2>
- <div class="editcontrols">
- <label for="add_type">Typ</label>
- <div class="input">
- <select id="add_type">
- <option>-</option>
- </select>
- </div>
-
- <div class="inputs">
-
- </div>
-
- </div>
-
- <input type="button" id="add_submit" value="OK"/>
- <input type="button" id="add_cancel" value="Cancel"/>
-
- <p><small class="create">The new widget will be added at the end of the current page. You can drag&drop it to the desired location on this page after creation.</small></p>
- </div>
- </form>
- </div>
- <div id="StatusBar" style="height: 20px;">
- </div>
- <div id="controlcontainer" class="loading">
- <div id="helplink" onClick="window.open('https://sourceforge.net/apps/mediawiki/openautomation/index.php?title=Benutzerhandbuch')">help</div>
- <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>
Added: CometVisu/trunk/visu/get_designs.php
===================================================================
--- CometVisu/trunk/visu/get_designs.php (rev 0)
+++ CometVisu/trunk/visu/get_designs.php 2012-10-28 08:54:08 UTC (rev 1078)
@@ -0,0 +1,24 @@
+<?php
+define('FOLDER_DESIGNS', "../designs/");
+
+$arrDesigns = array();
+
+if (false !== ($handle = opendir(FOLDER_DESIGNS))) {
+ while (false !== ($strFile = readdir($handle))) {
+ if ($strFile == "." || $strFile == "..") {
+ continue;
+ }
+
+ if (true === is_dir(FOLDER_DESIGNS . $strFile) && true === file_exists(FOLDER_DESIGNS . $strFile . "/basic.css")) {
+ $arrDesigns[] = $strFile;
+ }
+ }
+}
+
+sort($arrDesigns);
+
+Header("Content-type: application/json");
+print json_encode($arrDesigns);
+exit;
+
+?>
\ No newline at end of file
Modified: CometVisu/trunk/visu/index.html
===================================================================
--- CometVisu/trunk/visu/index.html 2012-10-25 16:47:04 UTC (rev 1077)
+++ CometVisu/trunk/visu/index.html 2012-10-28 08:54:08 UTC (rev 1078)
@@ -4,6 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CometVisu-Client</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="icon" href="icon/comet_16x16_000000.png" type="image/png" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0; webkit-user-select: none;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-10-25 16:47:04 UTC (rev 1077)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-10-28 08:54:08 UTC (rev 1078)
@@ -386,9 +386,14 @@
var extend = $(this).attr('hrefextend');
var sPath = window.location.pathname;
var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
+
+ // @TODO: make this match once the new editor is finished-ish.
var editMode = 'edit_config.html' == sPage;
+
+ // skip this element if it's edit-only and we are non-edit, or the other way round
if( editMode && '!edit' == condition ) return;
if( !editMode && 'edit' == condition ) return;
+
var text = $(this).text();
switch( extend )
{
@@ -606,39 +611,6 @@
var creator = design.getCreator(page.nodeName);
var retval = creator.create(page, path, flavour, type);
- node = $(page).get(0);
- var attributes = {};
- if (typeof node.attributes != "undefined") {
- for(var i=0; i<node.attributes.length; i++) {
- if(node.attributes.item(i).specified) {
- attributes[node.attributes.item(i).nodeName]=node.attributes.item(i).nodeValue;
- }
- }
- } else {
- $.extend(attributes, node);
- }
-
- var configData = {attributes: {}, elements: {}};
- if (typeof creator.attributes != "undefined") {
- $.each(creator.attributes, function (index, e) {
- if ($(page).attr(index)) {
- configData.attributes[index] = $(page).attr(index);
- }
- });
- }
-
- if (typeof creator.elements != "undefined") {
- $.each(creator.elements, function (index, e) {
- var elements = $(page).find(index);
- configData.elements[index] = elements;
- });
- }
-
- retval.data("configData", configData)
- .data("path", path)
- .data("nodeName", page.nodeName)
- .data("textContent", page.textContent);
-
if (jQuery(retval).is(".widget") || (jQuery(retval).is(".group")) ) {
retval = jQuery("<div class='widget_container " +
(retval.data("rowspanClass") ? retval.data("rowspanClass") : '')+"' />")
@@ -802,7 +774,7 @@
/* FIXME - Question: should this belong to the VisuDesign object so that it */
/* is possible to overload?!? */
/** ************************************************************************* */
-function refreshAction( target, src ) {
+function refreshAction( target, src ) {
/* Special treatment for (external) iframes:
* we need to clear it and reload it in another thread as otherwise stays
* blank for some targets/sites and src = src doesnt work anyway on external
@@ -817,7 +789,7 @@
}, 0);
} else {
target.src = src + '&' + new Date().getTime();
- }
+ }
}
function setupRefreshAction() {
@@ -843,7 +815,7 @@
$body.append($div);
- $.getJSON("edit/get_designs.php", function(data) {
+ $.getJSON("get_designs.php", function(data) {
$div.empty();
$div.append("<h1>Please select design</h1>");
Modified: CometVisu/trunk/visu/plugins/clock/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/clock/structure_plugin.js 2012-10-25 16:47:04 UTC (rev 1077)
+++ CometVisu/trunk/visu/plugins/clock/structure_plugin.js 2012-10-28 08:54:08 UTC (rev 1078)
@@ -123,14 +123,5 @@
if( data.address[addr][1] == true ) continue; // skip read only
visu.write( addr.substr(1), transformEncode( data.address[addr][0], data.value ) );
}
- },
- attributes: {
- rowspan: { type: 'numeric', required: false },
- colspan: { type: 'numeric', required: false }
- },
- elements: {
- label: { type: 'string', required: true, multi: false },
- address: { type: 'address', required: true, multi: true }
- },
- content: false
+ }
});
\ No newline at end of file
Modified: CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js 2012-10-25 16:47:04 UTC (rev 1077)
+++ CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js 2012-10-28 08:54:08 UTC (rev 1078)
@@ -156,16 +156,7 @@
toHex( value*255/100 )+
color.substring(7);
jQuery.farbtastic( element ).setColor( color );
- },
- attributes: {
- rowspan: { type: 'numeric', required: false },
- colspan: { type: 'numeric', required: false }
- },
- elements: {
- label: { type: 'string', required: true, multi: false },
- address: { type: 'address', required: true, multi: true, options: {variant: ['r', 'g', 'b']} }
- },
- content: false
+ }
});
/**
Modified: CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2012-10-25 16:47:04 UTC (rev 1077)
+++ CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2012-10-28 08:54:08 UTC (rev 1078)
@@ -209,87 +209,19 @@
VisuDesign_Custom.prototype.addCreator("diagram_inline", {
create: function( page, path ) {
return createDiagram(page, path, "inline");
- },
- attributes: {
- rrd: {type: "string", required: false},
- width: {type: "string", required: false},
- height: {type: "string", required: false},
- unit: {type: "string", required: false},
- series: {type: "list", required: false, list: {hour: "hours", day: "days", week: "weeks", month: "months", year: "years"}},
- period: {type: "numeric", required: false},
- datasource: {type: "list", required: false, list: {'MIN': "Min", 'AVERAGE': "Avg", 'MAX': "Max"}},
- refresh: {type: "numeric", required: false},
- yaxismin: {type: "numeric", required: false},
- yaxismax: {type: "numeric", required: false},
- linecolor: {type: "string", required: false},
- colspan: {type: "numeric", required: false},
- rowspan: {type: "numeric", required: false},
- gridcolor: {type: "string", required: false},
- title: {type: "string", required: false}
- },
- elements: {
- label: { type: 'string', required: false, multi: false },
- rrd: { type: 'string', required: false, multi: true },
- },
- content: false
+ }
});
VisuDesign_Custom.prototype.addCreator("diagram_popup", {
create: function(page,path) {
return createDiagram(page, path, "popup");
- },
- attributes: {
- rrd: {type: "string", required: false},
- unit: {type: "string", required: false},
- series: {type: "list", required: false, list: {hour: "hours", day: "days", week: "weeks", month: "months", year: "years"}},
- period: {type: "numeric", required: false},
- datasource: {type: "list", required: false, list: {'MIN': "Min", 'AVERAGE': "Avg", 'MAX': "Max"}},
- refresh: {type: "numeric", required: false},
- yaxismin: {type: "numeric", required: false},
- yaxismax: {type: "numeric", required: false},
- linecolor: {type: "string", required: false},
- gridcolor: {type: "string", required: false},
- tooltip: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- width: {type: "string", required: false},
- height: {type: "string", required: false},
- title: {type: "string", required: false}
- },
- elements: {
- label: { type: 'string', required: false, multi: false },
- rrd: { type: 'string', required: false, multi: true },
- },
- content: false
+ }
});
VisuDesign_Custom.prototype.addCreator("diagram", {
create: function(page,path) {
return createDiagram(page, path, "none");
- },
- attributes: {
- rrd: {type: "string", required: false},
- unit: {type: "string", required: false},
- series: {type: "list", required: false, list: {hour: "hours", day: "days", week: "weeks", month: "months", year: "years"}},
- period: {type: "numeric", required: false},
- datasource: {type: "list", required: false, list: {'MIN': "Min", 'AVERAGE': "Avg", 'MAX': "Max"}},
- refresh: {type: "numeric", required: false},
- yaxismin: {type: "numeric", required: false},
- yaxismax: {type: "numeric", required: false},
- linecolor: {type: "string", required: false},
- gridcolor: {type: "string", required: false},
- tooltip: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- width: {type: "string", required: false},
- height: {type: "string", required: false},
- previewlabels: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- popup: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- legend: {type: "list", required: false, list: {'both': "both", 'inline': "inline", 'popup': "popup", 'none': "none"}},
- legendposition: {type: "list", rquired: false, list: {'se' : "bottomright", 'sw':"bottomleft", 'ne' : "topright", 'nw':"topleft"}},
- title: {type: "string", required: false}
- },
- elements: {
- label: { type: 'string', required: false, multi: false },
- rrd: { type: 'string', required: false, multi: true },
- },
- content: false
+ }
});
VisuDesign_Custom.prototype.addCreator("diagram_info", {
@@ -412,32 +344,7 @@
var element = $(this);
var value = defaultUpdate( e, d, element );
element.addClass('switchUnpressed');
- },
- attributes: {
- rrd: {type: "string", required: false},
- unit: {type: "string", required: false},
- series: {type: "list", required: false, list: {hour: "hours", day: "days", week: "weeks", month: "months", year: "years"}},
- period: {type: "numeric", required: false},
- datasource: {type: "list", required: false, list: {'MIN': "Min", 'AVERAGE': "Avg", 'MAX': "Max"}},
- refresh: {type: "numeric", required: false},
- tooltip: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- linecolor: {type: "string", required: false},
- gridcolor: {type: "string", required: false},
- yaxismin: {type: "numeric", required: false},
- yaxismax: {type: "numeric", required: false},
- format: {type: 'format', required: false },
- mapping: {type: 'mapping', required: false },
- styling: {type: 'styling', required: false },
- legend: {type: "list", required: false, list: {'both': "both", 'inline': "inline", 'popup': "popup", 'none': "none"}},
- legendposition: {type: "list", rquired: false, list: {'se' : "bottomright", 'sw':"bottomleft", 'ne' : "topright", 'nw':"topleft"}},
- title: {type: "string", required: false}
- },
- elements: {
- label: { type: 'string', required: false, multi: false },
- address: { type: 'address', required: true, multi: true },
- rrd: { type: 'string', required: false, multi: true },
- },
- content: {type: "string", required: true}
+ }
});
diagramColors = {
Modified: CometVisu/trunk/visu/plugins/gweather/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/gweather/structure_plugin.js 2012-10-25 16:47:04 UTC (rev 1077)
+++ CometVisu/trunk/visu/plugins/gweather/structure_plugin.js 2012-10-28 08:54:08 UTC (rev 1078)
@@ -58,18 +58,7 @@
refreshGweather(gweather, {});
return ret_val;
- },
- attributes: {
- width: {type: "string", required: false},
- height: {type: "string", required: false},
- refresh: {type: "numeric", required: false},
- city: {type: "string", required: true},
- lang: {type: "string", required: false},
- image_url: {type: "string", required: false},
- current: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- forecast: {type: "list", required: false, list: {'true': "yes", 'false': "no"}}
- },
- content: {type: "string", required: true}
+ }
});
function refreshGweather(gweather, data) {
Modified: CometVisu/trunk/visu/plugins/jqclock/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/jqclock/structure_plugin.js 2012-10-25 16:47:04 UTC (rev 1077)
+++ CometVisu/trunk/visu/plugins/jqclock/structure_plugin.js 2012-10-28 08:54:08 UTC (rev 1078)
@@ -55,15 +55,6 @@
ret_val.append(label).append(actor);
return ret_val;
- },
- attributes: {
- width: {type: "string", required: false},
- height: {type: "string", required: false},
- lang: {type: "list", required: true, list: {'de':'Deutsch','en':'English','es':'Espanol','fr':'Francais','it':'Italiano','ru':'Ruski'}},
- date: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- colspan: { type: 'numeric', required: false },
- rowspan: { type: 'numeric', required: false }
- },
- content: false
+ }
});
Modified: CometVisu/trunk/visu/plugins/rss/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/rss/structure_plugin.js 2012-10-25 16:47:04 UTC (rev 1077)
+++ CometVisu/trunk/visu/plugins/rss/structure_plugin.js 2012-10-28 08:54:08 UTC (rev 1078)
@@ -72,24 +72,7 @@
refreshRSS(rss, {});
return ret_val;
- },
- attributes: {
- src: {type: "string", required: true},
- width: {type: "string", required: false},
- height: {type: "string", required: false},
- refresh: {type: "numeric", required: false},
- limit: {type: "numeric", required: false},
- header: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- date: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- content: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- snippet: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- showerror: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- ssl: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- linktarget: {type: "list", required: false, list: {"_new": "_new", "_self": "_self"}},
- link: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- title: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- },
- content: {type: "string", required: true}
+ }
});
function refreshRSS(rss, data) {
Modified: CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js 2012-10-25 16:47:04 UTC (rev 1077)
+++ CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js 2012-10-28 08:54:08 UTC (rev 1078)
@@ -75,19 +75,7 @@
refreshRSSlog(rss, {});
return ret_val;
- },
- attributes: {
- src: {type: "string", required: true},
- filter: {type: "string", required: false},
- width: {type: "string", required: false},
- height: {type: "string", required: false},
- refresh: {type: "numeric", required: false},
- content: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- datetime: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- mode: {type: "list", required: false, list: {'first': 'first', 'last': 'last', 'rollover':'rollover' }},
- timeformat: {type: "string", required: false},
- },
- content: false
+ }
});
function refreshRSSlog(rss, data) {
Modified: CometVisu/trunk/visu/plugins/strftime/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/strftime/structure_plugin.js 2012-10-25 16:47:04 UTC (rev 1077)
+++ CometVisu/trunk/visu/plugins/strftime/structure_plugin.js 2012-10-28 08:54:08 UTC (rev 1078)
@@ -79,10 +79,5 @@
f();
return ret_val;
- },
- attributes : {
- lang : {type : "list" , required : false, list : {en : "en", de : "de", fr : "fr"}},
- format : {type : "string", required : false},
- },
- content : false
+ }
});
Modified: CometVisu/trunk/visu/plugins/svg/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/svg/structure_plugin.js 2012-10-25 16:47:04 UTC (rev 1077)
+++ CometVisu/trunk/visu/plugins/svg/structure_plugin.js 2012-10-28 08:54:08 UTC (rev 1078)
@@ -71,18 +71,5 @@
element.find('#line'+(i+1)).attr('y1',9);
element.find('#line'+(i+1)).attr('y2',9);
}
- },
- attributes: {
- format: { type: 'format' , required: false },
- mapping: { type: 'mapping', required: false },
- styling: { type: 'styling', required: false },
- colspan: { type: 'numeric', required: false },
- rowspan: { type: 'numeric', required: false }
- },
- elements: {
- label: { type: 'string' , required: true , multi: false },
- address: { type: 'address', required: true , multi: true },
- layout: { type: 'layout' , required: false, multi: false }
- },
- content: false
+ }
});
\ No newline at end of file
Modified: CometVisu/trunk/visu/plugins/upnpcontroller/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/upnpcontroller/structure_plugin.js 2012-10-25 16:47:04 UTC (rev 1077)
+++ CometVisu/trunk/visu/plugins/upnpcontroller/structure_plugin.js 2012-10-28 08:54:08 UTC (rev 1078)
@@ -81,15 +81,7 @@
refreshUpnpcontroller(upnpcontroller, {}, false);
return ret_val;
- },
- attributes: {
- label: {type: "string", required: true},
- player_ip_addr: {type: "string", required: true},
- player_port: {type: "string", required: false},
- refresh: {type: "numeric", required: true},
- debug: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- },
- content: false
+ }
});
Modified: CometVisu/trunk/visu/structure/pure/_common.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/_common.js 2012-10-25 16:47:04 UTC (rev 1077)
+++ CometVisu/trunk/visu/structure/pure/_common.js 2012-10-28 08:54:08 UTC (rev 1078)
@@ -209,13 +209,6 @@
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},
- position: {type: 'object', required: false} // either {x:,y:} or an jQuery object
}
});
Modified: CometVisu/trunk/visu/structure/pure/break.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/break.js 2012-10-25 16:47:04 UTC (rev 1077)
+++ CometVisu/trunk/visu/structure/pure/break.js 2012-10-28 08:54:08 UTC (rev 1078)
@@ -18,8 +18,5 @@
basicdesign.addCreator('break', {
create: function( element, path, flavour, type ) {
return $( '<br />' );
- },
- attributes: {},
- elements: {},
- content: false
+ }
});
\ No newline at end of file
Modified: CometVisu/trunk/visu/structure/pure/group.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/group.js 2012-10-25 16:47:04 UTC (rev 1077)
+++ CometVisu/trunk/visu/structure/pure/group.js 2012-10-28 08:54:08 UTC (rev 1078)
@@ -37,15 +37,5 @@
if( flavour ) ret_val.addClass( 'flavour_' + flavour );
ret_val.append( container );
return ret_val;
- },
- attributes: {
- align: { type: 'string' , required: false },
- flavour: { type: 'string' , required: false },
- colspan: { type: 'numeric', required: false },
- rowspan: { type: 'numeric', required: false },
- ...
[truncated message content] |
|
From: <pe...@us...> - 2012-10-30 18:59:42
|
Revision: 1082
http://openautomation.svn.sourceforge.net/openautomation/?rev=1082&view=rev
Author: peuter
Date: 2012-10-30 18:59:29 +0000 (Tue, 30 Oct 2012)
Log Message:
-----------
* added align attribute to pagejump, switch, toggle, trigger and info. Real alignment has to be done via css, example rules added to metal design
Modified Paths:
--------------
CometVisu/trunk/visu/designs/metal/basic.css
CometVisu/trunk/visu/structure/pure/info.js
CometVisu/trunk/visu/structure/pure/pagejump.js
CometVisu/trunk/visu/structure/pure/switch.js
CometVisu/trunk/visu/structure/pure/toggle.js
CometVisu/trunk/visu/structure/pure/trigger.js
CometVisu/trunk/visu/visu_config.xsd
Modified: CometVisu/trunk/visu/designs/metal/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/metal/basic.css 2012-10-28 21:30:25 UTC (rev 1081)
+++ CometVisu/trunk/visu/designs/metal/basic.css 2012-10-30 18:59:29 UTC (rev 1082)
@@ -728,4 +728,32 @@
.rowspan { overflow:none; }
.jqclock .clockdate { float: left; }
.jqclock .clocktime { min-width: 4em; display: block; float: left; margin: 0 0 0 0.4em; }
-.strftime { font-family: Helvetica, Arial, sans-serif; font-size: 5mm; }
\ No newline at end of file
+.strftime { font-family: Helvetica, Arial, sans-serif; font-size: 5mm; }
+
+/* START: alignment of widgets */
+.widget.center:not(.switch):not(.toggle):not(.trigger) > div,
+.widget.right:not(.switch):not(.toggle):not(.trigger) > div {
+ width: 50%;
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ -ms-box-sizing: border-box;
+}
+.widget.center:not(.switch):not(.toggle):not(.trigger) > div { text-align: center; }
+.widget.right:not(.switch):not(.toggle):not(.trigger) > div { text-align: right; }
+
+.widget:not(.switch):not(.toggle):not(.trigger) > .actor:first-child,
+.widget:not(.switch):not(.toggle):not(.trigger) > .actor:first-child > div {
+ float: none; width: auto;
+}
+.widget_container { position: relative; }
+.widget.center.toggle > .actor:first-child,
+.widget.center.switch > .actor:first-child,
+.widget.center.trigger > .actor:first-child {
+ position: absolute; left: 50%; margin-left: -2em;
+}
+.widget.center > .actor > div, .widget.right > .actor > div { float: none; }
+
+#navbarTop .pagejump.center > div, #navbarBottom .pagejump.center > div { width: 100%; }
+#navbarTop .pagejump.right .label, #navbarBottom .pagejump.right .label { text-align: center !important; float: right; }
+/* END: alignment of widgets */
\ No newline at end of file
Modified: CometVisu/trunk/visu/structure/pure/info.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/info.js 2012-10-28 21:30:25 UTC (rev 1081)
+++ CometVisu/trunk/visu/structure/pure/info.js 2012-10-30 18:59:29 UTC (rev 1082)
@@ -20,7 +20,11 @@
var $e = $(element);
var layout = $e.children('layout')[0];
var style = layout ? 'style="' + extractLayout( layout, type ) + '"' : '';
- var ret_val = $('<div class="widget clearfix info" ' + style + ' />');
+ var classes = 'widget clearfix info';
+ if( $e.attr('align') ) {
+ classes+=" "+$e.attr('align');
+ }
+ var ret_val = $('<div class="'+classes+'" ' + style + ' />');
//type == '3d' && ret_val.data( extractLayout3d( layout ) ).bind( 'update3d', this.update3d );
type == '3d' && $(document).bind( 'update3d', {element: ret_val, layout: extractLayout3d( layout )}, this.update3d );
@@ -34,6 +38,7 @@
'mapping' : $e.attr('mapping'),
'styling' : $e.attr('styling')
});
+
for( var addr in address ) $actor.bind( addr, this.update );
ret_val.append( $actor );
return ret_val;
Modified: CometVisu/trunk/visu/structure/pure/pagejump.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/pagejump.js 2012-10-28 21:30:25 UTC (rev 1081)
+++ CometVisu/trunk/visu/structure/pure/pagejump.js 2012-10-30 18:59:29 UTC (rev 1082)
@@ -21,7 +21,11 @@
var layout = $e.children('layout')[0];
var style = layout ? 'style="' + extractLayout( layout, type ) + '"' : '';
var target = $e.attr('target') ? $e.attr('target') : '0';
- var ret_val = $('<div class="widget clearfix pagejump" ' + style + ' />');
+ var classes = 'widget clearfix pagejump';
+ if( $e.attr('align') ) {
+ classes+=" "+$e.attr('align');
+ }
+ var ret_val = $('<div class="'+classes+'" ' + style + '/>');
ret_val.setWidgetLayout($e);
var label = extractLabel( $e.find('label')[0] );
var address = makeAddressList($e);
Modified: CometVisu/trunk/visu/structure/pure/switch.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/switch.js 2012-10-28 21:30:25 UTC (rev 1081)
+++ CometVisu/trunk/visu/structure/pure/switch.js 2012-10-30 18:59:29 UTC (rev 1082)
@@ -20,10 +20,15 @@
var $e = $(element);
var layout = $e.children('layout')[0];
var style = layout ? 'style="' + extractLayout( layout, type ) + '"' : '';
- var ret_val = $('<div class="widget clearfix switch" ' + style + '/>');
+ var classes = 'widget clearfix switch';
+ if( $e.attr('align') ) {
+ classes+=" "+$e.attr('align');
+ }
+ var ret_val = $('<div class="'+classes+'" ' + style + '/>');
ret_val.setWidgetLayout($e)
var label = extractLabel( $e.find('label')[0] );
var address = makeAddressList($e);
+
var actor = '<div class="actor switchUnpressed"><div class="value">-</div></div>';
var $actor = $(actor).data( {
'address' : address,
Modified: CometVisu/trunk/visu/structure/pure/toggle.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/toggle.js 2012-10-28 21:30:25 UTC (rev 1081)
+++ CometVisu/trunk/visu/structure/pure/toggle.js 2012-10-30 18:59:29 UTC (rev 1082)
@@ -20,7 +20,11 @@
var $e = $(element);
var layout = $e.children('layout')[0];
var style = layout ? 'style="' + extractLayout( layout, type ) + '"' : '';
- var ret_val = $('<div class="widget clearfix toggle" ' + style + '/>');
+ var classes = 'widget clearfix toggle';
+ if( $e.attr('align') ) {
+ classes+=" "+$e.attr('align');
+ }
+ var ret_val = $('<div class="'+classes+'" ' + style + '/>');
ret_val.setWidgetLayout($e);
var label = extractLabel( $e.find('label')[0] );
var address = makeAddressList($e);
Modified: CometVisu/trunk/visu/structure/pure/trigger.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/trigger.js 2012-10-28 21:30:25 UTC (rev 1081)
+++ CometVisu/trunk/visu/structure/pure/trigger.js 2012-10-30 18:59:29 UTC (rev 1082)
@@ -21,7 +21,11 @@
var layout = $e.children('layout')[0];
var style = layout ? 'style="' + extractLayout( layout, type ) + '"' : '';
var value = $e.attr('value') ? $e.attr('value') : 0;
- var ret_val = $('<div class="widget clearfix trigger" ' + style + ' />');
+ var classes = 'widget clearfix trigger';
+ if( $e.attr('align') ) {
+ classes+=" "+$e.attr('align');
+ }
+ var ret_val = $('<div class="'+classes+'" ' + style + '/>');
ret_val.setWidgetLayout($e);
var label = extractLabel( $e.find('label')[0] );
var address = makeAddressList($e);
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2012-10-28 21:30:25 UTC (rev 1081)
+++ CometVisu/trunk/visu/visu_config.xsd 2012-10-30 18:59:29 UTC (rev 1082)
@@ -487,6 +487,7 @@
<xsd:attribute ref="value" use="required" />
<xsd:attribute ref="mapping" use="optional" />
<xsd:attribute ref="styling" use="optional" />
+ <xsd:attribute ref="align" use="optional" />
</xsd:complexType>
<xsd:complexType name="infotrigger">
@@ -551,6 +552,7 @@
<xsd:attribute ref="format" use="optional" />
<xsd:attribute ref="styling" use="optional" />
<xsd:attribute ref="mapping" use="optional" />
+ <xsd:attribute ref="align" use="optional" />
</xsd:complexType>
<xsd:complexType name="image">
@@ -611,6 +613,7 @@
</xsd:choice>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="target" type="xsd:string" />
+ <xsd:attribute ref="align" use="optional" />
</xsd:complexType>
<xsd:complexType name="colorchooser">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2012-11-07 19:48:29
|
Revision: 1103
http://openautomation.svn.sourceforge.net/openautomation/?rev=1103&view=rev
Author: hausl
Date: 2012-11-07 19:48:22 +0000 (Wed, 07 Nov 2012)
Log Message:
-----------
Added range area for slider widget, visible in metal design only
Modified Paths:
--------------
CometVisu/trunk/visu/designs/metal/basic.css
CometVisu/trunk/visu/structure/pure/slide.js
Modified: CometVisu/trunk/visu/designs/metal/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/metal/basic.css 2012-11-07 19:37:02 UTC (rev 1102)
+++ CometVisu/trunk/visu/designs/metal/basic.css 2012-11-07 19:48:22 UTC (rev 1103)
@@ -450,7 +450,7 @@
.ui-slider { position: relative; text-align: left; }
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; min-width: 1.6em; height: 1.6em; 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 .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; background-color: #F7931E; }
.ui-slider-horizontal { height: .8em; margin-left: 0.6em !important; }
.ui-slider-horizontal .ui-slider-handle { top: -.5em; margin-left: -.8em; }
Modified: CometVisu/trunk/visu/structure/pure/slide.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/slide.js 2012-11-07 19:37:02 UTC (rev 1102)
+++ CometVisu/trunk/visu/structure/pure/slide.js 2012-11-07 19:48:22 UTC (rev 1103)
@@ -61,6 +61,7 @@
step: step,
min: min,
max: max,
+ range: "min",
animate: true,
start: this.slideStart,
change: this.slideChange,
@@ -73,6 +74,7 @@
step: step,
min: min,
max: max,
+ range: "min",
animate: true,
start: this.slideStart,
change: this.slideChange
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pe...@us...> - 2012-11-08 17:02:44
|
Revision: 1108
http://openautomation.svn.sourceforge.net/openautomation/?rev=1108&view=rev
Author: peuter
Date: 2012-11-08 17:02:33 +0000 (Thu, 08 Nov 2012)
Log Message:
-----------
removed tabs to match CometVisu?\194?\180s styleguide
Modified Paths:
--------------
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/transforms/transform_oh.js
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-11-08 16:59:13 UTC (rev 1107)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-11-08 17:02:33 UTC (rev 1108)
@@ -16,18 +16,26 @@
*
* @module Templateengine
* @title CometVisu templateengine
-*/
+ */
var design = new VisuDesign_Custom();
-var icons = new icon();
+var icons = new icon();
var mappings = {}; // store the mappings
var stylings = {}; // store the stylings
-var navbars = { // store informations about the nav bars
- top: { dynamic: false },
- left: { dynamic: false },
- right: { dynamic: false },
- bottom: { dynamic: false }
+var navbars = { // store informations about the nav bars
+ top : {
+ dynamic : false
+ },
+ left : {
+ dynamic : false
+ },
+ right : {
+ dynamic : false
+ },
+ bottom : {
+ dynamic : false
+ }
};
var ga_list = [];
@@ -41,7 +49,7 @@
var defaultColumns = 12;
var minColumnWidth = 150;
var enableColumnAdjustment = false;
-if (backend==undefined) {
+if (backend == undefined) {
var backend = "cgi";
}
if ($.getUrlVar("backend")) {
@@ -49,21 +57,21 @@
}
var backendConfig = {
- baseUrl: '/cgi-bin/',
+ baseUrl : '/cgi-bin/',
};
function initBackendClient(backend) {
- if (backend.toLowerCase()=='oh') {
- backendConfig.baseUrl = '/cv/';
- }
+ if (backend.toLowerCase() == 'oh') {
+ backendConfig.baseUrl = '/cv/';
+ }
- visu = new CometVisu(backendConfig.baseUrl);
- visu.update = function( json ) { // overload the handler
- for( key in json ) {
- $.event.trigger( '_' + key, json[key] );
- }
- };
- visu.user = 'demo_user'; // example for setting a user
+ visu = new CometVisu(backendConfig.baseUrl);
+ visu.update = function(json) { // overload the handler
+ for (key in json) {
+ $.event.trigger('_' + key, json[key]);
+ }
+ };
+ visu.user = 'demo_user'; // example for setting a user
}
var configSuffix;
@@ -77,8 +85,9 @@
var forceReload = false;
}
-if( $.getUrlVar('forceReload') ) {
- forceReload = $.getUrlVar('forceReload') != 'false'; // true unless set to false
+if ($.getUrlVar('forceReload')) {
+ forceReload = $.getUrlVar('forceReload') != 'false'; // true unless set to
+ // false
}
// "Bug"-Fix for ID: 3204682 "Caching on web server"
@@ -89,13 +98,12 @@
// Disable features that aren't ready yet
// This can be overwritten in the URL with the parameter "maturity"
-var use_maturity;
+var use_maturity;
if ($.getUrlVar('maturity')) {
var url_maturity = $.getUrlVar('maturity');
if (!isNaN(url_maturity - 0)) {
- use_maturity = url_maturity - 0; // given directly as number
- }
- else {
+ use_maturity = url_maturity - 0; // given directly as number
+ } else {
use_maturity = Maturity[url_maturity]; // or as the ENUM name
}
}
@@ -104,59 +112,62 @@
use_maturity = Maturity.release; // default to release
}
-$(document).ready(function() {
- // get the data once the page was loaded
- $.ajax({
- url: 'visu_config' + (configSuffix ? '_' + configSuffix : '' ) + '.xml',
- cache: !forceReload,
- success: parseXML,
- error: function(jqXHR, textStatus, errorThrown){
- var message = 'Config-File Error! ';
- switch( textStatus )
- {
- case 'parsererror':
- message += '<br />Invalid config file!<br /><a href="check_config.php?config=' + configSuffix + '">Please check!</a>';
- }
- $('#loading').html( message );
- },
- dataType: 'xml'
-});
-} );
+$(document)
+ .ready(
+ function() {
+ // get the data once the page was loaded
+ $
+ .ajax({
+ url : 'visu_config' + (configSuffix ? '_' + configSuffix : '')
+ + '.xml',
+ cache : !forceReload,
+ success : parseXML,
+ error : function(jqXHR, textStatus, errorThrown) {
+ var message = 'Config-File Error! ';
+ switch (textStatus) {
+ case 'parsererror':
+ message += '<br />Invalid config file!<br /><a href="check_config.php?config='
+ + configSuffix + '">Please check!</a>';
+ }
+ $('#loading').html(message);
+ },
+ dataType : 'xml'
+ });
+ });
$(window).unload(function() {
visu.stop();
});
-function transformEncode( transformation, value ) {
+function transformEncode(transformation, value) {
var basetrans = transformation.split('.')[0];
- return transformation in Transform ?
- Transform[ transformation ].encode( value ) :
- (basetrans in Transform ? Transform[ basetrans ].encode( value ) : value);
+ return transformation in Transform ? Transform[transformation].encode(value)
+ : (basetrans in Transform ? Transform[basetrans].encode(value) : value);
}
-function transformDecode( transformation, value ) {
+function transformDecode(transformation, value) {
var basetrans = transformation.split('.')[0];
- return transformation in Transform ?
- Transform[ transformation ].decode( value ) :
- (basetrans in Transform ? Transform[ basetrans ].decode( value ) : value);
+ return transformation in Transform ? Transform[transformation].decode(value)
+ : (basetrans in Transform ? Transform[basetrans].decode(value) : value);
}
-function map( value, this_map ) {
- if( this_map && mappings[this_map] )
- {
+function map(value, this_map) {
+ if (this_map && mappings[this_map]) {
var m = mappings[this_map];
-
- if( m.formula ) {
- return m.formula( value );
- } else if( m[value] ) {
+
+ if (m.formula) {
+ return m.formula(value);
+ } else if (m[value]) {
return m[value];
- } else if( m['range'] ) {
- var valueFloat = parseFloat( value );
-
+ } else if (m['range']) {
+ var valueFloat = parseFloat(value);
+
var range = m['range'];
- for( var min in range ) {
- if( min > valueFloat ) continue;
- if( range[min][0] < valueFloat ) continue; // check max
+ for ( var min in range) {
+ if (min > valueFloat)
+ continue;
+ if (range[min][0] < valueFloat)
+ continue; // check max
return range[min][1];
}
}
@@ -165,136 +176,170 @@
}
function adjustColumns() {
- if (enableColumnAdjustment==false) return false;
-
+ if (enableColumnAdjustment == false)
+ return false;
+
var factor = window.devicePixelRatio || 1;
- var widthNavbarLeft = $( '#navbarLeft' ).css('display')!='none' ? $( '#navbarLeft' ).width(): 0;
- var widthNavbarRight = $( '#navbarRight' ).css('display')!='none' ? $( '#navbarRight' ).width() : 0;
- var width = $( 'body' ).width() - widthNavbarLeft - widthNavbarRight - 1; // remove an additional pixel for Firefox
- width=width/factor;
+ var widthNavbarLeft = $('#navbarLeft').css('display') != 'none' ? $(
+ '#navbarLeft').width() : 0;
+ var widthNavbarRight = $('#navbarRight').css('display') != 'none' ? $(
+ '#navbarRight').width() : 0;
+ var width = $('body').width() - widthNavbarLeft - widthNavbarRight - 1; // remove
+ // an
+ // additional
+ // pixel
+ // for
+ // Firefox
+ width = width / factor;
- var $main = $( '#main' );
+ var $main = $('#main');
var newColumns = $main.data('columns');
- newColumns = (Math.ceil(width/minColumnWidth) % 2)>0 ? Math.ceil(width/minColumnWidth)+1 : Math.ceil(width/minColumnWidth);
- newColumns = Math.min(defaultColumns,newColumns);
- if (newColumns>defaultColumns/2 && defaultColumns>newColumns) newColumns = defaultColumns;
+ newColumns = (Math.ceil(width / minColumnWidth) % 2) > 0 ? Math.ceil(width
+ / minColumnWidth) + 1 : Math.ceil(width / minColumnWidth);
+ newColumns = Math.min(defaultColumns, newColumns);
+ if (newColumns > defaultColumns / 2 && defaultColumns > newColumns)
+ newColumns = defaultColumns;
- if (newColumns!=$main.data('columns')) {
- $main.data({'columns': newColumns} );
+ if (newColumns != $main.data('columns')) {
+ $main.data({
+ 'columns' : newColumns
+ });
return true;
- }
- else {
+ } else {
return false;
}
}
/*
- * Make sure everything looks right when the window gets resized.
- * This is necessary as the scroll effect requires a fixed element size
+ * Make sure everything looks right when the window gets resized. This is
+ * necessary as the scroll effect requires a fixed element size
*/
function handleResize(resize, skipScrollFix) {
var uagent = navigator.userAgent.toLowerCase();
- var widthNavbarLeft = $( '#navbarLeft' ).css('display')!='none' ? $( '#navbarLeft' ).width(): 0;
- var widthNavbarRight = $( '#navbarRight' ).css('display')!='none' ? $( '#navbarRight' ).width() : 0;
- var width = $( 'body' ).width() - widthNavbarLeft - widthNavbarRight - 1; // remove an additional pixel for Firefox
+ var widthNavbarLeft = $('#navbarLeft').css('display') != 'none' ? $(
+ '#navbarLeft').width() : 0;
+ var widthNavbarRight = $('#navbarRight').css('display') != 'none' ? $(
+ '#navbarRight').width() : 0;
+ var width = $('body').width() - widthNavbarLeft - widthNavbarRight - 1; // remove
+ // an
+ // additional
+ // pixel
+ // for
+ // Firefox
- var $main = $( '#main' );
- if (/(android|blackberry|iphone|ipod|series60|symbian|windows ce|palm)/i.test(uagent)) {
- $main.css( 'width', width );
- $( '#pageSize' ).text( '.page{width:' + (width-0) + 'px;}' );
+ var $main = $('#main');
+ if (/(android|blackberry|iphone|ipod|series60|symbian|windows ce|palm)/i
+ .test(uagent)) {
+ $main.css('width', width);
+ $('#pageSize').text('.page{width:' + (width - 0) + 'px;}');
// do nothing
} else {
- var height = $( window ).height() - $main.position().top;
- if ($( '#navbarBottom' ).css('display')!='none') {
- height-= $( '#navbarBottom' ).outerHeight(true)-1;
+ var height = $(window).height() - $main.position().top;
+ if ($('#navbarBottom').css('display') != 'none') {
+ height -= $('#navbarBottom').outerHeight(true) - 1;
}
- if ($( '#bottom' ).css('display')!='none') {
- height-= $( '#bottom' ).outerHeight(true) - 1;
+ if ($('#bottom').css('display') != 'none') {
+ height -= $('#bottom').outerHeight(true) - 1;
}
- $main.css( 'width', width ).css( 'height', height );
- $( '#pageSize' ).text( '.page{width:' + (width-0) + 'px;height:' + height + 'px;}' );
+ $main.css('width', width).css('height', height);
+ $('#pageSize').text(
+ '.page{width:' + (width - 0) + 'px;height:' + height + 'px;}');
}
- if (skipScrollFix===undefined) {
+ if (skipScrollFix === undefined) {
if (adjustColumns()) {
var allContainer = $('.widget_container');
allContainer.each(function(i, e) {
- var $e=$(e);
+ var $e = $(e);
var ourColspan = $e.children('*:first-child').data('colspan');
- if (ourColspan<=0) return;
- var areaColspan = $e.parentsUntil('#centerContainer').last().data('columns') || defaultColumns;
- var ourWidth = Math.min(100,ourColspan/areaColspan*100);
- $e.css('width', ourWidth+'%');
+ if (ourColspan <= 0)
+ return;
+ var areaColspan = $e.parentsUntil('#centerContainer').last().data(
+ 'columns')
+ || defaultColumns;
+ var ourWidth = Math.min(100, ourColspan / areaColspan * 100);
+ $e.css('width', ourWidth + '%');
});
// and elements inside groups
var adjustableElements = $('.group .widget_container');
adjustableElements.each(function(i, e) {
var $e = $(e);
var ourColspan = $e.children('.widget').data('colspan');
- if (ourColspan<=0) return;
- if (ourColspan==undefined) {
+ if (ourColspan <= 0)
+ return;
+ if (ourColspan == undefined) {
// workaround for nowidget groups
ourColspan = $e.children('.group').data('colspan');
}
- var areaColspan = $e.parentsUntil('#centerContainer').last().data('columns') || defaultColumns;
- var groupColspan = Math.min(areaColspan,$e.parentsUntil('.widget_container', '.group').data('colspan'));
- var ourWidth = Math.min(100,ourColspan/groupColspan*100); // in percent
- $e.css('width', ourWidth+'%');
+ var areaColspan = $e.parentsUntil('#centerContainer').last().data(
+ 'columns')
+ || defaultColumns;
+ var groupColspan = Math.min(areaColspan, $e.parentsUntil(
+ '.widget_container', '.group').data('colspan'));
+ var ourWidth = Math.min(100, ourColspan / groupColspan * 100); // in
+ // percent
+ $e.css('width', ourWidth + '%');
});
}
- // main_scroll != undefined && main_scroll.seekTo( main_scroll.getIndex(), 0 ); // fix scroll
+ // main_scroll != undefined && main_scroll.seekTo( main_scroll.getIndex(), 0
+ // ); // fix scroll
}
}
-$( window ).bind( 'resize', handleResize );
+$(window).bind('resize', handleResize);
-
function rowspanClass(rowspan) {
- var className = 'rowspan rowspan'+ rowspan;
- var styleId = className.replace(" ","_")+'Style';
- if ( !$('#'+styleId).get(0) ) {
- var dummyDiv = $('<div class="clearfix" id="calcrowspan"><div id="containerDiv" class="widget_container"><div class="widget clearfix text" id="innerDiv" /></div></div>')
- .appendTo(document.body).show();
-
- var singleHeight = $('#containerDiv').outerHeight(false);
- var singleHeightMargin = $('#containerDiv').outerHeight(true );
+ var className = 'rowspan rowspan' + rowspan;
+ var styleId = className.replace(" ", "_") + 'Style';
+ if (!$('#' + styleId).get(0)) {
+ var dummyDiv = $(
+ '<div class="clearfix" id="calcrowspan"><div id="containerDiv" class="widget_container"><div class="widget clearfix text" id="innerDiv" /></div></div>')
+ .appendTo(document.body).show();
+ var singleHeight = $('#containerDiv').outerHeight(false);
+ var singleHeightMargin = $('#containerDiv').outerHeight(true);
+
$('#calcrowspan').remove();
-
+
// append css style
- $('head').append('<style id="'+styleId+'">.rowspan.rowspan' + rowspan + ' { height: ' + ((rowspan-1)*singleHeightMargin+singleHeight) + 'px;} </style>').data(className, 1);
+ $('head').append(
+ '<style id="' + styleId + '">.rowspan.rowspan' + rowspan
+ + ' { height: '
+ + ((rowspan - 1) * singleHeightMargin + singleHeight)
+ + 'px;} </style>').data(className, 1);
}
return className;
}
function parseXML(xml) {
// erst mal den Cache für AJAX-Requests wieder aktivieren
- $.ajaxSetup({cache: true});
+ $.ajaxSetup({
+ cache : true
+ });
-
/*
* First, we try to get a design by url Secondly, we try to get a predefined
* design in the config file Otherwise we show the design selection dialog
*/
-
+
// read predefined design in config
- predefinedDesign = $( 'pages', xml ).attr("design");
-
- if ($( 'pages', xml ).attr("backend")) {
- backend = $( 'pages', xml ).attr("backend");
+ predefinedDesign = $('pages', xml).attr("design");
+
+ if ($('pages', xml).attr("backend")) {
+ backend = $('pages', xml).attr("backend");
}
initBackendClient(backend);
-
- scrollSpeed = $( 'pages', xml ).attr("scroll_speed");
- if ($('pages',xml).attr('enable_column_adjustment')=="true") {
+
+ scrollSpeed = $('pages', xml).attr("scroll_speed");
+ if ($('pages', xml).attr('enable_column_adjustment') == "true") {
enableColumnAdjustment = true;
- }
- else if (/(android|blackberry|iphone|ipod|series60|symbian|windows ce|palm)/i.test(navigator.userAgent.toLowerCase())) {
+ } else if (/(android|blackberry|iphone|ipod|series60|symbian|windows ce|palm)/i
+ .test(navigator.userAgent.toLowerCase())) {
enableColumnAdjustment = true;
}
- if ($('pages',xml).attr('default_columns')) {
- defaultColumns = $('pages',xml).attr('default_columns');
+ if ($('pages', xml).attr('default_columns')) {
+ defaultColumns = $('pages', xml).attr('default_columns');
}
- if ($('pages',xml).attr('min_column_width')) {
- minColumnWidth = $('pages',xml).attr('min_column_width');
+ if ($('pages', xml).attr('min_column_width')) {
+ minColumnWidth = $('pages', xml).attr('min_column_width');
}
// design by url
@@ -302,35 +347,46 @@
clientDesign = $.getUrlVar("design");
}
// design by config file
- else if (predefinedDesign){
- clientDesign = predefinedDesign;
+ else if (predefinedDesign) {
+ clientDesign = predefinedDesign;
}
// selection dialog
else {
selectDesign();
}
- var maxMobileScreenWidth = $('pages',xml).attr('max_mobile_screen_width') || 480;
-
- $( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/designglobals.css" />' );
- $( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/' + clientDesign + '/basic.css" />' );
- $( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/' + clientDesign + '/mobile.css" media="only screen and (max-device-width: '+maxMobileScreenWidth+'px)" />' );
- $( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/' + clientDesign + '/custom.css" />' );
- $( 'head' ).append( '<script src="designs/' + clientDesign + '/design_setup.js" type="text/javascript" />' );
-
+ var maxMobileScreenWidth = $('pages', xml).attr('max_mobile_screen_width') || 480;
+
+ $('head')
+ .append(
+ '<link rel="stylesheet" type="text/css" href="designs/designglobals.css" />');
+ $('head').append(
+ '<link rel="stylesheet" type="text/css" href="designs/' + clientDesign
+ + '/basic.css" />');
+ $('head').append(
+ '<link rel="stylesheet" type="text/css" href="designs/' + clientDesign
+ + '/mobile.css" media="only screen and (max-device-width: '
+ + maxMobileScreenWidth + 'px)" />');
+ $('head').append(
+ '<link rel="stylesheet" type="text/css" href="designs/' + clientDesign
+ + '/custom.css" />');
+ $('head').append(
+ '<script src="designs/' + clientDesign
+ + '/design_setup.js" type="text/javascript" />');
+
// start with the plugins
var pluginsToLoad = 0;
- $( 'meta > plugins plugin', xml ).each( function(i){
+ $('meta > plugins plugin', xml).each(function(i) {
pluginsToLoad += 1;
var name = 'plugins/' + $(this).attr('name') + '/structure_plugin.js';
- if( forceReload )
+ if (forceReload)
name += '?_=' + (new Date().getTime());
var html_doc = document.getElementsByTagName('body')[0];
js = document.createElement('script');
js.setAttribute('type', 'text/javascript');
- js.setAttribute('src' , name );
+ js.setAttribute('src', name);
html_doc.appendChild(js);
- js.onreadystatechange = function () {
+ js.onreadystatechange = function() {
if (js.readyState == 'complete') {
pluginsToLoad -= 1;
if (pluginsToLoad <= 0) {
@@ -339,101 +395,109 @@
}
};
- js.onload = function () {
+ js.onload = function() {
pluginsToLoad -= 1;
if (pluginsToLoad <= 0) {
setup_page(xml);
}
};
- } );
+ });
// then the mappings
- $( 'meta > mappings mapping', xml ).each( function(i){
- var $this = $(this);
- var name = $this.attr('name');
- mappings[ name ] = {};
- var formula = $this.find('formula');
- if( formula.length > 0 )
- {
- eval( 'var func = function(x){' + formula.text() + '; return y;}' );
- mappings[ name ][ 'formula' ] = func;
- } else {
- $this.find('entry').each( function(){
- var $localThis = $(this);
- var value = $localThis.contents();
- for( var i = 0; i < value.length; i++ )
- {
- var $v = $(value[i]);
- if( $v.is('icon') )
- value[i] = icons.getIcon( $v.attr('name') );
- }
-
- if( $localThis.attr('value') )
- {
- mappings[ name ][ $localThis.attr('value') ] = value;
+ $('meta > mappings mapping', xml).each(
+ function(i) {
+ var $this = $(this);
+ var name = $this.attr('name');
+ mappings[name] = {};
+ var formula = $this.find('formula');
+ if (formula.length > 0) {
+ eval('var func = function(x){' + formula.text() + '; return y;}');
+ mappings[name]['formula'] = func;
} else {
- if( ! mappings[ name ][ 'range' ] ) mappings[ name ][ 'range' ] = {};
- mappings[ name ][ 'range' ][ parseFloat($localThis.attr('range_min')) ] =
- [ parseFloat( $localThis.attr('range_max') ), value ];
+ $this.find('entry').each(
+ function() {
+ var $localThis = $(this);
+ var value = $localThis.contents();
+ for ( var i = 0; i < value.length; i++) {
+ var $v = $(value[i]);
+ if ($v.is('icon'))
+ value[i] = icons.getIcon($v.attr('name'));
+ }
+
+ if ($localThis.attr('value')) {
+ mappings[name][$localThis.attr('value')] = value;
+ } else {
+ if (!mappings[name]['range'])
+ mappings[name]['range'] = {};
+ mappings[name]['range'][parseFloat($localThis
+ .attr('range_min'))] = [
+ parseFloat($localThis.attr('range_max')), value ];
+ }
+ });
}
});
- }
- });
// then the stylings
- $( 'meta > stylings styling', xml ).each( function(i){
- var name = $(this).attr('name');
- var classnames = '';
- stylings[ name ] = {};
- $(this).find('entry').each( function(){
- classnames += $(this).text() + ' ';
- if( $(this).attr('value') )
- {
- stylings[ name ][ $(this).attr('value') ] = $(this).text();
- } else { // a range
- if( ! stylings[ name ][ 'range' ] ) stylings[ name ][ 'range' ] = {};
- stylings[ name ][ 'range' ][ parseFloat($(this).attr('range_min')) ] =
- [ parseFloat( $(this).attr('range_max') ), $(this).text() ];
-
- }
- });
- stylings[ name ]['classnames'] = classnames;
- });
+ $('meta > stylings styling', xml)
+ .each(
+ function(i) {
+ var name = $(this).attr('name');
+ var classnames = '';
+ stylings[name] = {};
+ $(this).find('entry')
+ .each(
+ function() {
+ classnames += $(this).text() + ' ';
+ if ($(this).attr('value')) {
+ stylings[name][$(this).attr('value')] = $(this).text();
+ } else { // a range
+ if (!stylings[name]['range'])
+ stylings[name]['range'] = {};
+ stylings[name]['range'][parseFloat($(this).attr(
+ 'range_min'))] = [
+ parseFloat($(this).attr('range_max')),
+ $(this).text() ];
+ }
+ });
+ stylings[name]['classnames'] = classnames;
+ });
+
// then the status bar
- $( 'meta > statusbar status', xml ).each( function(i){
- var type = $(this).attr('type');
+ $('meta > statusbar status', xml).each(function(i) {
+ var type = $(this).attr('type');
var condition = $(this).attr('condition');
- var extend = $(this).attr('hrefextend');
+ var extend = $(this).attr('hrefextend');
var sPath = window.location.pathname;
var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
-
+
// @TODO: make this match once the new editor is finished-ish.
var editMode = 'edit_config.html' == sPage;
-
- // skip this element if it's edit-only and we are non-edit, or the other way round
- if( editMode && '!edit' == condition ) return;
- if( !editMode && 'edit' == condition ) return;
+ // skip this element if it's edit-only and we are non-edit, or the other way
+ // round
+ if (editMode && '!edit' == condition)
+ return;
+ if (!editMode && 'edit' == condition)
+ return;
+
var text = $(this).text();
- switch( extend )
- {
- case 'all': // append all parameters
- var search = window.location.search.replace( /\$/g, '$$$$' );
- text = text.replace( /(href="[^"]*)(")/g, '$1' + search + '$2' );
- break;
- case 'config': // append config file info
- var search = window.location.search.replace( /\$/g, '$$$$' );
- search = search.replace( /.*(config=[^&]*).*|.*/, '?$1' );
+ switch (extend) {
+ case 'all': // append all parameters
+ var search = window.location.search.replace(/\$/g, '$$$$');
+ text = text.replace(/(href="[^"]*)(")/g, '$1' + search + '$2');
+ break;
+ case 'config': // append config file info
+ var search = window.location.search.replace(/\$/g, '$$$$');
+ search = search.replace(/.*(config=[^&]*).*|.*/, '?$1');
+ // text = $(text).replaceWith( /(href="[^"]*)(")/g, '$1' + search + '$2'
+ // );
-// text = $(text).replaceWith( /(href="[^"]*)(")/g, '$1' + search + '$2' );
-
-
- text = text.replace( /(href="[^"]*)(")/g, '$1' + search + '$2' );
- break;
+ text = text.replace(/(href="[^"]*)(")/g, '$1' + search + '$2');
+ break;
}
- $('.footer').html( $('.footer').html() + text );
+ $('.footer').html($('.footer').html() + text);
});
if (pluginsToLoad <= 0) {
@@ -441,234 +505,271 @@
}
}
-function setup_page( xml )
-{
+function setup_page(xml) {
// and now setup the pages
- var page = $( 'pages > page', xml )[0]; // only one page element allowed...
+ var page = $('pages > page', xml)[0]; // only one page element allowed...
-
// read topbar datetime format
- var topbar_datetime = $( 'meta > topbar_datetime > strftime', xml );
-
+ var topbar_datetime = $('meta > topbar_datetime > strftime', xml);
+
// if definition exists in xml
if (topbar_datetime.length) {
// get creator for strftime plugin
var creator = design.getCreator('strftime');
// get rendered datetime div
var retval = creator.create(topbar_datetime, 'id_0').html();
- // show on top right corner
+ // show on top right corner
$('#top .nav_additional').html(retval);
}
-
-
+
create_pages(page, 'id_0');
-
+
adjustColumns();
// all containers
var allContainer = $('.widget_container');
allContainer.each(function(i, e) {
var $e = $(e);
var ourColspan = $e.children('*:first-child').data('colspan');
- if (ourColspan<=0) return;
- var areaColspan = $e.parentsUntil('#centerContainer').last().data('columns') || defaultColumns;
- var ourWidth = Math.min(100,ourColspan/areaColspan*100);
- $e.css('width', ourWidth+'%');
+ if (ourColspan <= 0)
+ return;
+ var areaColspan = $e.parentsUntil('#centerContainer').last()
+ .data('columns')
+ || defaultColumns;
+ var ourWidth = Math.min(100, ourColspan / areaColspan * 100);
+ $e.css('width', ourWidth + '%');
});
- // and elements inside groups
- var adjustableElements = $('.group .widget_container');
- adjustableElements.each(function(i, e) {
- var $e = $(e);
- var ourColspan = $e.children('.widget').data('colspan');
- if (ourColspan<=0) return;
- if (ourColspan==undefined) {
- // workaround for nowidget groups
- ourColspan = $e.children('.group').data('colspan');
- }
- var areaColspan = $e.parentsUntil('#centerContainer').last().data('columns') || defaultColumns;
- var groupColspan = Math.min(areaColspan,$e.parentsUntil('.widget_container', '.group').data('colspan'));
- var ourWidth = Math.min(100,ourColspan/groupColspan*100); // in percent
- $e.css('width', ourWidth+'%');
- });
-
+ // and elements inside groups
+ var adjustableElements = $('.group .widget_container');
+ adjustableElements.each(function(i, e) {
+ var $e = $(e);
+ var ourColspan = $e.children('.widget').data('colspan');
+ if (ourColspan <= 0)
+ return;
+ if (ourColspan == undefined) {
+ // workaround for nowidget groups
+ ourColspan = $e.children('.group').data('colspan');
+ }
+ var areaColspan = $e.parentsUntil('#centerContainer').last()
+ .data('columns')
+ || defaultColumns;
+ var groupColspan = Math.min(areaColspan, $e.parentsUntil(
+ '.widget_container', '.group').data('colspan'));
+ var ourWidth = Math.min(100, ourColspan / groupColspan * 100); // in
+ // percent
+ $e.css('width', ourWidth + '%');
+ });
+
// setup the scrollable
- main_scroll = $('#main').scrollable({keyboard: false, t...
[truncated message content] |
|
From: <pe...@us...> - 2012-11-18 11:06:03
|
Revision: 1144
http://openautomation.svn.sourceforge.net/openautomation/?rev=1144&view=rev
Author: peuter
Date: 2012-11-18 11:05:56 +0000 (Sun, 18 Nov 2012)
Log Message:
-----------
added align possibility to diagram_info
Modified Paths:
--------------
CometVisu/trunk/visu/designs/metal/basic.css
CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
Modified: CometVisu/trunk/visu/designs/metal/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/metal/basic.css 2012-11-18 10:56:41 UTC (rev 1143)
+++ CometVisu/trunk/visu/designs/metal/basic.css 2012-11-18 11:05:56 UTC (rev 1144)
@@ -753,7 +753,8 @@
.widget_container { position: relative; }
.widget.center.toggle > .actor:first-child,
.widget.center.switch > .actor:first-child,
-.widget.center.trigger > .actor:first-child {
+.widget.center.trigger > .actor:first-child,
+.widget.center.diagram_info > .actor:first-child {
position: absolute; left: 50%; margin-left: -2em;
}
.widget.center > .actor > div, .widget.right > .actor > div { float: none; }
Modified: CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2012-11-18 10:56:41 UTC (rev 1143)
+++ CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2012-11-18 11:05:56 UTC (rev 1144)
@@ -59,7 +59,7 @@
function diagram_get_content( page ) {
var axes = []; // if yaxismin, yaxismax or unit-attributes exist: old behaviour, otherwise use axis-elements
- var axesnames = {}
+ var axesnames = {};
var axesnum = 0;
if (page.attr('yaxismin') || page.attr('yaxismax') || page.attr('unit')) {
axesnum=1;
@@ -231,7 +231,7 @@
var address = {};
$p.find('address').each( function(){
var src = this.textContent;
- ga_list.push( src )
+ ga_list.push( src );
address[ '_' + src ] = [ this.getAttribute('transform') ];
});
@@ -243,8 +243,11 @@
}
var id = "diagram_" + uniqid();
-
- var ret_val = $('<div class="widget clearfix diagram_info" />');
+ var classes = 'widget clearfix diagram_info';
+ if( $p.attr('align') ) {
+ classes+=" "+$p.attr('align');
+ }
+ var ret_val = $('<div class="'+classes+'" />');
ret_val.setWidgetLayout($p).makeWidgetLabel($p);
var actor = '<div class="actor switchUnpressed ';
@@ -424,7 +427,7 @@
var src = index.slice(1);
var linecolor = value[0];
var label = value[1];
- var yaxis = value[2]
+ var yaxis = value[2];
var idx = num;
$.ajax({
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pe...@us...> - 2012-11-30 14:05:31
|
Revision: 1178
http://openautomation.svn.sourceforge.net/openautomation/?rev=1178&view=rev
Author: peuter
Date: 2012-11-30 14:05:24 +0000 (Fri, 30 Nov 2012)
Log Message:
-----------
- removed default output of target name in pagejumps if no name is specified -> the name=" " workaround used in e.g. visu_config_metal.xml is obsolete now
Modified Paths:
--------------
CometVisu/trunk/visu/structure/pure/pagejump.js
CometVisu/trunk/visu/visu_config_metal.xml
Modified: CometVisu/trunk/visu/structure/pure/pagejump.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/pagejump.js 2012-11-30 13:47:40 UTC (rev 1177)
+++ CometVisu/trunk/visu/structure/pure/pagejump.js 2012-11-30 14:05:24 UTC (rev 1178)
@@ -35,8 +35,6 @@
actor += '">';
if( $e.attr( 'name' ) )
actor += '<div class="value">' + $e.attr( 'name' ) + '</div>';
- else
- actor += '<div class="value">' + target + '</div>';
actor += '</div>';
var $actor = $(actor).data( {
'styling' : $(element).attr('styling'),
Modified: CometVisu/trunk/visu/visu_config_metal.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_metal.xml 2012-11-30 13:47:40 UTC (rev 1177)
+++ CometVisu/trunk/visu/visu_config_metal.xml 2012-11-30 14:05:24 UTC (rev 1178)
@@ -67,24 +67,24 @@
<label><icon name="steuer_home" /></label>
</pagejump>
<line />
- <pagejump target="KNX" name=" ">
+ <pagejump target="KNX">
<layout colspan="0"/>
<label><icon name="steuer_alles_ein_aus" />KNX</label>
</pagejump>
- <pagejump target="Video" name=" ">
+ <pagejump target="Video">
<layout colspan="0"/>
<label><icon name="it_fernsehen" />Video</label>
</pagejump>
- <pagejump target="Audio" name=" ">
+ <pagejump target="Audio">
<layout colspan="0"/>
<label><icon name="audio_audio" />Audio</label>
</pagejump>
- <pagejump target="Web" name=" ">
+ <pagejump target="Web">
<layout colspan="0"/>
<label><icon name="it_internet" />Web</label>
</pagejump>
<line />
- <pagejump target="Wetter" name=" ">
+ <pagejump target="Wetter">
<layout colspan="0"/>
<label><icon name="wetter_sonne" />Wetter</label>
</pagejump>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-12-09 15:07:14
|
Revision: 1193
http://openautomation.svn.sourceforge.net/openautomation/?rev=1193&view=rev
Author: makki1
Date: 2012-12-09 15:07:06 +0000 (Sun, 09 Dec 2012)
Log Message:
-----------
urltrigger-Widget and RSSlog/demo
Modified Paths:
--------------
CometVisu/trunk/visu/index.html
CometVisu/trunk/visu/plugins/rsslog/rsslog.php
CometVisu/trunk/visu/visu_config.xsd
Added Paths:
-----------
CometVisu/trunk/visu/structure/pure/urltrigger.js
CometVisu/trunk/visu/visu_config_demorss.xml
Modified: CometVisu/trunk/visu/index.html
===================================================================
--- CometVisu/trunk/visu/index.html 2012-12-08 18:29:18 UTC (rev 1192)
+++ CometVisu/trunk/visu/index.html 2012-12-09 15:07:06 UTC (rev 1193)
@@ -44,6 +44,7 @@
<script src="structure/pure/text.js" type="text/javascript"></script>
<script src="structure/pure/toggle.js" type="text/javascript"></script>
<script src="structure/pure/trigger.js" type="text/javascript"></script>
+ <script src="structure/pure/urltrigger.js" type="text/javascript"></script>
<script src="structure/pure/unknown.js" type="text/javascript"></script>
<script src="structure/pure/video.js" type="text/javascript"></script>
<script src="structure/pure/wgplugin_info.js" type="text/javascript"></script>
@@ -84,4 +85,4 @@
Loading ...
</div>
</body>
-</html>
\ No newline at end of file
+</html>
Modified: CometVisu/trunk/visu/plugins/rsslog/rsslog.php
===================================================================
--- CometVisu/trunk/visu/plugins/rsslog/rsslog.php 2012-12-08 18:29:18 UTC (rev 1192)
+++ CometVisu/trunk/visu/plugins/rsslog/rsslog.php 2012-12-09 15:07:06 UTC (rev 1193)
@@ -59,7 +59,6 @@
$log_content = $_GET['c'] ? $_GET['c'] : '<no content>';
$log_title = $_GET['h'] ? $_GET['h'] : '';
$log_state = $_GET['state'] ? $_GET['state'] : 0;
- $log_state = $_GET['value'] ? $_GET['value'] : 0;
if( mb_detect_encoding($log_content, 'UTF-8', true) != 'UTF-8' )
$log_content = utf8_encode($log_content);
if( mb_detect_encoding($log_title, 'UTF-8', true) != 'UTF-8' )
@@ -75,6 +74,7 @@
<html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /></head><body>
<table border="1">
<?php
+ $records = 0;
echo '<tr><th>ID</th><th>DateTime</th><th>Timestamp</th><th>Title</th><th>Content</th><th>Tags</th><th>State</th></tr>';
while( sqlite_has_more($result) )
{
@@ -88,7 +88,9 @@
echo '<td>' . $row['tags'] . '</td>';
echo '<td>' . $row['state'] . '</td>';
echo "</tr>\n";
+ $records++;
}
+ echo '<tfoot><tr><td>Sum</td><td>' . $records . '</td></tr></tfoot>';
?>
</table>
</body></html>
@@ -229,7 +231,7 @@
$ok = sqlite_exec($db, $q, $error);
if (!$ok)
- die("Cannot execute query. $error (Content: $content Tags: $tags");
+ die("Cannot execute query. $error (Title: $itle Content: $content Tags: $tags State: $state)");
}
// return a handle to all the data
@@ -240,7 +242,7 @@
$filters[$i] = " (tags LIKE '%" . sqlite_escape_string($val) . "%') ";
}
- $q = "SELECT id, title, content, tags, state, strftime('%s', t) AS t FROM Logs WHERE" . implode('OR', $filters);;
+ $q = "SELECT id, title, content, tags, state, strftime('%s', t) AS t FROM Logs WHERE (" . implode('OR', $filters) . ")";
if (isset($state))
$q .= " AND state=" . $state . " ";
@@ -259,7 +261,7 @@
$filters[$i] = " (tags LIKE '%" . sqlite_escape_string($val) . "%') ";
}
- $q = "DELETE from Logs WHERE t < datetime($timestamp, 'unixepoch') AND " . implode('OR', $filters);
+ $q = "DELETE from Logs WHERE t < datetime($timestamp, 'unixepoch') AND (" . implode('OR', $filters) . ")";
$ok = sqlite_exec($db, $q, $error);
if (!$ok)
Added: CometVisu/trunk/visu/structure/pure/urltrigger.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/urltrigger.js (rev 0)
+++ CometVisu/trunk/visu/structure/pure/urltrigger.js 2012-12-09 15:07:06 UTC (rev 1193)
@@ -0,0 +1,77 @@
+/* trigger.js (c) 2012 by Christian Mayer [CometVisu at ChristianMayer dot de]
+ * modified urltrigger.js (c) 2012 by mm...@el...
+ *
+ * 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
+ */
+
+basicdesign.addCreator('urltrigger', {
+ create: function( element, path, flavour, type ) {
+ var $e = $(element);
+ var layout = $e.children('layout')[0];
+ var style = layout ? 'style="' + extractLayout( layout, type ) + '"' : '';
+ var value = $e.attr('value') ? $e.attr('value') : 0;
+ var classes = 'widget clearfix trigger';
+ if( $e.attr('align') ) {
+ classes+=" "+$e.attr('align');
+ }
+ var ret_val = $('<div class="'+classes+'" ' + style + '/>');
+ ret_val.setWidgetLayout($e);
+ var label = extractLabel( $e.find('label')[0] );
+ var actor = '<div class="actor switchUnpressed ';
+ if ( $e.attr( 'align' ) )
+ actor += $e.attr( 'align' );
+ actor += '"><div class="value"></div></div>';
+ var $actor = $(actor);
+ var valueElement = $actor.find('.value');
+ var mappedValue = map( value, $e.attr('mapping') );
+ if( ('string' == typeof mappedValue) || ('number' == typeof mappedValue) )
+ {
+ valueElement.append( mappedValue );
+ } else
+ for( var i = 0; i < mappedValue.length; i++ )
+ {
+ valueElement.append( $(mappedValue[i]).clone() );
+ }
+ $actor.data( {
+ 'url' : $(element).attr('url'),
+ 'mapping' : $(element).attr('mapping'),
+ 'styling' : $(element).attr('styling'),
+ 'type' : 'urltrigger',
+ 'align' : $e.attr('align'),
+ 'params' : $(element).attr('params'),
+ 'sendValue': value //value is currently ignored in XHR! maybe for multitrigger
+ } ).bind( 'click', this.action ).bind( 'mousedown', function(){
+ $(this).removeClass('switchUnpressed').addClass('switchPressed');
+ } ).bind( 'mouseup mouseout', function(){ // not perfect but simple
+ $(this).removeClass('switchPressed').addClass('switchUnpressed');
+ } ).setWidgetStyling(value);
+ ret_val.append( label ).append( $actor );
+ return ret_val;
+ },
+ action: function() {
+ var data = $(this).data();
+ data.params = data.params ? data.params : '';
+ $.ajax({
+ type: "GET",
+ datatype: "html",
+ data: encodeURI(data.params),
+ url: data.url,
+ success: function(data){
+ //maybe do something useful with the response?
+ }
+ });
+ }
+});
+
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2012-12-08 18:29:18 UTC (rev 1192)
+++ CometVisu/trunk/visu/visu_config.xsd 2012-12-09 15:07:06 UTC (rev 1193)
@@ -339,6 +339,7 @@
<xsd:element name="switch" type="switch" />
<xsd:element name="toggle" type="switch" />
<xsd:element name="trigger" type="trigger" />
+ <xsd:element name="urltrigger" type="urltrigger" />
<xsd:element name="multitrigger" type="multitrigger" />
<xsd:element name="infotrigger" type="infotrigger" />
<xsd:element name="designtoggle" type="designtoggle" />
@@ -396,6 +397,7 @@
<xsd:element name="switch" type="switch" />
<xsd:element name="toggle" type="switch" />
<xsd:element name="trigger" type="trigger" />
+ <xsd:element name="urltrigger" type="urltrigger" />
<xsd:element name="multitrigger" type="multitrigger" />
<xsd:element name="infotrigger" type="infotrigger" />
<xsd:element name="designtoggle" type="designtoggle" />
@@ -440,6 +442,7 @@
<xsd:element name="switch" type="switch" />
<xsd:element name="toggle" type="switch" />
<xsd:element name="trigger" type="trigger" />
+ <xsd:element name="urltrigger" type="urltrigger" />
<xsd:element name="multitrigger" type="multitrigger" />
<xsd:element name="infotrigger" type="infotrigger" />
<xsd:element name="designtoggle" type="designtoggle" />
@@ -529,6 +532,19 @@
<xsd:attribute ref="align" use="optional" />
</xsd:complexType>
+ <xsd:complexType name="urltrigger">
+ <xsd:choice maxOccurs="unbounded" minOccurs="1">
+ <xsd:element name="label" type="label" />
+ <xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
+ </xsd:choice>
+ <xsd:attribute ref="value" use="optional" />
+ <xsd:attribute ref="mapping" use="optional" />
+ <xsd:attribute ref="styling" use="optional" />
+ <xsd:attribute ref="align" use="optional" />
+ <xsd:attribute name="url" type="xsd:string" use="required" />
+ <xsd:attribute name="params" type="xsd:string" use="optional" />
+ </xsd:complexType>
+
<xsd:complexType name="infotrigger">
<xsd:choice maxOccurs="unbounded" minOccurs="1">
<xsd:element name="label" type="label" />
Added: CometVisu/trunk/visu/visu_config_demorss.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demorss.xml (rev 0)
+++ CometVisu/trunk/visu/visu_config_demorss.xml 2012-12-09 15:07:06 UTC (rev 1193)
@@ -0,0 +1,102 @@
+<?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="rss"/>
+ <plugin name="rsslog"/>
+ </plugins>
+ <mappings>
+ <mapping name="Open_Close">
+ <entry value="0">zu</entry>
+ <entry value="1">offen</entry>
+ </mapping>
+ <mapping name="Close_Open">
+ <entry value="0">offen</entry>
+ <entry value="1">zu</entry>
+ </mapping>
+ <mapping name="On_Off">
+ <entry value="0">Aus</entry>
+ <entry value="1">An</entry>
+ </mapping>
+ <mapping name="Off_On">
+ <entry value="0">An</entry>
+ <entry value="1">Aus</entry>
+ </mapping>
+ <mapping name="KonnexHVAC">
+ <entry value="auto">Auto</entry>
+ <entry value="comfort">Komfort</entry>
+ <entry value="standby">Stand By</entry>
+ <entry value="economy">Economy</entry>
+ <entry value="building_protection">Haus-Schutz</entry>
+ </mapping>
+ </mappings>
+ <stylings>
+ <styling name="Red_Green">
+ <entry value="0">red</entry>
+ <entry value="1">green</entry>
+ </styling>
+ <styling name="Green_Red">
+ <entry value="0">green</entry>
+ <entry value="1">red</entry>
+ </styling>
+ <styling name="Blue_Green_Red">
+ <entry range_min="-100" range_max="20">blue</entry>
+ <entry range_min="20" range_max="22">green</entry>
+ <entry range_min="22" 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=".?forceReload=true">Reload</a>
+ - <a href="?config=demo">Widget Demo</a>
+ ]]></status>
+ <status type="html" condition="!edit" hrefextend="config"><![CDATA[
+ - <a href="edit_config.html">Edit</a>
+ ]]></status>
+ <status type="html" condition="edit" hrefextend="all"><![CDATA[
+ - <a href=".">normal Mode</a>
+ ]]></status>
+ <status type="html" hrefextend="config"><![CDATA[
+ - <a href="check_config.php">Check Config</a>
+ ]]></status>
+ </statusbar>
+ </meta>
+ <page name="Start">
+ <text align="center">Welcome to the CometVisu - Demo for urltrigger, RSSlog and RSS Plugin</text>
+ <line/>
+ <urltrigger value="Ins Log" url="plugins/rsslog/rsslog.php" params="t[]=aquarium&c=AQ1 Wasserwechsel">
+ <label>Aquarium 1 Wasser gewechselt</label>
+ </urltrigger>
+ <urltrigger value="Ins Log" url="plugins/rsslog/rsslog.php" params="t[]=WP&c=Filter gereinigt">
+ <label>WP Filter gereinigt</label>
+ </urltrigger>
+ <urltrigger value="Call me" url="/something/else.php">
+ <label>Any other local(!) URL/script</label>
+ </urltrigger>
+ <urltrigger value="AQ2 WW" url="plugins/rsslog/rsslog.php" params="t[]=aquarium&c=AQ2 Wasserwechsel"/>
+ <line/>
+ <text align="center">rsslog filter: Aquarium - 6 lines</text>
+ <rsslog src="plugins/rsslog/rsslog.php?f=aqua" refresh="300" limit="5" mode="last">
+ <layout rowspan="9" colspan="6"></layout>
+ </rsslog>
+ <line/>
+ <text align="center">rsslog filter: Sensoren - only last (click me!)</text>
+ <rsslog src="plugins/rsslog/rsslog.php?f=sensoren" mode="rollover"/>
+ <line/>
+ <text align="center">rsslog filter: WP</text>
+ <rsslog src="plugins/rsslog/rsslog.php?f=WP" mode="rollover"/>
+ <rsslog src="plugins/rsslog/rsslog.php?state=1" filter="security" refresh="300" mode="last" timeformat="%d.%m. %H:%M">
+ <label>Ereignisse state=1 Filter=security</label>
+ <layout rowspan="9" colspan="6"></layout>
+ </rsslog>
+ <rsslog src="plugins/rsslog/rsslog.php?state=0" filter="security" refresh="300" mode="last" timeformat="%d.%m. %H:%M">
+ <label>Ereignisse state=0 Filter=security</label>
+ <layout rowspan="9" colspan="6"></layout>
+ </rsslog>
+ <line/>
+ <page name="externe feeds">
+ <rss src="http://www.tagesschau.de/xml/rss2" refresh="3600" header="true"/>
+ </page>
+ </page>
+</pages>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2012-12-09 15:36:19
|
Revision: 1194
http://openautomation.svn.sourceforge.net/openautomation/?rev=1194&view=rev
Author: hausl
Date: 2012-12-09 15:36:09 +0000 (Sun, 09 Dec 2012)
Log Message:
-----------
Centralized default icons into iconhandler.js
Modified Paths:
--------------
CometVisu/trunk/visu/designs/alaska/design_setup.js
CometVisu/trunk/visu/designs/alaska_slim/design_setup.js
CometVisu/trunk/visu/designs/discreet/design_setup.js
CometVisu/trunk/visu/designs/discreet_sand/design_setup.js
CometVisu/trunk/visu/designs/discreet_slim/design_setup.js
CometVisu/trunk/visu/designs/metal/design_setup.js
CometVisu/trunk/visu/designs/pitchblack/design_setup.js
CometVisu/trunk/visu/designs/planet/design_setup.js
CometVisu/trunk/visu/designs/pure/design_setup.js
CometVisu/trunk/visu/lib/iconhandler.js
Modified: CometVisu/trunk/visu/designs/alaska/design_setup.js
===================================================================
--- CometVisu/trunk/visu/designs/alaska/design_setup.js 2012-12-09 15:07:06 UTC (rev 1193)
+++ CometVisu/trunk/visu/designs/alaska/design_setup.js 2012-12-09 15:36:09 UTC (rev 1194)
@@ -21,271 +21,3 @@
//
//////////////////////////////////////////////////////////////////////////////
-icons.insert({
- 'CometVisu' : { '*' : '128',
- '16' : { '*' : 'sodium' ,
- 'black' : { 'uri': 'icon/comet_16_000000.png' },
- 'white' : { 'uri': 'icon/comet_16_ffffff.png' },
- 'antimony' : { 'uri': 'icon/comet_16_00ddff.png' },
- 'boron' : { 'uri': 'icon/comet_16_00ff11.png' },
- 'lithium' : { 'uri': 'icon/comet_16_ff0000.png' },
- 'potassium' : { 'uri': 'icon/comet_16_d00055.png' },
- 'sodium' : { 'uri': 'icon/comet_16_ff8000.png' } },
- '32' : { '*' : 'sodium' ,
- 'black' : { 'uri': 'icon/comet_32_000000.png' },
- 'white' : { 'uri': 'icon/comet_32_ffffff.png' },
- 'antimony' : { 'uri': 'icon/comet_32_00ddff.png' },
- 'boron' : { 'uri': 'icon/comet_32_00ff11.png' },
- 'lithium' : { 'uri': 'icon/comet_32_ff0000.png' },
- 'potassium' : { 'uri': 'icon/comet_32_d00055.png' },
- 'sodium' : { 'uri': 'icon/comet_32_ff8000.png' } },
- '64' : { '*' : 'sodium' ,
- 'black' : { 'uri': 'icon/comet_64_000000.png' },
- 'white' : { 'uri': 'icon/comet_64_ffffff.png' },
- 'antimony' : { 'uri': 'icon/comet_64_00ddff.png' },
- 'boron' : { 'uri': 'icon/comet_64_00ff11.png' },
- 'lithium' : { 'uri': 'icon/comet_64_ff0000.png' },
- 'potassium' : { 'uri': 'icon/comet_64_d00055.png' },
- 'sodium' : { 'uri': 'icon/comet_64_ff8000.png' } },
- '128': { '*' : 'sodium' ,
- 'black' : { 'uri': 'icon/comet_128_000000.png' },
- 'white' : { 'uri': 'icon/comet_128_ffffff.png' },
- 'antimony' : { 'uri': 'icon/comet_128_00ddff.png' },
- 'boron' : { 'uri': 'icon/comet_128_00ff11.png' },
- 'lithium' : { 'uri': 'icon/comet_128_ff0000.png' },
- 'potassium' : { 'uri': 'icon/comet_128_d00055.png' },
- 'sodium' : { 'uri': 'icon/comet_128_ff8000.png' } } },
- 'audio_audio' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_audio.png' , 'style': 'height: 2em;' },
- 'sodium' : { 'uri': 'icon/knx-uf-iconset/128x128_or/audio_audio.png' , 'style': 'height: 2em;' } } },
- 'audio_eject' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_eject.png' , 'style': 'height: 2em;' } } },
- 'audio_ff' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_ff.png' , 'style': 'height: 2em;' } } },
- 'audio_mute' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_mute.png' , 'style': 'height: 2em;' } } },
- 'audio_pause' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_pause.png' , 'style': 'height: 2em;' } } },
- 'audio_playliste' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_playliste.png' , 'style': 'height: 2em;' } } },
- 'audio_play' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_play.png' , 'style': 'height: 2em;' } } },
- 'audio_rec' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_rec.png' , 'style': 'height: 2em;' } } },
- 'audio_rew' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_rew.png' , 'style': 'height: 2em;' } } },
- 'audio_sound' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_sound.png' , 'style': 'height: 2em;' } } },
- 'audio_stop' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_stop.png' , 'style': 'height: 2em;' } } },
- 'fts_fenster_gekippt' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_fenster_gekippt.png' , 'style': 'height: 2em;' } } },
- 'fts_fenster_offen' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_fenster_offen.png' , 'style': 'height: 2em;' } } },
- 'fts_fenster' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_fenster.png' , 'style': 'height: 2em;' } } },
- 'fts_garage' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_garage.png' , 'style': 'height: 2em;' } } },
- 'fts_markise' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_markise.png' , 'style': 'height: 2em;' } } },
- 'fts_rollo' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_rollo.png' , 'style': 'height: 2em;' } } },
- 'fts_tuer_offen' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_tuer_offen.png' , 'style': 'height: 2em;' } } },
- 'fts_tuer' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_tuer.png' , 'style': 'height: 2em;' } } },
- 'it_fernsehen' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_fernsehen.png' , 'style': 'height: 2em;' } } },
- 'it_funk_dcf77' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_funk_dcf77.png' , 'style': 'height: 2em;' } } },
- 'it_internet' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_internet.png' , 'style': 'height: 2em;' } } },
- 'it_kamera' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_kamera.png' , 'style': 'height: 2em;' } } },
- 'it_nas' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_nas.png' , 'style': 'height: 2em;' } } },
- 'it_netz' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_netz.png' , 'style': 'height: 2em;' } } },
- 'it_netzwerk' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_netzwerk.png' , 'style': 'height: 2em;' } } },
- 'it_pc' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_pc.png' , 'style': 'height: 2em;' } } },
- 'it_radio' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_radio.png' , 'style': 'height: 2em;' } } },
- 'it_router' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_router.png' , 'style': 'height: 2em;' } } },
- 'it_server' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_server.png' , 'style': 'height: 2em;' } } },
- 'it_smartphone' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_smartphone.png' , 'style': 'height: 2em;' } } },
- 'it_telefon' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_telefon.png' , 'style': 'height: 2em;' } } },
- 'it_wlan' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_wlan.png' , 'style': 'height: 2em;' } } },
- 'licht_esstisch' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_esstisch.png' , 'style': 'height: 2em;' } } },
- 'licht_indirekt' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_indirekt.png' , 'style': 'height: 2em;' } } },
- 'licht_led' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_led.png' , 'style': 'height: 2em;' } } },
- 'licht_lichterkette' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_lichterkette.png' , 'style': 'height: 2em;' } } },
- 'licht_licht' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_licht.png' , 'style': 'height: 2em;' } } },
- 'licht_party' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_party.png' , 'style': 'height: 2em;' } } },
- 'licht_regelung' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_regelung.png' , 'style': 'height: 2em;' } } },
- 'licht_stehlampe' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_stehlampe.png' , 'style': 'height: 2em;' } } },
- 'meld_achtung' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/meld_achtung.png' , 'style': 'height: 2em;' } } },
- 'meld_medizin' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/meld_medizin.png' , 'style': 'height: 2em;' } } },
- 'meld_post_offen' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/meld_post_offen.png' , 'style': 'height: 2em;' } } },
- 'meld_post' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/meld_post.png' , 'style': 'height: 2em;' } } },
- 'meld_service' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/meld_service.png' , 'style': 'height: 2em;' } } },
- 'meld_steckdose' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/meld_steckdose.png' , 'style': 'height: 2em;' } } },
- 'sani_bewaesserung' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_bewaesserung.png' , 'style': 'height: 2em;' } } },
- 'sani_fussbodenheizung' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_fussbodenheizung.png' , 'style': 'height: 2em;' } } },
- 'sani_heizung' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_heizung.png' , 'style': 'height: 2em;' } } },
- 'sani_kessel_temp' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_kessel_temp.png' , 'style': 'height: 2em;' } } },
- 'sani_lueftung' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_lueftung.png' , 'style': 'height: 2em;' } } },
- 'sani_lueftung_regelung': { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_lueftung_regelung.png' , 'style': 'height: 2em;' } } },
- 'sani_pumpe' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_pumpe.png' , 'style': 'height: 2em;' } } },
- 'sani_solar' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_solar.png' , 'style': 'height: 2em;' } } },
- 'sani_solar_temp' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_solar_temp.png' , 'style': 'height: 2em;' } } },
- 'sani_wasserhahn' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_wasserhahn.png' , 'style': 'height: 2em;' } } },
- 'secur_alarmanlage' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/secur_alarmanlage.png' , 'style': 'height: 2em;' } } },
- 'secur_codierung' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/secur_codierung.png' , 'style': 'height: 2em;' } } },
- 'secur_frostschutz' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/secur_frostschutz.png' , 'style': 'height: 2em;' } } },
- 'secur_hitzeschutz' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/secur_hitzeschutz.png' , 'style': 'height: 2em;' } } },
- 'secur_offen' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/secur_offen.png' , 'style': 'height: 2em;' } } },
- 'secur_rauchmelder' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/secur_rauchmelder.png' , 'style': 'height: 2em;' } } },
- 'secur_zu' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/secur_zu.png' , 'style': 'height: 2em;' } } },
- 'steuer_ab' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_ab.png' , 'style': 'height: 2em;' } } },
- 'steuer_alles_ein_aus' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_alles_ein_aus.png' , 'style': 'height: 2em;' } } },
- 'steuer_auf' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_auf.png' , 'style': 'height: 2em;' } } },
- 'steuer_aussen_ein_aus' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_aussen_ein_aus.png' , 'style': 'height: 2em;' } } },
- 'steuer_ein_aus' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_ein_aus.png' , 'style': 'height: 2em;' } } },
- 'steuer_home' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_home.png' , 'style': 'height: 2em;' } } },
- 'steuer_minus' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_minus.png' , 'style': 'height: 2em;' } } },
- 'steuer_plus' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_plus.png' , 'style': 'height: 2em;' } } },
- 'steuer_standby' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_standby.png' , 'style': 'height: 2em;' } } },
- 'steuer_vor' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_vor.png' , 'style': 'height: 2em;' } } },
- 'steuer_x' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_x.png' , 'style': 'height: 2em;' } } },
- 'steuer_zurueck' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_zurueck.png' , 'style': 'height: 2em;' } } },
- 'szene_essen' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_essen.png' , 'style': 'height: 2em;' } } },
- 'szene_garten' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_garten.png' , 'style': 'height: 2em;' } } },
- 'szene_kochen' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_kochen.png' , 'style': 'height: 2em;' } } },
- 'szene_making_love' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_making_love.png' , 'style': 'height: 2em;' } } },
- 'szene_nacht' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_nacht.png' , 'style': 'height: 2em;' } } },
- 'szene_party' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_party.png' , 'style': 'height: 2em;' } } },
- 'szene_pool' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_pool.png' , 'style': 'height: 2em;' } } },
- 'szene_schlafen' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_schlafen.png' , 'style': 'height: 2em;' } } },
- 'szene_schwimmen' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_schwimmen.png' , 'style': 'height: 2em;' } } },
- 'szene_szene' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_szene.png' , 'style': 'height: 2em;' } } },
- 'szene_terrasse' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_terrasse.png' , 'style': 'height: 2em;' } } },
- 'szene_toilette' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_toilette.png' , 'style': 'height: 2em;' } } },
- 'szene_weihnachten' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_weihnachten.png' , 'style': 'height: 2em;' } } },
- 'temp_aussen' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/temp_aussen.png' , 'style': 'height: 2em;' } } },
- 'temp_frost' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/temp_frost.png' , 'style': 'height: 2em;' } } },
- 'temp_innen' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/temp_innen.png' , 'style': 'height: 2em;' } } },
- 'temp_regelung' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/temp_regelung.png' , 'style': 'height: 2em;' } } },
- 'temp_temperatur' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/temp_temperatur.png' , 'style': 'height: 2em;' } } },
- 'user_abwesend' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/user_abwesend.png' , 'style': 'height: 2em;' } } },
- 'user_anwesend' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/user_anwesend.png' , 'style': 'height: 2em;' } } },
- 'user_ext_away' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/user_ext_away.png' , 'style': 'height: 2em;' } } },
- 'wetter_bewoelkt' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_bewoelkt.png' , 'style': 'height: 2em;' } } },
- 'wetter_feuchtigkeit' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_feuchtigkeit.png' , 'style': 'height: 2em;' } } },
- 'wetter_gewitter' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_gewitter.png' , 'style': 'height: 2em;' } } },
- 'wetter_pollen' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_pollen.png' , 'style': 'height: 2em;' } } },
- 'wetter_regen' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_regen.png' , 'style': 'height: 2em;' } } },
- 'wetter_schnee' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_schnee.png' , 'style': 'height: 2em;' } } },
- 'wetter_sommer' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_sommer.png' , 'style': 'height: 2em;' } } },
- 'wetter_sonne' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_sonne.png' , 'style': 'height: 2em;' } } },
- 'wetter_unwetter' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_unwetter.png' , 'style': 'height: 2em;' } } },
- 'wetter_wind' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_wind.png' , 'style': 'height: 2em;' } } },
- 'wetter_winter' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_winter.png' , 'style': 'height: 2em;' } } },
- 'zeit_automatik' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/zeit_automatik.png' , 'style': 'height: 2em;' } } },
- 'zeit_diagramm' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/zeit_diagramm.png' , 'style': 'height: 2em;' } } },
- 'zeit_ecomode' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/zeit_ecomode.png' , 'style': 'height: 2em;' } } },
- 'zeit_handbetrieb' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/zeit_handbetrieb.png' , 'style': 'height: 2em;' } } },
- 'zeit_kalender' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/zeit_kalender.png' , 'style': 'height: 2em;' } } },
- 'zeit_notiz' : { '*': { '*' : 'white',
- ...
[truncated message content] |
|
From: <ma...@us...> - 2012-12-09 22:00:21
|
Revision: 1198
http://openautomation.svn.sourceforge.net/openautomation/?rev=1198&view=rev
Author: mayerch
Date: 2012-12-09 22:00:14 +0000 (Sun, 09 Dec 2012)
Log Message:
-----------
- little bug fixes
- add (inital) ability to switch the flow-o-matic flow via the bus
Modified Paths:
--------------
CometVisu/trunk/visu/lib/cometvisu-client.js
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
Modified: CometVisu/trunk/visu/lib/cometvisu-client.js
===================================================================
--- CometVisu/trunk/visu/lib/cometvisu-client.js 2012-12-09 18:43:51 UTC (rev 1197)
+++ CometVisu/trunk/visu/lib/cometvisu-client.js 2012-12-09 22:00:14 UTC (rev 1198)
@@ -79,7 +79,7 @@
return;
}
- if( !this.doRestart )
+ if( json && !this.doRestart )
{
this.lastIndex = json.i;
var data = json.d;
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-12-09 18:43:51 UTC (rev 1197)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-12-09 22:00:14 UTC (rev 1198)
@@ -49,23 +49,14 @@
var defaultColumns = 12;
var minColumnWidth = 150;
var enableColumnAdjustment = false;
-if (backend == undefined) {
- var backend = "cgi";
-}
+var backend = 'cgi-bin'; // default path to backend
if ($.getUrlVar("backend")) {
backend = $.getUrlVar("backend");
}
-var backendConfig = {
- baseUrl : '/cgi-bin/',
-};
-
-function initBackendClient(backend) {
- if (backend.toLowerCase() == 'oh') {
- backendConfig.baseUrl = '/cv/';
- }
-
- visu = new CometVisu(backendConfig.baseUrl);
+function initBackendClient() {
+ backend = '/' + backend + '/';
+ visu = new CometVisu( backend );
visu.update = function(json) { // overload the handler
for (key in json) {
$.event.trigger('_' + key, json[key]);
@@ -326,7 +317,7 @@
if ($('pages', xml).attr("backend")) {
backend = $('pages', xml).attr("backend");
}
- initBackendClient(backend);
+ initBackendClient();
scrollSpeed = $('pages', xml).attr("scroll_speed");
if ($('pages', xml).attr('enable_column_adjustment') == "true") {
@@ -644,8 +635,7 @@
var length = 0.0;
$(this)
.find('path')
- .each(
- function() {
+ .each( function() {
var path = this;
if (path.className.animVal.split(' ')
.indexOf('pipe-o-matic_clone') > 0)
@@ -705,7 +695,21 @@
}
length += path.getTotalLength();
});
- });
+ if( this.attributes.getNamedItem('data-cometvisu-active') )
+ {
+ activeValues = this.attributes.getNamedItem('data-cometvisu-active').value;
+ $( activeValues.split(' ') ).each( function() {
+ $('body').bind( '_' + this, function( e, data, passedElement ){
+ if( data == '01' )
+ //pipe_group.classList.add('flow_active');
+ pipe_group.setAttribute('class', pipe_group.getAttribute('class').replace(' flow_active','') + ' flow_active' );
+ else
+ pipe_group.setAttribute('class', pipe_group.getAttribute('class').replace(' flow_active','') );
+ //pipe_group.classList.remove('flow_active');
+ } );
+ } );
+ }
+ });
// Flow-O-Matic: add CSS
// helper for multiple bowser support
Modified: CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2012-12-09 18:43:51 UTC (rev 1197)
+++ CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2012-12-09 22:00:14 UTC (rev 1198)
@@ -431,7 +431,7 @@
var idx = num;
$.ajax({
- url: backendConfig.baseUrl+"rrdfetch?rrd=" + src + ".rrd&ds=" + datasource + "&start=end-" + period + s.start + "&end=" + s.end + "&res=" + s.res,
+ url: backend+"rrdfetch?rrd=" + src + ".rrd&ds=" + datasource + "&start=end-" + period + s.start + "&end=" + s.end + "&res=" + s.res,
dataType: "json",
type: "GET",
context: this,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|