|
From: <ma...@us...> - 2012-05-31 20:40:52
|
Revision: 850
http://openautomation.svn.sourceforge.net/openautomation/?rev=850&view=rev
Author: mayerch
Date: 2012-05-31 20:40:46 +0000 (Thu, 31 May 2012)
Log Message:
-----------
Global change: enable and disable pages via classes and not via individual style-attribute anymore - this allows designs to react to it
Planet design: move page heading
Modified Paths:
--------------
CometVisu/trunk/visu/designs/designglobals.css
CometVisu/trunk/visu/designs/planet/basic.css
CometVisu/trunk/visu/designs/planet/design_setup.js
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/structure/pure/page.js
Modified: CometVisu/trunk/visu/designs/designglobals.css
===================================================================
--- CometVisu/trunk/visu/designs/designglobals.css 2012-05-31 19:30:14 UTC (rev 849)
+++ CometVisu/trunk/visu/designs/designglobals.css 2012-05-31 20:40:46 UTC (rev 850)
@@ -44,6 +44,16 @@
}
/*
+ * Disable all pages except the active ones
+ */
+.page {
+ display: none;
+}
+
+.pageActive {
+ display: block;
+}
+/*
* global color declarations for stylings in all designs
* may be overloaded by designs
*/
Modified: CometVisu/trunk/visu/designs/planet/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/planet/basic.css 2012-05-31 19:30:14 UTC (rev 849)
+++ CometVisu/trunk/visu/designs/planet/basic.css 2012-05-31 20:40:46 UTC (rev 850)
@@ -129,7 +129,7 @@
}
#navbarLeft {
- width: 11em; /* left bar width */
+ width: 12em; /* left bar width */
overflow-y: hidden;
margin-left: 0; /* overwrite the margin-left of .page */
}
@@ -145,27 +145,39 @@
#navbarLeft .widget, #navbarLeft hr {
margin-left: 0;
- margin-right: 1em;
+ margin-right: 2em;
}
#navbarLeft .switch, #navbarLeft .trigger, #navbarLeft .multitrigger {
- margin-right: 0em;
+ margin-right: 1em;
}
#centerContainer {
}
+#main {
+ overflow-y: visible !important;
+}
+
/******************************************************************/
h1 {
color: #999;
+ position: fixed;
+ top: 0;
+ right: 0.5em;
+ display: none;
}
+.activePage h1 {
+ display: block;
+}
+
.page
{
float:left;
overflow: auto;
position: relative;
- margin-left: 1em; /* to stay out of the knee */
+ /*margin-left: 1em;*/ /* to stay out of the knee */
}
.colspan0 {
Modified: CometVisu/trunk/visu/designs/planet/design_setup.js
===================================================================
--- CometVisu/trunk/visu/designs/planet/design_setup.js 2012-05-31 19:30:14 UTC (rev 849)
+++ CometVisu/trunk/visu/designs/planet/design_setup.js 2012-05-31 20:40:46 UTC (rev 850)
@@ -22,7 +22,7 @@
//////////////////////////////////////////////////////////////////////////////
//$('head').data('colspanDefault', 1 ); // 6 is already the default
-$('#navbarLeft').data({'columns': 6, 'size': '11em'} );
+$('#navbarLeft').data({'columns': 6, 'size': '12em'} );
$('#main').data('columns', 12 );
$('#navbarRight').data('columns', 1 );
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-05-31 19:30:14 UTC (rev 849)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-05-31 20:40:46 UTC (rev 850)
@@ -426,7 +426,8 @@
}
function scrollToPage( page_id, speed ) {
- $('#'+page_id).css( 'display', '' ); // show new page
+ $('.activePage').removeClass('activePage');
+ $('#'+page_id).addClass('pageActive activePage'); // show new page
// which is the parent of target page_id?
// => set this id as lastpage in url for window.onpopstate handling
@@ -473,7 +474,7 @@
path = path.join('_');
for( var i = new_array.length; i < old_array.length; i++ ) {
path += '_' + old_array[i]; // reuse of path...
- $('#'+path).css('display','none');
+ $('#'+path).removeClass('pageActive');
}
}
Modified: CometVisu/trunk/visu/structure/pure/page.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/page.js 2012-05-31 19:30:14 UTC (rev 849)
+++ CometVisu/trunk/visu/structure/pure/page.js 2012-05-31 20:40:46 UTC (rev 850)
@@ -26,7 +26,6 @@
address[ '_' + $p.attr('ga') ] = [ 'DPT:1.001', 0 ];
}
- var pstyle = ( '0' != path ) ? 'display:none;' : ''; // subPage style
var name = $p.attr('name');
var type = $p.attr('type') || 'text'; //text, 2d or 3d
var backdrop = $p.attr('backdrop');
@@ -52,7 +51,7 @@
var childs = $p.children();
//var container = $( '<div class="clearfix" />' );
- var subpage = $( '<div class="page" id="' + path + '" style="'+pstyle+';"/>' );
+ var subpage = $( '<div class="page" id="' + path + '"/>' );
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;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-06-11 19:36:26
|
Revision: 878
http://openautomation.svn.sourceforge.net/openautomation/?rev=878&view=rev
Author: mayerch
Date: 2012-06-11 19:36:20 +0000 (Mon, 11 Jun 2012)
Log Message:
-----------
navbar: display fix
planet design: recoloring
Modified Paths:
--------------
CometVisu/trunk/visu/designs/designglobals.css
CometVisu/trunk/visu/designs/planet/basic.css
CometVisu/trunk/visu/structure/pure/navbar.js
Modified: CometVisu/trunk/visu/designs/designglobals.css
===================================================================
--- CometVisu/trunk/visu/designs/designglobals.css 2012-06-11 17:34:58 UTC (rev 877)
+++ CometVisu/trunk/visu/designs/designglobals.css 2012-06-11 19:36:20 UTC (rev 878)
@@ -45,12 +45,15 @@
/*
* Disable all pages except the active ones
+ *
+ * Note: the .navbar class needs all of this decoration to overwrite the
+ * .clearfix class without using an !important qualifier
*/
-.page, .navbar {
+.page, html[xmlns] .navbar.clearfix {
display: none;
}
-.pageActive, .navbarActive {
+.pageActive, html[xmlns] .navbar.clearfix.navbarActive {
display: block;
}
/*
Modified: CometVisu/trunk/visu/designs/planet/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/planet/basic.css 2012-06-11 17:34:58 UTC (rev 877)
+++ CometVisu/trunk/visu/designs/planet/basic.css 2012-06-11 19:36:20 UTC (rev 878)
@@ -1,17 +1,16 @@
/*
+ * Styling of the Planet design for the CometVisu
+ * ==============================================
+ *
+ * This design is inspired by the LCARS computer interface of the StarTrek
+ * universe.
+ */
+
+/*
* Global definitions used:
* navbarWidth: 10rem
*/
-/* define basic setup */
-/*
-* {
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
- box-sizing: border-box;
-}
-*/
-
html {
font-size: 5.5mm;
}
@@ -33,6 +32,7 @@
a {
text-decoration: none;
+ color: #000000;
}
/* Clearfix */
@@ -87,7 +87,7 @@
#top:before {
width: 2rem;
height: 2rem;
- border: solid #9999cc;
+ border: solid #ff9966;
border-top-width: 1.5rem;
border-left-width: 10rem;
border-top-left-radius: 4rem 4rem;
@@ -101,7 +101,7 @@
.nav_path:before {
width: 2rem;
height: 2rem;
- border: solid #9999cc;
+ border: solid #ff9966;
border-top-width: 1.5rem;
border-left-width: 10rem;
border-top-left-radius: 12rem 3.5rem;
@@ -114,10 +114,10 @@
}
.nav_path {
- background: #9999cc;
+ background: #ff9966;
margin-left: 12.1rem;
margin-right: 0.1rem;
- margin-bottom: 2.1rem;
+ margin-bottom: 2.0rem;
border: 0px;
border-top-right-radius: 1rem;
border-bottom-right-radius: 1rem;
@@ -125,7 +125,7 @@
.nav_path a {
color: #000;
- background-color: #ff9900;
+ background-color: #cc6699;
border-width: 0px 0.1rem 0px 0px;
border-style: solid;
border-color: #000;
@@ -150,7 +150,7 @@
content: "";
display: block;
height: 100%;
- background-color: #cc6699;
+ background-color: #cc6666;
width: 10rem; /* size of the knee */
margin-top: 0.1rem;
}
@@ -184,7 +184,7 @@
}
#bottom > .footer {
- background-color: #ff0;
+ background-color: #ff9966;
height: 1.5rem;
margin: 0.1rem 0.1rem 0.1rem 0;
border-top-right-radius: 1rem;
@@ -249,8 +249,7 @@
.widget .actor, .widget.pagelink > div > a, .widget.text > div {
text-align: center;
min-height: 2rem;
- background: #ffcc99;
- /* margin: 0.1rem; */
+ background: #ffcc66;
}
.widget.pagelink > div > a {
display: block;
@@ -284,7 +283,7 @@
content: "";
height: 2rem;
display: block;
- border: 1rem solid #fc9;
+ border: 1rem solid #cc6699;
border-bottom-style: none;
border-right-style: none;
-moz-box-sizing: border-box;
@@ -295,7 +294,7 @@
}
.multitrigger > .label {
- background: #fc9;
+ background: #cc6699;
width: 10rem;
display: inline-block;
margin-top: -2rem;
@@ -363,7 +362,7 @@
content: "";
visibility: visible;
height: 2rem;
- border: 1rem solid #fc9;
+ border: 1rem solid #cc6699;
border-top-style: none;
border-right-style: none;
-moz-box-sizing: border-box;
@@ -395,7 +394,7 @@
}
.text {
- color: #999;
+ color: #000;
}
.widget.slide {
@@ -406,7 +405,7 @@
.slide:before {
content: "";
display: block;
- background-color: #fc9;
+ background-color: #ffcc66;
border-right-style: solid;
border-right-width: 0.1rem;
border-top-left-radius: 1rem;
@@ -422,7 +421,7 @@
display: block;
border-top-right-radius: 1rem;
border-bottom-right-radius: 1rem;
- background-color: #fc9;
+ background-color: #ffcc66;
height: 2rem;
min-width: 2.0rem;
visibility: visible;
@@ -456,7 +455,7 @@
.ui-widget-content { /*border: 1px solid #dddddd;*/ background: #000 ; color: #000; }
.ui-widget-content a { color: #333333; }
-.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { /*border: 1px solid #cccccc;*/ background: #fc9 ; /*border-radius:1rem;*/ }
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { /*border: 1px solid #cccccc;*/ background: #ffcc66 ; /*border-radius:1rem;*/ }
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; }
/*.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }*/
@@ -489,7 +488,7 @@
content: "";
content: "";
display: block;
- border: 0.3rem solid #0f0;
+ border: 0.3rem solid #9999ff;
border-top-left-radius: 0.5rem;
border-bottom-left-radius: 0.5rem;
border-right-width: 0;
@@ -513,7 +512,7 @@
content: "";
visibility: visible;
display: inline-block;
- border: 0.3rem solid #0f0;
+ border: 0.3rem solid #9999ff;
border-top-right-radius: 0.5rem;
border-bottom-right-radius: 0.5rem;
border-left-width: 0;
@@ -541,7 +540,7 @@
margin: .1rem .0rem 0.0rem .1rem;
clear: both;
border: none;
- background: #9cf;
+ background: #cc99cc;
height: 1.0rem;
border-top-right-radius: 1rem;
border-bottom-right-radius: 1rem;
@@ -557,7 +556,7 @@
.popup:before, .widget.image:before, .widget.video:before, .widget.diagram:before {
content: "";
display: block;
- border: 0.3rem solid #0f0;
+ border: 0.3rem solid #9999ff;
border-top-left-radius: 0.5rem;
border-bottom-left-radius: 0.5rem;
border-right-width: 0;
@@ -588,7 +587,7 @@
content: "";
visibility: visible;
display: inline-block;
- border: 0.3rem solid #0f0;
+ border: 0.3rem solid #9999ff;
border-top-right-radius: 0.5rem;
border-bottom-right-radius: 0.5rem;
border-left-width: 0;
@@ -655,7 +654,7 @@
.actor.red
{
- background-color:#FF0000;
+ background-color:#CC0000;
color: #000;
}
.actor.white
Modified: CometVisu/trunk/visu/structure/pure/navbar.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/navbar.js 2012-06-11 17:34:58 UTC (rev 877)
+++ CometVisu/trunk/visu/structure/pure/navbar.js 2012-06-11 19:36:20 UTC (rev 878)
@@ -20,7 +20,7 @@
var $n = $(navbar);
var childs = $n.children();
var id = path.split('_'); id.pop();
- var container = $( '<div class="navbar" id="' + id.join('_') + '_navbar" />' );
+ var container = $( '<div class="navbar clearfix" id="' + id.join('_') + '_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 ) );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-06-29 19:36:11
|
Revision: 897
http://openautomation.svn.sourceforge.net/openautomation/?rev=897&view=rev
Author: mayerch
Date: 2012-06-29 19:36:04 +0000 (Fri, 29 Jun 2012)
Log Message:
-----------
Added tools to automatically modify a SVG that is used as a backdrop in 2D pages:
Pipe-O-Matic:
When a SVG group has a class "pipe_group" it's contained paths will be modified to look like a pipe or tube
Flow-O-Matic:
When a SVG groups has a class "show_flow" the path will be modified to show a "fluid".
When it additionally has a class "flow_active" this "fluid" will show a flowing motion.
Note: it is allowed to have multiple paths in a group. This can be used to show a crossing. If one path consists out of multiple subpaths a crossing would look like a connection.
This effect can be seen in the 2d3d demo config
Modified Paths:
--------------
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/media/demo_2d_backdrop_red_pot.svg
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-06-25 21:05:12 UTC (rev 896)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-06-29 19:36:04 UTC (rev 897)
@@ -386,6 +386,110 @@
}
}
+ $('embed').each( function () {
+ this.onload = function(){
+ var svg = this.getSVGDocument();
+
+ // Pipe-O-Matic:
+ var pipes = svg.getElementsByClassName('pipe_group');
+ $(pipes).each( function(){
+ var pipe_group = this;
+ $(this).find('path').each( function(){
+ var path = this;
+ var halfsize = parseInt( parseFloat( path.style.strokeWidth ) / 2 );
+ var opacity = 0.15;
+ for( var width = halfsize-1; width > 0; width-- )
+ {
+ opacity -= 0.1/halfsize;
+ var n = path.cloneNode();
+ n.className.baseVal += ' pipe-o-matic_clone';
+ n.style.strokeWidth = width * 2;
+ n.style.stroke = '#ffffff';
+ n.style.strokeOpacity = opacity;
+ pipe_group.insertBefore( n, path.nextElementSibling );
+ }
+ });
+ });
+
+ // Flow-O-Matic: add Paths
+ var segmentLength = 40;
+ var pipes = svg.getElementsByClassName('show_flow');
+ $(pipes).each( function(){
+ var pipe_group = this;
+ var length = 0.0;
+ $(this).find('path').each( function(){
+ var path = this;
+ if( path.className.animVal.split(' ').indexOf( 'pipe-o-matic_clone' ) > 0 ) return;
+ var stroke = path.style.stroke;
+ var r, g, b;
+ if(stroke[0] == '#' )
+ {
+ r = parseInt( path.style.stroke.substring( 1, 3 ), 16 );
+ g = parseInt( path.style.stroke.substring( 3, 5 ), 16 );
+ b = parseInt( path.style.stroke.substring( 5, 7 ), 16 );
+ } else if( stroke.indexOf( 'rgb(') == 0 )
+ {
+ var colors = stroke.replace(/[^0-9,.]*/g, '' ).split(',');
+ r = colors[0];
+ g = colors[1];
+ b = colors[2];
+ }
+ var rTarget = 0; // this color should be somehow user setable - but how?
+ var gTarget = 0;
+ var bTarget = 0;
+ function toHex( v ) { var ret = parseInt( v ).toString( 16 ); return (ret.length<2)?'0'+ret:ret; }
+ for( var i = segmentLength/2; i > 0; i -= 2 )
+ {
+ var factor = 1-i/(segmentLength/2);
+ var offset = (length+segmentLength/2-i) % segmentLength;
+ var low = 2*i;
+ var high = segmentLength - low;
+ var n = path.cloneNode();
+ n.className.baseVal += ' flow-o-matic_clone';
+ n.style.stroke = '#' + toHex( r*factor+rTarget*(1-factor) ) + toHex( g*factor+gTarget*(1-factor) ) + toHex( b*factor+bTarget*(1-factor) );
+ if( high > offset )
+ {
+ n.style.strokeDasharray = [ high - offset, low, offset, 0 ];
+ } else {
+ n.style.strokeDasharray = [ 0, low - (offset - high), high, offset - high ];
+ }
+ n.style.strokeDashoffset = length % (0.5*segmentLength);
+ pipe_group.insertBefore( n, path.nextElementSibling );
+ }
+ length += path.getTotalLength();
+ });
+ });
+
+ // Flow-O-Matic: add CSS
+ // helper for multiple bowser support
+ function createKeyframe( name, content )
+ {
+ return '@keyframes ' + name + " {\n" + content + "}\n" +
+ '@-moz-keyframes ' + name + " {\n" + content + "}\n" +
+ '@-webkit-keyframes ' + name + " {\n" + content + "}\n";
+ }
+ var keyframes = createKeyframe( 'move',
+ "from { stroke-dashoffset: " + segmentLength + "; }\n"
+ + "to { stroke-dashoffset: 0; }\n" );
+ function createCSSRules( style, value )
+ {
+ return style + ': ' + value + ";\n"
+ + '-moz-' + style + ': ' + value + ";\n"
+ + '-webkit-' + style + ': ' + value + ";\n";
+ }
+ keyframes += ".flow_active path {\n"
+ + createCSSRules( 'animation-duration' , '3s' )
+ + createCSSRules( 'animation-name' , 'move' )
+ + createCSSRules( 'animation-timing-function', 'linear' )
+ + createCSSRules( 'animation-iteration-count', 'infinite' )
+ + "}\n";
+ var s = svg.createElementNS( 'http://www.w3.org/2000/svg', 'style' );
+ s.setAttribute('type','text/css');
+ s.textContent = keyframes;
+ $( 'svg', svg ).prepend( s );
+ };
+ });
+
visu.subscribe( ga_list );
$(window).trigger('resize');
$("#pages").triggerHandler("done");
Modified: CometVisu/trunk/visu/media/demo_2d_backdrop_red_pot.svg
===================================================================
--- CometVisu/trunk/visu/media/demo_2d_backdrop_red_pot.svg 2012-06-25 21:05:12 UTC (rev 896)
+++ CometVisu/trunk/visu/media/demo_2d_backdrop_red_pot.svg 2012-06-29 19:36:04 UTC (rev 897)
@@ -15,7 +15,7 @@
<!--
<script xlink:href="../lib/jquery.js" type="text/javascript"></script>
-->
- <script xlink:href="../lib/jquery.js" type="text/javascript"></script>
+ <script xlink:href="../dependencies/jquery.js" type="text/javascript"></script>
<script xlink:href="../lib/cometvisu-client.js" type="text/javascript"></script>
<script xlink:href="../transforms/transform_default.js" type="text/javascript"></script>
<script xlink:href="../transforms/transform_knx.js" type="text/javascript"></script>
@@ -104,6 +104,25 @@
</cc:Work>
</rdf:RDF>
</metadata>
+ <g class="pipe_group show_flow flow_active">
+ <path
+ d="m 425.8384,434.07799 c 0.6364,13.41532 0.56549,30.8791 23.95269,30.62832 70.12255,-0.7519 97.23888,7.42707 137.96865,-25.07085 40.86838,-32.60851 18.35681,-90.8422 -8.26522,-94.98813 -31.80211,-4.95265 -34.86451,66.70935 -17.88672,88.88153 15.40697,20.12076 128.71885,35.91591 131.11642,-17.03335 2.48464,-54.87234 -47.01995,-52.65006 -46.5036,-3.61604"
+ id="pipe1"
+ class="pipe"
+ style="fill:none;stroke:#ff0000;stroke-width:20;" />
+ <path
+ d="m 646.22062,410.07947 c -1.31084,48.2736 65.27818,36.38289 67.80232,36.63966"
+ id="pipe2"
+ class="pipe"
+ style="fill:none;stroke:#ff0000;stroke-width:20;" />
+ </g>
+ <g class="pipe_group">
+ <path
+ d="m 692.79659,112.28814 c 0,29.25237 -26.08511,52.9661 -58.26272,52.9661 -32.1776,0 -58.26271,-23.71373 -58.26271,-52.9661 0,-29.252371 26.08511,-52.966103 58.26271,-52.966103 32.17761,0 58.26272,23.713732 58.26272,52.966103 z"
+ id="pipe1"
+ class="pipe"
+ style="fill:none;stroke:#0000ff;stroke-width:20;" />
+ </g>
<path
d="m 524.85653,400.57388 a 100,37.795274 0 0 1 -200,0 100,37.795274 0 1 1 200,0 z"
id="path3029-8"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-07-22 12:47:17
|
Revision: 920
http://openautomation.svn.sourceforge.net/openautomation/?rev=920&view=rev
Author: mayerch
Date: 2012-07-22 12:47:11 +0000 (Sun, 22 Jul 2012)
Log Message:
-----------
Make example mappings more consistend (same logic as Stylings now)
Modified Paths:
--------------
CometVisu/trunk/visu/visu_config.xml
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/visu_config.xml
===================================================================
--- CometVisu/trunk/visu/visu_config.xml 2012-07-18 19:33:06 UTC (rev 919)
+++ CometVisu/trunk/visu/visu_config.xml 2012-07-22 12:47:11 UTC (rev 920)
@@ -7,19 +7,19 @@
<plugin name="upnpcontroller"/>
</plugins>
<mappings>
- <mapping name="Open_Close">
+ <mapping name="Close_Open">
<entry value="0">zu</entry>
<entry value="1">offen</entry>
</mapping>
- <mapping name="Close_Open">
+ <mapping name="Open_Close">
<entry value="0">offen</entry>
<entry value="1">zu</entry>
</mapping>
- <mapping name="On_Off">
+ <mapping name="Off_On">
<entry value="0">Aus</entry>
<entry value="1">An</entry>
</mapping>
- <mapping name="Off_On">
+ <mapping name="On_Off">
<entry value="0">An</entry>
<entry value="1">Aus</entry>
</mapping>
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2012-07-18 19:33:06 UTC (rev 919)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2012-07-22 12:47:11 UTC (rev 920)
@@ -6,24 +6,24 @@
<plugin name="diagram"/>
</plugins>
<mappings>
- <mapping name="Open_Close">
+ <mapping name="Close_Open">
<entry value="0">zu</entry>
<entry value="1">offen</entry>
</mapping>
- <mapping name="Close_Open">
+ <mapping name="Open_Close">
<entry value="0">offen</entry>
<entry value="1">zu</entry>
</mapping>
- <mapping name="Close_Tilted_Open">
+ <mapping name="Open_Tilted_Close">
<entry value="0">offen</entry>
<entry value="1">gekippt</entry>
<entry value="2">zu</entry>
</mapping>
- <mapping name="On_Off">
+ <mapping name="Off_On">
<entry value="0">Aus</entry>
<entry value="1">An</entry>
</mapping>
- <mapping name="Off_On">
+ <mapping name="On_Off">
<entry value="0">An</entry>
<entry value="1">Aus</entry>
</mapping>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pe...@us...> - 2012-08-10 22:48:36
|
Revision: 936
http://openautomation.svn.sourceforge.net/openautomation/?rev=936&view=rev
Author: peuter
Date: 2012-08-10 22:48:28 +0000 (Fri, 10 Aug 2012)
Log Message:
-----------
- now every corner in a group is rounded
- if a navbar is defined the pagelinks on top are hidden
- special design for a pagejump to the root page ("Home-Button") if it is on top of the navbar, see sample config
- groups must not have a name anymore
- added a custom "scrolltopage" event which is called at the end of each page scroll
Modified Paths:
--------------
CometVisu/trunk/visu/designs/metal/basic.css
CometVisu/trunk/visu/designs/metal/design_setup.js
CometVisu/trunk/visu/designs/metal/visu_config_metal.xml
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/designs/metal/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/metal/basic.css 2012-08-10 19:52:30 UTC (rev 935)
+++ CometVisu/trunk/visu/designs/metal/basic.css 2012-08-10 22:48:28 UTC (rev 936)
@@ -58,15 +58,6 @@
{
clear:both;
}
-
-div#top {
- padding-top: 8px;
- border-top: 3px solid #1d1d1d;
- border-bottom: 1px solid #0a0a0a;
- background-color: #121212;
- padding-bottom: 2px;
-}
-
.page h1 {
display: none;
margin-top: 0;
@@ -176,8 +167,13 @@
.group div.widget_container:first-child, .group div.widget_container:first-child .widget {
border-top-left-radius: 1em;
}
-
+.navbar .group div.widget_container:first-child, .navbar .group div.widget_container:first-child .widget {
+ border-top-left-radius: 0;
+ border-top-right-radius: 1em;
+}
iframe { border: none; }
+
+.navbar .widget { border-width: 0 0 1px 0; }
.navbar .widget .label {
float: none;
@@ -286,8 +282,6 @@
margin: 0.2em 0.5em;
border: 2px solid #B3B3B3;
border-radius: 1em;
- border-bottom-left-radius: 0;
- border-bottom-right-radius: 0;
/*padding-bottom: 1em;
background: #eeeeee;*/
}
Modified: CometVisu/trunk/visu/designs/metal/design_setup.js
===================================================================
--- CometVisu/trunk/visu/designs/metal/design_setup.js 2012-08-10 19:52:30 UTC (rev 935)
+++ CometVisu/trunk/visu/designs/metal/design_setup.js 2012-08-10 22:48:28 UTC (rev 936)
@@ -23,7 +23,50 @@
//$(".value < img").css("padding", "0");
$('#navbarLeft').data({'columns': 6} );
+var rootPageJumpChanged = false;
+$(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 repositition the elements in order to fit the new page height
+ handleResize();
+ }
+ if (!rootPageJumpChanged) {
+ $('.navbar > .widget_container:first-child .group .pagejump:first-child .actor').each(function(i) {
+ var data = $(this).data();
+ var target = data.target;
+ if (target.match(/^id_[0-9_]+$/)==null) {
+ // find Page-ID by name
+ $('.page h1').each(function(i) {
+ if ($(this).text()==target) {
+ target = $(this).closest(".page").attr('id');
+ return;
+ }
+ });
+ }
+ if (target=="id_0") {
+ // pagejump to root-page found
+ $(this).closest(".group").css({
+ 'border-top-right-radius': 0,
+ 'border-bottom-left-radius': '1em',
+ 'margin-top': 0,
+ 'border-top': 'none',
+ 'border-left': '2px solid #B3B3B3'
+ });
+ $('.navbar > .widget_container:first-child .group .widget_container:last-child, .navbar > .widget_container:first-child .group div.widget_container:last-child .widget').css({
+ 'border-bottom-left-radius': '1em',
+ 'border': 'none'
+ });
+ }
+ });
+ rootPageJumpChanged=true;
+ }
+ }
+});
+
function getOffsetCorners(elem) {
return {
top_left: {top: Math.round(elem.offset().top), left: Math.round(elem.offset().left) },
@@ -49,25 +92,25 @@
if (roundUpperCorners) {
// upper left corner is done by regular css-rule
// upper right corner
- if (Math.abs(elemCorners.top_right.top-groupCorners.top_right.top)<threshold && Math.abs(elemCorners.top_right.left-groupCorners.top_right.left)<threshold) {
- $(this).css({'border-top-right-radius': '1em'});
- $(this).children().css({'border-top-right-radius': '1em'});
+ if (group.css('border-top-right-radius')!="0px" && Math.abs(elemCorners.top_right.top-groupCorners.top_right.top)<threshold && Math.abs(elemCorners.top_right.left-groupCorners.top_right.left)<threshold) {
+ $(this).css({'border-top-right-radius': group.css('border-top-right-radius')});
+ $(this).children().css({'border-top-right-radius': group.css('border-top-right-radius')});
}
}
- if (Math.abs(elemCorners.bottom_right.top-groupCorners.bottom_right.top)<threshold && Math.abs(elemCorners.bottom_right.left-groupCorners.bottom_right.left)<threshold) {
- $(this).css({'border-bottom-right-radius': '1em'});
- $(this).children().css({'border-bottom-right-radius': '1em'});
+ if (group.css('border-bottom-right-radius')!="0px" && Math.abs(elemCorners.bottom_right.top-groupCorners.bottom_right.top)<threshold && Math.abs(elemCorners.bottom_right.left-groupCorners.bottom_right.left)<threshold) {
+ $(this).css({'border-bottom-right-radius': group.css('border-bottom-right-radius')});
+ $(this).children().css({'border-bottom-right-radius': group.css('border-bottom-right-radius')});
}
- if (Math.abs(elemCorners.bottom_left.top-groupCorners.bottom_left.top)<threshold && Math.abs(elemCorners.bottom_left.left-groupCorners.bottom_left.left)<threshold) {
- $(this).css({'border-bottom-left-radius': '1em'});
- $(this).children().css({'border-bottom-left-radius': '1em'});
+ if (group.css('border-bottom-left-radius')!="0px" && Math.abs(elemCorners.bottom_left.top-groupCorners.bottom_left.top)<threshold && Math.abs(elemCorners.bottom_left.left-groupCorners.bottom_left.left)<threshold) {
+ $(this).css({'border-bottom-left-radius': group.css('border-bottom-left-radius')});
+ $(this).children().css({'border-bottom-left-radius': group.css('border-bottom-left-radius')});
}
});
});
}
-//$(window).bind('resize',function() {
-// roundCorners();
-//});
+$(window).bind('scrolltopage',function() {
+ roundCorners();
+});
icons.insert({
'CometVisu' : { '*' : '128',
Modified: CometVisu/trunk/visu/designs/metal/visu_config_metal.xml
===================================================================
--- CometVisu/trunk/visu/designs/metal/visu_config_metal.xml 2012-08-10 19:52:30 UTC (rev 935)
+++ CometVisu/trunk/visu/designs/metal/visu_config_metal.xml 2012-08-10 22:48:28 UTC (rev 936)
@@ -102,6 +102,13 @@
</meta>
<page name="Übersicht">
<navbar position="left" dynamic="true" width="200px">
+ <group nowidget="true">
+ <pagejump target="Übersicht">
+ <label>
+ <icon name="steuer_home" />
+ </label>
+ </pagejump>
+ </group>
<group name="Räume" nowidget="true">
<pagejump target="Wohnzimmer" name="Wohnen">
<label>
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-08-10 19:52:30 UTC (rev 935)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-08-10 22:48:28 UTC (rev 936)
@@ -599,6 +599,7 @@
$(this).parent().addClass("active");
}
});
+ $(window).trigger('scrolltopage',page_id);
}
function updateTopNavigation() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pe...@us...> - 2012-08-11 15:49:32
|
Revision: 937
http://openautomation.svn.sourceforge.net/openautomation/?rev=937&view=rev
Author: peuter
Date: 2012-08-11 15:49:24 +0000 (Sat, 11 Aug 2012)
Log Message:
-----------
- some Javascript cleanup
- found a pure css-based solution to round the group corners, Javascript workaround removed, now the borders should work in every setup
- some minor design tweaks, e.g. widget borders, statusbar text color
Modified Paths:
--------------
CometVisu/trunk/visu/designs/metal/basic.css
CometVisu/trunk/visu/designs/metal/design_setup.js
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/designs/metal/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/metal/basic.css 2012-08-10 22:48:28 UTC (rev 936)
+++ CometVisu/trunk/visu/designs/metal/basic.css 2012-08-11 15:49:24 UTC (rev 937)
@@ -79,7 +79,7 @@
.footer,
.footer *
{
- color: #000000;
+ color: #555;
font-size: 0.9em;
vertical-align: middle;
}
@@ -95,10 +95,9 @@
{
margin: 0;
padding: 0.3em;
- /* border:yellow 1px solid; */
- border-color: #020202;
+ border-color: #666;
border-style: solid;
- border-width: 0 1px 1px 0;
+ border-width: 1px 1px 0 0;
min-height: 2em;
text-shadow: 0 1px 1px #111;
@@ -164,13 +163,7 @@
/*white-space: pre-wrap;*/
}
.widget.group { padding: 0; }
-.group div.widget_container:first-child, .group div.widget_container:first-child .widget {
- border-top-left-radius: 1em;
-}
-.navbar .group div.widget_container:first-child, .navbar .group div.widget_container:first-child .widget {
- border-top-left-radius: 0;
- border-top-right-radius: 1em;
-}
+
iframe { border: none; }
.navbar .widget { border-width: 0 0 1px 0; }
@@ -282,8 +275,7 @@
margin: 0.2em 0.5em;
border: 2px solid #B3B3B3;
border-radius: 1em;
- /*padding-bottom: 1em;
- background: #eeeeee;*/
+ overflow: hidden;
}
.navbar .group {
margin: 0.2em 0 0.1em 0;
@@ -292,6 +284,16 @@
border-bottom-right-radius: 1em;
border-left: none;
}
+.navbar .group.root {
+ border-top-right-radius: 0;
+ border-bottom-left-radius: 1em;
+ margin-top: 0;
+ border-top: none;
+ border-left: 2px solid #B3B3B3;
+}
+.navbar > .widget_container:first-child .group .widget_container:last-child, .navbar > .widget_container:first-child .group div.widget_container:last-child .widget {
+ border: none;
+}
.group > div > h2 {
font-size: 0.8em;
padding: 0 1em;
@@ -322,9 +324,6 @@
background-image: -o-linear-gradient(#f0f0f0, #ddd); /* Opera 11.10+ */
background-image: linear-gradient(#f0f0f0, #ddd);
}
-.navbar .group .clearfix div.widget_container:last-child, .navbar .group .clearfix div.widget_container:last-child .widget {
- border-bottom-right-radius: 1em;
-}
.pagejump {
background: #333333;
background-image: -webkit-gradient(linear, left top, left bottom, from( #444444 /*{c-bar-background-start}*/), to( #2D2D2D /*{c-bar-background-end}*/)); /* Saf4+, Chrome */
Modified: CometVisu/trunk/visu/designs/metal/design_setup.js
===================================================================
--- CometVisu/trunk/visu/designs/metal/design_setup.js 2012-08-10 22:48:28 UTC (rev 936)
+++ CometVisu/trunk/visu/designs/metal/design_setup.js 2012-08-11 15:49:24 UTC (rev 937)
@@ -23,95 +23,28 @@
//$(".value < img").css("padding", "0");
$('#navbarLeft').data({'columns': 6} );
-var rootPageJumpChanged = false;
-
$(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 repositition the elements in order to fit the new page height
+ // because the #top bar is missing now we have to reposition the elements in order to fit the new page height
handleResize();
}
- if (!rootPageJumpChanged) {
- $('.navbar > .widget_container:first-child .group .pagejump:first-child .actor').each(function(i) {
- var data = $(this).data();
- var target = data.target;
- if (target.match(/^id_[0-9_]+$/)==null) {
- // find Page-ID by name
- $('.page h1').each(function(i) {
- if ($(this).text()==target) {
- target = $(this).closest(".page").attr('id');
- return;
- }
- });
- }
- if (target=="id_0") {
- // pagejump to root-page found
- $(this).closest(".group").css({
- 'border-top-right-radius': 0,
- 'border-bottom-left-radius': '1em',
- 'margin-top': 0,
- 'border-top': 'none',
- 'border-left': '2px solid #B3B3B3'
- });
- $('.navbar > .widget_container:first-child .group .widget_container:last-child, .navbar > .widget_container:first-child .group div.widget_container:last-child .widget').css({
- 'border-bottom-left-radius': '1em',
- 'border': 'none'
- });
- }
- });
- rootPageJumpChanged=true;
- }
+ $('.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');
+ }
});
-function getOffsetCorners(elem) {
- return {
- top_left: {top: Math.round(elem.offset().top), left: Math.round(elem.offset().left) },
- bottom_left: {top: Math.round(elem.offset().top+elem.height()), left: Math.round(elem.offset().left) },
- top_right: {top: Math.round(elem.offset().top), left: Math.round(elem.offset().left+elem.width()) },
- bottom_right: {top: Math.round(elem.offset().top+elem.height()), left: Math.round(elem.offset().left+elem.width()) },
- };
-}
-function roundCorners() {
- // find elements in each groups corners
- $('.group:visible').each(function(i){
- var group = $(this);
- // do not use this in navbars
- if (group.parents('.navbar').size()>0) return;
-
- var groupCorners = getOffsetCorners(group);
-
- // if the group has a headline (=name) we must not round the upper corners
- var roundUpperCorners = ($(this).find('.widget_container:first-child').size()>0);
- var threshold=5;
- $(this).find('.widget_container').each(function (i) {
- var elemCorners = getOffsetCorners($(this));
- if (roundUpperCorners) {
- // upper left corner is done by regular css-rule
- // upper right corner
- if (group.css('border-top-right-radius')!="0px" && Math.abs(elemCorners.top_right.top-groupCorners.top_right.top)<threshold && Math.abs(elemCorners.top_right.left-groupCorners.top_right.left)<threshold) {
- $(this).css({'border-top-right-radius': group.css('border-top-right-radius')});
- $(this).children().css({'border-top-right-radius': group.css('border-top-right-radius')});
- }
- }
- if (group.css('border-bottom-right-radius')!="0px" && Math.abs(elemCorners.bottom_right.top-groupCorners.bottom_right.top)<threshold && Math.abs(elemCorners.bottom_right.left-groupCorners.bottom_right.left)<threshold) {
- $(this).css({'border-bottom-right-radius': group.css('border-bottom-right-radius')});
- $(this).children().css({'border-bottom-right-radius': group.css('border-bottom-right-radius')});
- }
- if (group.css('border-bottom-left-radius')!="0px" && Math.abs(elemCorners.bottom_left.top-groupCorners.bottom_left.top)<threshold && Math.abs(elemCorners.bottom_left.left-groupCorners.bottom_left.left)<threshold) {
- $(this).css({'border-bottom-left-radius': group.css('border-bottom-left-radius')});
- $(this).children().css({'border-bottom-left-radius': group.css('border-bottom-left-radius')});
- }
- });
- });
-}
-$(window).bind('scrolltopage',function() {
- roundCorners();
-});
-
icons.insert({
'CometVisu' : { '*' : '128',
'16' : { '*' : 'sodium' ,
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-08-10 22:48:28 UTC (rev 936)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-08-11 15:49:24 UTC (rev 937)
@@ -552,11 +552,7 @@
$('.pagejump.active').removeClass('active');
if (page_id.match(/^id_[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 = $('.page h1:contains('+page_id+')').closest(".page").attr("id");
}
$('#'+page_id).addClass('pageActive activePage'); // show new page
$('#'+page_id+'_navbar').addClass('navbarActive');
@@ -588,14 +584,13 @@
}
// set pagejump for this page to active if it exists
$(".pagejump > .actor").each(function (i) {
- var data = $(this).data();
- if (data.target.match(/^id_[0-9_]+$/)==null) {
+ if ($(this).data().target.match(/^id_[0-9_]+$/)==null) {
// get page id by name
- if ($('#'+page_id+' h1').text()==data.target) {
+ if ($('#'+page_id+' h1:contains('+$(this).data().target+')').size()>0) {
$(this).parent().addClass("active");
}
}
- else if (page_id==data.target) {
+ else if (page_id==$(this).data().target) {
$(this).parent().addClass("active");
}
});
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-08-11 19:55:52
|
Revision: 938
http://openautomation.svn.sourceforge.net/openautomation/?rev=938&view=rev
Author: mayerch
Date: 2012-08-11 19:55:44 +0000 (Sat, 11 Aug 2012)
Log Message:
-----------
* Added new design "metal" to <designtoggle>
* moved metal demo config to main directory so that it can be reached directly via URL parameter: "?config=metal"
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_custom.js
Added Paths:
-----------
CometVisu/trunk/visu/visu_config_metal.xml
Removed Paths:
-------------
CometVisu/trunk/visu/designs/metal/visu_config_metal.xml
Deleted: CometVisu/trunk/visu/designs/metal/visu_config_metal.xml
===================================================================
--- CometVisu/trunk/visu/designs/metal/visu_config_metal.xml 2012-08-11 15:49:24 UTC (rev 937)
+++ CometVisu/trunk/visu/designs/metal/visu_config_metal.xml 2012-08-11 19:55:44 UTC (rev 938)
@@ -1,367 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- design="metal" xsi:noNamespaceSchemaLocation="visu_config.xsd">
- <meta>
- <plugins>
- <plugin name="gweather" />
- </plugins>
- <mappings>
- <mapping name="OpenClose">
- <entry value="0">
- <icon name="fts_fenster_offen" />
- </entry>
- <entry value="1">
- <icon name="fts_fenster" />
- </entry>
- <entry value="2">
- <icon name="fts_fenster_gekippt" />
- </entry>
- </mapping>
- <mapping name="DoorOpenClose">
- <entry value="0">
- <icon name="fts_tuer_offen" />
- </entry>
- <entry value="1">
- <icon name="fts_tuer" />
- </entry>
- </mapping>
- <mapping name="UpDown">
- <entry value="0">
- <icon name="steuer_auf" />
- </entry>
- <entry value="Auf">
- <icon name="steuer_auf" />
- </entry>
- <entry value="1">
- <icon name="steuer_ab" />
- </entry>
- <entry value="Zu">
- <icon name="steuer_ab" />
- </entry>
- </mapping>
- <mapping name="DaWeg">
- <entry value="0">Weg</entry>
- <entry value="1">Da</entry>
- </mapping>
- <mapping name="OnOff">
- <entry value="0">O</entry>
- <entry value="1">I</entry>
- </mapping>
- <mapping name="AudioMute">
- <entry value="0">
- <icon name="audio_mute" />
- </entry>
- <entry value="1">
- <icon name="audio_audio" />
- </entry>
- </mapping>
- <mapping name="Sign">
- <entry range_min="-1e99" range_max="0">Negativ</entry>
- <entry value="0">Null</entry>
- <entry range_min="0" range_max="1e99">Positiv</entry>
- </mapping>
- </mappings>
- <stylings>
- <styling name="RedGreen">
- <entry value="Aus">red</entry>
- <entry value="Weg">red</entry>
- <entry value="Fehlt">red</entry>
- <entry value="Offen">red</entry>
- <entry value="An">green</entry>
- <entry value="Da">green</entry>
- <entry value="Zu">green</entry>
- <entry value="Vorhanden">red</entry>
- <entry value="0">red</entry>
- <entry value="1">green</entry>
- </styling>
- <styling name="GreenRed">
- <entry value="Aus">green</entry>
- <entry value="An">red</entry>
- <entry value="1">red</entry>
- <entry value="0">green</entry>
- </styling>
- <styling name="BluePurpleRed">
- <entry range_min="-100" range_max="0">blue</entry>
- <entry value="0">purple</entry>
- <entry range_min="0" range_max="100">red</entry>
- </styling>
- <styling name="BluePurpleRedTemp">
- <entry range_min="0" range_max="18">blue</entry>
- <entry range_min="18" range_max="21">purple</entry>
- <entry range_min="21" 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="Übersicht">
- <navbar position="left" dynamic="true" width="200px">
- <group nowidget="true">
- <pagejump target="Übersicht">
- <label>
- <icon name="steuer_home" />
- </label>
- </pagejump>
- </group>
- <group name="Räume" nowidget="true">
- <pagejump target="Wohnzimmer" name="Wohnen">
- <label>
- <icon name="it_fernsehen" />
- </label>
- </pagejump>
- <pagejump target="Schlafzimmer" name="Schlafen">
- <label>
- <icon name="szene_schlafen" />
- </label>
- </pagejump>
- </group>
- <group name="Sonstiges" nowidget="true">
- <pagejump target="Multiroom" name="Audio">
- <label>
- <icon name="audio_sound" />
- </label>
- </pagejump>
- <pagejump target="Temperaturen" name="Temperatur">
- <label>
- <icon name="temp_temperatur" />
- </label>
- </pagejump>
- </group>
- </navbar>
- <group name="Allgemein" nowidget="true">
- <layout colspan="12" />
- <info>
- <label>Modus</label>
- <address transform="DPT:16.001" variant="">12/1/3</address>
- </info>
- <info>
- <label>Präsenz</label>
- <address transform="DPT:16.001" variant="">12/1/0</address>
- </info>
- <switch mapping="OnOff" styling="RedGreen">
- <layout colspan="3" />
- <label>Follow me</label>
- <address transform="DPT:1.001" variant="">12/1/6</address>
- </switch>
- <switch mapping="OnOff" styling="RedGreen">
- <layout colspan="3" />
- <label>Abwesend</label>
- <address transform="DPT:1.001" variant="">12/1/2</address>
- </switch>
- <switch mapping="OnOff" styling="RedGreen">
- <layout colspan="3" />
- <label>Wecker</label>
- <address transform="DPT:1.001" variant="">12/1/8</address>
- </switch>
- <page name="Multiroom">
- <layout colspan="3" />
- <group name="Allgemein" nowidget="true">
- <layout colspan="12" />
- <switch mapping="OnOff" styling="RedGreen">
- <label>Webradio</label>
- <address transform="DPT:1.001" variant="">12/1/7</address>
- </switch>
- <switch mapping="AudioMute" styling="RedGreen">
- <layout colspan="3" />
- <label>LS Schlafzimmer</label>
- <address transform="DPT:1.001" variant="">13/5/1</address>
- </switch>
- <switch mapping="AudioMute" styling="RedGreen">
- <layout colspan="3" />
- <label>LS Wohnzimmer</label>
- <address transform="DPT:1.001" variant="">14/1/3</address>
- </switch>
- </group>
- <!-- iframe src="http://drake:9000" width="100%" height="600px"> <layout
- colspan="12"/> </iframe -->
- </page>
- </group>
- <group name="Wetter" nowidget="true">
- <layout colspan="12" />
- <gweather city="Warstein" lang="de" current="true" forecast="true">
- <layout colspan="7" />
- </gweather>
- </group>
- <group name="Räume" nowidget="true">
- <layout colspan="6" />
- <page name="Test"><layout colspan="3" /></page>
- <page name="Wohnzimmer">
- <layout colspan="3" />
- <group name="Licht" nowidget="true">
- <layout colspan="12" />
- <switch mapping="OnOff" styling="RedGreen">
- <layout colspan="3" />
- <label>Strahler</label>
- <address transform="DPT:1.001" variant="">13/0/0</address>
- </switch>
- <switch mapping="OnOff" styling="RedGreen">
- <layout colspan="3" />
- <label>Spot</label>
- <address transform="DPT:1.001" variant="">13/0/1</address>
- </switch>
- <switch mapping="OnOff" styling="RedGreen">
- <layout colspan="3" />
- <label>Schrank</label>
- <address transform="DPT:1.001" variant="">13/0/2</address>
- </switch>
- <switch mapping="OnOff" styling="RedGreen">
- <layout colspan="3" />
- <label>Stehlampe</label>
- <address transform="DPT:1.001" variant="">13/0/24</address>
- </switch>
- </group>
- <group name="Jalousien" nowidget="true">
- <layout colspan="12" />
- <multitrigger button1label="↑" button1value="0"
- button2label="↓" button2value="1" styling="RedGreen"
- mapping="UpDown">
- <label><icon name="fts_rollo" /> Fenster</label>
- <address transform="DPT:1.001" variant="">13/0/3</address>
- </multitrigger>
- <multitrigger button1label="↑" button1value="0"
- button2label="↓" button2value="1" styling="RedGreen"
- mapping="UpDown">
- <label><icon name="fts_rollo" /> Tür</label>
- <address transform="DPT:1.001" variant="">13/0/4</address>
- </multitrigger>
- </group>
- <group name="Steckdosen" nowidget="true">
- <layout colspan="12" />
- <switch mapping="OnOff" styling="RedGreen">
- <layout colspan="3" />
- <label>SD 1</label>
- <address transform="DPT:1.001" variant="">10/0/0</address>
- </switch>
- <switch mapping="OnOff" styling="RedGreen">
- <layout colspan="3" />
- <label>SD 2</label>
- <address transform="DPT:1.001" variant="">13/0/5</address>
- </switch>
- <switch mapping="OnOff" styling="RedGreen">
- <layout colspan="3" />
- <label>SD 3</label>
- <address transform="DPT:1.001" variant="">13/0/6</address>
- </switch>
- <switch mapping="OnOff" styling="RedGreen">
- <layout colspan="3" />
- <label>SD 4</label>
- <address transform="DPT:1.001" variant="">13/0/13</address>
- </switch>
- </group>
- <group name="Heizung" nowidget="true">
- <slide min="0" max="100">
- <label><icon name="sani_heizung" />Heizung</label>
- <address transform="DPT:5.001" variant="">13/0/38</address>
- </slide>
- <info format="%.1f °C">
- <label><icon name="temp_temperatur" />Ist</label>
- <address transform="DPT:9.001" variant="">13/0/14</address>
- </info>
- <infotrigger uplabel="+" upvalue="0.5" downlabel="-"
- downvalue="-0.5" styling="BluePurpleRedTemp" align="center"
- infoposition="1" format="%.1f °C" change="absolute" min="15" max="25">
- <label><icon name="temp_regelung" />Soll</label>
- <address transform="DPT:9.001" variant="">13/0/39</address>
- </infotrigger>
- </group>
- <group name="Sonstiges" nowidget="true">
- <info mapping="OpenClose">
- <layout colspan="3" />
- <label>Fenster</label>
- <address transform="DPT:1.001" variant="">13/0/34</address>
- </info>
- <info mapping="DoorOpenClose">
- <layout colspan="3" />
- <label>Tür</label>
- <address transform="DPT:1.001" variant="">13/0/35</address>
- </info>
- <info mapping="OnOff" styling="RedGreen">
- <label>Bewegung</label>
- <address transform="DPT:1.001" variant="">13/0/36</address>
- </info>
- </group>
- </page>
- <page name="Schlafzimmer">
- <layout colspan="3" />
- <group name="Licht" nowidget="true">
- <layout colspan="12" />
- <switch mapping="OnOff" styling="RedGreen">
- <label>Licht</label>
- <address transform="DPT:1.001" variant="">13/1/0</address>
- </switch>
- <info format="%.2f Lux">
- <label><icon name="licht_licht" />Helligkeit</label>
- <address transform="DPT:9.001" variant="">13/1/25</address>
- </info>
- </group>
- <group name="Jalousien + Fenster" nowidget="true">
- <layout colspan="12" />
- <multitrigger button1label="↑" button1value="0"
- button2label="↓" button2value="1">
- <label><icon name="fts_rollo" />Jalousien</label>
- <address transform="DPT:1.001" variant="">13/1/1</address>
- </multitrigger>
- <info mapping="OpenClose">
- <label>Fenster</label>
- <address transform="DPT:1.001" variant="">13/1/17</address>
- </info>
- </group>
- <group align="center" name="Heizung" nowidget="true">
- <slide min="0" max="100">
- <label><icon name="sani_heizung" />Heizung</label>
- <address transform="DPT:5.001" variant="">13/1/27</address>
- </slide>
- <info format="%.1f °C">
- <label><icon name="temp_temperatur" />Ist</label>
- <address transform="DPT:9.001" variant="">13/1/12</address>
- </info>
- <infotrigger uplabel="+" upvalue="0.5" downlabel="-"
- downvalue="-0.5" styling="BluePurpleRedTemp" align="center"
- infoposition="1" format="%.1f °C" change="absolute" min="15" max="25">
- <label><icon name="temp_regelung" />Soll</label>
- <address transform="DPT:9.001" variant="">13/1/28</address>
- </infotrigger>
- </group>
- <group align="center" name="Verbraucher" nowidget="true">
- <switch mapping="AudioMute" styling="RedGreen">
- <label>Lautsprecher</label>
- <address transform="DPT:1.001" variant="">13/5/1</address>
- </switch>
- <switch mapping="OnOff" styling="RedGreen">
- <label>TV</label>
- <address transform="DPT:1.001" variant="">13/1/4</address>
- </switch>
- <switch mapping="OnOff" styling="RedGreen">
- <label>DVD</label>
- <address transform="DPT:1.001" variant="">13/1/7</address>
- </switch>
- <switch mapping="OnOff" styling="RedGreen">
- <label>IR</label>
- <address transform="DPT:1.001" variant="">13/1/6</address>
- </switch>
- </group>
- </page>
- <page name="Temperaturen">
- <layout colspan="3" />
- <info format="%.1f °C">
- <label><icon name="temp_aussen" />Aussen</label>
- <address transform="DPT:9.001" variant="">13/6/1</address>
- </info>
- <info format="%.1f °C">
- <label><icon name="temp_frost" />Kühlbox</label>
- <address transform="DPT:9.001" variant="">13/5/4</address>
- </info>
- <info format="%.1f °C">
- <label><icon name="temp_innen" />Innen</label>
- <address transform="DPT:9.001" variant="">14/1/6</address>
- </info>
- </page>
- </group>
- </page>
-</pages>
Modified: CometVisu/trunk/visu/designs/structure_custom.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_custom.js 2012-08-11 15:49:24 UTC (rev 937)
+++ CometVisu/trunk/visu/designs/structure_custom.js 2012-08-11 19:55:44 UTC (rev 938)
@@ -63,7 +63,7 @@
'type' : 'toggle'
})
.bind('click', function() {
- var designs = [ 'pure', 'discreet', 'discreet_sand', 'discreet_slim', 'alaska', 'alaska_slim', 'planet' ];
+ var designs = [ 'pure', 'discreet', 'discreet_sand', 'discreet_slim', 'alaska', 'alaska_slim', 'planet', 'metal' ];
var oldDesign = $('.value',this).text();
var newDesign = designs[ (designs.indexOf(oldDesign) + 1) % designs.length ];
Copied: CometVisu/trunk/visu/visu_config_metal.xml (from rev 937, CometVisu/trunk/visu/designs/metal/visu_config_metal.xml)
===================================================================
--- CometVisu/trunk/visu/visu_config_metal.xml (rev 0)
+++ CometVisu/trunk/visu/visu_config_metal.xml 2012-08-11 19:55:44 UTC (rev 938)
@@ -0,0 +1,367 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ design="metal" xsi:noNamespaceSchemaLocation="visu_config.xsd">
+ <meta>
+ <plugins>
+ <plugin name="gweather" />
+ </plugins>
+ <mappings>
+ <mapping name="OpenClose">
+ <entry value="0">
+ <icon name="fts_fenster_offen" />
+ </entry>
+ <entry value="1">
+ <icon name="fts_fenster" />
+ </entry>
+ <entry value="2">
+ <icon name="fts_fenster_gekippt" />
+ </entry>
+ </mapping>
+ <mapping name="DoorOpenClose">
+ <entry value="0">
+ <icon name="fts_tuer_offen" />
+ </entry>
+ <entry value="1">
+ <icon name="fts_tuer" />
+ </entry>
+ </mapping>
+ <mapping name="UpDown">
+ <entry value="0">
+ <icon name="steuer_auf" />
+ </entry>
+ <entry value="Auf">
+ <icon name="steuer_auf" />
+ </entry>
+ <entry value="1">
+ <icon name="steuer_ab" />
+ </entry>
+ <entry value="Zu">
+ <icon name="steuer_ab" />
+ </entry>
+ </mapping>
+ <mapping name="DaWeg">
+ <entry value="0">Weg</entry>
+ <entry value="1">Da</entry>
+ </mapping>
+ <mapping name="OnOff">
+ <entry value="0">O</entry>
+ <entry value="1">I</entry>
+ </mapping>
+ <mapping name="AudioMute">
+ <entry value="0">
+ <icon name="audio_mute" />
+ </entry>
+ <entry value="1">
+ <icon name="audio_audio" />
+ </entry>
+ </mapping>
+ <mapping name="Sign">
+ <entry range_min="-1e99" range_max="0">Negativ</entry>
+ <entry value="0">Null</entry>
+ <entry range_min="0" range_max="1e99">Positiv</entry>
+ </mapping>
+ </mappings>
+ <stylings>
+ <styling name="RedGreen">
+ <entry value="Aus">red</entry>
+ <entry value="Weg">red</entry>
+ <entry value="Fehlt">red</entry>
+ <entry value="Offen">red</entry>
+ <entry value="An">green</entry>
+ <entry value="Da">green</entry>
+ <entry value="Zu">green</entry>
+ <entry value="Vorhanden">red</entry>
+ <entry value="0">red</entry>
+ <entry value="1">green</entry>
+ </styling>
+ <styling name="GreenRed">
+ <entry value="Aus">green</entry>
+ <entry value="An">red</entry>
+ <entry value="1">red</entry>
+ <entry value="0">green</entry>
+ </styling>
+ <styling name="BluePurpleRed">
+ <entry range_min="-100" range_max="0">blue</entry>
+ <entry value="0">purple</entry>
+ <entry range_min="0" range_max="100">red</entry>
+ </styling>
+ <styling name="BluePurpleRedTemp">
+ <entry range_min="0" range_max="18">blue</entry>
+ <entry range_min="18" range_max="21">purple</entry>
+ <entry range_min="21" 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="Übersicht">
+ <navbar position="left" dynamic="true" width="200px">
+ <group nowidget="true">
+ <pagejump target="Übersicht">
+ <label>
+ <icon name="steuer_home" />
+ </label>
+ </pagejump>
+ </group>
+ <group name="Räume" nowidget="true">
+ <pagejump target="Wohnzimmer" name="Wohnen">
+ <label>
+ <icon name="it_fernsehen" />
+ </label>
+ </pagejump>
+ <pagejump target="Schlafzimmer" name="Schlafen">
+ <label>
+ <icon name="szene_schlafen" />
+ </label>
+ </pagejump>
+ </group>
+ <group name="Sonstiges" nowidget="true">
+ <pagejump target="Multiroom" name="Audio">
+ <label>
+ <icon name="audio_sound" />
+ </label>
+ </pagejump>
+ <pagejump target="Temperaturen" name="Temperatur">
+ <label>
+ <icon name="temp_temperatur" />
+ </label>
+ </pagejump>
+ </group>
+ </navbar>
+ <group name="Allgemein" nowidget="true">
+ <layout colspan="12" />
+ <info>
+ <label>Modus</label>
+ <address transform="DPT:16.001" variant="">12/1/3</address>
+ </info>
+ <info>
+ <label>Präsenz</label>
+ <address transform="DPT:16.001" variant="">12/1/0</address>
+ </info>
+ <switch mapping="OnOff" styling="RedGreen">
+ <layout colspan="3" />
+ <label>Follow me</label>
+ <address transform="DPT:1.001" variant="">12/1/6</address>
+ </switch>
+ <switch mapping="OnOff" styling="RedGreen">
+ <layout colspan="3" />
+ <label>Abwesend</label>
+ <address transform="DPT:1.001" variant="">12/1/2</address>
+ </switch>
+ <switch mapping="OnOff" styling="RedGreen">
+ <layout colspan="3" />
+ <label>Wecker</label>
+ <address transform="DPT:1.001" variant="">12/1/8</address>
+ </switch>
+ <page name="Multiroom">
+ <layout colspan="3" />
+ <group name="Allgemein" nowidget="true">
+ <layout colspan="12" />
+ <switch mapping="OnOff" styling="RedGreen">
+ <label>Webradio</label>
+ <address transform="DPT:1.001" variant="">12/1/7</address>
+ </switch>
+ <switch mapping="AudioMute" styling="RedGreen">
+ <layout colspan="3" />
+ <label>LS Schlafzimmer</label>
+ <address transform="DPT:1.001" variant="">13/5/1</address>
+ </switch>
+ <switch mapping="AudioMute" styling="RedGreen">
+ <layout colspan="3" />
+ <label>LS Wohnzimmer</label>
+ <address transform="DPT:1.001" variant="">14/1/3</address>
+ </switch>
+ </group>
+ <!-- iframe src="http://drake:9000" width="100%" height="600px"> <layout
+ colspan="12"/> </iframe -->
+ </page>
+ </group>
+ <group name="Wetter" nowidget="true">
+ <layout colspan="12" />
+ <gweather city="Warstein" lang="de" current="true" forecast="true">
+ <layout colspan="7" />
+ </gweather>
+ </group>
+ <group name="Räume" nowidget="true">
+ <layout colspan="6" />
+ <page name="Test"><layout colspan="3" /></page>
+ <page name="Wohnzimmer">
+ <layout colspan="3" />
+ <group name="Licht" nowidget="true">
+ <layout colspan="12" />
+ <switch mapping="OnOff" styling="RedGreen">
+ <layout colspan="3" />
+ <label>Strahler</label>
+ <address transform="DPT:1.001" variant="">13/0/0</address>
+ </switch>
+ <switch mapping="OnOff" styling="RedGreen">
+ <layout colspan="3" />
+ <label>Spot</label>
+ <address transform="DPT:1.001" variant="">13/0/1</address>
+ </switch>
+ <switch mapping="OnOff" styling="RedGreen">
+ <layout colspan="3" />
+ <label>Schrank</label>
+ <address transform="DPT:1.001" variant="">13/0/2</address>
+ </switch>
+ <switch mapping="OnOff" styling="RedGreen">
+ <layout colspan="3" />
+ <label>Stehlampe</label>
+ <address transform="DPT:1.001" variant="">13/0/24</address>
+ </switch>
+ </group>
+ <group name="Jalousien" nowidget="true">
+ <layout colspan="12" />
+ <multitrigger button1label="↑" button1value="0"
+ button2label="↓" button2value="1" styling="RedGreen"
+ mapping="UpDown">
+ <label><icon name="fts_rollo" /> Fenster</label>
+ <address transform="DPT:1.001" variant="">13/0/3</address>
+ </multitrigger>
+ <multitrigger button1label="↑" button1value="0"
+ button2label="↓" button2value="1" styling="RedGreen"
+ mapping="UpDown">
+ <label><icon name="fts_rollo" /> Tür</label>
+ <address transform="DPT:1.001" variant="">13/0/4</address>
+ </multitrigger>
+ </group>
+ <group name="Steckdosen" nowidget="true">
+ <layout colspan="12" />
+ <switch mapping="OnOff" styling="RedGreen">
+ <layout colspan="3" />
+ <label>SD 1</label>
+ <address transform="DPT:1.001" variant="">10/0/0</address>
+ </switch>
+ <switch mapping="OnOff" styling="RedGreen">
+ <layout colspan="3" />
+ <label>SD 2</label>
+ <address transform="DPT:1.001" variant="">13/0/5</address>
+ </switch>
+ <switch mapping="OnOff" styling="RedGreen">
+ <layout colspan="3" />
+ <label>SD 3</label>
+ <address transform="DPT:1.001" variant="">13/0/6</address>
+ </switch>
+ <switch mapping="OnOff" styling="RedGreen">
+ <layout colspan="3" />
+ <label>SD 4</label>
+ <address transform="DPT:1.001" variant="">13/0/13</address>
+ </switch>
+ </group>
+ <group name="Heizung" nowidget="true">
+ <slide min="0" max="100">
+ <label><icon name="sani_heizung" />Heizung</label>
+ <address transform="DPT:5.001" variant="">13/0/38</address>
+ </slide>
+ <info format="%.1f °C">
+ <label><icon name="temp_temperatur" />Ist</label>
+ <address transform="DPT:9.001" variant="">13/0/14</address>
+ </info>
+ <infotrigger uplabel="+" upvalue="0.5" downlabel="-"
+ downvalue="-0.5" styling="BluePurpleRedTemp" align="center"
+ infoposition="1" format="%.1f °C" change="absolute" min="15" max="25">
+ <label><icon name="temp_regelung" />Soll</label>
+ <address transform="DPT:9.001" variant="">13/0/39</address>
+ </infotrigger>
+ </group>
+ <group name="Sonstiges" nowidget="true">
+ <info mapping="OpenClose">
+ <layout colspan="3" />
+ <label>Fenster</label>
+ <address transform="DPT:1.001" variant="">13/0/34</address>
+ </info>
+ <info mapping="DoorOpenClose">
+ <layout colspan="3" />
+ <label>Tür</label>
+ <address transform="DPT:1.001" variant="">13/0/35</address>
+ </info>
+ <info mapping="OnOff" styling="RedGreen">
+ <label>Bewegung</label>
+ <address transform="DPT:1.001" variant="">13/0/36</address>
+ </info>
+ </group>
+ </page>
+ <page name="Schlafzimmer">
+ <layout colspan="3" />
+ <group name="Licht" nowidget="true">
+ <layout colspan="12" />
+ <switch mapping="OnOff" styling="RedGreen">
+ <label>Licht</label>
+ <address transform="DPT:1.001" variant="">13/1/0</address>
+ </switch>
+ <info format="%.2f Lux">
+ <label><icon name="licht_licht" />Helligkeit</label>
+ <address transform="DPT:9.001" variant="">13/1/25</address>
+ </info>
+ </group>
+ <group name="Jalousien + Fenster" nowidget="true">
+ <layout colspan="12" />
+ <multitrigger button1label="↑" button1value="0"
+ button2label="↓" button2value="1">
+ <label><icon name="fts_rollo" />Jalousien</label>
+ <address transform="DPT:1.001" variant="">13/1/1</address>
+ </multitrigger>
+ <info mapping="OpenClose">
+ <label>Fenster</label>
+ <address transform="DPT:1.001" variant="">13/1/17</address>
+ </info>
+ </group>
+ <group align="center" name="Heizung" nowidget="true">
+ <slide min="0" max="100">
+ <label><icon name="sani_heizung" />Heizung</label>
+ <address transform="DPT:5.001" variant="">13/1/27</address>
+ </slide>
+ <info format="%.1f °C">
+ <label><icon name="temp_temperatur" />Ist</label>
+ <address transform="DPT:9.001" variant="">13/1/12</address>
+ </info>
+ <infotrigger uplabel="+" upvalue="0.5" downlabel="-"
+ downvalue="-0.5" styling="BluePurpleRedTemp" align="center"
+ infoposition="1" format="%.1f °C" change="absolute" min="15" max="25">
+ <label><icon name="temp_regelung" />Soll</label>
+ <address transform="DPT:9.001" variant="">13/1/28</address>
+ </infotrigger>
+ </group>
+ <group align="center" name="Verbraucher" nowidget="true">
+ <switch mapping="AudioMute" styling="RedGreen">
+ <label>Lautsprecher</label>
+ <address transform="DPT:1.001" variant="">13/5/1</address>
+ </switch>
+ <switch mapping="OnOff" styling="RedGreen">
+ <label>TV</label>
+ <address transform="DPT:1.001" variant="">13/1/4</address>
+ </switch>
+ <switch mapping="OnOff" styling="RedGreen">
+ <label>DVD</label>
+ <address transform="DPT:1.001" variant="">13/1/7</address>
+ </switch>
+ <switch mapping="OnOff" styling="RedGreen">
+ <label>IR</label>
+ <address transform="DPT:1.001" variant="">13/1/6</address>
+ </switch>
+ </group>
+ </page>
+ <page name="Temperaturen">
+ <layout colspan="3" />
+ <info format="%.1f °C">
+ <label><icon name="temp_aussen" />Aussen</label>
+ <address transform="DPT:9.001" variant="">13/6/1</address>
+ </info>
+ <info format="%.1f °C">
+ <label><icon name="temp_frost" />Kühlbox</label>
+ <address transform="DPT:9.001" variant="">13/5/4</address>
+ </info>
+ <info format="%.1f °C">
+ <label><icon name="temp_innen" />Innen</label>
+ <address transform="DPT:9.001" variant="">14/1/6</address>
+ </info>
+ </page>
+ </group>
+ </page>
+</pages>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pe...@us...> - 2012-08-15 10:27:37
|
Revision: 963
http://openautomation.svn.sourceforge.net/openautomation/?rev=963&view=rev
Author: peuter
Date: 2012-08-15 10:27:29 +0000 (Wed, 15 Aug 2012)
Log Message:
-----------
* Fixed Bug that prevented the subpage-nabvars from disappearing
* Enhanced the shownavbar-setting to allow each navbar beeing disabled separately. (Top-, Right-, Bottom-, Left-Navbar) can be disabled/enabled by an css-like syntax e.g. shownavbar="true false false true" enabled top and left, shownavbar="true false"
* Added possibility to use more than one navbar at once, e.g. top and left
* Changed metal-config to show an example usage of the new feature
* Fixed some Bugs in Metal Design: Chrome and Opera browsers should work better with the rounded group corners
* Changed wrong red-styling in metal design
Modified Paths:
--------------
CometVisu/trunk/visu/designs/metal/basic.css
CometVisu/trunk/visu/designs/metal/design_setup.js
CometVisu/trunk/visu/designs/metal/mobile.css
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/structure/pure/navbar.js
CometVisu/trunk/visu/visu_config.xsd
CometVisu/trunk/visu/visu_config_metal.xml
Modified: CometVisu/trunk/visu/designs/metal/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/metal/basic.css 2012-08-15 07:48:42 UTC (rev 962)
+++ CometVisu/trunk/visu/designs/metal/basic.css 2012-08-15 10:27:29 UTC (rev 963)
@@ -90,6 +90,7 @@
.widget_container {
float: left;
+ width: 100%;
}
.widget
{
@@ -98,7 +99,6 @@
border-color: #666;
border-style: solid;
border-width: 1px 1px 0 0;
-
min-height: 2em;
text-shadow: 0 1px 1px #111;
background-image: -webkit-gradient(linear, left top, left bottom, from(#444444), to(#2d2d2d)); /* Saf4+, Chrome */
@@ -108,8 +108,9 @@
background-image: -o-linear-gradient(#444444, #2d2d2d); /* Opera 11.10+ */
background-image: linear-gradient(#444444, #2d2d2d);
}
+.navbar .pagejump { position: relative; }
.pagejump:hover,.pagelink:hover,.pagejump.active {
- background: #444444;
+ background-color: #444444;
font-weight: bold;
color: #fff;
text-shadow: 0 1px 1px #111;
@@ -120,7 +121,7 @@
background-image: -o-linear-gradient(#555555, #383838); /* Opera 11.10+ */
background-image: linear-gradient(#555555, #383838);
}
-.pagejump.active { background: url(images/active_page24.png) no-repeat center right; }
+.pagejump.active { background-image: url(images/active_page24.png); background-repeat: no-repeat; background-position: center right; }
.text > div,
.link > a {
float:left;
@@ -162,7 +163,6 @@
float:left;
/*white-space: pre-wrap;*/
}
-.widget.group { padding: 0; }
iframe { border: none; }
@@ -172,14 +172,13 @@
width: auto;
}
.navbar .widget .label > img {
- position: absolute;
left: 0.2em;
}
.navbar .switchPressed, .navbar .switchUnpressed {
width: 100% !important;
}
.navbar .switchPressed .value, .navbar .switchUnpressed .value {
- padding-left: 2em;
+ padding-left: 2.2em;
}
.green.switchPressed div, .green.switchUnpressed div {
@@ -189,12 +188,15 @@
text-shadow: 0;
}
.red.switchPressed div, .red.switchUnpressed div{
+ background: transparent url(images/dot_red.png) no-repeat center center;
+ color: grey !important;
+}
+.grey.switchPressed div, .grey.switchUnpressed div{
background: transparent url(images/dot_grey.png) no-repeat center center;
color: grey !important;
}
-
-.red
+.red
{
color:#f44;
font-weight:bold;
@@ -272,15 +274,16 @@
text-align: left;
margin-left: 0.2em;
}
-.group {
- margin: 0.2em 0.5em;
-}
+
.group.widget {
- border: 2px solid #B3B3B3;
+ border: 1px solid #B3B3B3;
border-radius: 1em;
-moz-border-radius: 1em;
-webkit-border-radius: 1em;
+ -o-border-radius: 1em;
overflow: hidden;
+ margin: 0.2em 0.5em;
+ padding: 0;
}
.navbar .group {
margin: 0.2em 0 0.1em 0;
@@ -311,8 +314,24 @@
border-left: 2px solid #B3B3B3;
}
.navbar > .widget_container:first-child .group .widget_container:last-child, .navbar > .widget_container:first-child .group div.widget_container:last-child .widget {
- border: none;
-}
+ border-width: 1px 0 0 0;
+ border-bottom-right-radius: 1em;
+ border-bottom-left-radius: 1em;
+}
+.navbar .group .widget_container:last-child,.navbar .group .widget_container:last-child .widget {
+ border-bottom-right-radius: 1em;
+}
+.navbar .pagejump .actor {
+ position: absolute;
+ top:0;
+ left:0;
+ right:0;
+ bottom:0;
+ vertical-align: middle;
+}
+.navbar .pagejump .actor .value {
+ line-height: 2em;
+}
.group > div > h2 {
font-size: 0.8em;
padding: 0 1em;
@@ -356,16 +375,16 @@
background-image: -o-linear-gradient(#f0f0f0, #ddd); /* Opera 11.10+ */
background-image: linear-gradient(#f0f0f0, #ddd);
}
-.pagejump {
+/*.pagejump {
background: #333333;
- background-image: -webkit-gradient(linear, left top, left bottom, from( #444444 /*{c-bar-background-start}*/), to( #2D2D2D /*{c-bar-background-end}*/)); /* Saf4+, Chrome */
- background-image: -webkit-linear-gradient( #444444 /*{c-bar-background-start}*/, #2D2D2D /*{c-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */
- background-image: -moz-linear-gradient( #444444 /*{c-bar-background-start}*/, #2D2D2D /*{c-bar-background-end}*/); /* FF3.6 */
- background-image: -ms-linear-gradient( #444444 /*{c-bar-background-start}*/, #2D2D2D /*{c-bar-background-end}*/); /* IE10 */
- background-image: -o-linear-gradient( #444444 /*{c-bar-background-start}*/, #2D2D2D /*{c-bar-background-end}*/); /* Opera 11.10+ */
- background-image: linear-gradient( #444444 /*{c-bar-background-start}*/, #2D2D2D /*{c-bar-background-end}*/);
+ background-image: -webkit-gradient(linear, left top, left bottom, from( #444444), to( #2D2D2D));
+ background-image: -webkit-linear-gradient( #444444 , #2D2D2D;
+ background-image: -moz-linear-gradient( #444444, #2D2D2D);
+ background-image: -ms-linear-gradient( #444444, #2D2D2D);
+ background-image: -o-linear-gradient( #444444, #2D2D2D);
+ background-image: linear-gradient( #444444, #2D2D2D);
margin: 0;
-}
+}*/
.switchPressed
{
@@ -571,3 +590,73 @@
background-color: #1d1d1d;
}
.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 !important;
+}
+
+#navbarTop, #navbarTop .navbar .widget, #navbarBottom .navbar .widget {
+ background: #333333;
+ background-image: -webkit-gradient(linear, left top, left bottom, from( #666), to( #000));
+ background-image: -webkit-linear-gradient( #666 , #000);
+ background-image: -moz-linear-gradient( #666, #000);
+ background-image: -ms-linear-gradient( #666, #000);
+ background-image: -o-linear-gradient( #666, #000);
+ background-image: linear-gradient( #666, #000);
+}
+#navbarTop .navbar .widget, #navbarBottom .navbar .widget {
+ margin: 0;
+ border-width:0;
+ padding: 0.3em 0.5em;
+
+}
+#navbarTop .navbar .widget:hover,#navbarTop .navbar .pagejump.active,#navbarTop .navbar .pagejump.active_ancestor {
+ background-color: #000;
+ font-weight: normal;
+ color: #fff;
+ text-shadow: 0 1px 1px #111;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#111), to(#666)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient(#111, #666); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient(#111, #666); /* FF3.6 */
+ background-image: -ms-linear-gradient(#111, #666); /* IE10 */
+ background-image: -o-linear-gradient(#111, #666); /* Opera 11.10+ */
+ background-image: linear-gradient(#111, #666);
+}
+
+#navbarTop { border-bottom: 2px solid #666; }
+#navbarTop .navbar .widget { position: relative; min-width: 2em; min-height: 3em; }
+#navbarTop .navbar .pagejump .label > img {
+ display: block;
+ margin: 0 auto;
+ height: 44px !important;
+}
+#navbarTop .navbar .pagejump .label {
+ text-align: center;
+ font-size: 0.7em;
+ width: 100%;
+ margin: 0 auto;
+ float: left;
+}
+#navbarTop .navbar .pagejump .actor .value {
+ display: none;
+}
+#navbarTop .navbar .pagejump .actor { position: absolute; top:0;left:0;right:0;bottom:0 }
+#navbarTop hr, #navbarBottom hr {
+ clear: none;
+ float: left;
+ width: 1px;
+ height: 3.6em;
+ margin: 0;
+ padding: 0;
+ color: inherit;
+}
\ No newline at end of file
Modified: CometVisu/trunk/visu/designs/metal/design_setup.js
===================================================================
--- CometVisu/trunk/visu/designs/metal/design_setup.js 2012-08-15 07:48:42 UTC (rev 962)
+++ CometVisu/trunk/visu/designs/metal/design_setup.js 2012-08-15 10:27:29 UTC (rev 963)
@@ -25,30 +25,77 @@
var started=true;
-$(window).resize(function() {
- // 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");
- }
- });
- }
- if (/(iphone|ipod|ipad)/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;
- }
+function getOffsetCorners(elem) {
+ return {
+ top_left: {top: Math.round(elem.offset().top), left: Math.round(elem.offset().left) },
+ bottom_left: {top: Math.round(elem.offset().top+elem.height()), left: Math.round(elem.offset().left) },
+ top_right: {top: Math.round(elem.offset().top), left: Math.round(elem.offset().left+elem.width()) },
+ bottom_right: {top: Math.round(elem.offset().top+elem.height()), left: Math.round(elem.offset().left+elem.width()) },
+ };
+}
+function roundCorners() {
+ // find elements in each groups corners
+ $('.page.activePage .group:visible').each(function(i) {
+ var group = $(this);
+ // do not use this in navbars
+ if (group.parents('.navbar').size()>0) return;
+ var groupCorners = getOffsetCorners(group);
+ // if the group has a headline (=name) we must not round the upper corners
+ var roundUpperCorners = ($(this).find('.widget_container:first-child').size()>0) && group.css('border-top-right-radius')!="0px";
+ var threshold=5;
+ $(this).find('.widget_container').each(function (i) {
+ var elemCorners = getOffsetCorners($(this));
+ if (roundUpperCorners) {
+ // upper left corner is done by regular css-rule upper right corner
+ if (Math.abs(elemCorners.top_right.top-groupCorners.top_right.top)<threshold && Math.abs(elemCorners.top_right.left-groupCorners.top_right.left)<threshold) {
+ $(this).css({'border-top-right-radius': group.css('border-top-right-radius')});
+ $(this).children().css({'border-top-right-radius': group.css('border-top-right-radius')});
+ }
+ }
+ if (group.css('border-bottom-right-radius')!="0px" && Math.abs(elemCorners.bottom_right.top-groupCorners.bottom_right.top)<threshold && Math.abs(elemCorners.bottom_right.left-groupCorners.bottom_right.left)<threshold) {
+ $(this).css({'border-bottom-right-radius': group.css('border-bottom-right-radius')});
+ $(this).children().css({'border-bottom-right-radius': group.css('border-bottom-right-radius')});
+ }
+ if (group.css('border-bottom-left-radius')!="0px" && Math.abs(elemCorners.bottom_left.top-groupCorners.bottom_left.top)<threshold && Math.abs(elemCorners.bottom_left.left-groupCorners.bottom_left.left)<threshold) {
+ $(this).css({'border-bottom-left-radius': group.css('border-bottom-left-radius')});
+ $(this).children().css({'border-bottom-left-radius': group.css('border-bottom-left-radius')});
+ }
+ });
+ });
+}
+$(window).bind('scrolltopage',function() {
+ //$('#id_0').append(navigator.userAgent.toLowerCase());
+ if (/(opera|chrome|safari)/i.test(navigator.userAgent.toLowerCase())) {
+ roundCorners();
+ }
});
+$(window).resize(function() {
+ // 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");
+ }
+ });
+ }
+ if (/(iphone|ipod|ipad)/i.test(navigator.userAgent.toLowerCase())) {
+ $('#top').css('margin-top','1em');
+ handleResize();
+ }
+ $('#navbarLeft .navbar .widget .label,#navbarRight .navbar .widget .label').each(function(i) {
+ if ($(this).text().trim()!="") {
+ $(this).parent().css("height","3em");
+ $(this).siblings('.actor').css("padding-top","1.3em");
+ }
+ });
+ started=false;
+ }
+});
+
icons.insert({
'CometVisu' : { '*' : '128',
'16' : { '*' : 'sodium' ,
Modified: CometVisu/trunk/visu/designs/metal/mobile.css
===================================================================
--- CometVisu/trunk/visu/designs/metal/mobile.css 2012-08-15 07:48:42 UTC (rev 962)
+++ CometVisu/trunk/visu/designs/metal/mobile.css 2012-08-15 10:27:29 UTC (rev 963)
@@ -12,7 +12,7 @@
.group {
margin: 0.2em 0.1em;
}
-.navbar, #navbarLeft { display: none !important; width: 0 !important; }
+#navbarLeft, #navbarLeft > .navbar, #navbarRight, #navbarRight > .navbar { display: none !important; width: 0 !important; }
.widget .ui-slider
{
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-08-15 07:48:42 UTC (rev 962)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-08-15 10:27:29 UTC (rev 963)
@@ -55,7 +55,7 @@
}
if( $.getUrlVar('forceReload') ) {
- forceReload = $.getUrlVar('forceReload') != 'false'; // true unless set to false
+ forceReload = $.getUrlVar('forceReload') != 'false'; // true unless set to false
}
// "Bug"-Fix for ID: 3204682 "Caching on web server"
@@ -142,28 +142,31 @@
}
/*
- * Make sure everything looks right when the window gets resized.
+ * Make sure everything looks right when the window gets resized.
* This is necessary as the scroll effect requires a fixed element size
*/
-function handleResize() {
+function handleResize(skipScrollFix) {
var uagent = navigator.userAgent.toLowerCase();
- var widthNavbarLeft = $( '#navbarLeft' ).width();
- var widthNavbarRight = $( '#navbarRight' ).width();
- 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
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
- - $( '#navbarBottom' ).outerHeight(true)
- - $( '#bottom' ).outerHeight(true) - 2;
+ 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;
+ }
$( '#main' ).css( 'width', width ).css( 'height', height );
$( '#pageSize' ).text( '.page{width:' + (width-0) + 'px;height:' + height + 'px;}' );
}
- main_scroll != undefined && main_scroll.seekTo( main_scroll.getIndex(), 0 ); // fix scroll
+ skipScrollFix===undefined && main_scroll != undefined && main_scroll.seekTo( main_scroll.getIndex(), 0 ); // fix scroll
}
$( window ).bind( 'resize', handleResize );
@@ -193,9 +196,9 @@
$.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
+ /*
+ * 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
@@ -511,14 +514,14 @@
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
+ attributes[node.attributes.item(i).nodeName]=node.attributes.item(i).nodeValue;
}
}
} else {
$.extend(attributes, node);
}
- var configData = {attributes: {}, elements: {}}
+ var configData = {attributes: {}, elements: {}};
if (typeof creator.attributes != "undefined") {
$.each(creator.attributes, function (index, e) {
if ($(page).attr(index)) {
@@ -551,6 +554,8 @@
function scrollToPage( page_id, speed, skipHistory ) {
$('.activePage').removeClass('activePage');
$('.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+')').each(function (i) {
@@ -559,64 +564,101 @@
}
});
}
+
+ $('#'+page_id).addClass('pageActive activePage');// show new page
+ // update visibility ob navbars, top-navigation, footer
updatePageParts($('#'+page_id));
- $('#'+page_id).addClass('pageActive activePage'); // show new page
- $('#'+page_id+'_navbar').addClass('navbarActive');
-
// 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
+
+ // 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');
+ $('#'+page_id+'_bottom_navbar').addClass('navbarActive');
+ $('#'+page_id+'_left_navbar').addClass('navbarActive');
+
var pagedivs=$('div', '#'+page_id);
- for( var i = 0; i<pagedivs.length; i++) { //check for inline diagrams & refresh
+ for( var i = 0; i<pagedivs.length; i++) { // check for inline diagrams & refresh
if( /diagram_inline/.test(pagedivs[i].className)) {
refreshDiagram(pagedivs[i]);
}
}
// 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) {
// get page id by name
var actor = $(this);
var target = $(this).data().target;
$('#'+page_id+' h1:contains('+target+')').each(function(i) {
if ($(this).text()==target) {
- actor.parent().addClass('active');
+ activePageJump = actor.parent();
+ return false;
}
});
}
else if (page_id==$(this).data().target) {
- $(this).parent().addClass("active");
+ activePageJump = $(this).parent();
}
+ if (activePageJump!=null) {
+ activePageJump.addClass('active');
+ var parentPage = getParentPage($('#'+page_id));
+ 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) {
+ // get page id by name
+ var actor = $(this);
+ var target = $(this).data().target;
+ $('#'+parentPage.attr('id')+' h1:contains('+target+')').each(function(i) {
+ if ($(this).text()==target) {
+ actor.parent().addClass('active_ancestor');
+ return false;
+ }
+ });
+ }
+ else if (parentPage.attr('id')==$(this).data().target) {
+ $(this).parent().addClass('active_ancestor');
+ }
+ });
+ parentPage = getParentPage(parentPage);
+ }
+ }
});
$(window).trigger('scrolltopage',page_id);
+
}
function updateTopNavigation() {
var path = $('#main .page').eq( this.getIndex() ).attr('id').split( '_' );
- var id = 'id_'; //path[0];
+ var id = 'id_'; // path[0];
var nav = '';
for( var i = 1; i < path.length; i++ ) { // element 0 is id_ (JNK)
id += path[i];
if ($('#'+id).hasClass("page")) {
-
- nav += ((1==i) ? '' : '<span> ► </span>')
+ nav += ((1==i) ? '' : '<span> ► </span>')
+ '<a href="javascript:scrollToPage(\'' +id+ '\')">'
+ $('#' + id + ' h1').text() + '</a>';
}
id += '_';
}
$('.nav_path').html( nav );
- var new_array = path;
- var old_array = old_scroll;
- old_scroll = path;
- path = path.join('_');
- for( var i = new_array.length; i < old_array.length; i++ ) {
- path += '_' + old_array[i]; // reuse of path...
- $('#'+path).removeClass('pageActive');
- $('#'+path+'_navbar').removeClass('navbarActive');
- }
}
/*
@@ -626,8 +668,8 @@
* so it's content can be easily extended
*/
function showPopup( type, attributes ) {
- //var retval = design.popups[ type ].create( attributes ); //page, path );
- //return retval;
+ // var retval = design.popups[ type ].create( attributes ); //page, path );
+ // return retval;
if( !design.popups[ type ] ) type = 'unknown';
return design.popups[ type ].create( attributes );
@@ -641,10 +683,10 @@
jQuery_object.remove();
}
-/****************************************************************************/
+/** ************************************************************************* */
/* FIXME - Question: should this belong to the VisuDesign object so that it */
-/* is possible to overload?!? */
-/****************************************************************************/
+/* is possible to overload?!? */
+/** ************************************************************************* */
function refreshAction( target, src ) {
target.src = src + '&' + new Date().getTime();
}
@@ -689,7 +731,7 @@
$div.append($myDiv);
var $tDiv = $("<div />");
- $tDiv.css({background: "transparent", position: "absolute", height: "90px", width: "160px", zIndex: 2})
+ $tDiv.css({background: "transparent", position: "absolute", height: "90px", width: "160px", zIndex: 2});
var pos = $myDiv.find("iframe").position();
$tDiv.css({left: pos.left + "px", top: pos.top + "px"});
$myDiv.append($tDiv);
@@ -709,10 +751,9 @@
} else {
document.location.href = document.location.href + "&design=" + element;
}
- })
-
- })
- })
+ });
+ });
+ });
}
/**
@@ -738,14 +779,44 @@
}
/**
+ * parse a string with up to four, space-separated values usage like css
+ * settings, e.g width: 1px 2px 3px 4px (top-, right-, bottom-, left-width)
+ *
+ * @param value
+ */
+function parseTopRightBottomLeftString(value) {
+ var parts = value.split(" ");
+ if (parts.length==4) {
+ return {top: parts[0], right: parts[1], bottom: parts[2], left: parts[3]};
+ }
+ else if (parts.length==3) {
+ return {top: parts[0], right: parts[1], bottom: parts[2], left: parts[1]};
+ }
+ else if (parts.length==2) {
+ return {top: parts[0], right: parts[1], bottom: parts[0], left: parts[1]};
+ }
+ else if (parts.length==1) {
+ return {top: parts[0], right: parts[0], bottom: parts[0], left: parts[0]};
+ }
+ else
+ return {top: '', right: '', bottom: '', left: ''};
+}
+
+/**
* 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;
+ var shownavbar={
+ top: "true",
+ right: "true",
+ bottom: "true",
+ left: "true"
+ };
if (page.data()!=null) {
if (page.data().showtopnavigation!=undefined) {
@@ -777,51 +848,94 @@
}
}
if (page.data().shownavbar!=undefined) {
- shownavbar = page.data().shownavbar!="false";
+ shownavbar = parseTopRightBottomLeftString(page.data().shownavbar);
}
else {
// traverse up the page tree
+ var inheritedShowNavbar={
+ top: 'inherit',
+ right: 'inherit',
+ bottom: 'inherit',
+ left: 'inherit'
+ };
var parentPage = getParentPage(page);
while (parentPage!=null) {
if (parentPage.data().shownavbar!=undefined) {
- shownavbar = parentPage.data().shownavbar!="false";
- break;
+ var pageShowNavBar = parseTopRightBottomLeftString(parentPage.data().shownavbar);
+ for (var pos in pageShowNavBar) {
+ if (pageShowNavBar[pos]!='inherit' && inheritedShowNavbar[pos]=='inherit') {
+ inheritedShowNavbar[pos]=pageShowNavBar[pos];
+ }
+ }
+ if (inheritedShowNavbar.top!='inherit' && inheritedShowNavbar.right!='inherit' && inheritedShowNavbar.bottom!='inherit' && inheritedShowNavbar.left!='inherit') {
+ // we are done
+ break;
+ }
}
parentPage = getParentPage(parentPage);
}
+ // set default values if not set otherwise
+ for (var pos in inheritedShowNavbar) {
+ if (inheritedShowNavbar[pos]=='inherit') {
+ inheritedShowNavbar[pos]=shownavbar[pos];
+ }
+ }
+ shownavbar=inheritedShowNavbar;
}
}
+ var resize=false;
if (showtopnavigation) {
- $('#top, #top > *').css("display","block");
+ if ($('#top').css("display")=="none") {
+ $('#top, #top > *').css("display","block");
+ resize=true;
+ //console.log("#top hidden");
+ }
}
else {
- $('#top, #top > *').css("display","none");
+ $('#top.loading').removeClass('loading');
+ if ($('#top').css("display")!="none") {
+ $('#top').css("display","none");
+ resize=true;
+ //console.log("#top visible");
+ }
}
if (showfooter) {
- $('#bottom, #bottom > *').css("display","block");
+ if ($('#bottom').css("display")=="none") {
+ $('#bottom').css("display","block");
+ //console.log("#bottom hidden");
+ resize=true;
+ }
}
else {
- $('#bottom, #bottom > *').css("display","none");
+ // the loading class prevents any element from beeing disabled, we have to remove it
+ $('#bottom.loading').removeClass('loading');
+ if ($('#bottom').css("display")!="none") {
+ $('#bottom').css("display","none");
+ //console.log("#bottom "+$('#bottom').css("display"));
+ resize=true;
+ }
}
- 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();
- }
- 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'));
+ $.each(['Left','Top','Right','Bottom'], function (index, value) {
+ if (shownavbar[value.toLowerCase()]=="true") {
+ if ($('#navbar'+value).css("display")=="none") {
+ $('#navbar'+value).css('display','block');
+ resize=true;
}
- $('#navbar'+value).css('width', 0);
- });
+ }
+ else if (shownavbar[value.toLowerCase()]=="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");
+ resize=true;
+ }
+ }
+ });
+ if (resize) {
+ // needs to be called twice to work
+ handleResize(true);
+ handleResize(true);
}
- handleResize();
}
function getParentPage(page) {
@@ -837,4 +951,4 @@
return $('.page[id="'+path+'"]');
}
}
-}
\ No newline at end of file
+}
Modified: CometVisu/trunk/visu/structure/pure/navbar....
[truncated message content] |
|
From: <pe...@us...> - 2012-08-17 14:59:47
|
Revision: 975
http://openautomation.svn.sourceforge.net/openautomation/?rev=975&view=rev
Author: peuter
Date: 2012-08-17 14:59:39 +0000 (Fri, 17 Aug 2012)
Log Message:
-----------
* changed usage of labels/names in navbars: The label text is positioned below the icon (if one exists) as small text (see Top-Navbar example in metal-config)
the pagejump name ist positioned on the right side of the Icon (see Left-Navbar example in metal-config), name can be skipped using space as name, e.g. <pagejump ... name=" ">
Modified Paths:
--------------
CometVisu/trunk/visu/designs/metal/basic.css
CometVisu/trunk/visu/designs/metal/design_setup.js
CometVisu/trunk/visu/visu_config_metal.xml
Modified: CometVisu/trunk/visu/designs/metal/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/metal/basic.css 2012-08-16 18:03:13 UTC (rev 974)
+++ CometVisu/trunk/visu/designs/metal/basic.css 2012-08-17 14:59:39 UTC (rev 975)
@@ -1,662 +1,690 @@
-@font-face {
- font-family: "Dosis";
- font-style: normal;
- font-weight: 400;
- src: url("fonts/Dosis-Medium.ttf");
-}
-body
-{
- color: white;
- font-family: Dosis, Helvetica, Arial, sans-serif;
- font-size: 5.5mm;
- overflow: hidden;
- margin:0;
- color: #fff /*{a-body-color}*/;
- text-shadow: 0 /*{a-body-shadow-x}*/ 1px /*{a-body-shadow-y}*/ 1px /*{a-body-shadow-radius}*/ #111 /*{a-body-shadow-color}*/;
- background: #222 /*{a-body-background-color}*/;
- background-image: -webkit-gradient(linear, left top, left bottom, from( #444 /*{a-body-background-start}*/), to( #222 /*{a-body-background-end}*/)); /* Saf4+, Chrome */
- background-image: -webkit-linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* Chrome 10+, Saf5.1+ */
- background-image: -moz-linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* FF3.6 */
- background-image: -ms-linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* IE10 */
- background-image: -o-linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* Opera 11.10+ */
- background-image: linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/);
-}
-
-h1
-{
- font-size: 2em;
- padding-left: 15px;
-}
-
-h2
-{
- font-size: 1.25em;
- margin-left: 15px;
- margin-top: 5px;
- margin-bottom: 5px;
-}
-
-body hr
-{
- clear:both;
- color: #81664b;
- background-color: #81664b;
- height: 1px;
- border:none;
- padding:0px;
- margin:0.1em;
-}
-
-#pages hr {
- border: 0; height: 30px; margin: 0 .1em;
- background: transparent url(images/hr_bg.png) 50% repeat-x;
- clear: both;
-}
-
-
-body br
-{
- clear:both;
-}
-.page h1 {
- display: none;
- margin-top: 0;
- padding-top: 1em;
- background: #121212 url(images/head_bg.png) scroll repeat-x bottom;
-}
-
-.nav_path
-{
- color: #81664b;
- margin-left: 15px;
-}
-.nav_path a
-{
- color: white;
- text-decoration:none;
-}
-
-.footer,
-.footer *
-{
- color: #555;
- font-size: 0.9em;
- vertical-align: middle;
-}
-
-.colspandefault { /* in units of 1/12 screen width */
- width: 6px;
-}
-
-.widget_container {
- float: left;
- width: 100%;
-}
-.widget
-{
- margin: 0;
- padding: 0.3em;
- border-color: #666;
- border-style: solid;
- border-width: 1px 1px 0 0;
- min-height: 2em;
- text-shadow: 0 1px 1px #111;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#444444), to(#2d2d2d)); /* Saf4+, Chrome */
- background-image: -webkit-linear-gradient(#444444, #2d2d2d); /* Chrome 10+, Saf5.1+ */
- background-image: -moz-linear-gradient(#444444, #2d2d2d); /* FF3.6 */
- background-image: -ms-linear-gradient(#444444, #2d2d2d); /* IE10 */
- background-image: -o-linear-gradient(#444444, #2d2d2d); /* Opera 11.10+ */
- background-image: linear-gradient(#444444, #2d2d2d);
-}
-.navbar .pagejump { position: relative; }
-.pagejump:hover,.pagelink:hover,.pagejump.active {
- background-color: #444444;
- font-weight: bold;
- color: #fff;
- text-shadow: 0 1px 1px #111;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#555555), to(#383838)); /* Saf4+, Chrome */
- background-image: -webkit-linear-gradient(#555555, #383838); /* Chrome 10+, Saf5.1+ */
- background-image: -moz-linear-gradient(#555555, #383838); /* FF3.6 */
- background-image: -ms-linear-gradient(#555555, #383838); /* IE10 */
- background-image: -o-linear-gradient(#555555, #383838); /* Opera 11.10+ */
- background-image: linear-gradient(#555555, #383838);
-}
-.pagejump.active { background-image: url(images/active_page24.png); background-repeat: no-repeat; background-position: center right; }
-.text > div,
-.link > a {
- float:left;
- text-align:left;
- padding-left: 0.2em;
-}
-
-.widget .label,
-.widget.info .actor,
-.text > div,
-.link > a {
- line-height: 2em;
-}
-
-.widget .label
-{
- float:left;
- width:49%;
- text-align:left;
- padding-left: 0.2em;
-}
-.widget .label img { vertical-align: middle; }
-.widget .switchPressed img.icon, .widget .switchUnpressed img.icon { height: 1.1em !important; }
-/*.widget .actor img.icon { height: 1.1em !important; }*/
-.widget_container > .pagejump > .label {
- width: auto;
- display: inline;
- padding-left: 0;
- line-height: 1em;
-}
-.widget .actor
-{
- float:left;
- margin-left:0.2em;
- text-align:left;
-}
-.widget .actor div
-{
- float:left;
- /*white-space: pre-wrap;*/
-}
-
- iframe { border: none; }
-
-
-.navbar .widget .label {
- float: none;
- width: auto;
-}
-.navbar .widget .label > img {
- left: 0.2em;
-}
-.navbar .switchPressed, .navbar .switchUnpressed {
- width: 100% !important;
-}
-.navbar .switchPressed .value, .navbar .switchUnpressed .value {
- padding-left: 2.2em;
-}
-
-.green.switchPressed div, .green.switchUnpressed div {
- background: transparent url(images/dot_green.png) no-repeat center center;
- /*background: transparent url(images/dot_white.png) no-repeat center center;*/
- color: white !important;
- text-shadow: 0;
-}
-.red.switchPressed div, .red.switchUnpressed div{
- background: transparent url(images/dot_red.png) no-repeat center center;
- color: grey !important;
-}
-.grey.switchPressed div, .grey.switchUnpressed div{
- background: transparent url(images/dot_grey.png) no-repeat center center;
- color: grey !important;
-}
-
-.red
-{
- color:#f44;
- font-weight:bold;
-}
-
-.green
-{
- color:#4f4;
-}
-
-.blue
-{
- color:#44f;
-}
-
-.purple
-{
- color:#f4f;
-}
-
-.link a
-{
- line-height: 2em;
- color: #81664b;
- width: 49%;
- padding-left: 0.2em;
-}
-
-.page
-{
- float:left;
- overflow: auto;
- position: relative;
-}
-
-.switchPressed, .switchUnpressed {
- border-style: solid;
- -moz-border-radius: 12px;
- -webkit-border-radius: 12px;
- border-radius: 12px;
- padding: 1px;
- background:none;
-}
-
-.switchUnpressed
-{
- border-width: 1px 2px 2px 1px;
- border-color: #282828 #010101 #010101 #282828;
- margin-top: 0px;
- background-color: #3A3A3A;
- background-position: center +2px;
-}
-.switchUnpressed div, .switchPressed div
-{
- padding: 5px;
- min-width: 3em;
- float: left;
- background: transparent;
- text-align: center;
- cursor: pointer;
-}
-
-.pagejump > .switchUnpressed, .pagejump > .switchPressed {
- width: auto;
- background-color: transparent;
- border: none;
- background: none;
- margin-left:0;
- margin-right: 0;
- float: left;
-}
-.group
-.pagejump .switchUnpressed div, .group .pagejump .switchPressed div {
- width: auto;
- text-align: left;
- margin-left: 0.2em;
-}
-
-.group.widget {
- border: 1px solid #B3B3B3;
- border-radius: 1em;
- -moz-border-radius: 1em;
- -webkit-border-radius: 1em;
- -o-border-radius: 1em;
- overflow: hidden;
- margin: 0.2em 0.5em;
- padding: 0;
-}
-.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;
-}
-.navbar > .widget_container:first-child .group .widget_container:last-child, .navbar > .widget_container:first-child .group div.widget_container:last-child .widget {
- border-width: 1px 0 0 0;
- border-bottom-right-radius: 1em;
- border-bottom-left-radius: 1em;
-}
-.navbar .group .widget_container:last-child,.navbar .group .widget_container:last-child .widget {
- border-bottom-right-radius: 1em;
-}
-.navbar .pagejump .actor {
- position: absolute;
- top:0;
- left:0;
- right:0;
- bottom:0;
- vertical-align: middle;
-}
-.navbar .pagejump .actor .value {
- line-height: 2em;
-}
-.group > div > h2 {
- font-size: 0.8em;
- padding: 0 1em;
- margin: 0;
- border: none;
- 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 */
- background-image: -webkit-linear-gradient(#999, #666); /* Chrome 10+, Saf5.1+ */
- background-image: -moz-linear-gradient(#999, #666); /* FF3.6 */
- background-image: -ms-linear-gradient(#999, #666); /* IE10 */
- background-image: -o-linear-gradient(#999, #666); /* Opera 11.10+ */
- background-image: linear-gradient(#999, #666);
-}
-.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;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0f0), to(#ddd)); /* Saf4+, Chrome */
- background-image: -webkit-linear-gradient(#f0f0f0, #ddd); /* Chrome 10+, Saf5.1+ */
- background-image: -moz-linear-gradient(#f0f0f0, #ddd); /* FF3.6 */
- background-image: -ms-linear-gradient(#f0f0f0, #ddd); /* IE10 */
- background-image: -o-linear-gradient(#f0f0f0, #ddd); /* Opera 11.10+ */
- background-image: linear-gradient(#f0f0f0, #ddd);
-}
-/*.pagejump {
- background: #333333;
- background-image: -webkit-gradient(linear, left top, left bottom, from( #444444), to( #2D2D2D));
- background-image: -webkit-linear-gradient( #444444 , #2D2D2D;
- background-image: -moz-linear-gradient( #444444, #2D2D2D);
- background-image: -ms-linear-gradient( #444444, #2D2D2D);
- background-image: -o-linear-gradient( #444444, #2D2D2D);
- background-image: linear-gradient( #444444, #2D2D2D);
- margin: 0;
-}*/
-
-.switchPressed
-{
- border-width: 2px 1px 1px 2px;
- border-color: #010101 #282828 #282828 #010101;
- margin-top: 1px;
- background-position: center -2px;
-}
-
-.switchUnpressed div {
- margin-left: -1px;
-}
-
-.switchPressed div {
- margin-top: -1px;
-}
-
-.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-horizontal { height: .8em; }
-.ui-slider-horizontal .ui-slider-handle { top: -.5em; margin-left: -.8em; }
-.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
-.ui-slider-horizontal .ui-slider-range-min { left: 0; }
-.ui-slider-horizontal .ui-slider-range-max { right: 0; }
-
-.ui-slider-vertical { width: .8em; height: 100px; }
-.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
-.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
-.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
-.ui-slider-vertical .ui-slider-range-max { top: 0; }
-.ui-widget-content { border: 1px solid #dddddd; background: #000 ; color: #000; }
-.ui-widget-content a { color: #333333; }
-.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #000 ; font-weight: bold; color: #1c94c4; }
-.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; }
-.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
-
-.dim .actor
-{
- width: 3em;
-}
-.widget .ui-slider
-{
- width: 45%;
- float: left;
- margin-left: 10px;
- margin-left: 1em;
- margin-top: 0.5em;
- border-color: #010101 #282828 #282828 #010101;
- background: url(images/gradient.png) #a7a7a7 repeat-y;
-}
-
-.widget .ui-slider-handle
-{
- border-style: solid;
- -moz-border-radius: 12px;
- -webkit-border-radius: 12px;
- border-radius: 12px;
- padding: 1px;
- /*background: url(images/button_bg.png) #171717 repeat-x;*/
- border-width: 1px 2px 2px 1px;
- border-color: #282828 #010101 #010101 #282828;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#444444), to(#2d2d2d)); /* Saf4+, Chrome */
- background-image: -webkit-linear-gradient(#444444, #2d2d2d); /* Chrome 10+, Saf5.1+ */
- background-image: -moz-linear-gradient(#444444, #2d2d2d); /* FF3.6 */
- background-image: -ms-linear-gradient(#444444, #2d2d2d); /* IE10 */
- background-image: -o-linear-gradient(#444444, #2d2d2d); /* Opera 11.10+ */
- background-image: linear-gradient(#444444, #2d2d2d);
-}
-.widget .ui-slider-handle {
- text-decoration: none;
- color: #FFF;
- text-align: center;
- /*padding: 0 0.5em;*/
-}
-/* Clearfix */
-.clearfix:after {
- content: ".";
- display: block;
- clear: both;
- visibility: hidden;
- line-height: 0;
- height: 0;
-}
-
-.clearfix {
- display: inline-block;
-}
-
-html[xmlns] .clearfix {
- display: block;
-}
-
-*:first-child+html .clearfix {
- min-height: 0;
-}
-
-* html .clearfix {
- height: 1%;
-}
-
-* html>body .clearfix {
- display: inline-block;
- width: 100%;
-}
-
-* html .clearfix {
- /* Hides from IE-mac \*/
- height: 1%;
- /* End hide from IE-mac */
-}
-
-.loading {
- display: block !important;
-}
-
-div#loading {
- display: none !important;
-}
-
-
-.popup,
-.popup_background {
- position: absolute;
- width: 90%;
- height: 90%;
- top: 5%;
- left: 5%;
-}
-
-.popup {
- z-index: 101;
- background: transparent;
-}
-
-
-.popup_background {
- z-index: 100;
- border-color: #020202;
- border-style: solid;
- border-width: 2px 0px 0px 2px;
- -moz-border-radius: 8px;
- -webkit-border-radius: 8px;
- border-radius: 8px;
- background: #101010;
- opacity: .98;
-}
-
-.popup div {
- margin: 4px;
-}
-
-.popup div.head {
- border-bottom: 1px solid;
-}
-
-.popup_background.error {
- background: #800000;
- border: #f00;
-}
-
-.clickable {
- cursor: pointer;
-}
-
-.diagram_inline {
- margin-left: 1em;
- width: 320px;
- height: 180px;
-}
-
-.diagram_preview {
- width: 240px;
- height: 2em;
-}
-
-#diagramTooltip {
- z-index: 1000;
- color: black;
- border: 1px solid #fdd;
- padding: 2px;
- background-color: #fee;
- opacity: 0.80;
-}
-
-/* styles for the preview */
-div#demo_1, div#demo_2 {
- width: 100%;
- height: 44px;
-}
-
-div#demo_1 {
- background-color: black;
-}
-
-div#demo_2 {
- height: 2px;
- background-color: white;
-}
-
-div#demo_3 {
- background-color: #1d1d1d;
-}
-.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 !important;
-}
-
-#navbarTop, #navbarTop .navbar .widget, #navbarBottom .navbar .widget {
- background: #333333;
- background-image: -webkit-gradient(linear, left top, left bottom, from( #666), to( #000));
- background-image: -webkit-linear-gradient( #666 , #000);
- background-image: -moz-linear-gradient( #666, #000);
- background-image: -ms-linear-gradient( #666, #000);
- background-image: -o-linear-gradient( #666, #000);
- background-image: linear-gradient( #666, #000);
-}
-#navbarTop .navbar .widget, #navbarBottom .navbar .widget {
- margin: 0;
- border-width:0;
- padding: 0.3em 0.5em;
-
-}
-#navbarTop .navbar .widget:hover,#navbarTop .navbar .pagejump.active,#navbarTop .navbar .pagejump.active_ancestor {
- background-color: #000;
- font-weight: normal;
- color: #fff;
- text-shadow: 0 1px 1px #111;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#111), to(#666)); /* Saf4+, Chrome */
- background-image: -webkit-linear-gradient(#111, #666); /* Chrome 10+, Saf5.1+ */
- background-image: -moz-linear-gradient(#111, #666); /* FF3.6 */
- background-image: -ms-linear-gradient(#111, #666); /* IE10 */
- background-image: -o-linear-gradient(#111, #666); /* Opera 11.10+ */
- background-image: linear-gradient(#111, #666);
-}
-
-#navbarTop { border-bottom: 2px solid #666; }
-#navbarTop .navbar .widget { position: relative; min-width: 2em; min-height: 3em; }
-#navbarTop .navbar .pagejump .label > img {
- display: block;
- margin: 0 auto;
- height: 44px !important;
-}
-#navbarTop .navbar .pagejump .label {
- text-align: center;
- font-size: 0.7em;
- width: 100%;
- margin: 0 auto;
- float: left;
-}
-#navbarTop .navbar .pagejump .actor .value {
- display: none;
-}
-#navbarTop .navbar .pagejump .actor { position: absolute; top:0;left:0;right:0;bottom:0 }
-#navbarTop hr, #navbarBottom hr {
- clear: none;
- float: left;
- width: 1px;
- height: 3.6em;
- margin: 0;
- padding: 0;
- color: inherit;
+@font-face {
+ font-family: "Dosis";
+ font-style: normal;
+ font-weight: 400;
+ src: url("fonts/Dosis-Medium.ttf");
+}
+body
+{
+ color: white;
+ font-family: Dosis, Helvetica, Arial, sans-serif;
+ font-size: 5.5mm;
+ overflow: hidden;
+ margin:0;
+ color: #fff /*{a-body-color}*/;
+ text-shadow: 0 /*{a-body-shadow-x}*/ 1px /*{a-body-shadow-y}*/ 1px /*{a-body-shadow-radius}*/ #111 /*{a-body-shadow-color}*/;
+ background: #222 /*{a-body-background-color}*/;
+ background-image: -webkit-gradient(linear, left top, left bottom, from( #444 /*{a-body-background-start}*/), to( #222 /*{a-body-background-end}*/)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* FF3.6 */
+ background-image: -ms-linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* IE10 */
+ background-image: -o-linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* Opera 11.10+ */
+ background-image: linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/);
+}
+
+h1
+{
+ font-size: 2em;
+ padding-left: 15px;
+}
+
+h2
+{
+ font-size: 1.25em;
+ margin-left: 15px;
+ margin-top: 5px;
+ margin-bottom: 5px;
+}
+
+body hr
+{
+ clear:both;
+ color: #81664b;
+ background-color: #81664b;
+ height: 1px;
+ border:none;
+ padding:0px;
+ margin:0.1em;
+}
+
+#pages hr {
+ border: 0; height: 30px; margin: 0 .1em;
+ background: transparent url(images/hr_bg.png) 50% repeat-x;
+ clear: both;
+}
+
+
+body br
+{
+ clear:both;
+}
+.page h1 {
+ display: none;
+ margin-top: 0;
+ padding-top: 1em;
+ background: #121212 url(images/head_bg.png) scroll repeat-x bottom;
+}
+
+.nav_path
+{
+ color: #81664b;
+ margin-left: 15px;
+}
+.nav_path a
+{
+ color: white;
+ text-decoration:none;
+}
+
+.footer,
+.footer *
+{
+ color: #555;
+ font-size: 0.9em;
+ vertical-align: middle;
+}
+
+.colspandefault { /* in units of 1/12 screen width */
+ width: 6px;
+}
+
+.widget_container {
+ float: left;
+ width: 100%;
+}
+.widget
+{
+ margin: 0;
+ padding: 0.3em;
+ border-color: #666;
+ border-style: solid;
+ border-width: 1px 1px 0 0;
+ min-height: 2em;
+ text-shadow: 0 1px 1px #111;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#444444), to(#2d2d2d)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient(#444444, #2d2d2d); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient(#444444, #2d2d2d); /* FF3.6 */
+ background-image: -ms-linear-gradient(#444444, #2d2d2d); /* IE10 */
+ background-image: -o-linear-gradient(#444444, #2d2d2d); /* Opera 11.10+ */
+ background-image: linear-gradient(#444444, #2d2d2d);
+}
+.navbar .pagejump { position: relative; }
+.pagejump:hover,.pagelink:hover,.pagejump.active {
+ background-color: #444444;
+ font-weight: bold;
+ color: #fff;
+ text-shadow: 0 1px 1px #111;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#555555), to(#383838)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient(#555555, #383838); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient(#555555, #383838); /* FF3.6 */
+ background-image: -ms-linear-gradient(#555555, #383838); /* IE10 */
+ background-image: -o-linear-gradient(#555555, #383838); /* Opera 11.10+ */
+ background-image: linear-gradient(#555555, #383838);
+}
+.pagejump.active { background-image: url(images/active_page24.png); background-repeat: no-repeat; background-position: center right; }
+.text > div,
+.link > a {
+ float:left;
+ text-align:left;
+ padding-left: 0.2em;
+}
+
+.widget .label,
+.widget.info .actor,
+.text > div,
+.link > a {
+ line-height: 2em;
+}
+
+.widget .label
+{
+ float:left;
+ width:49%;
+ text-align:left;
+ padding-left: 0.2em;
+}
+.widget .label img { vertical-align: middle; }
+.widget .switchPressed img.icon, .widget .switchUnpressed img.icon { height: 1.1em !important; }
+/*.widget .actor img.icon { height: 1.1em !important; }*/
+.widget_container > .pagejump > .label {
+ width: auto;
+ display: inline;
+ padding-left: 0;
+ line-height: 1em;
+}
+.widget .actor
+{
+ float:left;
+ margin-left:0.2em;
+ text-align:left;
+}
+.widget .actor div
+{
+ float:left;
+ /*white-space: pre-wrap;*/
+}
+
+ iframe { border: none; }
+
+
+.navbar .widget .label {
+ float: none;
+ width: auto;
+}
+.navbar .widget .label > img {
+ left: 0.2em;
+}
+.navbar .switchPressed, .navbar .switchUnpressed {
+ width: 100% !important;
+}
+.navbar .switchPressed .value, .navbar .switchUnpressed .value {
+ padding-left: 2.2em;
+}
+
+.green.switchPressed div, .green.switchUnpressed div {
+ background: transparent url(images/dot_green.png) no-repeat center center;
+ /*background: transparent url(images/dot_white.png) no-repeat center center;*/
+ color: white !important;
+ text-shadow: 0;
+}
+.red.switchPressed div, .red.switchUnpressed div{
+ background: transparent url(images/dot_red.png) no-repeat center center;
+ color: grey !important;
+}
+.grey.switchPressed div, .grey.switchUnpressed div{
+ background: transparent url(images/dot_grey.png) no-repeat center center;
+ color: grey !important;
+}
+
+.red
+{
+ color:#f44;
+ font-weight:bold;
+}
+
+.green
+{
+ color:#4f4;
+}
+
+.blue
+{
+ color:#44f;
+}
+
+.purple
+{
+ color:#f4f;
+}
+
+.link a
+{
+ line-height: 2em;
+ color: #81664b;
+ width: 49%;
+ padding-left: 0.2em;
+}
+
+#pages > .page
+{
+ float:left;
+ overflow: auto;
+ position: relative;
+}
+
+.switchPressed, .switchUnpressed {
+ border-style: solid;
+ -moz-border-radius: 12px;
+ -webkit-border-radius: 12px;
+ border-radius: 12px;
+ padding: 1px;
+ background:none;
+}
+
+.switchUnpressed
+{
+ border-width: 1px 2px 2px 1px;
+ border-color: #282828 #010101 #010101 #282828;
+ margin-top: 0px;
+ background-color: #3A3A3A;
+ background-position: center +2px;
+}
+.switchUnpressed div, .switchPressed div
+{
+ padding: 5px;
+ min-width: 3em;
+ float: left;
+ background: transparent;
+ text-align: center;
+ cursor: pointer;
+}
+
+.pagejump > .switchUnpressed, .pagejump > .switchPressed {
+ width: auto;
+ background-color: transparent;
+ border: none;
+ background: none;
+ margin-left:0;
+ margin-right: 0;
+ float: left;
+}
+.group
+.pagejump .switchUnpressed div, .group .pagejump .switchPressed div {
+ width: auto;
+ text-align: left;
+ margin-left: 0.3em;
+}
+
+.group.widget {
+ border: 1px solid #B3B3B3;
+ border-radius: 1em;
+ -moz-border-radius: 1em;
+ -webkit-border-radius: 1em;
+ -o-border-radius: 1em;
+ overflow: hidden;
+ margin: 0.2em 0.5em;
+ padding: 0;
+}
+.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;
+}
+.navbar > .widget_container:first-child .group .widget_container:last-child, .navbar > .widget_container:first-child .group div.widget_container:last-child .widget {
+ border-width: 1px 0 0 0;
+ border-bottom-right-radius: 1em;
+ border-bottom-left-radius: 1em;
+}
+.navbar .group .widget_container:last-child,.navbar .group .widget_container:last-child .widget {
+ border-bottom-right-radius: 1em;
+}
+.navbar .pagejump .actor {
+ position: absolute;
+ top:0;
+ left:0;
+ right:0;
+ bottom:0;
+ vertical-align: middle;
+}
+.navbar .pagejump .actor .value {
+ line-height: 2em;
+}
+.group > div > h2 {
+ font-size: 0.8em;
+ padding: 0 1em;
+ margin: 0;
+ border: none;
+ 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 */
+ background-image: -webkit-linear-gradient(#999, #666); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient(#999, #666); /* FF3.6 */
+ background-image: -ms-linear-gradient(#999, #666); /* IE10 */
+ background-image: -o-linear-gradient(#999, #666); /* Opera 11.10+ */
+ background-image: linear-gradient(#999, #666);
+}
+.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;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0f0), to(#ddd)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient(#f0f0f0, #ddd); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient(#f0f0f0, #ddd); /* FF3.6 */
+ background-image: -ms-linear-gradient(#f0f0f0, #ddd); /* IE10 */
+ background-image: -o-linear-gradient(#f0f0f0, #ddd); /* Opera 11.10+ */
+ background-image: linear-gradient(#f0f0f0, #ddd);
+}
+/*.pagejump {
+ background: #333333;
+ background-image: -webkit-gradient(linear, left top, left bottom, from( #444444), to( #2D2D2D));
+ background-image: -webkit-linear-gradient( #444444 , #2D2D2D;
+ background-image: -moz-linear-gradient( #444444, #2D2D2D);
+ background-image: -ms-linear-gradient( #444444, #2D2D2D);
+ background-image: -o-linear-gradient( #444444, #2D2D2D);
+ background-image: linear-gradient( #444444, #2D2D2D);
+ margin: 0;
+}*/
+
+.switchPressed
+{
+ border-width: 2px 1px 1px 2px;
+ border-color: #010101 #282828 #282828 #010101;
+ margin-top: 1px;
+ background-position: center -2px;
+}
+
+.switchUnpressed div {
+ margin-left: -1px;
+}
+
+.switchPressed div {
+ margin-top: -1px;
+}
+
+.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-horizontal { height: .8em; }
+.ui-slider-horizontal .ui-slider-handle { top: -.5em; margin-left: -.8em; }
+.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
+.ui-slider-horizontal .ui-slider-range-min { left: 0; }
+.ui-slider-horizontal .ui-slider-range-max { right: 0; }
+
+.ui-slider-vertical { width: .8em; height: 100px; }
+.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
+.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
+.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
+.ui-slider-vertical .ui-slider-range-max { top: 0; }
+.ui-widget-content { border: 1px solid #dddddd; background: #000 ; color: #000; }
+.ui-widget-content a { color: #333333; }
+.ui-state-default, .ui-widget-content .ui-state-default, .ui...
[truncated message content] |
|
From: <pe...@us...> - 2012-09-01 13:49:22
|
Revision: 996
http://openautomation.svn.sourceforge.net/openautomation/?rev=996&view=rev
Author: peuter
Date: 2012-09-01 13:49:15 +0000 (Sat, 01 Sep 2012)
Log Message:
-----------
new approach to improve the scaling on different screen sizes, only enabled on mobile devices to imitate the old behavior. Can be enabled via config using <pages enable_column_adjustment="true">
* the approach tries to calculate the maximum amount of columns that can be displayed in one line and reduces this value if needed
Modified Paths:
--------------
CometVisu/trunk/visu/lib/templateengine.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-09-01 13:35:43 UTC (rev 995)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-09-01 13:49:15 UTC (rev 996)
@@ -38,6 +38,9 @@
var scrollSpeed;
var resizeAfterScroll = false;
+var defaultColumns = 12;
+var minColumnWidth = 150;
+var enableColumnAdjustment = false;
visu = new CometVisu('/cgi-bin/');
visu.update = function( json ) { // overload the handler
@@ -145,32 +148,79 @@
return value;
}
+function adjustColumns() {
+ 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 $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;
+
+ if (newColumns!=$main.data('columns')) {
+ $main.data({'columns': newColumns} );
+ return true;
+ }
+ 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
*/
-function handleResize(skipScrollFix) {
+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 $main = $( '#main' );
if (/(android|blackberry|iphone|ipod|series60|symbian|windows ce|palm)/i.test(uagent)) {
- $( '#main' ).css( 'width', width );
+ $main.css( 'width', width );
$( '#pageSize' ).text( '.page{width:' + (width-0) + 'px;}' );
// do nothing
} else {
- var height = $( window ).height() - $( '#main' ).position().top;
+ 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;
+ height-= $( '#bottom' ).outerHeight(true) - 1;
}
- $( '#main' ).css( 'width', width ).css( 'height', height );
+ $main.css( 'width', width ).css( 'height', height );
$( '#pageSize' ).text( '.page{width:' + (width-0) + 'px;height:' + height + 'px;}' );
}
- skipScrollFix===undefined && main_scroll != undefined && main_scroll.seekTo( main_scroll.getIndex(), 0 ); // fix scroll
+ if (skipScrollFix===undefined) {
+ if (adjustColumns()) {
+ var allContainer = $('.widget_container');
+ allContainer.each(function(i, e) {
+ var $e=$(e);
+ var ourColspan = $e.children('*:first-child').data('colspan');
+ 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 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+'%');
+ });
+ }
+ // main_scroll != undefined && main_scroll.seekTo( main_scroll.getIndex(), 0 ); // fix scroll
+ }
}
$( window ).bind( 'resize', handleResize );
@@ -209,6 +259,18 @@
predefinedDesign = $( 'pages', xml ).attr("design");
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())) {
+ enableColumnAdjustment = true;
+ }
+ 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');
+ }
// design by url
if ($.getUrlVar("design")) {
@@ -356,27 +418,27 @@
create_pages(page, 'id_0');
-
+ adjustColumns();
// all containers
- if (!/(android|blackberry|iphone|ipod|series60|symbian|windows ce|palm)/i.test(navigator.userAgent.toLowerCase())) {
- var allContainer = $('.widget_container');
- allContainer.each(function(i, e) {
- var ourColspan = $(e).children('*:first-child').data('colspan');
- var areaColspan = $(e).parentsUntil('#centerContainer').last().data('columns') || 12;
- var ourWidth = ourColspan/areaColspan*100;
- $(e).css('width', ourWidth+'%');
- });
-
+ var allContainer = $('.widget_container');
+ allContainer.each(function(i, e) {
+ var $e = $(e);
+ var ourColspan = $e.children('*:first-child').data('colspan');
+ 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 groupColspan = $(e).parentsUntil('.widget_container', '.group').data('colspan');
- var ourColspan = $(e).children('.widget').data('colspan');
- var ourWidth = ourColspan/groupColspan*100; // in percent
- $(e).css('width', ourWidth+'%');
+ var $e = $(e);
+ 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+'%');
});
- };
-
+
// setup the scrollable
main_scroll = $('#main').scrollable({keyboard: false, touch: false}).data('scrollable');
main_scroll.onSeek( updateTopNavigation );
@@ -667,7 +729,7 @@
});
$(window).trigger('scrolltopage',page_id);
if (resizeAfterScroll) {
- handleResize(true);
+ //handleResize(null,true);
resizeAfterScroll=false;
}
}
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2012-09-01 13:35:43 UTC (rev 995)
+++ CometVisu/trunk/visu/visu_config.xsd 2012-09-01 13:49:15 UTC (rev 996)
@@ -99,6 +99,9 @@
<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:attribute name="min_column_width" type="xsd:decimal" use="optional" />
+ <xsd:attribute name="default_columns" type="xsd:decimal" use="optional" />
+ <xsd:attribute name="enable_column_adjustment" 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-09-01 13:35:43 UTC (rev 995)
+++ CometVisu/trunk/visu/visu_config_metal.xml 2012-09-01 13:49:15 UTC (rev 996)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" design="metal"
- xsi:noNamespaceSchemaLocation="visu_config.xsd">
+ xsi:noNamespaceSchemaLocation="visu_config.xsd" enable_column_adjustment="true">
<meta>
<plugins>
<plugin name="gweather" />
@@ -141,7 +141,6 @@
<address transform="DPT:16.001" variant="">12/1/0</address>
</info>
<switch mapping="OnOff" styling="GreyGreen">
- <layout colspan="3" />
<label>Follow me</label>
<address transform="DPT:1.001" variant="">12/1/6</address>
</switch>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j-...@us...> - 2012-09-28 16:42:05
|
Revision: 1022
http://openautomation.svn.sourceforge.net/openautomation/?rev=1022&view=rev
Author: j-n-k
Date: 2012-09-28 16:41:56 +0000 (Fri, 28 Sep 2012)
Log Message:
-----------
Plugin diagram, new feature: legendposition=("ne" | "nw" | "se" | "sw")
default if omitted: "ne" (editor-names: topright, topleft, bottomright, bottomleft)
fixed xsd (unit missing in axis-definition, added new options)
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-27 18:07:29 UTC (rev 1021)
+++ CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2012-09-28 16:41:56 UTC (rev 1022)
@@ -133,6 +133,7 @@
diagram.data("period", $p.attr("period") || 1);
diagram.data("datasource", $p.attr("datasource") || "AVERAGE");
diagram.data("legend", $p.attr("legend") || "both");
+ diagram.data("legendposition", $p.attr("legendposition") || "ne");
if ($p.attr("title")) {
diagram.data("label", $p.attr("title"));
} else {
@@ -280,7 +281,8 @@
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"}},
+ 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: {
@@ -344,6 +346,7 @@
bDiagram.data("period", $p.attr("period") || 1);
bDiagram.data("datasource", $p.attr("datasource") || "AVERAGE");
bDiagram.data("legend", $p.attr("legend") || "both");
+ bDiagram.data("legendposition", $p.attr("legendposition") || "ne");
if ($p.attr("title")) {
bDiagram.data("label", $p.attr("title"));
} else {
@@ -422,10 +425,11 @@
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 },
+ 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: {
@@ -462,7 +466,7 @@
var showlegend = !((diagram.data("legend")=="none")
|| (diagram.data("ispopup") && (diagram.data("legend")=="inline"))
|| (!diagram.data("ispopup") && (diagram.data("legend")=="popup")));
-
+ var legendposition = diagram.data("legendposition");
var label = diagram.data("label"); // title of diagram
var refresh = diagram.data("refresh");
var datasource = diagram.data("datasource") || "AVERAGE"; //FIXME: to be moved to rrd-definition
@@ -485,7 +489,8 @@
}],
legend: {
show: showlegend,
- backgroundColor: "#101010"
+ backgroundColor: "#101010",
+ position: legendposition
},
series: {
points: { show: false, fill: false }
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2012-09-27 18:07:29 UTC (rev 1021)
+++ CometVisu/trunk/visu/visu_config.xsd 2012-09-28 16:41:56 UTC (rev 1022)
@@ -80,12 +80,22 @@
</xsd:restriction>
</xsd:simpleType>
+ <xsd:simpleType name="legendposition">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="nw" />
+ <xsd:enumeration value="ne" />
+ <xsd:enumeration value="sw" />
+ <xsd:enumeration value="se" />
+ </xsd:restriction>
+ </xsd:simpleType>
+
<xsd:simpleType name="navbarPositionType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="top" />
<xsd:enumeration value="left" />
<xsd:enumeration value="right" />
<xsd:enumeration value="bottom" />
+ <xsd:attribute name="scope" type="xsd:decimal" use="optional" />
</xsd:restriction>
</xsd:simpleType>
@@ -324,7 +334,6 @@
<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 -->
@@ -535,9 +544,11 @@
<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="legendposition" type="legendposition" 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:attribute name="tooltip" type="xsd:string" use="optional" />
</xsd:complexType>
<xsd:complexType name="diagram_inline">
@@ -606,6 +617,7 @@
<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="legendposition" type="legendposition" use="optional" />
<xsd:attribute name="title" type="xsd:string" use="optional" />
</xsd:complexType>
@@ -693,6 +705,7 @@
<xsd:attribute name="min" type="xsd:decimal"></xsd:attribute>
<xsd:attribute name="max" type="xsd:decimal"></xsd:attribute>
<xsd:attribute name="position" type="xsd:string"></xsd:attribute>
+ <xsd:attribute name="unit" type="xsd:string" use="optional" />
</xsd:extension>
</xsd:simpleContent>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pe...@us...> - 2012-10-09 19:03:13
|
Revision: 1037
http://openautomation.svn.sourceforge.net/openautomation/?rev=1037&view=rev
Author: peuter
Date: 2012-10-09 19:03:03 +0000 (Tue, 09 Oct 2012)
Log Message:
-----------
- slider enhancement to add the possibility to show its value (enabled by adding a format attribute to the slide element, e.g. <slide format="%d%%">, disabled by default
- removed some debug code
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/structure/pure/slide.js
CometVisu/trunk/visu/visu_config.xsd
CometVisu/trunk/visu/visu_config_metal.xml
Modified: CometVisu/trunk/visu/designs/metal/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/metal/basic.css 2012-10-09 15:08:23 UTC (rev 1036)
+++ CometVisu/trunk/visu/designs/metal/basic.css 2012-10-09 19:03:03 UTC (rev 1037)
@@ -469,12 +469,13 @@
background-image: -ms-linear-gradient(#444444, #2d2d2d); /* IE10 */
background-image: -o-linear-gradient(#444444, #2d2d2d); /* Opera 11.10+ */
background-image: linear-gradient(#444444, #2d2d2d);
-}
-.widget .ui-slider-handle {
- text-decoration: none;
+ text-decoration: none;
color: #FFF;
+ font-weight: 100;
text-align: center;
- /*padding: 0 0.5em;*/
+ white-space:nowrap;
+ font-size: 0.8em;
+ padding: 0.2em;
}
/* Clearfix */
.clearfix:after {
Modified: CometVisu/trunk/visu/designs/metal/design_setup.js
===================================================================
--- CometVisu/trunk/visu/designs/metal/design_setup.js 2012-10-09 15:08:23 UTC (rev 1036)
+++ CometVisu/trunk/visu/designs/metal/design_setup.js 2012-10-09 19:03:03 UTC (rev 1037)
@@ -79,8 +79,6 @@
if (target=="id_0") {
// pagejump to root-page found
var group = $(this).closest(".group");
- console.log(group);
- console.log(group.find('.widget_container').size());
if (group.find('.widget_container').size()==1)
group.addClass("root");
}
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-10-09 15:08:23 UTC (rev 1036)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-10-09 19:03:03 UTC (rev 1037)
@@ -439,7 +439,6 @@
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) {
Modified: CometVisu/trunk/visu/structure/pure/slide.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/slide.js 2012-10-09 15:08:23 UTC (rev 1036)
+++ CometVisu/trunk/visu/structure/pure/slide.js 2012-10-09 19:03:03 UTC (rev 1037)
@@ -48,20 +48,35 @@
'max' : max,
'step' : step,
'type' : 'dim',
- 'valueInternal': true
+ 'valueInternal': true,
+ 'format' : $e.attr('format') || null
});
for( var addr in address )
{
if( address[addr][1] & 1 ) $actor.bind( addr, this.update ); // only when read flag is set
}
- $actor.slider({
- step: step,
- min: min,
- max: max,
- animate: true,
- start: this.slideStart,
- change: this.slideChange
- });
+ if ($(actor).data('format')!=null) {
+ $actor.slider({
+ step: step,
+ min: min,
+ max: max,
+ animate: true,
+ start: this.slideStart,
+ change: this.slideChange,
+ slide: this.slideUpdateValue
+ });
+ $actor.children('.ui-slider-handle').text($actor.slider('value'));
+ }
+ else {
+ $actor.slider({
+ step: step,
+ min: min,
+ max: max,
+ animate: true,
+ start: this.slideStart,
+ change: this.slideChange
+ });
+ }
ret_val.append( $actor );
return ret_val;
},
@@ -74,8 +89,13 @@
element.data( 'valueInternal', false );
element.slider('value', value);
element.data( 'valueInternal', true );
+ $(this).children('.ui-slider-handle').html(value);
}
},
+ slideUpdateValue:function(event,ui) {
+ var actor = $( '.actor', $(this).parent() );
+ $(ui.handle).text(sprintf( actor.data( 'format' ), ui.value));
+ },
/*
* Start a thread that regularily sends the silder position to the bus
*/
@@ -120,7 +140,8 @@
mapping: { type: 'mapping', required: false },
styling: { type: 'styling', required: false },
colspan: { type: 'numeric', required: false },
- rowspan: { type: 'numeric', required: false }
+ rowspan: { type: 'numeric', required: false },
+ format: { type: 'string' , required: false }
},
elements: {
label: { type: 'string' , required: true , multi: false },
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2012-10-09 15:08:23 UTC (rev 1036)
+++ CometVisu/trunk/visu/visu_config.xsd 2012-10-09 19:03:03 UTC (rev 1037)
@@ -434,6 +434,7 @@
<xsd:attribute ref="step" />
<xsd:attribute ref="mapping" use="optional" />
<xsd:attribute ref="styling" use="optional" />
+ <xsd:attribute ref="format" use="optional" />
</xsd:complexType>
<xsd:complexType name="info">
Modified: CometVisu/trunk/visu/visu_config_metal.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_metal.xml 2012-10-09 15:08:23 UTC (rev 1036)
+++ CometVisu/trunk/visu/visu_config_metal.xml 2012-10-09 19:03:03 UTC (rev 1037)
@@ -198,7 +198,7 @@
</switch>
</group>
<group name="Heizung">
- <slide min="0" max="100">
+ <slide min="0" max="100" format="%d%%">
<label><icon name="sani_heizung" />Heizung</label>
<address transform="DPT:5.001" variant="">13/0/38</address>
</slide>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <han...@us...> - 2012-10-13 18:39:59
|
Revision: 1059
http://openautomation.svn.sourceforge.net/openautomation/?rev=1059&view=rev
Author: hannesloehr
Date: 2012-10-13 18:39:52 +0000 (Sat, 13 Oct 2012)
Log Message:
-----------
Added strftime example to plugin demo page.
Added rendered strftime content to top right corner.
Definition in xml by meta > topbar_datetime > strftime.
CSS changed only for metal design.
Added "var" to definition of function f in strftime structure_plugin because second strftime widget was not refreshed.
Modified Paths:
--------------
CometVisu/trunk/visu/designs/metal/basic.css
CometVisu/trunk/visu/index.html
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/plugins/strftime/structure_plugin.js
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/designs/metal/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/metal/basic.css 2012-10-12 23:41:24 UTC (rev 1058)
+++ CometVisu/trunk/visu/designs/metal/basic.css 2012-10-13 18:39:52 UTC (rev 1059)
@@ -76,6 +76,26 @@
text-decoration:none;
}
+#top .nav_additional {
+ position: absolute;
+ right: 0;
+ top: 0;
+ margin-right: 15px;
+ float: right;
+}
+
+#top .nav_additional .widget {
+ padding: 0;
+ min-height: 0;
+ background: none;
+ border: 0;
+}
+
+#top .nav_additional .text > div {
+ line-height: 1.3em;
+}
+
+
.footer,
.footer *
{
Modified: CometVisu/trunk/visu/index.html
===================================================================
--- CometVisu/trunk/visu/index.html 2012-10-12 23:41:24 UTC (rev 1058)
+++ CometVisu/trunk/visu/index.html 2012-10-13 18:39:52 UTC (rev 1059)
@@ -55,7 +55,7 @@
</head>
<body>
<div id="top" class="loading">
- <div class="nav_path">-</div>
+ <div class="nav_path">-</div><div class="nav_additional"></div>
</div>
<div id="navbarTop" class="loading"></div>
<div id="centerContainer">
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-10-12 23:41:24 UTC (rev 1058)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-10-13 18:39:52 UTC (rev 1059)
@@ -421,7 +421,22 @@
{
// and now setup the pages
var page = $( 'pages > page', xml )[0]; // only one page element allowed...
+
+ // read topbar datetime format
+ 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
+ $('#top .nav_additional').html(retval);
+ }
+
+
create_pages(page, 'id_0');
adjustColumns();
Modified: CometVisu/trunk/visu/plugins/strftime/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/strftime/structure_plugin.js 2012-10-12 23:41:24 UTC (rev 1058)
+++ CometVisu/trunk/visu/plugins/strftime/structure_plugin.js 2012-10-13 18:39:52 UTC (rev 1059)
@@ -69,7 +69,7 @@
X: '%T'
};
- f = function() {
+ var f = function() {
var d = new Date();
d.locale = locale;
var iso = d.strftime(format);
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2012-10-12 23:41:24 UTC (rev 1058)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2012-10-13 18:39:52 UTC (rev 1059)
@@ -4,6 +4,7 @@
<plugins>
<plugin name="colorchooser"/>
<plugin name="diagram"/>
+ <plugin name="strftime"/>
</plugins>
<mappings>
<mapping name="Close_Open">
@@ -113,6 +114,9 @@
<entry value="17">olive</entry>
</styling>
</stylings>
+ <topbar_datetime>
+ <strftime lang="de" format="%A, %d. %b %H:%M"></strftime>
+ </topbar_datetime>
<statusbar>
<status type="html"><![CDATA[
<img src="icon/comet_64_ff8000.png" alt="CometVisu" /> by <a href="http://www.cometvisu.org/">CometVisu.org</a>
@@ -736,6 +740,7 @@
<label>Update Value</label>
<address transform="DPT:1.001" type="">12/7/1</address>
</trigger>
+ <strftime lang="de" format="%A, %d. %B %Y %H:%M:%S"><layout colspan="0"/></strftime>
</page>
</page>
</pages>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <net...@us...> - 2012-10-21 08:28:10
|
Revision: 1067
http://openautomation.svn.sourceforge.net/openautomation/?rev=1067&view=rev
Author: netzkind
Date: 2012-10-21 08:28:02 +0000 (Sun, 21 Oct 2012)
Log Message:
-----------
starting a new, solid editor; MS1 (see DEVELOPMENT.txt); this is work in progress, so non-usability is guaranteed.
Added Paths:
-----------
CometVisu/trunk/visu/editor/
CometVisu/trunk/visu/editor/DEVELOPMENT.txt
CometVisu/trunk/visu/editor/index.html
CometVisu/trunk/visu/editor/lib/
CometVisu/trunk/visu/editor/lib/Configuration.js
CometVisu/trunk/visu/editor/lib/DumpConfig.js
CometVisu/trunk/visu/editor/lib/Schema.js
Added: CometVisu/trunk/visu/editor/DEVELOPMENT.txt
===================================================================
--- CometVisu/trunk/visu/editor/DEVELOPMENT.txt (rev 0)
+++ CometVisu/trunk/visu/editor/DEVELOPMENT.txt 2012-10-21 08:28:02 UTC (rev 1067)
@@ -0,0 +1,49 @@
+=== KNOWN BUGS AND LIMITATIONS ===
+* loading the XSD is done in Javascript. The Schema-Loader knows a certain set an structure of an XSD. If "unknown"
+ XSD-features are being used in the schema, the Schema-Loader may not know about them, and the editor will thus fail.
+* the Schema and the Editor do not care about bounds. This means it does not check if the schema only allows
+ for a certain number of children in an element.
+
+
+=== ROADMAP ===
+* MS1 - done
+ - OOP-representation of the schema/XSD
+ - OOP-representation of the configuration
+ - validate configuration against XSD
+
+* MS2 - week 46/47 2012
+ - browser loads configuration, checks it against an XSD, warns if not compliant
+ - editor is displayed in browser, nodes are shown as a tree
+ - node-attributes can be edited
+ - node children can be added, removed
+
+* MS3 - week 49/50 2012
+ - nodes have copy & paste, move.
+ - configuration can be saved
+ - attributes like rrd, addr can be selected from a list; said list is loaded from the server
+ - attributes like styling, mapping can be selected from a dynamic list; list is based on actual configuration
+
+* MS4 - week 52 2012
+ - preview for a selected node without the need of replacing the configuration on the server
+
+
+=== TODO ===
+* MS1:
+ - done
+
+* MS2:
+ - frontend: show tree
+ - frontend: make node attributes editable
+ - frontend: make node removeable
+ - frontend: make node children addable, removable
+
+* MS3:
+ - frontend: have copy&paste for nodes incl. children
+ - frontend: have move for nodes incl. children (drag&drop?; mind touch-devices!)
+ - frontend: save configuration
+ - backend (save the xml; php)
+ - cross-reference: have select-lists for mapping, stylings, ... defined by the config itself
+
+* MS4:
+ - frontend: preview node incl. children
+
Added: CometVisu/trunk/visu/editor/index.html
===================================================================
--- CometVisu/trunk/visu/editor/index.html (rev 0)
+++ CometVisu/trunk/visu/editor/index.html 2012-10-21 08:28:02 UTC (rev 1067)
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <script src="../dependencies/jquery.js" type="text/javascript"></script>
+ <script src="lib/Schema.js" type="text/javascript"></script>
+ <script src="lib/Configuration.js" type="text/javascript"></script>
+ <script src="lib/DumpConfig.js" type="text/javascript"></script>
+
+ </head>
+ <body>
+ <div>TODO write content</div>
+ <h1>Editor</h1>
+ <p><b>all of this is work in progress</b></p>
+ <p>once this is ready, it will be an xsd-aware, form-driven editor for the CometVisu-configuration with a
+ tree-like representation of the configuration</p>
+ <p>WYSIWIG will be dropped in favour of the xsd-awareness, which will hopefully make this editor withstand
+ even massive changes to the visu, the templateengine or the configuration-schema. Any plugin and feature
+ which is well defined in the xsd will be supported out-of-the-box (as long as no Ninja-XSD is used...)</p>
+
+ <pre>
+var config;
+var schema;
+
+$(document).unbind('configuration_loaded').bind('configuration_loaded', function () {
+ // configuration is loaded
+ var schemaFilename = config.getSchemaFilename();
+ console.log(schemaFilename);
+ schema = new Schema(schemaFilename);
+});
+
+// the good:
+var config = new Configuration('../visu_config_metal.xml'); // <== metal-config is valid
+// the bad:
+// var config = new Configuration('../visu_config_demo.xml'); // <== demo-config is invalid
+
+$(document).unbind('schema_loaded').bind('schema_loaded', function () {
+ try {
+ config.setSchema(schema);
+ } catch (e) {
+ console.error('configuration and schema do not mix (invalid config?), can not proceed');
+ return;
+ }
+
+ if (false === config.isValid()) {
+ console.error('configuration is not valid, can not proceed');
+ } else {
+ console.log('config loaded and valid');
+ }
+
+ // var dc = new DumpConfig(config);
+ // dc.dump();
+
+});
+ </pre>
+
+ </body>
+</html>
Added: CometVisu/trunk/visu/editor/lib/Configuration.js
===================================================================
--- CometVisu/trunk/visu/editor/lib/Configuration.js (rev 0)
+++ CometVisu/trunk/visu/editor/lib/Configuration.js 2012-10-21 08:28:02 UTC (rev 1067)
@@ -0,0 +1,380 @@
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
+
+/**
+ * Javascript-Representation of a configuration
+ *
+ * These classes are used to load a visu-configuration, making it's attributes and nodes available in Javascript
+ *
+ *
+ * LICENSE: 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, see <http://opensource.org/licenses/gpl-license.php>;.
+ *
+ * @category editor
+ * @package CometVisu
+ * @author Julian Makowski (julian at makowskis dot de)
+ * @copyright 2012 Julian Makowski
+ * @license GPLv3 or later, http://opensource.org/licenses/gpl-license.php
+ * @version SVN: $Id$
+ * @link http://cometvisu.de
+ * @since 2012-10-10
+ * @requires Schema.js
+ */
+
+/**
+ * loader
+ *
+ * @param filename string full name of the configuration file
+ */
+var Configuration = function (filename) {
+ if (filename == undefined || filename == '' || !filename.match(/\.xml$/)) {
+ throw 'no, empty or invalid filename given, can not instantiate without one';
+ }
+
+ var _config = this;
+ var _filename = filename;
+
+ /**
+ * the Schema-object associated with this Configuration
+ * @var object
+ */
+ var _schema = {};
+
+ /**
+ * the configuration
+ * @var object
+ */
+ var $xml = {};
+
+ /**
+ * a list of our child-nodes
+ * @var array
+ */
+ _config.rootNodes = [];
+
+ /**
+ * load and cache the configuration/xml from the server
+ */
+ _config.load = function () {
+ $.ajax(_filename,
+ {
+ dataType: 'xml',
+ success: function (data) {
+ $xml = $(data);
+
+ // parse the data, to have at least a list of root-level-elements
+ parseXML();
+
+ // tell everyone that we are done!
+ $(document).trigger('configuration_loaded');
+ }
+ }
+ );
+ }
+
+ /**
+ * get the filename of the schema/xsd associated with this Configuration
+ *
+ * @return string filename (including path) to the schema/xsd
+ */
+ _config.getSchemaFilename = function () {
+ // extract schema-name
+ var schemaName = $xml.children().attr('xsi:noNamespaceSchemaLocation');
+
+ if (schemaName == undefined || schemaName == '') {
+ throw 'no schema/xsd found in root-level-element, can not run without one';
+ }
+
+ // path is the same as the one from the configuration, so let's throw out the filename, and voila, path.
+ var schemaPath = _filename.replace(/\/[^\/]*$/, '');
+
+ var schemaFilename = schemaPath + '/' + schemaName;
+
+ return schemaFilename;
+
+ }
+
+ /**
+ * set the Schema-object for this configuration
+ *
+ * @param schema object Schema-object
+ */
+ _config.setSchema = function (schema) {
+ if (schema == undefined || typeof schema != 'object') {
+ throw 'internal problem: improper usage of Configuration (not an object)';
+ }
+
+ _schema = schema;
+
+
+ $.each(_config.rootNodes, function (i, element) {
+ var elementName = element.name;
+
+ if (typeof _schema.allowedRootElements[elementName] == 'undefined') {
+ throw 'schema is not valid for this configuration, can not find root-level element ' + elementName;
+ }
+
+ var childSchemaElement = _schema.allowedRootElements[elementName];
+ element.setSchemaElement(childSchemaElement);
+ });
+ }
+
+ /**
+ * check and report if the loaded configuration is valid by the standards of an already set schema
+ *
+ * @return boolean valid?
+ */
+ _config.isValid = function () {
+ if ($.isEmptyObject(_schema)) {
+ throw 'internal problem: improper usage of Configuration (no schema set)';
+ }
+
+ var isValid = true;
+
+ $.each(_config.rootNodes, function (i, element) {
+ var elementName = element.name;
+ // if no element of this name is allowed at root level, this config is not valid. period.
+ if (typeof _schema.allowedRootElements[elementName] == 'undefined') {
+ // not valid
+ isValid = false;
+ return;
+ }
+
+ // check this element for validity
+ isValid = isValid && element.isValid();
+ });
+
+ return isValid;
+ }
+
+ /**
+ * Parse the already loaded XML
+ */
+ var parseXML = function () {
+
+ // start with the root-nodes, and then go down through all of the configuration ...
+ // the going-down-part is done by ConfigurationElement itself
+ $xml.children().each(function () {
+ var node = new ConfigurationElement(this, _config);
+ _config.rootNodes.push(node);
+ });
+ }
+
+ _config.load();
+
+}
+
+// @TODO: need a way to find a SchemaElement for a ConfigurationElement, no matter where we are.
+// maybe make ConfigurationElement remember parent, and go up the tree?
+
+/**
+ * a single element from a configuration
+ *
+ * @param node object DOMNode
+ * @param config object Configuration-object this node belongs to
+ */
+var ConfigurationElement = function (node, config) {
+ var _element = this;
+
+ /**
+ * extract the attributes for this element
+ *
+ * @return object list of set attributes
+ */
+ var getAttributes = function () {
+ var attributes = {};
+
+ // get the node, and use plain-old-javascript to get a list of its attributes
+ // there is jQuery-equivalent to this (as of 2012-10-10, that is)
+ var node = $n.get(0);
+
+ if (typeof node.attributes != 'undefined') {
+ $.each(node.attributes, function (index, e) {
+ // attributes with a colon are ignored, we expect them to be of xsd-nature.
+ if (!e.name.match(/:/)) {
+ attributes[e.name] = e.value;
+ }
+ });
+ }
+
+ return attributes;
+ }
+
+ /**
+ * extract the children for this element.
+ * creates new ConfigurationElement-objects for each child, so this goes recursive.
+ *
+ * @return array list of set children
+ */
+ var getChildren = function () {
+ var children = [];
+
+ $n.children().each(function () {
+ var child = new ConfigurationElement(this, _config);
+
+ children.push(child);
+ });
+
+ return children;
+ }
+
+ /**
+ * get the immediate text of this element
+ *
+ * @return string the value of this element
+ */
+ var getValue = function () {
+ return $n.clone().find("*").remove().end().text();
+ }
+
+ /**
+ * set the SchemaElement for this ConfigurationElement.
+ * Goes recursive.
+ *
+ * @param schemaElement object SchemaElement for this ConfigurationElement
+ */
+ _element.setSchemaElement = function (schemaElement) {
+ // set our own schemaElement
+ _schemaElement = schemaElement;
+
+ // if we have children, check them, too.
+ if (_element.children.length > 0) {
+
+ // go over all of our children, and set their SchemaElement
+ $.each(_element.children, function (i, child) {
+ var childName = child.name;
+ // find the SchemaElement for this child
+ var childSchemaElement = schemaElement.getSchemaElementForElementName(childName);
+
+ if (childSchemaElement == undefined) {
+ // the xsd does not match, we are invalid
+ throw 'xsd does not match this configuration, or configuration is not valid';
+ }
+
+ // and set it.
+ child.setSchemaElement(childSchemaElement);
+ });
+ }
+ }
+
+ /**
+ * get the current SchemaElement
+ *
+ * @return SchemaElement
+ */
+ _element.getSchemaElement = function () {
+ return _schemaElement;
+ }
+
+ /**
+ * check if this element, its attributes and its children are valid, when compared to a given schemaElement
+ *
+ * @return boolean valid?
+ */
+ _element.isValid = function () {
+
+ var isValid = true;
+
+ // first, check if our attributes are good
+ $.each(_element.attributes, function (name, value) {
+ // check if this attribute is allowed, at all
+ if (typeof _schemaElement.allowedAttributes[name] == 'undefined') {
+ isValid = false;
+ return;
+ }
+
+ // if we are good, check if the value is valid
+ isValid = isValid && _schemaElement.allowedAttributes[name].isValueValid(value);
+ });
+
+ if (false === isValid) {
+ // bail out, if we already know that we failed
+ return false;
+ }
+
+ // if we have children, check them, too.
+ if (_element.children.length > 0) {
+
+ // list of all of our children
+ var allSubElements = [];
+
+ // go over list of all elements, and see if some are not valid
+ // that's it
+ $.each(_element.children, function (i, child) {
+ var childName = child.name;
+ isValid = isValid && _schemaElement.isChildElementAllowed(childName);
+
+ if (isValid == false) {
+ return;
+ }
+
+ // go recursive.
+ isValid = isValid && child.isValid();
+ });
+
+ // @TODO: check bounds?
+ }
+
+ if (_element.children.length == 0 || _schemaElement.isMixed) {
+ // if this element has no children, it appears to be a text-node
+ // also, if it may be of mixed value
+ // alas: check for validity
+
+ var value = getValue();
+
+ if (value != '') {
+ // only inspect elements with actual content. Empty nodes are deemed valid.
+ // @TODO: check if there might be nodes this does not apply for. sometime.
+ isValid = isValid && _schemaElement.isValueValid(value);
+ }
+ }
+
+ return isValid;
+ }
+
+ /**
+ * the Configuration-object this element belongs to
+ * @var object
+ */
+ var _config = config;
+
+ /**
+ * the node this element represents
+ * @var object
+ */
+ var $n = $(node);
+
+ /**
+ * our SchemaElement, if schema was set
+ * @var object
+ */
+ var _schemaElement = undefined;
+
+ /**
+ * the name of this element
+ * @var string
+ */
+ _element.name = $n.get(0).nodeName;
+
+ /**
+ * get and store a list of this elements set attributes
+ * @var object
+ */
+ _element.attributes = getAttributes();
+
+ /**
+ * get and store a list of this elements children
+ * @var array
+ */
+ _element.children = getChildren();
+
+}
\ No newline at end of file
Added: CometVisu/trunk/visu/editor/lib/DumpConfig.js
===================================================================
--- CometVisu/trunk/visu/editor/lib/DumpConfig.js (rev 0)
+++ CometVisu/trunk/visu/editor/lib/DumpConfig.js 2012-10-21 08:28:02 UTC (rev 1067)
@@ -0,0 +1,89 @@
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
+
+/**
+ * Draw the configuration-tree on-screen
+ *
+ * This is most probably only an interims-file, and will be replaced by the Editor itself
+ *
+ *
+ * LICENSE: 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, see <http://opensource.org/licenses/gpl-license.php>;.
+ *
+ * @category editor
+ * @package CometVisu
+ * @author Julian Makowski (julian at makowskis dot de)
+ * @copyright 2012 Julian Makowski
+ * @license GPLv3 or later, http://opensource.org/licenses/gpl-license.php
+ * @version SVN: $Id$
+ * @link http://cometvisu.de
+ * @since 2012-10-17
+ * @requires Schema.js, Configuration.js
+ */
+
+/**
+ * Class for dumping the configuration
+ *
+ * @param config object Configuration-object, fully loaded and equipped with its schema
+ */
+var DumpConfig = function (config) {
+ var _dc = this;
+
+ /**
+ * Configuration
+ * @var object
+ */
+ var _config = config;
+
+ _dc.dump = function () {
+ $('body').remove('#config');
+
+ var container = $('<ul />').attr('id', 'config');
+
+ $.each(_config.rootNodes, function (i, node) {
+ dumpElement(node, container);
+ });
+
+ $('body').append(container);
+ }
+
+ /**
+ * dump a single element
+ *
+ * @param element object ConfigurationElement to dump
+ * @param container object jQuery-object of our parent-DOMNode
+ */
+ var dumpElement = function (element, container) {
+ var elementContainer = $('<li />');
+ elementContainer.append($('<b />').html('Name: ' + element.name));
+
+ var allowed = $('<span />');
+
+ $.each(element.getSchemaElement().getAllowedElements(), function (i, item) {
+ allowed.append($('<i />').html(item.name));
+ });
+
+
+ allowed.appendTo(elementContainer);
+
+ if (element.children.length > 0) {
+ var subElementContainer = $('<ul />');
+
+ $.each(element.children, function (i, subElement) {
+ dumpElement(subElement, subElementContainer);
+ });
+ subElementContainer.appendTo(elementContainer);
+ }
+
+ elementContainer.appendTo(container);
+ }
+}
\ No newline at end of file
Added: CometVisu/trunk/visu/editor/lib/Schema.js
===================================================================
--- CometVisu/trunk/visu/editor/lib/Schema.js (rev 0)
+++ CometVisu/trunk/visu/editor/lib/Schema.js 2012-10-21 08:28:02 UTC (rev 1067)
@@ -0,0 +1,873 @@
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
+
+/**
+ * Javascript-Representation of an XSD/Schema
+ *
+ * The classes in this file are able to load an XML-Schema/XSD from a give URL, and
+ * create an object-oriented representation of it. This includes the ability to check for validity of
+ * values, as well as having a tree-like structure of allowed elements and attributes.
+ *
+ *
+ * LICENSE: 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, see <http://opensource.org/licenses/gpl-license.php>;.
+ *
+ * @category editor
+ * @package CometVisu
+ * @author Julian Makowski (julian at makowskis dot de)
+ * @copyright 2012 Julian Makowski
+ * @license GPLv3 or later, http://opensource.org/licenses/gpl-license.php
+ * @version SVN: $Id$
+ * @link http://cometvisu.de
+ * @since 2012-10-03
+ */
+
+
+/**
+ * starting-point for a javascript-representation of the XSD
+ *
+ * @param filename string filename of the schema, including a relative path
+ */
+var Schema = function (filename) {
+ if (filename == undefined || filename == '' || !filename.match(/\.xsd$/)) {
+ throw 'no, empty or invalid filename given, can not instantiate without one';
+ }
+
+ var _schema = this;
+ var _filename = filename;
+
+ /**
+ * jQuery-object of the schema/xsd
+ * @var object
+ */
+ var $xsd = {};
+
+ /**
+ * object of allowed root-level elements
+ * @var object
+ */
+ _schema.allowedRootElements = {};
+
+ /**
+ * load and cache the xsd from the server
+ */
+ var cacheXSD = function () {
+ $.ajax(_filename,
+ {
+ dataType: 'xml',
+ success: function (data) {
+ $xsd = $(data);
+
+ // parse the data, to have at least a list of root-level-elements
+ parseXSD();
+
+ // tell everyone that we are done!
+ $(document).trigger('schema_loaded');
+ }
+ }
+ );
+ }
+
+ /**
+ * parse the schema once
+ */
+ var parseXSD = function () {
+ // make a list of root-level elements
+ $('xsd\\:schema > xsd\\:element', $xsd).each(function () {
+ var name = $(this).attr('name');
+ _schema.allowedRootElements[name] = new SchemaElement(this, _schema);
+ });
+ }
+
+ /**
+ * dive into the schema and find the element that is being pulled in by a ref.
+ * Do so recursively.
+ * referenced nodes can be top-level-nodes only!
+ *
+ * @param type string Type of the node (e.g. element, attributeGroup, ...)
+ * @param refName string Name as per the ref-attribute
+ * @return object jQuery-object of the ref'ed element
+ */
+ _schema.getReferencedNode = function (type, refName) {
+ var $ref = $('xsd\\:schema > xsd\\:' + type + '[name="' + refName + '"]', $xsd);
+
+ if ($ref.is('[ref]')) {
+ // do it recursively, if necessary
+ $ref = _schema.getReferencedNode(type, $ref.attr('ref'));
+ }
+
+ return $ref;
+ }
+
+ /**
+ * get the definition of a type, be it complex or simple
+ *
+ * @param type string Type of type to find (either simple or complex)
+ * @param name string Name of the type to find
+ */
+ _schema.getTypeNode = function (type, name) {
+ var $type = $('xsd\\:' + type + 'Type[name="' + name + '"]', $xsd);
+
+ if ($type.length != 1) {
+ throw 'schema/xsd appears to be invalid, ' + type + 'Type "' + name + '" can not be found';
+ }
+
+ return $type;
+ }
+
+ cacheXSD();
+}
+
+/**
+ * a single SimpleType from the schema.
+ * Should be useable for SimpleContent, too.
+ * Is usable for attributes, too.
+ *
+ * @param node DOMNode the DOMNode this SimpleType is
+ * @param schema object a Schema-object of where this node comes from
+ */
+var SchemaSimpleType = function (node, schema) {
+ var _type = this;
+
+ /**
+ * parse a node, find it's data (restrictions, extensions, bases ... whatever)
+ *
+ * @param node DOMNode the node to parse
+ */
+ var fillNodeData = function (node) {
+ var $n = $(node);
+
+ if ($n.is('xsd\\:attribute[ref]')) {
+ // it's a ref, seek other element!
+ var refName = $n.attr('ref');
+ $n = _schema.getReferencedNode('attribute', refName);
+
+ if ($n.length != 1) {
+ throw 'schema/xsd appears to be invalid, can not find element ' + refName;
+ }
+ }
+
+ if ($n.is('xsd\\:attribute[type], xsd\\:element[type]')) {
+ // hacked: allow this to be used for attributes
+ var baseType = $n.attr('type');
+ nodeData.bases.push(baseType);
+ _type.baseType = baseType;
+ return;
+ }
+
+ var subNodes = $n.find('> xsd\\:restriction, > xsd\\:extension');
+
+ subNodes.each(function () {
+ var baseType = $(this).attr('base');
+ nodeData.bases.push(baseType);
+
+ if (!baseType.match(/^xsd:/)) {
+ // don't dive in for default-types, they simply can not be found
+ var subnode = _schema.getReferencedNode('simpleType', baseType)
+ fillNodeData(subnode);
+ } else {
+ _type.baseType = baseType;
+ }
+
+ });
+
+ subNodes.find('> xsd\\:pattern').each(function () {
+ var pattern = $(this).attr('value');
+ nodeData.pattern.push(pattern);
+ });
+
+
+ subNodes.find('> xsd\\:enumeration').each(function () {
+ var value = $(this).attr('value');
+ nodeData.enumerations.push(value);
+ });
+
+ }
+
+ /**
+ * check if a given value is valid for this type
+ *
+ * @param value mixed the value to check
+ * @return boolean if the value is valid
+ */
+ _type.isValueValid = function (value) {
+
+ if (-1 == _type.baseType.search(/^xsd:/)) {
+ // created our own type, will need to find and use it.
+ var typeNode = _schema.getTypeNode('simple', _type.baseType);
+ var subType = new SchemaSimpleType(typeNode, _schema);
+ return subType.isValueValid(value);
+ } else {
+ // xsd:-namespaces types, those are the originals
+ switch (_type.baseType) {
+ case 'xsd:string':
+ if (! (typeof(value) == 'string')) {
+ // it's not a string, but it should be.
+ // pretty much any input a user gives us is string, so this is pretty much moot.
+ return false;
+ }
+ break;
+ case 'xsd:decimal':
+ if (!value.match(/^[-+]?[0-9]+(\.[0-9]+)?$/)) {
+ return false;
+ }
+ break;
+ case 'xsd:integer':
+ if (!value.match(/^[-+]?[0-9]+$/)) {
+ return false;
+ }
+ break;
+ case 'xsd:float':
+ if (!value.match(/^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/)) {
+ return false;
+ }
+ break;
+ case 'xsd:boolean':
+ if (!value.match(/^(true|false|0|1)$/)) {
+ return false;
+ }
+ break;
+ default:
+ throw 'not implemented baseType ' + _self.baseType;
+ }
+ }
+
+ // check if the value is in our list of valid values, if there is such a list
+ if (nodeData.enumerations.length > 0) {
+ if (-1 == $.inArray(value, nodeData.enumerations)) {
+ return false;
+ }
+ }
+
+ // check if the value matches any given pattern
+ if (nodeData.pattern.length > 0) {
+ // start with assuming...
[truncated message content] |
|
From: <pe...@us...> - 2012-10-25 06:11:15
|
Revision: 1076
http://openautomation.svn.sourceforge.net/openautomation/?rev=1076&view=rev
Author: peuter
Date: 2012-10-25 06:11:07 +0000 (Thu, 25 Oct 2012)
Log Message:
-----------
* removed design specific code from templateengine.js and moved the used inline css-code in the rowspanX calculation to an extra css class
* removed the border from certain nowidget-groups via jquery selector, because the correct selection is not possible via pure css selectors
Modified Paths:
--------------
CometVisu/trunk/visu/designs/designglobals.css
CometVisu/trunk/visu/designs/metal/basic.css
CometVisu/trunk/visu/designs/metal/design_setup.js
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/designs/designglobals.css
===================================================================
--- CometVisu/trunk/visu/designs/designglobals.css 2012-10-24 17:40:41 UTC (rev 1075)
+++ CometVisu/trunk/visu/designs/designglobals.css 2012-10-25 06:11:07 UTC (rev 1076)
@@ -60,7 +60,7 @@
* global color declarations for stylings in all designs
* may be overloaded by designs
*/
-
+.rowspan { overflow:hidden; position:relative; }
.red
{
color:#FF0000;
Modified: CometVisu/trunk/visu/designs/metal/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/metal/basic.css 2012-10-24 17:40:41 UTC (rev 1075)
+++ CometVisu/trunk/visu/designs/metal/basic.css 2012-10-25 06:11:07 UTC (rev 1076)
@@ -124,12 +124,12 @@
border-width: 1px;
min-height: 2.1em;
text-shadow: 0 1px 1px #111;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#444444), to(#2d2d2d)); /* Saf4+, Chrome */
- background-image: -webkit-linear-gradient(#444444, #2d2d2d); /* Chrome 10+, Saf5.1+ */
- background-image: -moz-linear-gradient(#444444, #2d2d2d); /* FF3.6 */
- background-image: -ms-linear-gradient(#444444, #2d2d2d); /* IE10 */
- background-image: -o-linear-gradient(#444444, #2d2d2d); /* Opera 11.10+ */
- background-image: linear-gradient(#444444, #2d2d2d);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#444444), to(#2d2d2d)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient(#444444, #2d2d2d); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient(#444444, #2d2d2d); /* FF3.6 */
+ background-image: -ms-linear-gradient(#444444, #2d2d2d); /* IE10 */
+ background-image: -o-linear-gradient(#444444, #2d2d2d); /* Opera 11.10+ */
+ background-image: linear-gradient(#444444, #2d2d2d);
}
.widget.iframe
{
@@ -138,22 +138,21 @@
}
/* 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; }
-.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; }
.pagejump:hover,.pagelink:hover,.pagejump.active {
- background-color: #444444;
- font-weight: bold;
- color: #fff;
- text-shadow: 0 1px 1px #111;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#555555), to(#383838)); /* Saf4+, Chrome */
- background-image: -webkit-linear-gradient(#555555, #383838); /* Chrome 10+, Saf5.1+ */
- background-image: -moz-linear-gradient(#555555, #383838); /* FF3.6 */
- background-image: -ms-linear-gradient(#555555, #383838); /* IE10 */
- background-image: -o-linear-gradient(#555555, #383838); /* Opera 11.10+ */
- background-image: linear-gradient(#555555, #383838);
+ background-color: #444444;
+ font-weight: bold;
+ color: #fff;
+ text-shadow: 0 1px 1px #111;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#555555), to(#383838)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient(#555555, #383838); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient(#555555, #383838); /* FF3.6 */
+ background-image: -ms-linear-gradient(#555555, #383838); /* IE10 */
+ background-image: -o-linear-gradient(#555555, #383838); /* Opera 11.10+ */
+ background-image: linear-gradient(#555555, #383838);
}
.pagejump.active { background-image: url(images/active_page24.png); background-repeat: no-repeat; background-position: center right; }
@@ -726,6 +725,7 @@
#pages .page .widget .ui-slider-horizontal:first-child {
width: 90%;
}
+.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
Modified: CometVisu/trunk/visu/designs/metal/design_setup.js
===================================================================
--- CometVisu/trunk/visu/designs/metal/design_setup.js 2012-10-24 17:40:41 UTC (rev 1075)
+++ CometVisu/trunk/visu/designs/metal/design_setup.js 2012-10-25 06:11:07 UTC (rev 1076)
@@ -99,6 +99,13 @@
}
}
});
+ // Disable borders for groups that contain widget-group as children
+ $('.page > div > .widget_container > .group:not(.widget)').each(function(i) {
+ var $this = $(this);
+ if ($this.find('.clearfix > .widget_container > .group.widget').size()>0) {
+ $this.css({'border': 'none', 'margin': 0});
+ }
+ });
started=false;
}
});
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-10-24 17:40:41 UTC (rev 1075)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-10-25 06:11:07 UTC (rev 1076)
@@ -232,9 +232,9 @@
function rowspanClass(rowspan) {
- var className = 'rowspan'+ rowspan;
-
- if ( !$('#'+className+'Style').get(0) ) {
+ 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();
@@ -243,17 +243,9 @@
$('#calcrowspan').remove();
- if (clientDesign=="metal") {
- // 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);
- }
- 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);
- }
- }
-
+ // append css style
+ $('head').append('<style id="'+styleId+'">.rowspan.rowspan' + rowspan + ' { height: ' + ((rowspan-1)*singleHeightMargin+singleHeight) + 'px;} </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-11-08 16:59:24
|
Revision: 1107
http://openautomation.svn.sourceforge.net/openautomation/?rev=1107&view=rev
Author: peuter
Date: 2012-11-08 16:59:13 +0000 (Thu, 08 Nov 2012)
Log Message:
-----------
extension added to support openHAB (http://code.google.com/p/openhab/) as backend
Modified Paths:
--------------
CometVisu/trunk/visu/index.html
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
CometVisu/trunk/visu/visu_config.xsd
Added Paths:
-----------
CometVisu/trunk/visu/transforms/transform_oh.js
Modified: CometVisu/trunk/visu/index.html
===================================================================
--- CometVisu/trunk/visu/index.html 2012-11-07 23:54:42 UTC (rev 1106)
+++ CometVisu/trunk/visu/index.html 2012-11-08 16:59:13 UTC (rev 1107)
@@ -51,6 +51,7 @@
<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="transforms/transform_oh.js" type="text/javascript"></script>
<script src="dependencies/Three.js" type="text/javascript"></script>
<script src="dependencies/poly2tri.js" type="text/javascript"></script>
<script src="dependencies/jsfloorplan.js" type="text/javascript"></script>
@@ -82,4 +83,4 @@
Loading ...
</div>
</body>
-</html>
+</html>
\ No newline at end of file
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-11-07 23:54:42 UTC (rev 1106)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-11-08 16:59:13 UTC (rev 1107)
@@ -41,15 +41,31 @@
var defaultColumns = 12;
var minColumnWidth = 150;
var enableColumnAdjustment = false;
+if (backend==undefined) {
+ var backend = "cgi";
+}
+if ($.getUrlVar("backend")) {
+ backend = $.getUrlVar("backend");
+}
-visu = new CometVisu('/cgi-bin/');
-visu.update = function( json ) { // overload the handler
- for( key in json ) {
- $.event.trigger( '_' + key, json[key] );
- }
+var backendConfig = {
+ baseUrl: '/cgi-bin/',
};
-visu.user = 'demo_user'; // example for setting a user
+function initBackendClient(backend) {
+ 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
+}
+
var configSuffix;
if ($.getUrlVar("config")) {
configSuffix = $.getUrlVar("config");
@@ -262,6 +278,11 @@
// read predefined design in config
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") {
enableColumnAdjustment = true;
Modified: CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2012-11-07 23:54:42 UTC (rev 1106)
+++ CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2012-11-08 16:59:13 UTC (rev 1107)
@@ -427,31 +427,32 @@
var idx = num;
$.ajax({
- url: "/cgi-bin/rrdfetch?rrd=" + src + ".rrd&ds=" + datasource + "&start=end-" + period + s.start + "&end=" + s.end + "&res=" + s.res,
+ url: backendConfig.baseUrl+"rrdfetch?rrd=" + src + ".rrd&ds=" + datasource + "&start=end-" + period + s.start + "&end=" + s.end + "&res=" + s.res,
dataType: "json",
type: "GET",
+ context: this,
success: function(data) {
- var color = linecolor || options.grid.color;
- var offset = new Date().getTimezoneOffset() * 60 * 1000;
- //TODO: find a better way
- for (var j = 0; j < data.length; j++) {
- data[j][0] -= offset;
- data[j][1] = parseFloat( data[j][1][0] );
- }
- fulldata[idx] = {label: label, color: color, data: data, yaxis: parseInt(yaxis)};
- rrdloaded++;
- if (rrdloaded==content.rrdnum) {
- if (!diagram.data("plotted")) { // only plot if diagram does not exist
- diagram.data("PLOT", $.plot(diagram, fulldata, options));
- diagram.data("plotted", true);
- } else { // otherwise replace data in plot
- var PLOT = diagram.data("PLOT");
- PLOT.setData(fulldata);
- PLOT.setupGrid();
- PLOT.draw();
+ var color = linecolor || options.grid.color;
+ var offset = new Date().getTimezoneOffset() * 60 * 1000;
+ //TODO: find a better way
+ for (var j = 0; j < data.length; j++) {
+ data[j][0] -= offset;
+ data[j][1] = parseFloat( data[j][1][0] );
}
- }
- //console.log( p, p.width(), p.height(), p.getPlotOffset() );
+ fulldata[idx] = {label: label, color: color, data: data, yaxis: parseInt(yaxis)};
+ rrdloaded++;
+ if (rrdloaded==content.rrdnum) {
+ if (!diagram.data("plotted")) { // only plot if diagram does not exist
+ diagram.data("PLOT", $.plot(diagram, fulldata, options));
+ diagram.data("plotted", true);
+ } else { // otherwise replace data in plot
+ var PLOT = diagram.data("PLOT");
+ PLOT.setData(fulldata);
+ PLOT.setupGrid();
+ PLOT.draw();
+ }
+ }
+ //console.log( p, p.width(), p.height(), p.getPlotOffset() );
}
});
num++;
Added: CometVisu/trunk/visu/transforms/transform_oh.js
===================================================================
--- CometVisu/trunk/visu/transforms/transform_oh.js (rev 0)
+++ CometVisu/trunk/visu/transforms/transform_oh.js 2012-11-08 16:59:13 UTC (rev 1107)
@@ -0,0 +1,86 @@
+/* transform_knx.js (c) 2010 by Christian Mayer [CometVisu at ChristianMayer dot de]
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+/**
+ * This class defines the default transforms: encode: transform JavaScript to
+ * bus value decode: transform bus to JavaScript value
+ */
+addTransform('OH', {
+ 'switch' : {
+ name : 'OH_Switch',
+ encode : function(phy) {
+ return phy == 1 ? 'ON' : 'OFF';
+ },
+ decode : function(string) {
+ return (string == "ON" || parseInt(string) > 0) ? 1 : 0;
+ }
+ },
+ 'contact' : {
+ name : 'OH_Contact',
+ encode : function(phy) {
+ return phy == 1 ? 'OPEN' : 'CLOSED';
+ },
+ decode : function(string) {
+ return string == "OPEN" ? 1 : 0;
+ }
+ },
+ 'rollershutter' : {
+ name : "OH_RollerShutter",
+ encode : function(phy) {
+ if (phy == 1) return 'DOWN';
+ else if (phy == 0) return 'UP';
+ else return phy;
+ },
+ decode : function(str) {
+ if (str=="NaN" || str=='Uninitialized') return 0;
+ else if (str=="UP") return 0;
+ else if (str=="DOWN") return 1;
+ else return str;
+ },
+ },
+ 'dimmer' : {
+ name : "OH_Dimmer",
+ encode : function(phy) {
+ return parseInt(phy);
+ },
+ decode : function(str) {
+ if (str=="NaN" || str=='Uninitialized') return 0;
+ else if (str=="ON") return 100;
+ else if (str=="OFF") return 0;
+ else return parseInt(str);
+ },
+ },
+ 'number' : {
+ name : "OH_Number",
+ encode : function(phy) {
+ return parseFloat(phy);
+ },
+ decode : function(str) {
+ if (str=="NaN" || str=='Uninitialized') return 0;
+ return parseFloat(str);
+ },
+ },
+ 'string' : {
+ name : "OH_String",
+ encode : function(phy) {
+ return phy;
+ },
+ decode : function(str) {
+ return str;
+ },
+ },
+});
Property changes on: CometVisu/trunk/visu/transforms/transform_oh.js
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2012-11-07 23:54:42 UTC (rev 1106)
+++ CometVisu/trunk/visu/visu_config.xsd 2012-11-08 16:59:13 UTC (rev 1107)
@@ -4,7 +4,7 @@
<!-- basic types -->
<xsd:simpleType name="addr">
<xsd:restriction base="xsd:string">
- <xsd:pattern value="[0-9]{1,2}/[0-9]{1,2}/[0-9]{1,3}" />
+ <xsd:pattern value="([0-9]{1,2}/[0-9]{1,2}/[0-9]{1,3}|[A-Za-z][A-Za-z0-9_\-\.]*)" />
</xsd:restriction>
</xsd:simpleType>
@@ -149,6 +149,15 @@
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
+
+ <xsd:attribute name="backend">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="cgi" />
+ <xsd:enumeration value="oh" />
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
<xsd:simpleType name="navbarPositionType">
<xsd:restriction base="xsd:string">
@@ -216,6 +225,7 @@
<xsd:element name="page" type="page" minOccurs="1" />
</xsd:choice>
<xsd:attribute name="design" type="xsd:string" use="required" />
+ <xsd:attribute ref="backend" use="optional" />
<xsd:attribute name="scroll_speed" type="xsd:decimal" use="optional" />
<xsd:attribute name="max_mobile_screen_width" type="xsd:decimal" use="optional" />
<xsd:attribute name="min_column_width" type="xsd:decimal" use="optional" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j-...@us...> - 2012-11-13 07:14:11
|
Revision: 1135
http://openautomation.svn.sourceforge.net/openautomation/?rev=1135&view=rev
Author: j-n-k
Date: 2012-11-13 07:14:04 +0000 (Tue, 13 Nov 2012)
Log Message:
-----------
Added RGB-Display widget "rgb" (uses 3 addresses (variant="r/g/b"))
Modified Paths:
--------------
CometVisu/trunk/visu/index.html
CometVisu/trunk/visu/visu_config.xsd
Added Paths:
-----------
CometVisu/trunk/visu/structure/pure/rgb.js
Modified: CometVisu/trunk/visu/index.html
===================================================================
--- CometVisu/trunk/visu/index.html 2012-11-12 22:12:00 UTC (rev 1134)
+++ CometVisu/trunk/visu/index.html 2012-11-13 07:14:04 UTC (rev 1135)
@@ -27,6 +27,7 @@
<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/rgb.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>
Added: CometVisu/trunk/visu/structure/pure/rgb.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/rgb.js (rev 0)
+++ CometVisu/trunk/visu/structure/pure/rgb.js 2012-11-13 07:14:04 UTC (rev 1135)
@@ -0,0 +1,63 @@
+/* image.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('rgb', {
+ create: function( element, path, flavour, type ) {
+ var $e = $(element);
+ var layout = $e.children('layout')[0];
+ var style = layout ? 'style="' + extractLayout( layout, type ) + '"' : '';
+
+ var classes = 'widget clearfix rgb';
+ 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, rgb_handleVariant);
+
+ var actor = '<div class="actor" style="background: #ffffff;"></div>';
+ var $actor = $(actor).data( {
+ 'address' : address,
+ } );
+ for( var addr in address )
+ {
+ if( address[addr][1] & 1 ) $actor.bind( addr, this.update ); // only when read flag is set
+ }
+ ret_val.append( label ).append( $actor );
+ return ret_val;
+ },
+ update: function(e,d) {
+ var element = $(this);
+ var value = transformDecode( element.data('address')[ e.type ][0], d );
+ var bg = element.css('background-color').replace(/[a-zA-Z()\s]/g, '').split(/,/);
+ switch (element.data('address')[e.type][2]) {
+ case 'r' : bg[0] = value; break;
+ case 'g' : bg[1] = value; break;
+ case 'b' : bg[2] = value; break;
+ default:
+ }
+ var bgs = "rgb(" + bg[0] + ", " + bg[1] + ", " + bg[2] + ")";
+ element.css('background-color', bgs );
+
+
+ },
+});
+
+function rgb_handleVariant(src, transform, mode, variant) {
+ return [true, variant];
+}
Property changes on: CometVisu/trunk/visu/structure/pure/rgb.js
___________________________________________________________________
Added: svn:executable
+ *
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2012-11-12 22:12:00 UTC (rev 1134)
+++ CometVisu/trunk/visu/visu_config.xsd 2012-11-13 07:14:04 UTC (rev 1135)
@@ -321,6 +321,7 @@
<xsd:element name="imagetrigger" type="imagetrigger" />
<xsd:element name="video" type="video" />
<xsd:element name="iframe" type="iframe" />
+ <xsd:element name="rgb" type="rgb" />
<xsd:element name="pagejump" type="pagejump" />
<!-- available plugins - include not checked -->
<xsd:element name="colorchooser" type="colorchooser" />
@@ -377,6 +378,7 @@
<xsd:element name="imagetrigger" type="imagetrigger" />
<xsd:element name="video" type="video" />
<xsd:element name="iframe" type="iframe" />
+ <xsd:element name="rgb" type="rgb" />
<xsd:element name="pagejump" type="pagejump" />
<!-- available plugins - include not checked -->
<xsd:element name="colorchooser" type="colorchooser" />
@@ -420,6 +422,7 @@
<xsd:element name="imagetrigger" type="imagetrigger" />
<xsd:element name="video" type="video" />
<xsd:element name="iframe" type="iframe" />
+ <xsd:element name="rgb" type="rgb" />
<xsd:element name="pagejump" type="pagejump" />
<!-- available plugins - include not checked -->
<xsd:element name="colorchooser" type="colorchooser" />
@@ -517,6 +520,14 @@
<xsd:attribute ref="format" use="optional" />
<xsd:attribute name="infoposition" type="xsd:decimal" use="optional" />
</xsd:complexType>
+
+ <xsd:complexType name="rgb">
+ <xsd:choice maxOccurs="unbounded" minOccurs="1">
+ <xsd:element name="label" type="label" />
+ <xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="address" type="address" minOccurs="3" maxOccurs="unbounded" />
+ </xsd:choice>
+ </xsd:complexType>
<xsd:complexType name="multitrigger">
<xsd:choice maxOccurs="unbounded" minOccurs="1">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <net...@us...> - 2012-11-23 22:39:00
|
Revision: 1163
http://openautomation.svn.sourceforge.net/openautomation/?rev=1163&view=rev
Author: netzkind
Date: 2012-11-23 22:38:50 +0000 (Fri, 23 Nov 2012)
Log Message:
-----------
updated jquery to 1.8.3, jQuery UI 1.9.2
fixed bug: do not try to match bounds of multi-dimensional choices
fixed bug: allow for decimals with no leading 0
Modified Paths:
--------------
CometVisu/trunk/visu/dependencies/jquery-ui.js
CometVisu/trunk/visu/dependencies/jquery.js
CometVisu/trunk/visu/editor/init.js
CometVisu/trunk/visu/editor/lib/Configuration.js
CometVisu/trunk/visu/editor/lib/Schema.js
Modified: CometVisu/trunk/visu/dependencies/jquery-ui.js
===================================================================
--- CometVisu/trunk/visu/dependencies/jquery-ui.js 2012-11-23 17:36:41 UTC (rev 1162)
+++ CometVisu/trunk/visu/dependencies/jquery-ui.js 2012-11-23 22:38:50 UTC (rev 1163)
@@ -1,14 +1,13 @@
-/*!
- * jQuery UI 1.8.16
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI
- */
+/*! jQuery UI - v1.9.2 - 2012-11-23
+* http://jqueryui.com
+* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js
+* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */
+
(function( $, undefined ) {
+var uuid = 0,
+ runiqueId = /^ui-id-\d+$/;
+
// prevent duplicate loading
// this is only a problem because we proxy existing functions
// and we don't want to double proxy them
@@ -18,26 +17,18 @@
}
$.extend( $.ui, {
- version: "1.8.16",
+ version: "1.9.2",
keyCode: {
- ALT: 18,
BACKSPACE: 8,
- CAPS_LOCK: 20,
COMMA: 188,
- COMMAND: 91,
- COMMAND_LEFT: 91, // COMMAND
- COMMAND_RIGHT: 93,
- CONTROL: 17,
DELETE: 46,
DOWN: 40,
END: 35,
ENTER: 13,
ESCAPE: 27,
HOME: 36,
- INSERT: 45,
LEFT: 37,
- MENU: 93, // COMMAND_RIGHT
NUMPAD_ADD: 107,
NUMPAD_DECIMAL: 110,
NUMPAD_DIVIDE: 111,
@@ -48,18 +39,14 @@
PAGE_UP: 33,
PERIOD: 190,
RIGHT: 39,
- SHIFT: 16,
SPACE: 32,
TAB: 9,
- UP: 38,
- WINDOWS: 91 // COMMAND
+ UP: 38
}
});
// plugins
$.fn.extend({
- propAttr: $.fn.prop || $.fn.attr,
-
_focus: $.fn.focus,
focus: function( delay, fn ) {
return typeof delay === "number" ?
@@ -77,13 +64,13 @@
scrollParent: function() {
var scrollParent;
- if (($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
+ if (($.ui.ie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
scrollParent = this.parents().filter(function() {
- return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
+ return (/(relative|absolute|fixed)/).test($.css(this,'position')) && (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
}).eq(0);
} else {
scrollParent = this.parents().filter(function() {
- return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
+ return (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
}).eq(0);
}
@@ -119,95 +106,63 @@
return 0;
},
- disableSelection: function() {
- return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
- ".ui-disableSelection", function( event ) {
- event.preventDefault();
- });
+ uniqueId: function() {
+ return this.each(function() {
+ if ( !this.id ) {
+ this.id = "ui-id-" + (++uuid);
+ }
+ });
},
- enableSelection: function() {
- return this.unbind( ".ui-disableSelection" );
- }
-});
-
-$.each( [ "Width", "Height" ], function( i, name ) {
- var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
- type = name.toLowerCase(),
- orig = {
- innerWidth: $.fn.innerWidth,
- innerHeight: $.fn.innerHeight,
- outerWidth: $.fn.outerWidth,
- outerHeight: $.fn.outerHeight
- };
-
- function reduce( elem, size, border, margin ) {
- $.each( side, function() {
- size -= parseFloat( $.curCSS( elem, "padding" + this, true) ) || 0;
- if ( border ) {
- size -= parseFloat( $.curCSS( elem, "border" + this + "Width", true) ) || 0;
+ removeUniqueId: function() {
+ return this.each(function() {
+ if ( runiqueId.test( this.id ) ) {
+ $( this ).removeAttr( "id" );
}
- if ( margin ) {
- size -= parseFloat( $.curCSS( elem, "margin" + this, true) ) || 0;
- }
});
- return size;
}
-
- $.fn[ "inner" + name ] = function( size ) {
- if ( size === undefined ) {
- return orig[ "inner" + name ].call( this );
- }
-
- return this.each(function() {
- $( this ).css( type, reduce( this, size ) + "px" );
- });
- };
-
- $.fn[ "outer" + name] = function( size, margin ) {
- if ( typeof size !== "number" ) {
- return orig[ "outer" + name ].call( this, size );
- }
-
- return this.each(function() {
- $( this).css( type, reduce( this, size, true, margin ) + "px" );
- });
- };
});
// selectors
function focusable( element, isTabIndexNotNaN ) {
- var nodeName = element.nodeName.toLowerCase();
+ var map, mapName, img,
+ nodeName = element.nodeName.toLowerCase();
if ( "area" === nodeName ) {
- var map = element.parentNode,
- mapName = map.name,
- img;
+ map = element.parentNode;
+ mapName = map.name;
if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
return false;
}
img = $( "img[usemap=#" + mapName + "]" )[0];
return !!img && visible( img );
}
- return ( /input|select|textarea|button|object/.test( nodeName )
- ? !element.disabled
- : "a" == nodeName
- ? element.href || isTabIndexNotNaN
- : isTabIndexNotNaN)
+ return ( /input|select|textarea|button|object/.test( nodeName ) ?
+ !element.disabled :
+ "a" === nodeName ?
+ element.href || isTabIndexNotNaN :
+ isTabIndexNotNaN) &&
// the element and all of its ancestors must be visible
- && visible( element );
+ visible( element );
}
function visible( element ) {
- return !$( element ).parents().andSelf().filter(function() {
- return $.curCSS( this, "visibility" ) === "hidden" ||
- $.expr.filters.hidden( this );
- }).length;
+ return $.expr.filters.visible( element ) &&
+ !$( element ).parents().andSelf().filter(function() {
+ return $.css( this, "visibility" ) === "hidden";
+ }).length;
}
$.extend( $.expr[ ":" ], {
- data: function( elem, i, match ) {
- return !!$.data( elem, match[ 3 ] );
- },
+ data: $.expr.createPseudo ?
+ $.expr.createPseudo(function( dataName ) {
+ return function( elem ) {
+ return !!$.data( elem, dataName );
+ };
+ }) :
+ // support: jQuery <1.8
+ function( elem, i, match ) {
+ return !!$.data( elem, match[ 3 ] );
+ },
focusable: function( element ) {
return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
@@ -225,6 +180,11 @@
var body = document.body,
div = body.appendChild( div = document.createElement( "div" ) );
+ // access offsetHeight before setting the style to prevent a layout bug
+ // in IE 9 which causes the element to continue to take up space even
+ // after it is removed from the DOM (#8026)
+ div.offsetHeight;
+
$.extend( div.style, {
minHeight: "100px",
height: "auto",
@@ -240,57 +200,134 @@
body.removeChild( div ).style.display = "none";
});
+// support: jQuery <1.8
+if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
+ $.each( [ "Width", "Height" ], function( i, name ) {
+ var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
+ type = name.toLowerCase(),
+ orig = {
+ innerWidth: $.fn.innerWidth,
+ innerHeight: $.fn.innerHeight,
+ outerWidth: $.fn.outerWidth,
+ outerHeight: $.fn.outerHeight
+ };
+ function reduce( elem, size, border, margin ) {
+ $.each( side, function() {
+ size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
+ if ( border ) {
+ size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
+ }
+ if ( margin ) {
+ size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
+ }
+ });
+ return size;
+ }
+ $.fn[ "inner" + name ] = function( size ) {
+ if ( size === undefined ) {
+ return orig[ "inner" + name ].call( this );
+ }
+ return this.each(function() {
+ $( this ).css( type, reduce( this, size ) + "px" );
+ });
+ };
+ $.fn[ "outer" + name] = function( size, margin ) {
+ if ( typeof size !== "number" ) {
+ return orig[ "outer" + name ].call( this, size );
+ }
+
+ return this.each(function() {
+ $( this).css( type, reduce( this, size, true, margin ) + "px" );
+ });
+ };
+ });
+}
+
+// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
+if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
+ $.fn.removeData = (function( removeData ) {
+ return function( key ) {
+ if ( arguments.length ) {
+ return removeData.call( this, $.camelCase( key ) );
+ } else {
+ return removeData.call( this );
+ }
+ };
+ })( $.fn.removeData );
+}
+
+
+
+
+
// deprecated
+
+(function() {
+ var uaMatch = /msie ([\w.]+)/.exec( navigator.userAgent.toLowerCase() ) || [];
+ $.ui.ie = uaMatch.length ? true : false;
+ $.ui.ie6 = parseFloat( uaMatch[ 1 ], 10 ) === 6;
+})();
+
+$.fn.extend({
+ disableSelection: function() {
+ return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
+ ".ui-disableSelection", function( event ) {
+ event.preventDefault();
+ });
+ },
+
+ enableSelection: function() {
+ return this.unbind( ".ui-disableSelection" );
+ }
+});
+
$.extend( $.ui, {
// $.ui.plugin is deprecated. Use the proxy pattern instead.
plugin: {
add: function( module, option, set ) {
- var proto = $.ui[ module ].prototype;
- for ( var i in set ) {
+ var i,
+ proto = $.ui[ module ].prototype;
+ for ( i in set ) {
proto.plugins[ i ] = proto.plugins[ i ] || [];
proto.plugins[ i ].push( [ option, set[ i ] ] );
}
},
call: function( instance, name, args ) {
- var set = instance.plugins[ name ];
- if ( !set || !instance.element[ 0 ].parentNode ) {
+ var i,
+ set = instance.plugins[ name ];
+ if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
return;
}
-
- for ( var i = 0; i < set.length; i++ ) {
+
+ for ( i = 0; i < set.length; i++ ) {
if ( instance.options[ set[ i ][ 0 ] ] ) {
set[ i ][ 1 ].apply( instance.element, args );
}
}
}
},
-
- // will be deprecated when we switch to jQuery 1.4 - use jQuery.contains()
- contains: function( a, b ) {
- return document.compareDocumentPosition ?
- a.compareDocumentPosition( b ) & 16 :
- a !== b && a.contains( b );
- },
-
+
+ contains: $.contains,
+
// only used by resizable
hasScroll: function( el, a ) {
-
+
//If overflow is hidden, the element might have extra content, but the user wants to hide it
if ( $( el ).css( "overflow" ) === "hidden") {
return false;
}
-
+
var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
has = false;
-
+
if ( el[ scroll ] > 0 ) {
return true;
}
-
+
// TODO: determine which cases actually cause this to happen
// if the element doesn't have the scroll set, see if it's possible to
// set the scroll
@@ -299,7 +336,7 @@
el[ scroll ] = 0;
return has;
},
-
+
// these are odd functions, fix the API or move into individual plugins
isOverAxis: function( x, reference, size ) {
//Determines when x coordinate is over "b" element axis
@@ -312,51 +349,25 @@
});
})( jQuery );
-/*!
- * jQuery UI Widget 1.8.16
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Widget
- */
(function( $, undefined ) {
-// jQuery 1.4+
-if ( $.cleanData ) {
- var _cleanData = $.cleanData;
- $.cleanData = function( elems ) {
- for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
- try {
- $( elem ).triggerHandler( "remove" );
- // http://bugs.jquery.com/ticket/8235
- } catch( e ) {}
- }
- _cleanData( elems );
- };
-} else {
- var _remove = $.fn.remove;
- $.fn.remove = function( selector, keepData ) {
- return this.each(function() {
- if ( !keepData ) {
- if ( !selector || $.filter( selector, [ this ] ).length ) {
- $( "*", this ).add( [ this ] ).each(function() {
- try {
- $( this ).triggerHandler( "remove" );
- // http://bugs.jquery.com/ticket/8235
- } catch( e ) {}
- });
- }
- }
- return _remove.call( $(this), selector, keepData );
- });
- };
-}
+var uuid = 0,
+ slice = Array.prototype.slice,
+ _cleanData = $.cleanData;
+$.cleanData = function( elems ) {
+ for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+ try {
+ $( elem ).triggerHandler( "remove" );
+ // http://bugs.jquery.com/ticket/8235
+ } catch( e ) {}
+ }
+ _cleanData( elems );
+};
$.widget = function( name, base, prototype ) {
- var namespace = name.split( "." )[ 0 ],
- fullName;
+ var fullName, existingConstructor, constructor, basePrototype,
+ namespace = name.split( "." )[ 0 ];
+
name = name.split( "." )[ 1 ];
fullName = namespace + "-" + name;
@@ -366,81 +377,167 @@
}
// create selector for plugin
- $.expr[ ":" ][ fullName ] = function( elem ) {
- return !!$.data( elem, name );
+ $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
+ return !!$.data( elem, fullName );
};
$[ namespace ] = $[ namespace ] || {};
- $[ namespace ][ name ] = function( options, element ) {
+ existingConstructor = $[ namespace ][ name ];
+ constructor = $[ namespace ][ name ] = function( options, element ) {
+ // allow instantiation without "new" keyword
+ if ( !this._createWidget ) {
+ return new constructor( options, element );
+ }
+
// allow instantiation without initializing for simple inheritance
+ // must use "new" keyword (the code above always passes args)
if ( arguments.length ) {
this._createWidget( options, element );
}
};
+ // extend with the existing constructor to carry over any static properties
+ $.extend( constructor, existingConstructor, {
+ version: prototype.version,
+ // copy the object used to create the prototype in case we need to
+ // redefine the widget later
+ _proto: $.extend( {}, prototype ),
+ // track widgets that inherit from this widget in case this widget is
+ // redefined after a widget inherits from it
+ _childConstructors: []
+ });
- var basePrototype = new base();
+ basePrototype = new base();
// we need to make the options hash a property directly on the new instance
// otherwise we'll modify the options hash on the prototype that we're
// inheriting from
-// $.each( basePrototype, function( key, val ) {
-// if ( $.isPlainObject(val) ) {
-// basePrototype[ key ] = $.extend( {}, val );
-// }
-// });
- basePrototype.options = $.extend( true, {}, basePrototype.options );
- $[ namespace ][ name ].prototype = $.extend( true, basePrototype, {
+ basePrototype.options = $.widget.extend( {}, basePrototype.options );
+ $.each( prototype, function( prop, value ) {
+ if ( $.isFunction( value ) ) {
+ prototype[ prop ] = (function() {
+ var _super = function() {
+ return base.prototype[ prop ].apply( this, arguments );
+ },
+ _superApply = function( args ) {
+ return base.prototype[ prop ].apply( this, args );
+ };
+ return function() {
+ var __super = this._super,
+ __superApply = this._superApply,
+ returnValue;
+
+ this._super = _super;
+ this._superApply = _superApply;
+
+ returnValue = value.apply( this, arguments );
+
+ this._super = __super;
+ this._superApply = __superApply;
+
+ return returnValue;
+ };
+ })();
+ }
+ });
+ constructor.prototype = $.widget.extend( basePrototype, {
+ // TODO: remove support for widgetEventPrefix
+ // always use the name + a colon as the prefix, e.g., draggable:start
+ // don't prefix for widgets that aren't DOM-based
+ widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name
+ }, prototype, {
+ constructor: constructor,
namespace: namespace,
widgetName: name,
- widgetEventPrefix: $[ namespace ][ name ].prototype.widgetEventPrefix || name,
- widgetBaseClass: fullName
- }, prototype );
+ // TODO remove widgetBaseClass, see #8155
+ widgetBaseClass: fullName,
+ widgetFullName: fullName
+ });
- $.widget.bridge( name, $[ namespace ][ name ] );
+ // If this widget is being redefined then we need to find all widgets that
+ // are inheriting from it and redefine all of them so that they inherit from
+ // the new version of this widget. We're essentially trying to replace one
+ // level in the prototype chain.
+ if ( existingConstructor ) {
+ $.each( existingConstructor._childConstructors, function( i, child ) {
+ var childPrototype = child.prototype;
+
+ // redefine the child widget using the same prototype that was
+ // originally used, but inherit from the new version of the base
+ $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
+ });
+ // remove the list of existing child constructors from the old constructor
+ // so the old child constructors can be garbage collected
+ delete existingConstructor._childConstructors;
+ } else {
+ base._childConstructors.push( constructor );
+ }
+
+ $.widget.bridge( name, constructor );
};
+$.widget.extend = function( target ) {
+ var input = slice.call( arguments, 1 ),
+ inputIndex = 0,
+ inputLength = input.length,
+ key,
+ value;
+ for ( ; inputIndex < inputLength; inputIndex++ ) {
+ for ( key in input[ inputIndex ] ) {
+ value = input[ inputIndex ][ key ];
+ if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
+ // Clone objects
+ if ( $.isPlainObject( value ) ) {
+ target[ key ] = $.isPlainObject( target[ key ] ) ?
+ $.widget.extend( {}, target[ key ], value ) :
+ // Don't extend strings, arrays, etc. with objects
+ $.widget.extend( {}, value );
+ // Copy everything else by reference
+ } else {
+ target[ key ] = value;
+ }
+ }
+ }
+ }
+ return target;
+};
+
$.widget.bridge = function( name, object ) {
+ var fullName = object.prototype.widgetFullName || name;
$.fn[ name ] = function( options ) {
var isMethodCall = typeof options === "string",
- args = Array.prototype.slice.call( arguments, 1 ),
+ args = slice.call( arguments, 1 ),
returnValue = this;
// allow multiple hashes to be passed on init
options = !isMethodCall && args.length ?
- $.extend.apply( null, [ true, options ].concat(args) ) :
+ $.widget.extend.apply( null, [ options ].concat(args) ) :
options;
- // prevent calls to internal methods
- if ( isMethodCall && options.charAt( 0 ) === "_" ) {
- return returnValue;
- }
-
if ( isMethodCall ) {
this.each(function() {
- var instance = $.data( this, name ),
- methodValue = instance && $.isFunction( instance[options] ) ?
- instance[ options ].apply( instance, args ) :
- instance;
- // TODO: add this back in 1.9 and use $.error() (see #5972)
-// if ( !instance ) {
-// throw "cannot call methods on " + name + " prior to initialization; " +
-// "attempted to call method '" + options + "'";
-// }
-// if ( !$.isFunction( instance[options] ) ) {
-// throw "no such method '" + options + "' for " + name + " widget instance";
-// }
-// var methodValue = instance[ options ].apply( instance, args );
+ var methodValue,
+ instance = $.data( this, fullName );
+ if ( !instance ) {
+ return $.error( "cannot call methods on " + name + " prior to initialization; " +
+ "attempted to call method '" + options + "'" );
+ }
+ if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
+ return $.error( "no such method '" + options + "' for " + name + " widget instance" );
+ }
+ methodValue = instance[ options ].apply( instance, args );
if ( methodValue !== instance && methodValue !== undefined ) {
- returnValue = methodValue;
+ returnValue = methodValue && methodValue.jquery ?
+ returnValue.pushStack( methodValue.get() ) :
+ methodValue;
return false;
}
});
} else {
this.each(function() {
- var instance = $.data( this, name );
+ var instance = $.data( this, fullName );
if ( instance ) {
instance.option( options || {} )._init();
} else {
- $.data( this, name, new object( options, this ) );
+ $.data( this, fullName, new object( options, this ) );
}
});
}
@@ -449,74 +546,126 @@
};
};
-$.Widget = function( options, element ) {
- // allow instantiation without initializing for simple inheritance
- if ( arguments.length ) {
- this._createWidget( options, element );
- }
-};
+$.Widget = function( /* options, element */ ) {};
+$.Widget._childConstructors = [];
$.Widget.prototype = {
widgetName: "widget",
widgetEventPrefix: "",
+ defaultElement: "<div>",
options: {
- disabled: false
+ disabled: false,
+
+ // callbacks
+ create: null
},
_createWidget: function( options, element ) {
- // $.widget.bridge stores the plugin instance, but we do it anyway
- // so that it's stored even before the _create function runs
- $.data( element, this.widgetName, this );
+ element = $( element || this.defaultElement || this )[ 0 ];
this.element = $( element );
- this.options = $.extend( true, {},
+ this.uuid = uuid++;
+ this.eventNamespace = "." + this.widgetName + this.uuid;
+ this.options = $.widget.extend( {},
this.options,
this._getCreateOptions(),
options );
- var self = this;
- this.element.bind( "remove." + this.widgetName, function() {
- self.destroy();
- });
+ this.bindings = $();
+ this.hoverable = $();
+ this.focusable = $();
+ if ( element !== this ) {
+ // 1.9 BC for #7810
+ // TODO remove dual storage
+ $.data( element, this.widgetName, this );
+ $.data( element, this.widgetFullName, this );
+ this._on( true, this.element, {
+ remove: function( event ) {
+ if ( event.target === element ) {
+ this.destroy();
+ }
+ }
+ });
+ this.document = $( element.style ?
+ // element within the document
+ element.ownerDocument :
+ // element is window or document
+ element.document || element );
+ this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
+ }
+
this._create();
- this._trigger( "create" );
+ this._trigger( "create", null, this._getCreateEventData() );
this._init();
},
- _getCreateOptions: function() {
- return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ];
- },
- _create: function() {},
- _init: function() {},
+ _getCreateOptions: $.noop,
+ _getCreateEventData: $.noop,
+ _create: $.noop,
+ _init: $.noop,
destroy: function() {
+ this._destroy();
+ // we can probably remove the unbind calls in 2.0
+ // all event bindings should go through this._on()
this.element
- .unbind( "." + this.widgetName )
- .removeData( this.widgetName );
+ .unbind( this.eventNamespace )
+ // 1.9 BC for #7810
+ // TODO remove dual storage
+ .removeData( this.widgetName )
+ .removeData( this.widgetFullName )
+ // support: jquery <1.6.3
+ // http://bugs.jquery.com/ticket/9413
+ .removeData( $.camelCase( this.widgetFullName ) );
this.widget()
- .unbind( "." + this.widgetName )
+ .unbind( this.eventNamespace )
.removeAttr( "aria-disabled" )
.removeClass(
- this.widgetBaseClass + "-disabled " +
+ this.widgetFullName + "-disabled " +
"ui-state-disabled" );
+
+ // clean up events and states
+ this.bindings.unbind( this.eventNamespace );
+ this.hoverable.removeClass( "ui-state-hover" );
+ this.focusable.removeClass( "ui-state-focus" );
},
+ _destroy: $.noop,
widget: function() {
return this.element;
},
option: function( key, value ) {
- var options = key;
+ var options = key,
+ parts,
+ curOption,
+ i;
if ( arguments.length === 0 ) {
// don't return a reference to the internal hash
- return $.extend( {}, this.options );
+ return $.widget.extend( {}, this.options );
}
- if (typeof key === "string" ) {
- if ( value === undefined ) {
- return this.options[ key ];
+ if ( typeof key === "string" ) {
+ // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
+ options = {};
+ parts = key.split( "." );
+ key = parts.shift();
+ if ( parts.length ) {
+ curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
+ for ( i = 0; i < parts.length - 1; i++ ) {
+ curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
+ curOption = curOption[ parts[ i ] ];
+ }
+ key = parts.pop();
+ if ( value === undefined ) {
+ return curOption[ key ] === undefined ? null : curOption[ key ];
+ }
+ curOption[ key ] = value;
+ } else {
+ if ( value === undefined ) {
+ return this.options[ key ] === undefined ? null : this.options[ key ];
+ }
+ options[ key ] = value;
}
- options = {};
- options[ key ] = value;
}
this._setOptions( options );
@@ -524,11 +673,12 @@
return this;
},
_setOptions: function( options ) {
- var self = this;
- $.each( options, function( key, value ) {
- self._setOption( key, value );
- });
+ var key;
+ for ( key in options ) {
+ this._setOption( key, options[ key ] );
+ }
+
return this;
},
_setOption: function( key, value ) {
@@ -536,10 +686,10 @@
if ( key === "disabled" ) {
this.widget()
- [ value ? "addClass" : "removeClass"](
- this.widgetBaseClass + "-disabled" + " " +
- "ui-state-disabled" )
+ .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
.attr( "aria-disabled", value );
+ this.hoverable.removeClass( "ui-state-hover" );
+ this.focusable.removeClass( "ui-state-focus" );
}
return this;
@@ -552,46 +702,171 @@
return this._setOption( "disabled", true );
},
+ _on: function( suppressDisabledCheck, element, handlers ) {
+ var delegateElement,
+ instance = this;
+
+ // no suppressDisabledCheck flag, shuffle arguments
+ if ( typeof suppressDisabledCheck !== "boolean" ) {
+ handlers = element;
+ element = suppressDisabledCheck;
+ suppressDisabledCheck = false;
+ }
+
+ // no element argument, shuffle and use this.element
+ if ( !handlers ) {
+ handlers = element;
+ element = this.element;
+ delegateElement = this.widget();
+ } else {
+ // accept selectors, DOM elements
+ element = delegateElement = $( element );
+ this.bindings = this.bindings.add( element );
+ }
+
+ $.each( handlers, function( event, handler ) {
+ function handlerProxy() {
+ // allow widgets to customize the disabled handling
+ // - disabled as an array instead of boolean
+ // - disabled class as method for disabling individual parts
+ if ( !suppressDisabledCheck &&
+ ( instance.options.disabled === true ||
+ $( this ).hasClass( "ui-state-disabled" ) ) ) {
+ return;
+ }
+ return ( typeof handler === "string" ? instance[ handler ] : handler )
+ .apply( instance, arguments );
+ }
+
+ // copy the guid so direct unbinding works
+ if ( typeof handler !== "string" ) {
+ handlerProxy.guid = handler.guid =
+ handler.guid || handlerProxy.guid || $.guid++;
+ }
+
+ var match = event.match( /^(\w+)\s*(.*)$/ ),
+ eventName = match[1] + instance.eventNamespace,
+ selector = match[2];
+ if ( selector ) {
+ delegateElement.delegate( selector, eventName, handlerProxy );
+ } else {
+ element.bind( eventName, handlerProxy );
+ }
+ });
+ },
+
+ _off: function( element, eventName ) {
+ eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
+ element.unbind( eventName ).undelegate( eventName );
+ },
+
+ _delay: function( handler, delay ) {
+ function handlerProxy() {
+ return ( typeof handler === "string" ? instance[ handler ] : handler )
+ .apply( instance, arguments );
+ }
+ var instance = this;
+ return setTimeout( handlerProxy, delay || 0 );
+ },
+
+ _hoverable: function( element ) {
+ this.hoverable = this.hoverable.add( element );
+ this._on( element, {
+ mouseenter: function( event ) {
+ $( event.currentTarget ).addClass( "ui-state-hover" );
+ },
+ mouseleave: function( event ) {
+ $( event.currentTarget ).removeClass( "ui-state-hover" );
+ }
+ });
+ },
+
+ _focusable: function( element ) {
+ this.focusable = this.focusable.add( element );
+ this._on( element, {
+ focusin: function( event ) {
+ $( event.currentTarget ).addClass( "ui-state-focus" );
+ },
+ focusout: function( event ) {
+ $( event.currentTarget ).removeClass( "ui-state-focus" );
+ }
+ });
+ },
+
_trigger: function( type, event, data ) {
- var callback = this.options[ type ];
+ var prop, orig,
+ callback = this.options[ type ];
+ data = data || {};
event = $.Event( event );
event.type = ( type === this.widgetEventPrefix ?
type :
this.widgetEventPrefix + type ).toLowerCase();
- data = data || {};
+ // the original event may come from any element
+ // so we need to reset the target on the new event
+ event.target = this.ele...
[truncated message content] |
|
From: <ha...@us...> - 2012-12-11 22:12:57
|
Revision: 1205
http://openautomation.svn.sourceforge.net/openautomation/?rev=1205&view=rev
Author: hausl
Date: 2012-12-11 22:12:48 +0000 (Tue, 11 Dec 2012)
Log Message:
-----------
Flavour-attribute for Icons implemented.
Modified Paths:
--------------
CometVisu/trunk/visu/lib/iconhandler.js
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/structure/pure/_common.js
CometVisu/trunk/visu/structure/pure/text.js
CometVisu/trunk/visu/visu_config.xsd
Modified: CometVisu/trunk/visu/lib/iconhandler.js
===================================================================
--- CometVisu/trunk/visu/lib/iconhandler.js 2012-12-11 21:09:54 UTC (rev 1204)
+++ CometVisu/trunk/visu/lib/iconhandler.js 2012-12-11 22:12:48 UTC (rev 1205)
@@ -50,511 +50,388 @@
* @private
*/
var db = {
-'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',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/zeit_notiz.png' , 'style': 'height: 2em;' } } },
-'zeit_statistik' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/zeit_statistik.png' , 'style': 'height: 2em;' } } },
-'zeit_uhr' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/zeit_uhr.png' , 'style': 'height: 2em;' } } },
-
+'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_or' : { '*': { '*' : '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_or' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_or/audio_eject.png' , 'style': 'height: 2em;' } } },
- 'audio_ff_or' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_or/audio_ff.png' , 'style': 'height: 2em;' } } },
- 'audio_mute_or' : { '*': { '*' : 'white',
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_or/audio_mute.png' , 'style': 'height: 2em;' } } },
- 'audio_pause_or' : { '*': { '*' : 'white',
- 'white' : { 'uri...
[truncated message content] |
|
From: <ha...@us...> - 2012-12-12 14:33:56
|
Revision: 1208
http://openautomation.svn.sourceforge.net/openautomation/?rev=1208&view=rev
Author: hausl
Date: 2012-12-12 14:33:44 +0000 (Wed, 12 Dec 2012)
Log Message:
-----------
1) Schema-adaptation to define possible widgets just once
2) Reference to schema fiel changed in the demo-configs
Modified Paths:
--------------
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_demorss.xml
CometVisu/trunk/visu/visu_config_metal.xml
Modified: CometVisu/trunk/visu/visu_config.xml
===================================================================
--- CometVisu/trunk/visu/visu_config.xml 2012-12-12 10:41:24 UTC (rev 1207)
+++ CometVisu/trunk/visu/visu_config.xml 2012-12-12 14:33:44 UTC (rev 1208)
@@ -1,5 +1,5 @@
<?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">
+<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" design="pure" xsi:noNamespaceSchemaLocation="./visu_config.xsd">
<meta>
<plugins>
<plugin name="colorchooser"/>
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2012-12-12 10:41:24 UTC (rev 1207)
+++ CometVisu/trunk/visu/visu_config.xsd 2012-12-12 14:33:44 UTC (rev 1208)
@@ -268,6 +268,21 @@
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
+ <xsd:group name="AvailablePlugins">
+ <xsd:choice>
+ <xsd:element name="colorchooser" type="colorchooser" />
+ <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" />
+ <xsd:element name="strftime" type="strftime" />
+ <xsd:element name="upnpcontroller" type="upnpcontroller" />
+ </xsd:choice>
+ </xsd:group>
+
<xsd:complexType name="icons">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="icon-definition" type="icon-definition" />
@@ -327,45 +342,15 @@
</xsd:choice>
</xsd:complexType>
- <!-- define a page - if you add a new widget, you need to list it here -->
+ <!-- define a page -->
<xsd:complexType name="page">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
- <!-- visual effects -->
- <xsd:element name="line" type="line" />
- <xsd:element name="break" type="break" />
+ <xsd:element name="layout" type="layout" />
+ <xsd:element name="page" type="page" />
<xsd:element name="group" type="group" />
<xsd:element name="navbar" type="navbar" />
- <!-- list all possbile widgets here -->
- <xsd:element name="text" type="text" />
- <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" />
- <xsd:element name="slide" type="slide" />
- <xsd:element name="info" type="info" />
- <xsd:element name="shade" type="info" />
- <xsd:element name="image" type="image" />
- <xsd:element name="imagetrigger" type="imagetrigger" />
- <xsd:element name="video" type="video" />
- <xsd:element name="iframe" type="iframe" />
- <xsd:element name="rgb" type="rgb" />
- <xsd:element name="pagejump" type="pagejump" />
- <!-- available plugins - include not checked -->
- <xsd:element name="colorchooser" type="colorchooser" />
- <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" />
- <xsd:element name="strftime" type="strftime" />
- <xsd:element name="upnpcontroller" type="upnpcontroller" />
- <xsd:element name="page" type="page" />
- <xsd:element name="layout" type="layout" />
+ <xsd:group ref="Widgets"/>
+ <xsd:group ref="AvailablePlugins"/>
</xsd:choice>
<xsd:attribute name="name" type="xsd:string" use="required" />
<xsd:attribute name="flavour" type="xsd:string" use="optional" />
@@ -390,40 +375,10 @@
<xsd:complexType name="group">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
- <!-- visual effects -->
- <xsd:element name="line" type="line" />
- <xsd:element name="break" type="break" />
- <!-- list all possbile widgets here -->
- <xsd:element name="text" type="text" />
- <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" />
- <xsd:element name="slide" type="slide" />
- <xsd:element name="info" type="info" />
- <xsd:element name="shade" type="info" />
- <xsd:element name="image" type="image" />
- <xsd:element name="imagetrigger" type="imagetrigger" />
- <xsd:element name="video" type="video" />
- <xsd:element name="iframe" type="iframe" />
- <xsd:element name="rgb" type="rgb" />
- <xsd:element name="pagejump" type="pagejump" />
- <!-- available plugins - include not checked -->
- <xsd:element name="colorchooser" type="colorchooser" />
- <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" />
- <xsd:element name="strftime" type="strftime" />
- <xsd:element name="upnpcontroller" type="upnpcontroller" />
<xsd:element name="page" type="page" />
<xsd:element name="group" type="group" />
+ <xsd:group ref="Widgets"/>
+ <xsd:group ref="AvailablePlugins"/>
</xsd:choice>
<xsd:attribute name="name" type="xsd:string" use="optional" />
<xsd:attribute name="nowidget" type="xsd:boolean" use="optional" />
@@ -434,10 +389,25 @@
<xsd:complexType name="navbar">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="page" type="page" />
+ <xsd:element name="group" type="group" />
+ <xsd:group ref="Widgets"/>
+ <xsd:group ref="AvailablePlugins"/>
+ </xsd:choice>
+ <xsd:attribute name="name" type="xsd:string" use="optional" />
+ <xsd:attribute name="position" type="navbarPositionType" use="required" />
+ <xsd:attribute name="dynamic" type="xsd:boolean" use="optional" />
+ <xsd:attribute name="width" type="xsd:string" use="optional" />
+ <xsd:attribute name="scope" type="xsd:decimal" use="optional" />
+ </xsd:complexType>
+
+ <!-- if you add a new widget, you need to list it here -->
+
+ <xsd:group name="Widgets">
+ <xsd:choice>
<!-- visual effects -->
<xsd:element name="line" type="line" />
<xsd:element name="break" type="break" />
- <xsd:element name="group" type="group" />
<!-- list all possbile widgets here -->
<xsd:element name="text" type="text" />
<xsd:element name="switch" type="switch" />
@@ -456,24 +426,8 @@
<xsd:element name="iframe" type="iframe" />
<xsd:element name="rgb" type="rgb" />
<xsd:element name="pagejump" type="pagejump" />
- <!-- available plugins - include not checked -->
- <xsd:element name="colorchooser" type="colorchooser" />
- <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="strftime" type="strftime" />
- <xsd:element name="upnpcontroller" type="upnpcontroller" />
- <xsd:element name="page" type="page" />
</xsd:choice>
- <xsd:attribute name="name" type="xsd:string" use="optional" />
- <xsd:attribute name="position" type="navbarPositionType" use="required" />
- <xsd:attribute name="dynamic" type="xsd:boolean" use="optional" />
- <xsd:attribute name="width" type="xsd:string" use="optional" />
- <xsd:attribute name="scope" type="xsd:decimal" use="optional" />
- </xsd:complexType>
+ </xsd:group>
<!-- more fun part - all widgets - if you add a new widget, you need to define it here -->
Modified: CometVisu/trunk/visu/visu_config_2d3d.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_2d3d.xml 2012-12-12 10:41:24 UTC (rev 1207)
+++ CometVisu/trunk/visu/visu_config_2d3d.xml 2012-12-12 14:33:44 UTC (rev 1208)
@@ -1,5 +1,5 @@
<?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">
+<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" design="pure" xsi:noNamespaceSchemaLocation="./visu_config.xsd">
<meta>
<plugins>
<plugin name="colorchooser"/>
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2012-12-12 10:41:24 UTC (rev 1207)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2012-12-12 14:33:44 UTC (rev 1208)
@@ -1,5 +1,5 @@
<?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" max_mobile_screen_width="480">
+<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" design="pure" xsi:noNamespaceSchemaLocation="./visu_config.xsd" max_mobile_screen_width="480">
<meta>
<plugins>
<plugin name="colorchooser"/>
Modified: CometVisu/trunk/visu/visu_config_demorss.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demorss.xml 2012-12-12 10:41:24 UTC (rev 1207)
+++ CometVisu/trunk/visu/visu_config_demorss.xml 2012-12-12 14:33:44 UTC (rev 1208)
@@ -1,5 +1,5 @@
<?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">
+<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" design="pure" xsi:noNamespaceSchemaLocation="./visu_config.xsd">
<meta>
<plugins>
<plugin name="rss"/>
Modified: CometVisu/trunk/visu/visu_config_metal.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_metal.xml 2012-12-12 10:41:24 UTC (rev 1207)
+++ CometVisu/trunk/visu/visu_config_metal.xml 2012-12-12 14:33:44 UTC (rev 1208)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" design="metal"
- xsi:noNamespaceSchemaLocation="visu_config.xsd" enable_column_adjustment="true">
+ xsi:noNamespaceSchemaLocation="./visu_config.xsd" enable_column_adjustment="true">
<meta>
<mappings>
<mapping name="OpenClose">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2012-12-19 00:43:02
|
Revision: 1231
http://openautomation.svn.sourceforge.net/openautomation/?rev=1231&view=rev
Author: hausl
Date: 2012-12-19 00:42:55 +0000 (Wed, 19 Dec 2012)
Log Message:
-----------
XSD cleanup
Modified Paths:
--------------
CometVisu/trunk/visu/designs/metal/basic.css
CometVisu/trunk/visu/index.html
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/visu_config.xsd
CometVisu/trunk/visu/visu_config_2d3d.xml
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/designs/metal/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/metal/basic.css 2012-12-19 00:03:59 UTC (rev 1230)
+++ CometVisu/trunk/visu/designs/metal/basic.css 2012-12-19 00:42:55 UTC (rev 1231)
@@ -76,26 +76,6 @@
text-decoration:none;
}
-#top .nav_additional {
- position: absolute;
- right: 0;
- top: 0;
- margin-right: 15px;
- float: right;
-}
-
-#top .nav_additional .widget {
- padding: 0;
- min-height: 0;
- background: none;
- border: 0;
-}
-
-#top .nav_additional .text > div {
- line-height: 1.3em;
-}
-
-
.footer,
.footer *
{
Modified: CometVisu/trunk/visu/index.html
===================================================================
--- CometVisu/trunk/visu/index.html 2012-12-19 00:03:59 UTC (rev 1230)
+++ CometVisu/trunk/visu/index.html 2012-12-19 00:42:55 UTC (rev 1231)
@@ -64,7 +64,7 @@
</head>
<body>
<div id="top" class="loading">
- <div class="nav_path">-</div><div class="nav_additional"></div>
+ <div class="nav_path">-</div>
</div>
<div id="navbarTop" class="loading"></div>
<div id="centerContainer">
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-12-19 00:03:59 UTC (rev 1230)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-12-19 00:42:55 UTC (rev 1231)
@@ -511,19 +511,6 @@
// and now setup the pages
var page = $('pages > page', xml)[0]; // only one page element allowed...
- // read topbar datetime format
- 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
- $('#top .nav_additional').html(retval);
- }
-
create_pages(page, 'id_0');
adjustColumns();
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2012-12-19 00:03:59 UTC (rev 1230)
+++ CometVisu/trunk/visu/visu_config.xsd 2012-12-19 00:42:55 UTC (rev 1231)
@@ -48,7 +48,7 @@
<xsd:complexType name="icon">
<xsd:attribute name="name" type="xsd:string" use="required" />
<xsd:attribute name="type" type="xsd:string" use="optional" />
- <xsd:attribute name="flavour" type="xsd:string" use="optional" />
+ <xsd:attribute ref="flavour" use="optional" />
</xsd:complexType>
<!-- attributes -->
@@ -67,6 +67,7 @@
<xsd:attribute name="mapping" type="xsd:string" />
<xsd:attribute name="styling" type="xsd:string" />
<xsd:attribute name="value" type="xsd:string" />
+ <xsd:attribute name="flavour" type="xsd:string" />
<xsd:attribute name="mode">
<xsd:simpleType>
@@ -293,7 +294,7 @@
<xsd:attribute name="name" type="xsd:string" use="required" />
<xsd:attribute name="uri" type="xsd:string" use="required" />
<xsd:attribute name="type" type="xsd:string" use="optional" />
- <xsd:attribute name="flavour" type="xsd:string" use="optional" />
+ <xsd:attribute ref="flavour" use="optional" />
</xsd:complexType>
<xsd:complexType name="mappings">
@@ -352,7 +353,7 @@
<xsd:group ref="AvailablePlugins"/>
</xsd:choice>
<xsd:attribute name="name" type="xsd:string" use="required" />
- <xsd:attribute name="flavour" type="xsd:string" use="optional" />
+ <xsd:attribute ref="flavour" use="optional" />
<xsd:attribute ref="align" use="optional" />
<xsd:attribute name="ga" type="addr" use="optional" />
<xsd:attribute name="visible" type="xsd:boolean" />
@@ -381,7 +382,7 @@
</xsd:choice>
<xsd:attribute name="name" type="xsd:string" use="optional" />
<xsd:attribute name="nowidget" type="xsd:boolean" use="optional" />
- <xsd:attribute name="flavour" type="xsd:string" use="optional" />
+ <xsd:attribute ref="flavour" use="optional" />
<xsd:attribute name="pagejumptarget" type="xsd:string" use="optional" />
<xsd:attribute ref="align" use="optional" />
</xsd:complexType>
@@ -425,6 +426,7 @@
<xsd:element name="iframe" type="iframe" />
<xsd:element name="rgb" type="rgb" />
<xsd:element name="pagejump" type="pagejump" />
+ <xsd:element name="wgplugin_info" type="wgplugin_info"/>
</xsd:choice>
</xsd:group>
@@ -436,7 +438,7 @@
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
</xsd:choice>
<xsd:attribute ref="align" use="optional" />
- <xsd:attribute name="flavour" type="xsd:string" use="optional" />
+ <xsd:attribute ref="flavour" use="optional" />
</xsd:complexType>
<xsd:complexType name="designtoggle">
@@ -462,7 +464,7 @@
<xsd:attribute name="on_value" type="xsd:string" use="optional" />
<xsd:attribute name="off_value" type="xsd:string" use="optional" />
<xsd:attribute ref="align" use="optional" />
- <xsd:attribute name="flavour" type="xsd:string" use="optional" />
+ <xsd:attribute ref="flavour" use="optional" />
</xsd:complexType>
<xsd:complexType name="toogle">
@@ -474,7 +476,7 @@
<xsd:attribute ref="styling" use="optional" />
<xsd:attribute ref="mapping" use="optional" />
<xsd:attribute ref="align" use="optional" />
- <xsd:attribute name="flavour" type="xsd:string" use="optional" />
+ <xsd:attribute ref="flavour" use="optional" />
</xsd:complexType>
<xsd:complexType name="trigger">
@@ -487,7 +489,7 @@
<xsd:attribute ref="mapping" use="optional" />
<xsd:attribute ref="styling" use="optional" />
<xsd:attribute ref="align" use="optional" />
- <xsd:attribute name="flavour" type="xsd:string" use="optional" />
+ <xsd:attribute ref="flavour" use="optional" />
</xsd:complexType>
<xsd:complexType name="urltrigger">
@@ -501,7 +503,7 @@
<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:attribute name="flavour" type="xsd:string" use="optional" />
+ <xsd:attribute ref="flavour" use="optional" />
</xsd:complexType>
<xsd:complexType name="infotrigger">
@@ -522,7 +524,7 @@
<xsd:attribute ref="align" use="optional" />
<xsd:attribute ref="format" use="optional" />
<xsd:attribute name="infoposition" type="xsd:decimal" use="optional" />
- <xsd:attribute name="flavour" type="xsd:string" use="optional" />
+ <xsd:attribute ref="flavour" use="optional" />
</xsd:complexType>
<xsd:complexType name="rgb">
@@ -531,7 +533,7 @@
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
<xsd:element name="address" type="address" minOccurs="3" maxOccurs="unbounded" />
</xsd:choice>
- <xsd:attribute name="flavour" type="xsd:string" use="optional" />
+ <xsd:attribute ref="flavour" use="optional" />
</xsd:complexType>
<xsd:complexType name="multitrigger">
@@ -551,7 +553,7 @@
<xsd:attribute name="button3value" type="xsd:string" use="optional" />
<xsd:attribute name="button4label" type="xsd:string" use="optional" />
<xsd:attribute name="button4value" type="xsd:string" use="optional" />
- <xsd:attribute name="flavour" type="xsd:string" use="optional" />
+ <xsd:attribute ref="flavour" use="optional" />
</xsd:complexType>
<xsd:complexType name="slide">
@@ -566,7 +568,7 @@
<xsd:attribute ref="mapping" use="optional" />
<xsd:attribute ref="styling" use="optional" />
<xsd:attribute ref="format" use="optional" />
- <xsd:attribute name="flavour" type="xsd:string" use="optional" />
+ <xsd:attribute ref="flavour" use="optional" />
</xsd:complexType>
<xsd:complexType name="info">
@@ -579,9 +581,23 @@
<xsd:attribute ref="styling" use="optional" />
<xsd:attribute ref="mapping" use="optional" />
<xsd:attribute ref="align" use="optional" />
- <xsd:attribute name="flavour" type="xsd:string" use="optional" />
+ <xsd:attribute ref="flavour" use="optional" />
</xsd:complexType>
+ <xsd:complexType name="wgplugin_info">
+ <xsd:choice maxOccurs="unbounded" minOccurs="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>
+ <xsd:attribute name="variable" type="xsd:string" />
+ <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:attribute ref="flavour" use="optional" />
+ </xsd:complexType>
+
<xsd:complexType name="image">
<xsd:choice maxOccurs="unbounded" minOccurs="0">
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
@@ -591,7 +607,7 @@
<xsd:attribute name="width" type="dimension" />
<xsd:attribute name="height" type="dimension" />
<xsd:attribute name="refresh" type="xsd:decimal" />
- <xsd:attribute name="flavour" type="xsd:string" use="optional" />
+ <xsd:attribute ref="flavour" use="optional" />
</xsd:complexType>
<xsd:complexType name="imagetrigger">
@@ -608,7 +624,7 @@
<xsd:attribute name="refresh" type="xsd:decimal" />
<xsd:attribute ref="mapping" use="optional" />
<xsd:attribute name="sendValue" type="xsd:string" use="optional" />
- <xsd:attribute name="flavour" type="xsd:string" use="optional" />
+ <xsd:attribute ref="flavour" use="optional" />
</xsd:complexType>
<xsd:complexType name="video">
@@ -620,7 +636,7 @@
<xsd:attribute name="width" type="dimension" />
<xsd:attribute name="height" type="dimension" />
<xsd:attribute name="autoplay" type="xsd:string" />
- <xsd:attribute name="flavour" type="xsd:string" use="optional" />
+ <xsd:attribute ref="flavour" use="optional" />
</xsd:complexType>
<xsd:complexType name="iframe">
@@ -634,7 +650,7 @@
<xsd:attribute name="frameborder" type="xsd:string" />
<xsd:attribute name="background" type="xsd:string" />
<xsd:attribute name="refresh" type="xsd:decimal" />
- <xsd:attribute name="flavour" type="xsd:string" use="optional" />
+ <xsd:attribute ref="flavour" use="optional" />
</xsd:complexType>
<xsd:complexType name="pagejump">
@@ -645,7 +661,7 @@
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="target" type="xsd:string" />
<xsd:attribute ref="align" use="optional" />
- <xsd:attribute name="flavour" type="xsd:string" use="optional" />
+ <xsd:attribute ref="flavour" use="optional" />
</xsd:complexType>
<xsd:complexType name="colorchooser">
Modified: CometVisu/trunk/visu/visu_config_2d3d.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_2d3d.xml 2012-12-19 00:03:59 UTC (rev 1230)
+++ CometVisu/trunk/visu/visu_config_2d3d.xml 2012-12-19 00:42:55 UTC (rev 1231)
@@ -106,12 +106,12 @@
<trigger value="0">
<layout x="0px" y="150px" width="600px" />
<label>Underground</label>
- <address transform="DPT:5.004" readonly="false" type="">12/7/51</address>
+ <address transform="DPT:5.004" type="">12/7/51</address>
</trigger>
<trigger value="1">
<layout x="0px" y="100px" width="600px" />
<label>Ground</label>
- <address transform="DPT:5.004" readonly="false" type="">12/7/51</address>
+ <address transform="DPT:5.004" type="">12/7/51</address>
</trigger>
</page>
<line/>
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2012-12-19 00:03:59 UTC (rev 1230)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2012-12-19 00:42:55 UTC (rev 1231)
@@ -114,9 +114,6 @@
<entry value="17">olive</entry>
</styling>
</stylings>
- <topbar_datetime>
- <strftime lang="de" format="%A, %d. %b %H:%M"></strftime>
- </topbar_datetime>
<statusbar>
<status type="html"><![CDATA[
<img src="icon/comet_64_ff8000.png" alt="CometVisu" /> by <a href="http://www.cometvisu.org/">CometVisu.org</a>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-12-25 23:52:46
|
Revision: 1249
http://openautomation.svn.sourceforge.net/openautomation/?rev=1249&view=rev
Author: mayerch
Date: 2012-12-25 23:52:36 +0000 (Tue, 25 Dec 2012)
Log Message:
-----------
Extended icon handling:
* they might take an option "color" which can be helpful to organize monochrome icons
* they might take an option "styling" to set an individual CSS styling for an icon
* they might take an option "dynamic" which will be used later on...
Note: options aren't updated in the XSD yet...
Modified Paths:
--------------
CometVisu/trunk/visu/icon/knx-uf-iconset/make-iconhandler.php
CometVisu/trunk/visu/lib/iconhandler.js
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/icon/knx-uf-iconset/make-iconhandler.php
===================================================================
--- CometVisu/trunk/visu/icon/knx-uf-iconset/make-iconhandler.php 2012-12-25 22:37:35 UTC (rev 1248)
+++ CometVisu/trunk/visu/icon/knx-uf-iconset/make-iconhandler.php 2012-12-25 23:52:36 UTC (rev 1249)
@@ -51,14 +51,14 @@
$outtxt = "";
foreach ($icons as $i) {
$name = preg_replace("/\.png$/", "", $i);
- $outtxt .= sprintf("%-30s", "'". $name ."' : ") ." { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',\n";
+ $outtxt .= sprintf("%-30s", "'". $name ."' : ") ." { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',\n";
$firstline = true;
foreach ($colors as $c) {
if (! $firstline) { $outtxt .= ",\n"; } else { $firstline = false; }
$color = $c;
$outtxt .= sprintf("%36s", "'". $color ."'") . " : { 'uri': 'icon/knx-uf-iconset/128x128_". $c ."/". $i ."' }";
}
- $outtxt .= " } },\n";
+ $outtxt .= " } } },\n";
}
$outtxt = preg_replace("/,\n$/", "", $outtxt);
Modified: CometVisu/trunk/visu/lib/iconhandler.js
===================================================================
--- CometVisu/trunk/visu/lib/iconhandler.js 2012-12-25 22:37:35 UTC (rev 1248)
+++ CometVisu/trunk/visu/lib/iconhandler.js 2012-12-25 23:52:36 UTC (rev 1249)
@@ -51,1798 +51,1749 @@
*/
var db = {
'CometVisu' : { '*' : '128',
- '16' : { '*' : 'sodium',
+ '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',
+ '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',
+ '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',
+ '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'} } },
+ 'sodium' : { 'uri': 'icon/comet_128_ff8000.png'} } } },
// Do not remove this line: Dynamic Icons Start
-'Background-2D-black' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
+'Background-2D-black' : { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/Background-2D-black.png' },
'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/Background-2D-black.png' },
'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/Background-2D-black.png' },
'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/Background-2D-black.png' },
'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/Background-2D-black.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/Background-2D-black.png' } } },
-'Background-2D-white' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/Background-2D-black.png' } } } },
+'Background-2D-white' : { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/Background-2D-white.png' },
'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/Background-2D-white.png' },
'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/Background-2D-white.png' },
'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/Background-2D-white.png' },
'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/Background-2D-white.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/Background-2D-white.png' } } },
-'Background-3D' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/Background-2D-white.png' } } } },
+'Background-3D' : { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/Background-3D.png' },
'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/Background-3D.png' },
'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/Background-3D.png' },
'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/Background-3D.png' },
'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/Background-3D.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/Background-3D.png' } } },
-'Background-MetalBrush' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/Background-3D.png' } } } },
+'Background-MetalBrush' : { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/Background-MetalBrush.png' },
'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/Background-MetalBrush.png' },
'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/Background-MetalBrush.png' },
'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/Background-MetalBrush.png' },
'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/Background-MetalBrush.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/Background-MetalBrush.png' } } },
-'audio_audio' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/Background-MetalBrush.png' } } } },
+'audio_audio' : { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/audio_audio.png' },
'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/audio_audio.png' },
'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/audio_audio.png' },
'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/audio_audio.png' },
'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/audio_audio.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_audio.png' } } },
-'audio_eject' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_audio.png' } } } },
+'audio_eject' : { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/audio_eject.png' },
'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/audio_eject.png' },
'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/audio_eject.png' },
'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/audio_eject.png' },
'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/audio_eject.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_eject.png' } } },
-'audio_ff' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_eject.png' } } } },
+'audio_ff' : { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/audio_ff.png' },
'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/audio_ff.png' },
'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/audio_ff.png' },
'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/audio_ff.png' },
'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/audio_ff.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_ff.png' } } },
-'audio_kopfhoerer' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_ff.png' } } } },
+'audio_kopfhoerer' : { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/audio_kopfhoerer.png' },
'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/audio_kopfhoerer.png' },
'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/audio_kopfhoerer.png' },
'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/audio_kopfhoerer.png' },
'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/audio_kopfhoerer.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_kopfhoerer.png' } } },
-'audio_mute' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_kopfhoerer.png' } } } },
+'audio_mute' : { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/audio_mute.png' },
'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/audio_mute.png' },
'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/audio_mute.png' },
'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/audio_mute.png' },
'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/audio_mute.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_mute.png' } } },
-'audio_pause' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_mute.png' } } } },
+'audio_pause' : { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/audio_pause.png' },
'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/audio_pause.png' },
'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/audio_pause.png' },
'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/audio_pause.png' },
'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/audio_pause.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_pause.png' } } },
-'audio_play' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_pause.png' } } } },
+'audio_play' : { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/audio_play.png' },
'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/audio_play.png' },
'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/audio_play.png' },
'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/audio_play.png' },
'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/audio_play.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_play.png' } } },
-'audio_playliste' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_play.png' } } } },
+'audio_playliste' : { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/audio_playliste.png' },
'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/audio_playliste.png' },
'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/audio_playliste.png' },
'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/audio_playliste.png' },
'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/audio_playliste.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_playliste.png' } } },
-'audio_rec' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_playliste.png' } } } },
+'audio_rec' : { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/audio_rec.png' },
'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/audio_rec.png' },
'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/audio_rec.png' },
'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/audio_rec.png' },
'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/audio_rec.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_rec.png' } } },
-'audio_rew' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_rec.png' } } } },
+'audio_rew' : { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/audio_rew.png' },
'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/audio_rew.png' },
'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/audio_rew.png' },
'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/audio_rew.png' },
'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/audio_rew.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_rew.png' } } },
-'audio_sound' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_rew.png' } } } },
+'audio_sound' : { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/audio_sound.png' },
'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/audio_sound.png' },
'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/audio_sound.png' },
'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/audio_sound.png' },
'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/audio_sound.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_sound.png' } } },
-'audio_stop' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_sound.png' } } } },
+'audio_stop' : { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/audio_stop.png' },
'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/audio_stop.png' },
'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/audio_stop.png' },
'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/audio_stop.png' },
'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/audio_stop.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_stop.png' } } },
-'fts_fenster' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/audio_stop.png' } } } },
+'fts_fenster' : { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/fts_fenster.png' },
'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/fts_fenster.png' },
'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/fts_fenster.png' },
'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/fts_fenster.png' },
'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/fts_fenster.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/fts_fenster.png' } } },
-'fts_fenster_1f' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
- 'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/fts_fenster_1f.png' },
- 'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/fts_fenster_1f.png' },
- 'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/fts_fenster_1f.png' },
- 'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/fts_fenster_1f.png' },
- 'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/fts_fenster_1f.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/fts_fenster_1f.png' } } },
-'fts_fenster_1f_gekippt' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
- 'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/fts_fenster_1f_gekippt.png' },
- 'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/fts_fenster_1f_gekippt.png' },
- 'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/fts_fenster_1f_gekippt.png' },
- 'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/fts_fenster_1f_gekippt.png' },
- 'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/fts_fenster_1f_gekippt.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/fts_fenster_1f_gekippt.png' } } },
-'fts_fenster_1f_offen' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
- 'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/fts_fenster_1f_offen.png' },
- 'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/fts_fenster_1f_offen.png' },
- 'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/fts_fenster_1f_offen.png' },
- 'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/fts_fenster_1f_offen.png' },
- 'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/fts_fenster_1f_offen.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/fts_fenster_1f_offen.png' } } },
-'fts_fenster_2f' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
- 'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/fts_fenster_2f.png' },
- 'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/fts_fenster_2f.png' },
- 'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/fts_fenster_2f.png' },
- 'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/fts_fenster_2f.png' },
- 'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/fts_fenster_2f.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/fts_fenster_2f.png' } } },
-'fts_fenster_2f_gekippt' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
- 'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/fts_fenster_2f_gekippt.png' },
- 'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/fts_fenster_2f_gekippt.png' },
- 'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/fts_fenster_2f_gekippt.png' },
- 'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/fts_fenster_2f_gekippt.png' },
- 'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/fts_fenster_2f_gekippt.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/fts_fenster_2f_gekippt.png' } } },
-'fts_fenster_2f_offen' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
- 'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/fts_fenster_2f_offen.png' },
- 'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/fts_fenster_2f_offen.png' },
- 'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/fts_fenster_2f_offen.png' },
- 'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/fts_fenster_2f_offen.png' },
- 'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/fts_fenster_2f_offen.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/fts_fenster_2f_offen.png' } } },
-'fts_fenster_gekippt' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/fts_fenster.png' } } } },
+'fts_fenster_gekippt' : { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/fts_fenster_gekippt.png' },
'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/fts_fenster_gekippt.png' },
'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/fts_fenster_gekippt.png' },
'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/fts_fenster_gekippt.png' },
'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/fts_fenster_gekippt.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/fts_fenster_gekippt.png' } } },
-'fts_fenster_offen' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/fts_fenster_gekippt.png' } } } },
+'fts_fenster_offen' : { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/fts_fenster_offen.png' },
'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/fts_fenster_offen.png' },
'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/fts_fenster_offen.png' },
'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/fts_fenster_offen.png' },
'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/fts_fenster_offen.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/fts_fenster_offen.png' } } },
-'fts_garage' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/fts_fenster_offen.png' } } } },
+'fts_garage' : { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/fts_garage.png' },
'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/fts_garage.png' },
'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/fts_garage.png' },
'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/fts_garage.png' },
'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/fts_garage.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/fts_garage.png' } } },
-'fts_garage_tor_10' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/fts_garage.png' } } } },
+'fts_garage_tor_10' : { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/fts_garage_tor_10.png' },
'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/fts_garage_tor_10.png' },
'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/fts_garage_tor_10.png' },
'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/fts_garage_tor_10.png' },
'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/fts_garage_tor_10.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/fts_garage_tor_10.png' } } },
-'fts_garage_tor_100' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/fts_garage_tor_10.png' } } } },
+'fts_garage_tor_100' : { '*': { '*' : { '*' : 'white', 'ws' : 'white', 'sodium' : 'orange',
'blue' : { 'uri': 'icon/knx-uf-iconset/128x128_blue/fts_garage_tor_100.png' },
'green' : { 'uri': 'icon/knx-uf-iconset/128x128_green/fts_garage_tor_100.png' },
'orange' : { 'uri': 'icon/knx-uf-iconset/128x128_orange/fts_garage_tor_100.png' },
'purple' : { 'uri': 'icon/knx-uf-iconset/128x128_purple/fts_garage_tor_100.png' },
'red' : { 'uri': 'icon/knx-uf-iconset/128x128_red/fts_garage_tor_100.png' },
- 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_white/fts_garage_tor_100.png' } } },
-'fts_garage_tor_20' : { '*': { '*' : 'white', 'ws' : 'white', 'sodium' : ...
[truncated message content] |
|
From: <ha...@us...> - 2013-01-03 22:58:52
|
Revision: 1296
http://openautomation.svn.sourceforge.net/openautomation/?rev=1296&view=rev
Author: hausl
Date: 2013-01-03 22:58:45 +0000 (Thu, 03 Jan 2013)
Log Message:
-----------
Schema: use base type xsd:anyURI, changed editor to recognize this type
Modified Paths:
--------------
CometVisu/trunk/visu/editor/lib/Schema.js
CometVisu/trunk/visu/visu_config.xsd
Modified: CometVisu/trunk/visu/editor/lib/Schema.js
===================================================================
--- CometVisu/trunk/visu/editor/lib/Schema.js 2013-01-03 22:05:11 UTC (rev 1295)
+++ CometVisu/trunk/visu/editor/lib/Schema.js 2013-01-03 22:58:45 UTC (rev 1296)
@@ -244,6 +244,7 @@
// xsd:-namespaces types, those are the originals
switch (_type.baseType) {
case 'xsd:string':
+ case 'xsd:anyURI':
if (!(typeof(value) == 'string')) {
// it's not a string, but it should be.
// pretty much any input a user gives us is string, so this is pretty much moot.
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2013-01-03 22:05:11 UTC (rev 1295)
+++ CometVisu/trunk/visu/visu_config.xsd 2013-01-03 22:58:45 UTC (rev 1296)
@@ -13,7 +13,7 @@
</xsd:simpleType>
<xsd:simpleType name="uri">
- <xsd:restriction base="xsd:string" />
+ <xsd:restriction base="xsd:anyURI" />
</xsd:simpleType>
<xsd:complexType name="layout">
@@ -294,7 +294,7 @@
<xsd:complexType name="icon-definition">
<xsd:attribute name="name" type="xsd:string" use="required" />
- <xsd:attribute name="uri" type="xsd:string" use="required" />
+ <xsd:attribute name="uri" type="uri" use="required" />
<xsd:attribute name="type" type="xsd:string" use="optional" />
<xsd:attribute ref="flavour" use="optional" />
<xsd:attribute name="color" type="xsd:string" use="optional" />
@@ -508,7 +508,7 @@
<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="url" type="uri" use="required" />
<xsd:attribute name="params" type="xsd:string" use="optional" />
<xsd:attribute ref="flavour" use="optional" />
</xsd:complexType>
@@ -623,7 +623,7 @@
<xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
<xsd:element name="address" type="address" minOccurs="1" />
</xsd:choice>
- <xsd:attribute name="src" type="xsd:string" />
+ <xsd:attribute name="src" type="uri" />
<xsd:attribute name="suffix" type="xsd:string" use="required" />
<xsd:attribute name="type" type="xsd:string" use="optional" />
<xsd:attribute name="width" type="dimension" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pe...@us...> - 2013-01-19 12:43:23
|
Revision: 1342
http://openautomation.svn.sourceforge.net/openautomation/?rev=1342&view=rev
Author: peuter
Date: 2013-01-19 12:43:11 +0000 (Sat, 19 Jan 2013)
Log Message:
-----------
* initial refactoring of the templateengine.js
Modified Paths:
--------------
CometVisu/trunk/visu/designs/metal/design_setup.js
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/plugins/clock/structure_plugin.js
CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
CometVisu/trunk/visu/plugins/svg/structure_plugin.js
CometVisu/trunk/visu/structure/pure/_common.js
CometVisu/trunk/visu/structure/pure/group.js
CometVisu/trunk/visu/structure/pure/image.js
CometVisu/trunk/visu/structure/pure/imagetrigger.js
CometVisu/trunk/visu/structure/pure/infotrigger.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/rgb.js
CometVisu/trunk/visu/structure/pure/slide.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/structure/pure/urltrigger.js
CometVisu/trunk/visu/structure/pure/web.js
Modified: CometVisu/trunk/visu/designs/metal/design_setup.js
===================================================================
--- CometVisu/trunk/visu/designs/metal/design_setup.js 2013-01-18 22:37:05 UTC (rev 1341)
+++ CometVisu/trunk/visu/designs/metal/design_setup.js 2013-01-19 12:43:11 UTC (rev 1342)
@@ -86,9 +86,9 @@
}
if (/(iphone|ipod|ipad)/i.test(navigator.userAgent.toLowerCase())) {
// disable scrolling
- main_scroll.getConf().speed=0;
+ templateEngine.main_scroll.getConf().speed=0;
$('body').css('padding-top','1em');
- handleResize(true);
+ templateEngine.handleResize(true);
}
$('#navbarLeft .navbar .widget .label,#navbarRight .navbar .widget .label').each(function(i) {
var label = $(this);
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2013-01-18 22:37:05 UTC (rev 1341)
+++ CometVisu/trunk/visu/lib/templateengine.js 2013-01-19 12:43:11 UTC (rev 1342)
@@ -17,1387 +17,1331 @@
* @module Templateengine
* @title CometVisu templateengine
*/
+var templateEngine = new TemplateEngine();
-var design = new VisuDesign_Custom();
-var icons = new icon();
+$(window).bind('resize', templateEngine.handleResize);
+$(window).unload(function() {
+ templateEngine.visu.stop();
+});
+$(document).ready(function() {
+ // get the data once the page was loaded
+ $.ajax({
+ url : 'visu_config'+ (templateEngine.configSuffix ? '_' + templateEngine.configSuffix : '') + '.xml',
+ cache : !templateEngine.forceReload,
+ success : templateEngine.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='
+ + templateEngine.configSuffix + '">Please check!</a>';
+ }
+ $('#loading').html(message);
+ },
+ dataType : 'xml'
+ });
+});
-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
- }
-};
+function TemplateEngine() {
+ var thisTemplateEngine = this;
+ this.design = new VisuDesign_Custom();
+ this.icons = new icon();
+ this.pagePartsHandler = new PagePartsHandler();
-var ga_list = [];
+ this.mappings = {}; // store the mappings
+ this.stylings = {}; // store the stylings
+
+ this.ga_list = [];
-var main_scroll;
-var old_scroll = '';
+ this.main_scroll;
+ this.old_scroll = '';
+ this.visu;
-var scrollSpeed;
+ this.scrollSpeed;
-var resizeAfterScroll = false;
-var defaultColumns = 12;
-var minColumnWidth = 150;
-var enableColumnAdjustment = false;
-var backend = 'cgi-bin'; // default path to backend
-if ($.getUrlVar("backend")) {
- backend = $.getUrlVar("backend");
-}
+ this.resizeAfterScroll = false;
+ this.defaultColumns = 12;
+ this.minColumnWidth = 150;
+ this.enableColumnAdjustment = false;
+ this.backend = 'cgi-bin'; // default path to backend
+ if ($.getUrlVar("backend")) {
+ this.backend = $.getUrlVar("backend");
+ }
-function initBackendClient() {
- backend = '/' + backend + '/';
- visu = new CometVisu( backend );
- visu.update = function(json) { // overload the handler
- for (key in json) {
- $.event.trigger('_' + key, json[key]);
- }
+ this.initBackendClient = function() {
+ var backend = '/' + thisTemplateEngine.backend + '/';
+ thisTemplateEngine.visu = new CometVisu(backend);
+ thisTemplateEngine.visu.update = function(json) { // overload the handler
+ for (key in json) {
+ $.event.trigger('_' + key, json[key]);
+ }
+ };
+ thisTemplateEngine.visu.user = 'demo_user'; // example for setting a user
};
- visu.user = 'demo_user'; // example for setting a user
-}
-var configSuffix;
-if ($.getUrlVar("config")) {
- configSuffix = $.getUrlVar("config");
-}
+ this.configSuffix;
+ if ($.getUrlVar("config")) {
+ this.configSuffix = $.getUrlVar("config");
+ }
-var clientDesign = "";
+ this.clientDesign = "";
-if (typeof forceReload == "undefined") {
- var forceReload = false;
-}
+ if (typeof forceReload == "undefined") {
+ this.forceReload = false;
+ }
-if ($.getUrlVar('forceReload')) {
- forceReload = $.getUrlVar('forceReload') != 'false'; // true unless set to
- // false
-}
+ if ($.getUrlVar('forceReload')) {
+ this.forceReload = $.getUrlVar('forceReload') != 'false'; // true unless set
+ // to
+ // false
+ }
-// "Bug"-Fix for ID: 3204682 "Caching on web server"
-// This isn't a real fix for the problem as that's part of the web browser, but
-// it helps to avoid the problems on the client, e.g. when the config file
-// has changed but the browser doesn't even ask the server about it...
-forceReload = true;
+ // "Bug"-Fix for ID: 3204682 "Caching on web server"
+ // This isn't a real fix for the problem as that's part of the web browser,
+ // but
+ // it helps to avoid the problems on the client, e.g. when the config file
+ // has changed but the browser doesn't even ask the server about it...
+ this.forceReload = true;
-// Disable features that aren't ready yet
-// This can be overwritten in the URL with the parameter "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 = Maturity[url_maturity]; // or as the ENUM name
+ // Disable features that aren't ready yet
+ // This can be overwritten in the URL with the parameter "maturity"
+ this.use_maturity;
+ if ($.getUrlVar('maturity')) {
+ this.url_maturity = $.getUrlVar('maturity');
+ if (!isNaN(this.url_maturity - 0)) {
+ this.use_maturity = this.url_maturity - 0; // given directly as number
+ } else {
+ this.use_maturity = Maturity[this.url_maturity]; // or as the ENUM name
+ }
}
-}
-if (isNaN(use_maturity)) {
- use_maturity = Maturity.release; // default to release
-}
+ if (isNaN(this.use_maturity)) {
+ this.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'
- });
- });
+ this.transformEncode = function(transformation, value) {
+ var basetrans = transformation.split('.')[0];
+ return transformation in Transform ? Transform[transformation]
+ .encode(value) : (basetrans in Transform ? Transform[basetrans]
+ .encode(value) : value);
+ };
-$(window).unload(function() {
- visu.stop();
-});
+ this.transformDecode = function(transformation, value) {
+ var basetrans = transformation.split('.')[0];
+ return transformation in Transform ? Transform[transformation]
+ .decode(value) : (basetrans in Transform ? Transform[basetrans]
+ .decode(value) : 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);
-}
+ this.map = function(value, this_map) {
+ if (this_map && thisTemplateEngine.mappings[this_map]) {
+ var m = thisTemplateEngine.mappings[this_map];
-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);
-}
+ if (m.formula) {
+ return m.formula(value);
+ } else if (m[value]) {
+ return m[value];
+ } else if (m['range']) {
+ var valueFloat = parseFloat(value);
-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]) {
- return m[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
- return range[min][1];
+ var range = m['range'];
+ for ( var min in range) {
+ if (min > valueFloat)
+ continue;
+ if (range[min][0] < valueFloat)
+ continue; // check max
+ return range[min][1];
+ }
}
}
- }
- return value;
-}
+ return value;
+ };
-function adjustColumns() {
- if (enableColumnAdjustment == false)
- return false;
+ this.adjustColumns = function() {
+ if (thisTemplateEngine.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 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 $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;
+ var $main = $('#main');
+ var newColumns = $main.data('columns');
+ newColumns = (Math.ceil(width / thisTemplateEngine.minColumnWidth) % 2) > 0 ? Math.ceil(width
+ / thisTemplateEngine.minColumnWidth) + 1 : Math.ceil(width / thisTemplateEngine.minColumnWidth);
+ newColumns = Math.min(thisTemplateEngine.defaultColumns, newColumns);
+ if (newColumns > thisTemplateEngine.defaultColumns / 2 && thisTemplateEngine.defaultColumns > newColumns)
+ newColumns = thisTemplateEngine.defaultColumns;
- if (newColumns != $main.data('columns')) {
- $main.data({
- 'columns' : newColumns
- });
- return true;
- } 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
- */
-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 $main = $('#main');
-// if (/(android|blackberry|iphone|ipod|series60|symbian|windows ce|palm)/i
-// .test(uagent)) {
- var mobileDevice = (/(android|blackberry|iphone|ipod|series60|symbian|windows ce|palm)/i.test(uagent));
- if (/(nexus 7|tablet)/i.test(uagent)) mobileDevice = false; // Nexus 7 and Android Tablets have a "big" screen, so prevent Navbar from scrolling
- if (mobileDevice) {
- $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;
- }
- 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;}');
- }
- if (skipScrollFix === undefined) {
- if (adjustColumns()) {
- 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 (newColumns != $main.data('columns')) {
+ $main.data({
+ 'columns' : newColumns
});
- // 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');
+ return true;
+ } 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
+ */
+ this.handleResize = function(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 $main = $('#main');
+ // if (/(android|blackberry|iphone|ipod|series60|symbian|windows ce|palm)/i.test(uagent)) {
+ var mobileDevice = (/(android|blackberry|iphone|ipod|series60|symbian|windows ce|palm)/i.test(uagent));
+ if (/(nexus 7|tablet)/i.test(uagent)) mobileDevice = false; // Nexus 7 and Android Tablets have a "big" screen, so prevent Navbar from scrolling
+ if (mobileDevice) {
+ $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;
+ }
+ 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;}');
+ if (skipScrollFix === undefined) {
+ if (thisTemplateEngine.adjustColumns()) {
+ 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') || thisTemplateEngine.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') || thisTemplateEngine.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);
+ };
+
-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();
+ this.rowspanClass = function(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 singleHeight = $('#containerDiv').outerHeight(false);
+ var singleHeightMargin = $('#containerDiv').outerHeight(true);
- $('#calcrowspan').remove();
+ $('#calcrowspan').remove();
- // append css style
- $('head').append(
- '<style id="' + styleId + '">.rowspan.rowspan' + rowspan
- + ' { height: '
- + ((rowspan - 1) * singleHeightMargin + singleHeight)
- + 'px;} </style>').data(className, 1);
- }
- return className;
-}
+ // append css style
+ $('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
- });
+ this.parseXML = function(xml) {
+ // erst mal den Cache für AJAX-Requests wieder aktivieren
+ $.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
- */
+ /*
+ * 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");
+ // read predefined design in config
+ predefinedDesign = $('pages', xml).attr("design");
- if ($('pages', xml).attr("backend")) {
- backend = $('pages', xml).attr("backend");
- }
- initBackendClient();
+ if ($('pages', xml).attr("backend")) {
+ backend = $('pages', xml).attr("backend");
+ }
+ thisTemplateEngine.initBackendClient();
- 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())) {
- enableColumnAdjustment = true;
- }
- 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');
- }
+ thisTemplateEngine.scrollSpeed = $('pages', xml).attr("scroll_speed");
+ if ($('pages', xml).attr('enable_column_adjustment') == "true") {
+ thisTemplateEngine.enableColumnAdjustment = true;
+ } else if (/(android|blackberry|iphone|ipod|series60|symbian|windows ce|palm)/i
+ .test(navigator.userAgent.toLowerCase())) {
+ thisTemplateEngine.enableColumnAdjustment = true;
+ }
+ if ($('pages', xml).attr('default_columns')) {
+ thisTemplateEngine.defaultColumns = $('pages', xml).attr('default_columns');
+ }
+ if ($('pages', xml).attr('min_column_width')) {
+ thisTemplateEngine.minColumnWidth = $('pages', xml).attr('min_column_width');
+ }
- // design by url
- if ($.getUrlVar("design")) {
- clientDesign = $.getUrlVar("design");
- }
- // design by config file
- else if (predefinedDesign) {
- clientDesign = predefinedDesign;
- }
- // selection dialog
- else {
- selectDesign();
- }
- var maxMobileScreenWidth = $('pages', xml).attr('max_mobile_screen_width') || 480;
+ // design by url
+ if ($.getUrlVar("design")) {
+ thisTemplateEngine.clientDesign = $.getUrlVar("design");
+ }
+ // design by config file
+ else if (predefinedDesign) {
+ thisTemplateEngine.clientDesign = predefinedDesign;
+ }
+ // selection dialog
+ else {
+ thisTemplateEngine.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" />');
+ $('head')
+ .append(
+ '<link rel="stylesheet" type="text/css" href="designs/designglobals.css" />');
+ $('head').append(
+ '<link rel="stylesheet" type="text/css" href="designs/' + thisTemplateEngine.clientDesign
+ + '/basic.css" />');
+ $('head').append(
+ '<link rel="stylesheet" type="text/css" href="designs/' + thisTemplateEngine.clientDesign
+ + '/mobile.css" media="only screen and (max-device-width: '
+ + maxMobileScreenWidth + 'px)" />');
+ $('head').append(
+ '<link rel="stylesheet" type="text/css" href="designs/' + thisTemplateEngine.clientDesign
+ + '/custom.css" />');
+ $('head').append(
+ '<script src="designs/' + thisTemplateEngine.clientDesign
+ + '/design_setup.js" type="text/javascript" />');
- // start with the plugins
- var pluginsToLoad = 0;
- $('meta > plugins plugin', xml).each(function(i) {
- pluginsToLoad += 1;
- var name = 'plugins/' + $(this).attr('name') + '/structure_plugin.js';
- 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);
- html_doc.appendChild(js);
+ // start with the plugins
+ var pluginsToLoad = 0;
+ $('meta > plugins plugin', xml).each(function(i) {
+ pluginsToLoad += 1;
+ var name = 'plugins/' + $(this).attr('name') + '/structure_plugin.js';
+ if (thisTemplateEngine.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);
+ html_doc.appendChild(js);
- js.onreadystatechange = function() {
- if (js.readyState == 'complete') {
+ js.onreadystatechange = function() {
+ if (js.readyState == 'complete') {
+ pluginsToLoad -= 1;
+ if (pluginsToLoad <= 0) {
+ thisTemplateEngine.setup_page(xml);
+ }
+ }
+ };
+
+ js.onload = function() {
pluginsToLoad -= 1;
if (pluginsToLoad <= 0) {
- setup_page(xml);
+ thisTemplateEngine.setup_page(xml);
}
- }
- };
+ };
+ });
- js.onload = function() {
- pluginsToLoad -= 1;
- if (pluginsToLoad <= 0) {
- setup_page(xml);
- }
- };
- });
-
- // then the icons
- $('meta > icons icon-definition', xml).each(
- function(i) {
- var $this = $(this);
- var name = $this.attr('name');
- var uri = $this.attr('uri');
- var type = $this.attr('type');
+ // then the icons
+ $('meta > icons icon-definition', xml).each(function(i) {
+ var $this = $(this);
+ var name = $this.attr('name');
+ var uri = $this.attr('uri');
+ var type = $this.attr('type');
var flavour = $this.attr('flavour');
- var color = $this.attr('color');
+ var color = $this.attr('color');
var styling = $this.attr('styling');
var dynamic = $this.attr('dynamic');
- icons.insert(name, uri, type, flavour, color, styling, dynamic);
+ thisTemplateEngine.icons.insert(name, uri, type, flavour, color, styling, dynamic);
});
+
+ // then the mappings
+ $('meta > mappings mapping', xml).each(function(i) {
+ var $this = $(this);
+ var name = $this.attr('name');
+ thisTemplateEngine.mappings[name] = {};
+ var formula = $this.find('formula');
+ if (formula.length > 0) {
+ eval('var func = function(x){' + formula.text() + '; return y;}');
+ thisTemplateEngine.mappings[name]['formula'] = func;
+ } else {
+ $this.find('entry').each(function() {
+ var $localThis = $(this);
+ var origin = $localThis.contents();
+ var value = [];
+ for ( var i = 0; i < origin.length; i++) {
+ var $v = $(origin[i]);
+ if ...
[truncated message content] |
|
From: <pe...@us...> - 2013-01-19 13:53:24
|
Revision: 1345
http://openautomation.svn.sourceforge.net/openautomation/?rev=1345&view=rev
Author: peuter
Date: 2013-01-19 13:53:17 +0000 (Sat, 19 Jan 2013)
Log Message:
-----------
some more fixes for templateengine-method calls
Modified Paths:
--------------
CometVisu/trunk/visu/plugins/clock/structure_plugin.js
CometVisu/trunk/visu/structure/pure/imagetrigger.js
CometVisu/trunk/visu/structure/pure/infotrigger.js
CometVisu/trunk/visu/structure/pure/multitrigger.js
CometVisu/trunk/visu/structure/pure/page.js
CometVisu/trunk/visu/structure/pure/slide.js
CometVisu/trunk/visu/structure/pure/switch.js
CometVisu/trunk/visu/structure/pure/toggle.js
CometVisu/trunk/visu/structure/pure/trigger.js
Modified: CometVisu/trunk/visu/plugins/clock/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/clock/structure_plugin.js 2013-01-19 13:22:55 UTC (rev 1344)
+++ CometVisu/trunk/visu/plugins/clock/structure_plugin.js 2013-01-19 13:53:17 UTC (rev 1345)
@@ -121,7 +121,7 @@
for( var addr in data.address )
{
if( data.address[addr][1] == true ) continue; // skip read only
- visu.write( addr.substr(1), transformEncode( data.address[addr][0], data.value ) );
+ templateEngine.visu.write( addr.substr(1), templateEngine.transformEncode( data.address[addr][0], data.value ) );
}
}
});
\ No newline at end of file
Modified: CometVisu/trunk/visu/structure/pure/imagetrigger.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/imagetrigger.js 2013-01-19 13:22:55 UTC (rev 1344)
+++ CometVisu/trunk/visu/structure/pure/imagetrigger.js 2013-01-19 13:53:17 UTC (rev 1345)
@@ -84,7 +84,7 @@
continue; // skip when write flag not set
if( data.sendValue == "" )
continue; // skip empty
- templateEngine.visu.write( addr.substr(1), transformEncode( data.address[addr][0], sendValue ) );
+ templateEngine.visu.write( addr.substr(1), templateEngine.transformEncode( data.address[addr][0], sendValue ) );
}
}
});
\ No newline at end of file
Modified: CometVisu/trunk/visu/structure/pure/infotrigger.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/infotrigger.js 2013-01-19 13:22:55 UTC (rev 1344)
+++ CometVisu/trunk/visu/structure/pure/infotrigger.js 2013-01-19 13:53:17 UTC (rev 1345)
@@ -138,7 +138,7 @@
{
if( !(data.address[addr][1] & 2) ) continue; // skip when write flag not set
if( data.address[addr][2] != relative ) continue; // skip when address mode doesn't fit action mode
- templateEngine.visu.write( addr.substr(1), transformEncode( data.address[addr][0], value ) );
+ templateEngine.visu.write( addr.substr(1), templateEngine.transformEncode( data.address[addr][0], value ) );
}
}
});
\ No newline at end of file
Modified: CometVisu/trunk/visu/structure/pure/multitrigger.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/multitrigger.js 2013-01-19 13:22:55 UTC (rev 1344)
+++ CometVisu/trunk/visu/structure/pure/multitrigger.js 2013-01-19 13:53:17 UTC (rev 1345)
@@ -134,7 +134,7 @@
for( var addr in data.address )
{
if( !(data.address[addr][1] & 2) ) continue; // skip when write flag not set
- templateEngine.visu.write( addr.substr(1), transformEncode( data.address[addr][0], data.value ) );
+ templateEngine.visu.write( addr.substr(1), templateEngine.transformEncode( data.address[addr][0], data.value ) );
}
}
});
\ No newline at end of file
Modified: CometVisu/trunk/visu/structure/pure/page.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/page.js 2013-01-19 13:22:55 UTC (rev 1344)
+++ CometVisu/trunk/visu/structure/pure/page.js 2013-01-19 13:53:17 UTC (rev 1345)
@@ -142,7 +142,7 @@
default:
if (data==01) {
templateEngine.scrollToPage(this.attributes.path.nodeValue);
- templateEngine.visu.write(e.type.substr(1), transformEncode('DPT:1.001', 0));
+ templateEngine.visu.write(e.type.substr(1), templateEngine.transformEncode('DPT:1.001', 0));
}
}
}
Modified: CometVisu/trunk/visu/structure/pure/slide.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/slide.js 2013-01-19 13:22:55 UTC (rev 1344)
+++ CometVisu/trunk/visu/structure/pure/slide.js 2013-01-19 13:53:17 UTC (rev 1345)
@@ -115,8 +115,8 @@
for( var addr in data.address )
{
if( !(data.address[addr][1] & 2) ) continue; // skip when write flag not set
- var dv = transformEncode( data.address[addr][0], asv );
- if( dv != transformEncode( data.address[addr][0], data.value ) )
+ var dv = templateEngine.transformEncode( data.address[addr][0], asv );
+ if( dv != templateEngine.transformEncode( data.address[addr][0], data.value ) )
templateEngine.visu.write( addr.substr(1), dv );
}
data.value = actor.slider('value');
@@ -133,8 +133,8 @@
for( var addr in data.address )
{
if( !(data.address[addr][1] & 2) ) continue; // skip when write flag not set
- var uv = transformEncode( data.address[addr][0], ui.value );
- if( uv != transformEncode( data.address[addr][0], data.value ) )
+ var uv = templateEngine.transformEncode( data.address[addr][0], ui.value );
+ if( uv != templateEngine.transformEncode( data.address[addr][0], data.value ) )
templateEngine.visu.write( addr.substr(1), uv );
}
}
Modified: CometVisu/trunk/visu/structure/pure/switch.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/switch.js 2013-01-19 13:22:55 UTC (rev 1344)
+++ CometVisu/trunk/visu/structure/pure/switch.js 2013-01-19 13:53:17 UTC (rev 1345)
@@ -60,7 +60,7 @@
for( var addr in data.address )
{
if( !(data.address[addr][1] & 2) ) continue; // skip when write flag not set
- templateEngine.visu.write( addr.substr(1), transformEncode( data.address[addr][0], data.basicvalue == data.off_value ? data.on_value : data.off_value ) );
+ templateEngine.visu.write( addr.substr(1), templateEngine.transformEncode( data.address[addr][0], data.basicvalue == data.off_value ? data.on_value : data.off_value ) );
}
}
});
\ No newline at end of file
Modified: CometVisu/trunk/visu/structure/pure/toggle.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/toggle.js 2013-01-19 13:22:55 UTC (rev 1344)
+++ CometVisu/trunk/visu/structure/pure/toggle.js 2013-01-19 13:53:17 UTC (rev 1345)
@@ -65,7 +65,7 @@
for( var addr in data.address )
{
if( !(data.address[addr][1] & 2) ) continue; // skip when write flag not set
- templateEngine.visu.write( addr.substr(1), transformEncode( data.address[addr][0], sendValue ) );
+ templateEngine.visu.write( addr.substr(1), templateEngine.transformEncode( data.address[addr][0], sendValue ) );
}
}
});
Modified: CometVisu/trunk/visu/structure/pure/trigger.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/trigger.js 2013-01-19 13:22:55 UTC (rev 1344)
+++ CometVisu/trunk/visu/structure/pure/trigger.js 2013-01-19 13:53:17 UTC (rev 1345)
@@ -81,7 +81,7 @@
{
if( !(data.address[addr][1] & 2) ) continue; // skip when write flag not set
if( isShort == data.address[addr][2] )
- templateEngine.visu.write( addr.substr(1), transformEncode( data.address[addr][0], isShort ? data.shortValue : data.sendValue ) );
+ templateEngine.visu.write( addr.substr(1), templateEngine.transformEncode( data.address[addr][0], isShort ? data.shortValue : data.sendValue ) );
}
}
$this.removeClass('switchPressed').addClass('switchUnpressed').removeData( 'downtime' );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|