|
From: <ma...@us...> - 2011-12-11 19:27:40
|
Revision: 565
http://openautomation.svn.sourceforge.net/openautomation/?rev=565&view=rev
Author: mayerch
Date: 2011-12-11 19:27:33 +0000 (Sun, 11 Dec 2011)
Log Message:
-----------
Initial commit for 2D (and very little 3D) mode.
Think of it as a proof of concept - and not anything to build on. Anything of it might change in the (hopefully: near) future.
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/visu_config.xsd
Added Paths:
-----------
CometVisu/trunk/visu/media/
CometVisu/trunk/visu/media/demo_2d_backdrop_red_pot.png
CometVisu/trunk/visu/visu_config_2d3d.xml
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2011-12-10 10:03:11 UTC (rev 564)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-12-11 19:27:33 UTC (rev 565)
@@ -70,7 +70,8 @@
var pstyle = ( '0' != path ) ? 'display:none;' : ''; // subPage style
var name = $p.attr('name');
- var type = $p.attr('type'); //text, 2d or 3d
+ var type = $p.attr('type') || 'text'; //text, 2d or 3d
+ var backdrop = $p.attr('backdrop');
if( $p.attr('flavour') ) flavour = $p.attr('flavour');// sub design choice
var wstyle = ''; // widget style
if( $p.attr('align') ) wstyle += 'text-align:' + $p.attr('align') + ';';
@@ -87,13 +88,17 @@
}
var childs = $p.children();
- var container = $( '<div class="clearfix"/>' );
+ var container = $( '<div class="clearfix" />' );
var $container = $( '<div class="clearfix" path="'+path+'"/>');
for( var addr in address ) $container.bind( addr, this.update );
var container=$container;
container.append( '<h1>' + name + '</h1>' );
+ if( '2d' == type )
+ {
+ container.append( '<img src="' + backdrop + '" style="position: absolute; top: 0px; left: 0px;z-index:-1;"/>' );
+ }
$( childs ).each( function(i){
container.append( create_pages( childs[i], path + '_' + i, flavour ) );
} );
@@ -104,11 +109,13 @@
return ret_val;
},
attributes: {
- align: { type: 'string', required: false },
- flavour:{ type: 'string', required: false },
- name: { type: 'string', required: true },
- ga: { type: 'addr', required: false },
- visible:{ type: 'string', required: false }
+ align: { type: 'string', required: false },
+ flavour: { type: 'string', required: false },
+ name: { type: 'string', required: true },
+ ga: { type: 'addr', required: false },
+ visible: { type: 'string', required: false },
+ type: { type: 'string', required: false },
+ backdrop: { type: 'string', required: false }
},
elements: {
},
@@ -191,7 +198,9 @@
this.addCreator('info', {
create: function( page, path ) {
var $p = $(page);
- var ret_val = $('<div class="widget info" />');
+ var layout = $p.find('layout')[0];
+ var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
+ var ret_val = $('<div class="widget info" ' + style + ' />');
var labelElement = $p.find('label')[0];
var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
var address = {};
@@ -218,6 +227,7 @@
styling: { type: 'styling', required: false }
},
elements: {
+ layout: { type: 'layout', required: false, multi: false },
label: { type: 'string', required: true, multi: false },
address: { type: 'address', required: true, multi: true }
},
@@ -227,7 +237,9 @@
this.addCreator('slide', {
create: function( page, path ) {
var $p = $(page);
- var ret_val = $('<div class="widget slide" />');
+ var layout = $p.find('layout')[0];
+ var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
+ var ret_val = $('<div class="widget slide" ' + style + ' />');
var labelElement = $p.find('label')[0];
var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
var address = {};
@@ -330,6 +342,7 @@
styling: { type: 'styling', required: false }
},
elements: {
+ layout: { type: 'layout', required: false, multi: false },
label: { type: 'string', required: true, multi: false },
address: { type: 'address', required: true, multi: true }
},
@@ -1135,3 +1148,12 @@
return value;
}
+
+function extractLayout( layout )
+{
+ var ret_val = 'position:absolute;';
+ if( layout.getAttribute('x' ) ) ret_val += 'left:' + layout.getAttribute('x' ) + ';';
+ if( layout.getAttribute('y' ) ) ret_val += 'top:' + layout.getAttribute('y' ) + ';';
+ if( layout.getAttribute('width') ) ret_val += 'width:' + layout.getAttribute('width') + ';';
+ return ret_val;
+}
\ No newline at end of file
Added: CometVisu/trunk/visu/media/demo_2d_backdrop_red_pot.png
===================================================================
(Binary files differ)
Property changes on: CometVisu/trunk/visu/media/demo_2d_backdrop_red_pot.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2011-12-10 10:03:11 UTC (rev 564)
+++ CometVisu/trunk/visu/visu_config.xsd 2011-12-11 19:27:33 UTC (rev 565)
@@ -16,6 +16,12 @@
<xsd:restriction base="xsd:string" />
</xsd:simpleType>
+<xsd:complexType name="layout">
+ <xsd:attribute name="x" type="xsd:string" use="optional" />
+ <xsd:attribute name="y" type="xsd:string" use="optional" />
+ <xsd:attribute name="width" type="xsd:string" use="optional" />
+</xsd:complexType>
+
<xsd:complexType name="address">
<xsd:simpleContent>
<xsd:extension base="addr">
@@ -180,6 +186,16 @@
<xsd:attribute ref="align" use="optional" />
<xsd:attribute name="ga" type="addr" use="optional" />
<xsd:attribute name="visible" type="xsd:boolean" />
+ <xsd:attribute name="type" use="optional">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="text"/>
+ <xsd:enumeration value="2d"/>
+ <xsd:enumeration value="3d"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="backdrop" type="uri" use="optional" />
</xsd:complexType>
</xsd:element>
@@ -302,6 +318,7 @@
<xsd:choice maxOccurs="unbounded" minOccurs="1">
<xsd:element name="label" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="address" type="address" minOccurs="1" />
+ <xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
</xsd:choice>
<xsd:attribute ref="min" />
<xsd:attribute ref="max" />
@@ -314,6 +331,7 @@
<xsd:choice maxOccurs="unbounded" minOccurs="1">
<xsd:element name="label" type="xsd:string" maxOccurs="1" />
<xsd:element name="address" type="address" minOccurs="1"/>
+ <xsd:element name="layout" type="layout" minOccurs="0" maxOccurs="1" />
</xsd:choice>
<xsd:attribute ref="format" use="optional" />
<xsd:attribute ref="styling" use="optional" />
Added: CometVisu/trunk/visu/visu_config_2d3d.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_2d3d.xml (rev 0)
+++ CometVisu/trunk/visu/visu_config_2d3d.xml 2011-12-11 19:27:33 UTC (rev 565)
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" design="pure" xsi:noNamespaceSchemaLocation="visu_config.xsd">
+ <meta>
+ <plugins>
+ <plugin name="colorchooser"/>
+ <plugin name="diagram"/>
+ </plugins>
+ <mappings>
+ <mapping name="Open_Close">
+ <entry value="0">zu</entry>
+ <entry value="1">offen</entry>
+ </mapping>
+ <mapping name="Close_Open">
+ <entry value="0">offen</entry>
+ <entry value="1">zu</entry>
+ </mapping>
+ <mapping name="On_Off">
+ <entry value="0">Aus</entry>
+ <entry value="1">An</entry>
+ </mapping>
+ <mapping name="Off_On">
+ <entry value="0">An</entry>
+ <entry value="1">Aus</entry>
+ </mapping>
+ <mapping name="KonnexHVAC">
+ <entry value="auto">Auto</entry>
+ <entry value="comfort">Komfort</entry>
+ <entry value="standby">Stand By</entry>
+ <entry value="economy">Economy</entry>
+ <entry value="building_protection">Haus-Schutz</entry>
+ </mapping>
+ </mappings>
+ <stylings>
+ <styling name="Red_Green">
+ <entry value="0">red</entry>
+ <entry value="1">green</entry>
+ </styling>
+ <styling name="Green_Red">
+ <entry value="0">green</entry>
+ <entry value="1">red</entry>
+ </styling>
+ <styling name="Blue_Green_Red">
+ <entry range_min="-100" range_max="20">blue</entry>
+ <entry range_min="20" range_max="22">green</entry>
+ <entry range_min="22" range_max="100">red</entry>
+ </styling>
+ </stylings>
+ <statusbar>
+ <status type="html"><![CDATA[
+ <img src="icon/comet_64_ff8000.png" alt="CometVisu" /> by <a href="http://www.cometvisu.org/">CometVisu.org</a>
+ - <a href=".?forceReload=true">Reload</a>
+ - <a href="?config=demo">Widget Demo</a>
+ ]]></status>
+ <status type="html" condition="!edit" hrefextend="config"><![CDATA[
+ - <a href="edit_config.html">Edit</a>
+ ]]></status>
+ <status type="html" condition="edit" hrefextend="all"><![CDATA[
+ - <a href=".">normal Mode</a>
+ ]]></status>
+ <status type="html"><![CDATA[
+ - <a href="check_config.php">Check Config</a>
+ <div style="float:right;padding-right:0.5em">Version: SVN</div>
+ ]]></status>
+ </statusbar>
+ </meta>
+ <page name="Start" type="text">
+ <line/>
+ <text align="center">Welcome to the CometVisu!</text>
+ <break/>
+ <page name="2D Demo" type="2d" backdrop="media/demo_2d_backdrop_red_pot.png">
+ <slide>
+ <layout x="0px" y="470px" width="600px" />
+ <label>Level</label>
+ <address transform="DPT:5.001" type="">12/7/52</address>
+ </slide>
+ <info format="%.2f">
+ <layout x="350px" y="370px" />
+ <address transform="DPT:5.001" type="">12/7/52</address>
+ </info>
+ </page>
+ <page name="3D Demo" >
+ <text>not avialable at the moment...</text>
+ </page>
+ <line/>
+ </page>
+</pages>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-12-11 22:08:58
|
Revision: 566
http://openautomation.svn.sourceforge.net/openautomation/?rev=566&view=rev
Author: mayerch
Date: 2011-12-11 22:08:49 +0000 (Sun, 11 Dec 2011)
Log Message:
-----------
Change static 2D backdrop to dynamic one.
NOTE: this is a proof of concept. And even in the future such a dynamic 2D backdrop will only be available to experts...
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/lib/cometvisu-client.js
CometVisu/trunk/visu/visu_config_2d3d.xml
Added Paths:
-----------
CometVisu/trunk/visu/media/demo_2d_backdrop_red_pot.svg
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2011-12-11 19:27:33 UTC (rev 565)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-12-11 22:08:49 UTC (rev 566)
@@ -97,7 +97,7 @@
container.append( '<h1>' + name + '</h1>' );
if( '2d' == type )
{
- container.append( '<img src="' + backdrop + '" style="position: absolute; top: 0px; left: 0px;z-index:-1;"/>' );
+ container.append( '<embed src="' + backdrop + '" style="position: absolute; top: 0px; left: 0px;z-index:-1;"/>' );
}
$( childs ).each( function(i){
container.append( create_pages( childs[i], path + '_' + i, flavour ) );
Modified: CometVisu/trunk/visu/lib/cometvisu-client.js
===================================================================
--- CometVisu/trunk/visu/lib/cometvisu-client.js 2011-12-11 19:27:33 UTC (rev 565)
+++ CometVisu/trunk/visu/lib/cometvisu-client.js 2011-12-11 22:08:49 UTC (rev 566)
@@ -28,6 +28,7 @@
this.pass = ''; // the current password
this.device = ''; // the current device ID
this.running = false; // is the communication running at the moment?
+ this.doRestart = false; // are we currently in a reastart, e.g. due to the watchdog
this.xhr = false; // the ongoing AJAX request
this.watchdogTimer = 5; // in Seconds - the alive check intervall of the watchdog
this.maxConnectionAge = 60; // in Seconds - restart if last read is older
@@ -80,7 +81,7 @@
*/
this.handleError=function(xhr,str,excptObj)
{
- if( this.running && xhr.readyState != 4 ) // ignore error when connection is irrelevant
+ if( this.running && xhr.readyState != 4 && !this.doRestart) // ignore error when connection is irrelevant
{
var readyState = 'UNKNOWN';
switch( xhr.readyState )
@@ -165,7 +166,9 @@
*/
this.restart = function()
{
+ this.doRestart = true;
if( this.xhr.abort ) this.xhr.abort();
+ this.doRestart = false;
this.handleRead(); // restart
}
Added: CometVisu/trunk/visu/media/demo_2d_backdrop_red_pot.svg
===================================================================
--- CometVisu/trunk/visu/media/demo_2d_backdrop_red_pot.svg (rev 0)
+++ CometVisu/trunk/visu/media/demo_2d_backdrop_red_pot.svg 2011-12-11 22:08:49 UTC (rev 566)
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ version="1.1"
+ width="750"
+ height="500"
+ id="svg2">
+ <!--
+ <script xlink:href="../lib/jquery.js" type="text/javascript"></script>
+ -->
+ <script type="application/javascript"><![CDATA[
+/*! jQuery v1.6.4 http://jquery.com/ | http://jquery.org/license */
+(function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bZ(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bY(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bA.test(a)?d(a,e):bY(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bY(a+"["+e+"]",b[e],c,d);else d(a,b)}function bX(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bW(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bP,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bW(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bW(a,c,d,e,"*",g));return l}function bV(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bL),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function by(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bt:bu;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bv(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bg(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bf(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function V(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(Q.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function U(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function M(a,b){return(a&&a!=="*"?a+".":"")+b.replace(y,"`").replace(z,"&")}function L(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(w,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function J(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function D(){return!0}function C(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.4",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;B.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:H?function(a){return a==null?"":H.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?F.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(!b)return-1;if(I)return I.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=G.call(arguments,2),g=function(){return a.apply(c,f.concat(G.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){J["[object "+b+"]"]=b.toLowerCase()}),A=e.uaMatch(z),A.browser&&(e.browser[A.browser]=!0,e.browser.version=A.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?C=function(){c.removeEventListener("DOMContentLoaded",C,!1),e.ready()}:c.attachEvent&&(C=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",C),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g+"With"](this===b?d:this,[h])}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-1000px",top:"-1000px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i=f.expando,j=typeof c=="string",k=a.nodeType,l=k?f.cache:a,m=k?a[f.expando]:a[f.expando]&&f.expando;if((!m||e&&m&&l[m]&&!l[m][i])&&j&&d===b)return;m||(k?a[f.expando]=m=++f.uuid:m=f.expando),l[m]||(l[m]={},k||(l[m].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?l[m][i]=f.extend(l[m][i],c):l[m]=f.extend(l[m],c);g=l[m],e&&(g[i]||(g[i]={}),g=g[i]),d!==b&&(g[f.camelCase(c)]=d);if(c==="events"&&!g[c])return g[i]&&g[i].events;j?(h=g[c],h==null&&(h=g[f.camelCase(c)])):h=g;return h}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e=f.expando,g=a.nodeType,h=g?f.cache:a,i=g?a[f.expando]:f.expando;if(!h[i])return;if(b){d=c?h[i][e]:h[i];if(d){d[b]||(b=f.camelCase(b)),delete d[b];if(!l(d))return}}if(c){delete h[i][e];if(!l(h[i]))return}var j=h[i][e];f.support.deleteExpando||!h.setInterval?delete h[i]:h[i]=null,j?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=j):g&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u,v;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(o);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(o);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(n," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,...
[truncated message content] |
|
From: <net...@us...> - 2011-12-18 14:29:27
|
Revision: 590
http://openautomation.svn.sourceforge.net/openautomation/?rev=590&view=rev
Author: netzkind
Date: 2011-12-18 14:29:20 +0000 (Sun, 18 Dec 2011)
Log Message:
-----------
attribute "variant" for address is now a select-list on a per-widget-basis; will no longer be displayed when not available (declutter UI)
Modified Paths:
--------------
CometVisu/trunk/visu/edit/cometeditor.js
CometVisu/trunk/visu/edit/visuconfig_edit.js
CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js
Modified: CometVisu/trunk/visu/edit/cometeditor.js
===================================================================
--- CometVisu/trunk/visu/edit/cometeditor.js 2011-12-18 14:19:21 UTC (rev 589)
+++ CometVisu/trunk/visu/edit/cometeditor.js 2011-12-18 14:29:20 UTC (rev 590)
@@ -90,6 +90,11 @@
// we've got elements we need to addit :)
container.append(set = jQuery("<fieldset />").addClass("elements"));
jQuery.each(elements, function(index, e) {
+ // Fallback if no options are specified
+ if (typeof e.options == "undefined") {
+ e.options = {};
+ }
+
var $line = $("<div />").addClass("add_input")
.append($("<label />").attr("for", "add_" + index).html(index))
.append($("<div class=\"input\" />"));
@@ -113,14 +118,14 @@
objData._attributes.variant = "";
objData._attributes.readonly = false;
- var elementDiv = HTMLLayer.createAddressEditorElement(objData);
+ var elementDiv = HTMLLayer.createAddressEditorElement(objData, e.options);
$input.find("div.multi_element").append(elementDiv);
});
if (typeof values._elements != "undefined"
&& typeof values._elements[index] != "undefined") {
- $.each(values._elements[index], function(i, e) {
- var elementDiv = HTMLLayer.createAddressEditorElement(e);
+ $.each(values._elements[index], function(i, myE) {
+ var elementDiv = HTMLLayer.createAddressEditorElement(myE, e.options);
$input.find("div.multi_element").append(elementDiv);
});
}
@@ -628,7 +633,8 @@
/**
* Create a sub-element for the multi-editor to edit an address-entry.
*/
- Layer.createAddressEditorElement = function(elementData) {
+ Layer.createAddressEditorElement = function(elementData, options) {
+
var elementDiv = jQuery("<div class=\"element clearfix\" />");
elementDiv.append("<div class=\"title\" />")
.append("<div class=\"value editable\" />")
@@ -652,6 +658,13 @@
.data("readonly", elementData._attributes.readonly == "true" ? true : false)
.data("address", elementData.textContent);
+ if (typeof options == "undefined" || typeof options.variant == "undefined" || options.variant == false) {
+ // if this element does not support variants, then remove them from the HTML.
+ elementDiv.find("div.variant").remove();
+ }
+
+ elementDiv.data("options", options);
+
return elementDiv;
}
}
\ No newline at end of file
Modified: CometVisu/trunk/visu/edit/visuconfig_edit.js
===================================================================
--- CometVisu/trunk/visu/edit/visuconfig_edit.js 2011-12-18 14:19:21 UTC (rev 589)
+++ CometVisu/trunk/visu/edit/visuconfig_edit.js 2011-12-18 14:29:20 UTC (rev 590)
@@ -179,6 +179,7 @@
$this.addClass("inedit");
$edit = jQuery("<div class=\"clearfix edit\" />");
$this.append($edit);
+ var options = $this.data("options");
$this.find(".editable").hide().each(function(index, e) {
$e = jQuery(e);
@@ -267,14 +268,24 @@
}
}
- if ($e.hasClass("variant")) {
+ if ($e.hasClass("variant") && typeof options.variant != "undefined") {
+ // variants can be selected from a pre-defined list ONLY.
element.find("label").html("variant");
- myElement.append($("<input class=\"add_variant\" />"));
- if (typeof $e.text() != "undefined") {
- // pre-set the value
- myElement.find(":input").val($e.text());
- }
+
+ // variants can be selected from a pre-defined list ONLY.
+ var variantList = $("<select name=\"variant\" />");
+ // go through list of available variants and display as select-list
+ $.each(options.variant, function (i, element) {
+ if (typeof $e.text() != "undefined"
+ && $e.text() == element) {
+ variantList.append("<option value=\"" + element + "\" label=\"" + element + "\" selected>" + element + "</option>");
+ } else {
+ variantList.append("<option value=\"" + element + "\" label=\"" + element + "\">" + element + "</option>");
+ }
+ });
+
+ myElement.append(variantList);
}
if (element.find("select")[0]) {
@@ -308,8 +319,10 @@
objData._attributes.variant = $e.find(".add_variant").val();
objData._attributes.readonly = $e.find(".add_readonly:checked").val();
+ var options = $e.data("options");
+
// remove this item and insert a new one instead
- var elementDiv = HTMLLayer.createAddressEditorElement(objData);
+ var elementDiv = HTMLLayer.createAddressEditorElement(objData, options);
$this.closest(".element").replaceWith(elementDiv);
}))
Modified: CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js 2011-12-18 14:19:21 UTC (rev 589)
+++ CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js 2011-12-18 14:29:20 UTC (rev 590)
@@ -166,7 +166,7 @@
},
elements: {
label: { type: 'string', required: true, multi: false },
- address: { type: 'address', required: true, multi: true }
+ address: { type: 'address', required: true, multi: true, options: {variant: ['r', 'g', 'b']} }
},
content: false
});
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <net...@us...> - 2011-12-18 16:24:09
|
Revision: 594
http://openautomation.svn.sourceforge.net/openautomation/?rev=594&view=rev
Author: netzkind
Date: 2011-12-18 16:24:02 +0000 (Sun, 18 Dec 2011)
Log Message:
-----------
force the user to select a design on startup; includes a "preview" of the available designs;
changed order of JS-files as compatibility.js needs jquery now.
Modified Paths:
--------------
CometVisu/trunk/visu/designs/alaska/basic.css
CometVisu/trunk/visu/designs/alaska_slim/basic.css
CometVisu/trunk/visu/designs/discreet/basic.css
CometVisu/trunk/visu/designs/discreet_sand/basic.css
CometVisu/trunk/visu/designs/discreet_slim/basic.css
CometVisu/trunk/visu/designs/pure/basic.css
CometVisu/trunk/visu/edit_config.html
CometVisu/trunk/visu/index.html
CometVisu/trunk/visu/lib/compatibility.js
CometVisu/trunk/visu/lib/templateengine.js
Added Paths:
-----------
CometVisu/trunk/visu/designs/design_preview.html
CometVisu/trunk/visu/edit/get_designs.php
CometVisu/trunk/visu/media/arrow.png
Modified: CometVisu/trunk/visu/designs/alaska/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska/basic.css 2011-12-18 15:59:22 UTC (rev 593)
+++ CometVisu/trunk/visu/designs/alaska/basic.css 2011-12-18 16:24:02 UTC (rev 594)
@@ -384,3 +384,34 @@
width: 100%;
text-decoration: none;
}
+
+
+/* styles for the preview */
+div#demo_1, div#demo_2, div#demo_3 {
+ width: 100%;
+}
+
+div#demo_container {
+ position: relative;
+}
+
+div#demo_1 {
+ height: 90px;
+ background: #fff;
+ background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#ededed));
+ background: -moz-linear-gradient(top, #fff, #ededed);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#ededed');
+ z-index: 1;
+}
+
+div#demo_2 {
+ height: 2px;
+ position: absolute;
+ top: 44px;
+ z-index: 2;
+ background-color: #686868;
+}
+
+div#demo_3 {
+ display: none;
+}
\ No newline at end of file
Modified: CometVisu/trunk/visu/designs/alaska_slim/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska_slim/basic.css 2011-12-18 15:59:22 UTC (rev 593)
+++ CometVisu/trunk/visu/designs/alaska_slim/basic.css 2011-12-18 16:24:02 UTC (rev 594)
@@ -364,3 +364,33 @@
width: 100%;
text-decoration: none;
}
+
+/* styles for the preview */
+div#demo_1, div#demo_2, div#demo_3 {
+ width: 100%;
+}
+
+div#demo_container {
+ position: relative;
+}
+
+div#demo_1 {
+ height: 90px;
+ background: #fff;
+ background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#ededed));
+ background: -moz-linear-gradient(top, #fff, #ededed);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#ededed');
+ z-index: 1;
+}
+
+div#demo_2 {
+ height: 2px;
+ position: absolute;
+ top: 44px;
+ z-index: 2;
+ background-color: #686868;
+}
+
+div#demo_3 {
+ display: none;
+}
Added: CometVisu/trunk/visu/designs/design_preview.html
===================================================================
--- CometVisu/trunk/visu/designs/design_preview.html (rev 0)
+++ CometVisu/trunk/visu/designs/design_preview.html 2011-12-18 16:24:02 UTC (rev 594)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CometVisu Design-Preview</title>
+ <link rel="icon" href="../icon/comet_16x16_000000.png" type="image/png" />
+ <meta name="viewport" content="width=260, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, webkit-user-select: none" />
+ <meta name="apple-mobile-web-app-capable" content="yes" />
+ <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
+ <script src="../lib/jquery.js" type="text/javascript"></script>
+ <script src="../lib/compatibility.js" type="text/javascript"></script>
+ </head>
+ <body>
+ <div id="demo_container" style="width: 100%; height: 90px;">
+ <div id="demo_1"></div>
+ <div id="demo_2"></div>
+ <div id="demo_3"></div>
+ </div>
+
+ <script type="text/javascript">
+ var design = $.getUrlVar("design");
+ $( 'head' ).append( '<link rel="stylesheet" type="text/css" href="' + design + '/basic.css" />' );
+ $( 'head' ).append( '<link rel="stylesheet" type="text/css" href="' + design + '/mobile.css" media="only screen and (max-device-width: 480px)" />' );
+ </script>
+ </body>
+</html>
Modified: CometVisu/trunk/visu/designs/discreet/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet/basic.css 2011-12-18 15:59:22 UTC (rev 593)
+++ CometVisu/trunk/visu/designs/discreet/basic.css 2011-12-18 16:24:02 UTC (rev 594)
@@ -387,4 +387,23 @@
padding: 2px;
background-color: #fee;
opacity: 0.80;
-}
\ No newline at end of file
+}
+
+/* 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;
+}
Modified: CometVisu/trunk/visu/designs/discreet_sand/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet_sand/basic.css 2011-12-18 15:59:22 UTC (rev 593)
+++ CometVisu/trunk/visu/designs/discreet_sand/basic.css 2011-12-18 16:24:02 UTC (rev 594)
@@ -380,4 +380,22 @@
padding: 2px;
background-color: #fee;
opacity: 0.80;
-}
\ No newline at end of file
+}
+
+/* styles for the preview */
+div#demo_1, div#demo_2, div#demo_3 {
+ width: 100%;
+ height: 30px;
+}
+
+div#demo_1 {
+ background-color: #165d7e;
+}
+
+div#demo_2 {
+ background-color: #cfc8b5;
+}
+
+div#demo_3 {
+ background-color: #baaf98;
+}
Modified: CometVisu/trunk/visu/designs/discreet_slim/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet_slim/basic.css 2011-12-18 15:59:22 UTC (rev 593)
+++ CometVisu/trunk/visu/designs/discreet_slim/basic.css 2011-12-18 16:24:02 UTC (rev 594)
@@ -380,4 +380,24 @@
padding: 2px;
background-color: #fee;
opacity: 0.80;
-}
\ No newline at end of file
+}
+
+/* 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;
+}
+
Modified: CometVisu/trunk/visu/designs/pure/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/pure/basic.css 2011-12-18 15:59:22 UTC (rev 593)
+++ CometVisu/trunk/visu/designs/pure/basic.css 2011-12-18 16:24:02 UTC (rev 594)
@@ -466,3 +466,23 @@
border: #ff8000 1px solid;
}
+/* styles for the preview */
+div#demo_1, div#demo_2, div#demo_3 {
+ width: 100%;
+}
+
+div#demo_1 {
+ height: 30px;
+ background-color: black;
+}
+
+div#demo_2 {
+ height: 2px;
+ background-color: #ff8000;
+}
+
+div#demo_3 {
+ height: 58px;
+ background-color: black;
+}
+
Added: CometVisu/trunk/visu/edit/get_designs.php
===================================================================
--- CometVisu/trunk/visu/edit/get_designs.php (rev 0)
+++ CometVisu/trunk/visu/edit/get_designs.php 2011-12-18 16:24:02 UTC (rev 594)
@@ -0,0 +1,24 @@
+<?php
+define('FOLDER_DESIGNS', "../designs/");
+
+$arrDesigns = array();
+
+if (false !== ($handle = opendir(FOLDER_DESIGNS))) {
+ while (false !== ($strFile = readdir($handle))) {
+ if ($strFile == "." || $strFile == "..") {
+ continue;
+ }
+
+ if (true === is_dir(FOLDER_DESIGNS . $strFile) && true === file_exists(FOLDER_DESIGNS . $strFile . "/basic.css")) {
+ $arrDesigns[] = $strFile;
+ }
+ }
+}
+
+sort($arrDesigns);
+
+Header("Content-type: application/json");
+print json_encode($arrDesigns);
+exit;
+
+?>
Modified: CometVisu/trunk/visu/edit_config.html
===================================================================
--- CometVisu/trunk/visu/edit_config.html 2011-12-18 15:59:22 UTC (rev 593)
+++ CometVisu/trunk/visu/edit_config.html 2011-12-18 16:24:02 UTC (rev 594)
@@ -8,8 +8,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" type="text/css" href="edit/style_edit.css" />
<link rel="stylesheet" type="text/css" href="edit/jquery-ui.css" />
- <script src="lib/compatibility.js" type="text/javascript"></script>
<script src="lib/jquery.js" type="text/javascript"></script>
+ <script src="lib/compatibility.js" type="text/javascript"></script>
<script src="lib/jquery-ui.js" type="text/javascript"></script>
<script src="lib/scrollable.js" type="text/javascript"></script>
<script src="lib/cometvisu-client.js" type="text/javascript"></script>
@@ -43,7 +43,6 @@
<div id="bottom" class="loading">
<hr />
<div class="footer"></div>
- </div>
</div>
<div id="addMaster">
Modified: CometVisu/trunk/visu/index.html
===================================================================
--- CometVisu/trunk/visu/index.html 2011-12-18 15:59:22 UTC (rev 593)
+++ CometVisu/trunk/visu/index.html 2011-12-18 16:24:02 UTC (rev 594)
@@ -8,8 +8,8 @@
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0; webkit-user-select: none;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
- <script src="lib/compatibility.js" type="text/javascript"></script>
<script src="lib/jquery.js" type="text/javascript"></script>
+ <script src="lib/compatibility.js" type="text/javascript"></script>
<script src="lib/jquery-ui.js" type="text/javascript"></script>
<script src="lib/scrollable.js" type="text/javascript"></script>
<script src="lib/cometvisu-client.js" type="text/javascript"></script>
@@ -34,7 +34,6 @@
<div id="bottom" class="loading">
<hr />
<div class="footer"></div>
- </div>
</div>
<div id="loading" style="text-align: center; width: 200px; height: 30px; margin: auto;">
Loading ...
Modified: CometVisu/trunk/visu/lib/compatibility.js
===================================================================
--- CometVisu/trunk/visu/lib/compatibility.js 2011-12-18 15:59:22 UTC (rev 593)
+++ CometVisu/trunk/visu/lib/compatibility.js 2011-12-18 16:24:02 UTC (rev 594)
@@ -134,4 +134,24 @@
}
}
-sprintf = sprintfWrapper.init;
\ No newline at end of file
+sprintf = sprintfWrapper.init;
+
+/**
+ * be able to access GET-Params
+ */
+$.extend({
+ getUrlVars: function(){
+ var vars = [], hash;
+ var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
+ for(var i = 0; i < hashes.length; i++)
+ {
+ hash = hashes[i].split('=');
+ vars.push(hash[0]);
+ vars[hash[0]] = hash[1];
+ }
+ return vars;
+ },
+ getUrlVar: function(name){
+ return $.getUrlVars()[name];
+ }
+});
\ No newline at end of file
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2011-12-18 15:59:22 UTC (rev 593)
+++ CometVisu/trunk/visu/lib/templateengine.js 2011-12-18 16:24:02 UTC (rev 594)
@@ -35,28 +35,16 @@
}
visu.user = 'demo_user'; // example for setting a user
-$.extend({
- getUrlVars: function(){
- var vars = [], hash;
- var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
- for(var i = 0; i < hashes.length; i++)
- {
- hash = hashes[i].split('=');
- vars.push(hash[0]);
- vars[hash[0]] = hash[1];
- }
- return vars;
- },
- getUrlVar: function(name){
- return $.getUrlVars()[name];
- }
-});
-
var configSuffix = "";
if ($.getUrlVar("config")) {
configSuffix = "_" + $.getUrlVar("config");
}
+var clientDesign = "";
+if ($.getUrlVar("design")) {
+ clientDesign = $.getUrlVar("design");
+}
+
if (typeof forceReload == "undefined") {
var forceReload = false;
}
@@ -88,22 +76,16 @@
}
$(document).ready(function() {
- // get the data once the page was loaded
- $.ajaxSetup({cache: !forceReload});
- window.setTimeout("$.get( 'visu_config" + configSuffix + ".xml', parseXML );", 200);
+
+ // only load the config and stuff if a design was specified
+ if (clientDesign != "") {
+ // get the data once the page was loaded
+ $.ajaxSetup({cache: !forceReload});
+ window.setTimeout("$.get( 'visu_config" + configSuffix + ".xml', parseXML );", 200);
+ } else {
+ selectDesign();
+ }
- // disable text selection - it's annoying on a touch screen!
- /*
- * Now in the CSS!
- if($.browser.mozilla)
- {//Firefox
- $('body').css('MozUserSelect','none');
- } else if($.browser.msie) {//IE
- $(document).bind('selectstart',function(){return false;});
- } else {//Opera, etc.
- $(document).mousedown(function(){return false;});
- }
- */
} );
$(window).unload(function() {
@@ -173,9 +155,8 @@
// erst mal den Cache für AJAX-Requests wieder aktivieren
$.ajaxSetup({cache: true});
- var design = $( 'pages', xml ).attr('design');
- $( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/' + design + '/basic.css" />' );
- $( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/' + design + '/mobile.css" media="only screen and (max-device-width: 480px)" />' );
+ $( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/' + clientDesign + '/basic.css" />' );
+ $( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/' + clientDesign + '/mobile.css" media="only screen and (max-device-width: 480px)" />' );
// start with the plugins
var pluginsToLoad = 0;
@@ -427,3 +408,61 @@
$(this).data('interval', setInterval( function(){refreshAction(target, src);}, refresh ) );
}
}
+
+
+function selectDesign() {
+
+ $body = $("body");
+
+ $("body > *").hide();
+ $body.css({backgroundColor: "black"});
+
+ $div = $("<div id=\"designSelector\" />");
+ $div.css({background: "#808080", width: "400px", color: "white", margin: "auto", padding: "0.5em"});
+ $div.html("Loading ...");
+
+ $body.append($div);
+
+ $.getJSON("edit/get_designs.php", function(data) {
+ $div.empty();
+
+ $div.append("<h1>Please select design</h1>");
+ $div.append("<p>The Location/URL will change after you have chosen your design. Please bookmark the new URL if you do not want to select the design every time.</p>");
+
+ $.each(data, function(i, element) {
+ var $myDiv = $("<div />");
+
+ $myDiv.css({cursor: "pointer", padding: "0.5em 1em", borderBottom: "1px solid black", margin: "auto", width: "262px", position: "relative"});
+
+ $myDiv.append("<div style=\"font-weight: bold; margin: 1em 0 .5em;\">Design: " + element + "</div>");
+ $myDiv.append("<iframe src=\"designs/design_preview.html?design=" + element + "\" width=\"160\" height=\"90\" border=\"0\" scrolling=\"auto\" frameborder=\"0\" style=\"z-index: 1;\"></iframe>");
+ $myDiv.append("<img width=\"60\" height=\"30\" src=\"media/arrow.png\" alt=\"select\" border=\"0\" style=\"margin: 60px 10px 10px 30px;\"/>");
+
+ $div.append($myDiv);
+
+ var $tDiv = $("<div />");
+ $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);
+
+ $myDiv.hover(function() {
+ // over
+ $myDiv.css({background: "#bbbbbb"});
+ },
+ function() {
+ // out
+ $myDiv.css({background: "transparent"});
+ });
+
+ $myDiv.click(function() {
+ if (document.location.search == "") {
+ document.location.href = document.location.href + "?design=" + element;
+ } else {
+ document.location.href = document.location.href + "&design=" + element;
+ }
+ })
+
+ })
+ })
+}
\ No newline at end of file
Added: CometVisu/trunk/visu/media/arrow.png
===================================================================
(Binary files differ)
Property changes on: CometVisu/trunk/visu/media/arrow.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j-...@us...> - 2011-12-19 17:29:24
|
Revision: 600
http://openautomation.svn.sourceforge.net/openautomation/?rev=600&view=rev
Author: j-n-k
Date: 2011-12-19 17:29:18 +0000 (Mon, 19 Dec 2011)
Log Message:
-----------
Changed name of jsonfeedview plugin, fix rendering problems otherd design coming
Modified Paths:
--------------
CometVisu/trunk/visu/designs/discreet_slim/basic.css
CometVisu/trunk/visu/plugins/jsonfeedview/structure_plugin.js
Added Paths:
-----------
CometVisu/trunk/visu/plugins/jsonfeedview/
Removed Paths:
-------------
CometVisu/trunk/visu/plugins/jsonviewer/
Modified: CometVisu/trunk/visu/designs/discreet_slim/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet_slim/basic.css 2011-12-19 16:42:30 UTC (rev 599)
+++ CometVisu/trunk/visu/designs/discreet_slim/basic.css 2011-12-19 17:29:18 UTC (rev 600)
@@ -131,7 +131,22 @@
white-space: pre-wrap;
}
+.jsonfeedview {
+ line-height: 2em;
+ text-align:left;
+ overflow:hidden;
+ display:table;
+}
+.jsonfeedview .table {
+ display:table;
+ padding-left: 1em;
+}
+
+.jsonfeedview > div .tr {
+ display:table-row;
+}
+
.green.switchPressed div, .green.switchUnpressed div{
background: transparent url(images/dot_green.png) no-repeat center center;
color: white !important;
Modified: CometVisu/trunk/visu/plugins/jsonfeedview/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/jsonviewer/structure_plugin.js 2011-12-18 21:37:40 UTC (rev 598)
+++ CometVisu/trunk/visu/plugins/jsonfeedview/structure_plugin.js 2011-12-19 17:29:18 UTC (rev 600)
@@ -18,29 +18,35 @@
/**
* This plugins views json-feeds
*/
-
- VisuDesign_Custom.prototype.addCreator('jsonviewer', {
+
+VisuDesign_Custom.prototype.addCreator('jsonfeedview', {
maturity: Maturity.development,
- create: function( page, path ) {
+ create: function (page, path) {
var $p = $(page);
- var ret_val = $('<div class="widget clearfix text" />');
- var style = '';
-
- if( style != '' ) style = 'style="' + style + '"';
- var json = $('<div class="value">-</div>');
+ var viewnum = parseFloat($p.attr('view')) || 1;
+
+ var dummy = $('<div class="widget text" />').appendTo($("body"));
+ dummy.css({'float': 'left', 'visibility': 'hidden', 'display': 'inline'});
+ var h = dummy.outerHeight();
+ var fontsize = parseFloat(dummy.css("font-size"));
+ var margin = parseFloat(dummy.css("marginTop"));
+ var padding = parseFloat(dummy.css("paddingTop"));
+ var minheight = parseFloat(dummy.css("min-height"));
+ dummy.remove();
+
+ var ourheight = ((viewnum-1)*(2*margin+2*padding)+viewnum*minheight)/fontsize;
+ var ret_val = $('<div class="widget clearfix jsonfeedview" style="height:'+ourheight+'em" ><div class="table" /></div>');
+
var refresh = $p.attr('refresh') || 30; // default 30s
+
+ ret_val.data("src", $p.attr('src'));
+ ret_val.data("refresh", refresh);
+ ret_val.data("view", viewnum); // default alles
+ ret_val.data("idx", 0);
- json.data("src", $p.attr('src'));
- json.data("refresh", refresh);
- json.data("view", $p.attr('view')); // default alles
- json.data("idx", 0);
-
- var data = jQuery.extend({}, json.data());
- ret_val.append(json);
-
-
-
- refreshjson(json, data);
+ var data = jQuery.extend({}, ret_val.data());
+
+ refreshjson(ret_val, data);
return ret_val;
},
attributes: {
@@ -54,30 +60,33 @@
function refreshjson(e,data) {
var element = $(e);
+
var tmp = $.getJSON(data.src, function(json) {
- var content = '';
+ var content = '<div class="table">';
var feed = json.responseData.feed;
var feedlength = feed.entries.length;
var viewnum = data.view;
+
if (viewnum > feedlength) { // max is number of entries
viewnum = feedlength;
}
- for (var i=0; i<viewnum; i++) {
+
+ for (var i=0; i<viewnum; i++) { //
var showidx = i + data.idx;
if (showidx >= feedlength) {
showidx = showidx - feedlength;
}
- content += ""+feed.entries[showidx].content + "<br>";
+ content += "<div class ='tr'>"+feed.entries[showidx].content+"</div>";
};
- element.html(content);
+ element.find('.table').replaceWith($(content+"</div")); //html(content);
if (data.idx >= feedlength) {
data.idx=0;
} else {
data.idx = data.idx+1;
}
});
- var tmp2=0;
+
window.setTimeout(function(element, data) {
refreshjson(element, data)
}, data.refresh * 1000, element, data);
-};
\ No newline at end of file
+};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-01-14 16:27:00
|
Revision: 651
http://openautomation.svn.sourceforge.net/openautomation/?rev=651&view=rev
Author: makki1
Date: 2012-01-14 16:26:53 +0000 (Sat, 14 Jan 2012)
Log Message:
-----------
(interims?) fix for saving addr in editor, updated xsd with plugins
Modified Paths:
--------------
CometVisu/trunk/visu/edit/cometeditor.js
CometVisu/trunk/visu/visu_config.xsd
Modified: CometVisu/trunk/visu/edit/cometeditor.js
===================================================================
--- CometVisu/trunk/visu/edit/cometeditor.js 2012-01-14 15:18:07 UTC (rev 650)
+++ CometVisu/trunk/visu/edit/cometeditor.js 2012-01-14 16:26:53 UTC (rev 651)
@@ -654,17 +654,19 @@
elementDiv.find(".readonly").append(elementData._attributes.readonly == "true" ? "readonly" : "")
elementDiv.data("transform", elementData._attributes.transform)
- .data("variant", elementData._attributes.variant)
.data("readonly", elementData._attributes.readonly == "true" ? true : false)
.data("address", elementData.textContent);
if (typeof options == "undefined" || typeof options.variant == "undefined" || options.variant == false) {
// if this element does not support variants, then remove them from the HTML.
elementDiv.find("div.variant").remove();
+ } else {
+ elementDiv.data("variant", elementData._attributes.variant);
}
elementDiv.data("options", options);
return elementDiv;
}
-}
\ No newline at end of file
+}
+
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2012-01-14 15:18:07 UTC (rev 650)
+++ CometVisu/trunk/visu/visu_config.xsd 2012-01-14 16:26:53 UTC (rev 651)
@@ -63,6 +63,7 @@
<xsd:attribute name="readonly" type="xsd:boolean" />
<xsd:attribute name="align" type="xsd:string" />
+<xsd:attribute name="variant" type="xsd:string" />
<!-- complex elements -->
@@ -179,6 +180,9 @@
<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="gweather" type="gweather" />
+ <xsd:element name="rss" type="rss" />
+ <xsd:element name="jqclock" type="jqclock" />
<xsd:element ref="page" />
</xsd:choice>
<xsd:attribute name="name" type="xsd:string" use="required" />
@@ -222,6 +226,9 @@
<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="gweather" type="gweather" />
+ <xsd:element name="rss" type="rss" />
+ <xsd:element name="jqclock" type="jqclock" />
<xsd:element ref="page" />
</xsd:choice>
<xsd:attribute name="name" type="xsd:string" use="required" />
@@ -428,6 +435,51 @@
<xsd:attribute name="gridcolor" type="xsd:string" use="optional" />
</xsd:complexType>
+<xsd:complexType name="gweather" >
+ <xsd:choice maxOccurs="unbounded" minOccurs="1">
+ <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ </xsd:choice>
+ <xsd:attribute name="width" type="dimension" use="optional"/>
+ <xsd:attribute name="height" type="dimension" use="optional"/>
+ <xsd:attribute name="refresh" type="xsd:integer" use="optional" />
+ <xsd:attribute name="city" type="xsd:string" use="required" />
+ <xsd:attribute name="lang" type="xsd:string" use="optional" />
+ <xsd:attribute name="image_url" type="xsd:string" use="optional" />
+ <xsd:attribute name="refresh" type="xsd:integer" use="optional" />
+ <xsd:attribute name="current" type="xsd:string" use="optional" />
+ <xsd:attribute name="forecast" type="xsd:string" use="optional" />
+</xsd:complexType>
+
+<xsd:complexType name="rss" >
+ <xsd:choice maxOccurs="unbounded" minOccurs="1">
+ <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ </xsd:choice>
+ <xsd:attribute name="src" type="xsd:string" use="required" />
+ <xsd:attribute name="width" type="dimension" use="optional"/>
+ <xsd:attribute name="height" type="dimension" use="optional"/>
+ <xsd:attribute name="refresh" type="xsd:integer" use="optional" />
+ <xsd:attribute name="limit" type="xsd:integer" use="optional" />
+ <xsd:attribute name="header" type="xsd:string" use="required" />
+ <xsd:attribute name="date" type="xsd:string" use="optional" />
+ <xsd:attribute name="content" type="xsd:string" use="optional" />
+ <xsd:attribute name="snippet" type="xsd:integer" use="optional" />
+ <xsd:attribute name="showerror" type="xsd:string" use="optional" />
+ <xsd:attribute name="ssl" type="xsd:string" use="optional" />
+ <xsd:attribute name="linktarget" type="xsd:string" use="optional" />
+ <xsd:attribute name="link" type="xsd:string" use="optional" />
+ <xsd:attribute name="title" type="xsd:string" use="optional" />
+</xsd:complexType>
+
+<xsd:complexType name="jqclock" >
+ <xsd:choice maxOccurs="unbounded" minOccurs="1">
+ <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ </xsd:choice>
+ <xsd:attribute name="width" type="dimension" use="optional"/>
+ <xsd:attribute name="height" type="dimension" use="optional"/>
+ <xsd:attribute name="lang" type="xsd:string" use="required" />
+ <xsd:attribute name="date" type="xsd:string" use="optional" />
+</xsd:complexType>
+
<xsd:complexType name="break" />
<xsd:complexType name="line" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-01-15 17:09:11
|
Revision: 654
http://openautomation.svn.sourceforge.net/openautomation/?rev=654&view=rev
Author: makki1
Date: 2012-01-15 17:09:04 +0000 (Sun, 15 Jan 2012)
Log Message:
-----------
small fixes on variants in editor, save should work now
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/edit/cometeditor.js
CometVisu/trunk/visu/edit/visuconfig_edit.js
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2012-01-15 12:32:22 UTC (rev 653)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2012-01-15 17:09:04 UTC (rev 654)
@@ -929,7 +929,7 @@
},
elements: {
label: { type: 'string', required: false, multi: false },
- address: { type: 'address', required: true, multi: true }
+ address: { type: 'address', required: true, multi: true, options: {variant: ['', 'isbutton']} }
},
content: false
});
@@ -1180,4 +1180,5 @@
if( layout.getAttribute('y' ) ) ret_val += 'top:' + layout.getAttribute('y' ) + ';';
if( layout.getAttribute('width') ) ret_val += 'width:' + layout.getAttribute('width') + ';';
return ret_val;
-}
\ No newline at end of file
+}
+
Modified: CometVisu/trunk/visu/edit/cometeditor.js
===================================================================
--- CometVisu/trunk/visu/edit/cometeditor.js 2012-01-15 12:32:22 UTC (rev 653)
+++ CometVisu/trunk/visu/edit/cometeditor.js 2012-01-15 17:09:04 UTC (rev 654)
@@ -311,7 +311,7 @@
$elements.each(function (index, e) {
$address = $("<address />")
.attr("transform", $(e).data("transform"))
- .attr("variant", $(e).data("variant"))
+ .attr("variant", $(e).data("variant") || "")
.attr("readonly", $(e).data("readonly") == true ? "true" : "false")
.append($(e).data("address"));
dataObject.append($address);
@@ -646,8 +646,9 @@
elementDiv.find(".title").append(t.find("option[value='" + elementData.textContent + "']").text());
elementDiv.find(".value").append(elementData.textContent);
elementDiv.find(".transform").append(elementData._attributes.transform);
+ elementDiv.find(".variant").append(elementData._attributes.variant);
if (elementData._attributes.variant != "undefined" && elementData._attributes.variant != "") {
- elementDiv.find(".variant").append(elementData._attributes.variant).show();
+ elementDiv.find(".variant").show();
} else {
elementDiv.find(".variant").hide();
}
Modified: CometVisu/trunk/visu/edit/visuconfig_edit.js
===================================================================
--- CometVisu/trunk/visu/edit/visuconfig_edit.js 2012-01-15 12:32:22 UTC (rev 653)
+++ CometVisu/trunk/visu/edit/visuconfig_edit.js 2012-01-15 17:09:04 UTC (rev 654)
@@ -273,7 +273,7 @@
element.find("label").html("variant");
// variants can be selected from a pre-defined list ONLY.
- var variantList = $("<select name=\"variant\" />");
+ var variantList = $("<select name=\"variant\" class=\"add_variant\" />");
// go through list of available variants and display as select-list
$.each(options.variant, function (i, element) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j-...@us...> - 2012-01-19 19:35:31
|
Revision: 662
http://openautomation.svn.sourceforge.net/openautomation/?rev=662&view=rev
Author: j-n-k
Date: 2012-01-19 19:35:25 +0000 (Thu, 19 Jan 2012)
Log Message:
-----------
Inital commit for rowspan
Use .addClass(rowspanClass(rowspan)) on your widget-div to add
a CSS class that sets the height to rowspan-rows. Example: image
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2012-01-18 19:10:46 UTC (rev 661)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2012-01-19 19:35:25 UTC (rev 662)
@@ -690,6 +690,11 @@
create: function( page, path ) {
var $p = $(page);
var ret_val = $('<div class="widget clearfix image" />');
+
+ if ($p.attr("rowspan")) { // add rowspan only if not default
+ ret_val.addClass(rowspanClass($p.attr("rowspan")));
+ }
+
var labelElement = $p.find('label')[0];
ret_val.append( labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '' );
var style = '';
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-01-18 19:10:46 UTC (rev 661)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-01-19 19:35:25 UTC (rev 662)
@@ -59,17 +59,17 @@
// 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
- }
+ 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
+ }
}
if (isNaN(use_maturity)) {
- use_maturity = Maturity.release; // default to release
+ use_maturity = Maturity.release; // default to release
}
$(document).ready(function() {
@@ -143,6 +143,35 @@
}
$( window ).bind( 'resize', handleResize );
+function rowspanClass(rowspan) {
+ var className = 'rowspan'+ rowspan;
+ if ( $('<div class="' + className + '" />').height() == 0 ) {
+ var dummyDiv = $('<div><div class="widget clearfix text" id="innerDiv" /></div>')
+ .appendTo($('body'));
+
+ // get css settings of single object
+ var paddingTop = parseFloat($('#innerDiv').css('padding-top'));
+ var paddingBottom = parseFloat($('#innerDiv').css('padding-bottom'));
+ var marginTop = parseFloat($('#innerDiv').css('margin-top'));
+ var marginBottom = parseFloat($('#innerDiv').css('margin-bottom'));
+ var borderTop = parseFloat($('#innerDiv').css('border-top-width'));
+ var borderBottom = parseFloat($('#innerDiv').css('border-bottom-width'));
+ var singleHeight = parseFloat($('#innerDiv').css('height'));
+
+ dummyDiv.remove();
+
+ // calculate total height
+ var totalHeight = (rowspan-1) * Math.round((singleHeight+
+ + marginTop + paddingTop + borderTop
+ + marginBottom + paddingBottom + borderBottom))
+ + singleHeight;
+
+ // append css style
+ $('head').append('<style>.rowspan' + rowspan + ' { height: ' + totalHeight + 'px; } </style>');
+ }
+ return className;
+}
+
function parseXML(xml) {
// erst mal den Cache für AJAX-Requests wieder aktivieren
$.ajaxSetup({cache: true});
Modified: CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js 2012-01-18 19:10:46 UTC (rev 661)
+++ CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js 2012-01-19 19:35:25 UTC (rev 662)
@@ -28,7 +28,7 @@
$.get("plugins/rsslog/rsslog.css", function(css) {
$("head").append("<style>"+css+"</style>");
- });
+});
VisuDesign_Custom.prototype.addCreator("rsslog", {
create: function( page, path ) {
@@ -41,10 +41,17 @@
var id = "rss_" + uniqid();
- var ret_val = $('<div class="widget clearfix" style="height:205px"/>');
+ var ret_val = $('<div class="widget clearfix" />');
ret_val.addClass( 'rsslog' );
- var label = '<div class="label" style="clear:both;">' + page.textContent + '</div>';
- var actor = $('<div class="actor" style="clear:left;"><div class="rsslog_inline" id="' + id + '"></div></div>');
+
+ if ($p.attr("rowspan")) { // add rowspan only if not default
+ ret_val.addClass(rowspanClass($p.attr("rowspan")));
+ }
+
+ var labelElement = $p.find('label')[0];
+ var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
+
+ var actor = $('<div class="actor rsslogBody"><div class="rsslog_inline" id="' + id + '"></div></div>');
var rss = $("#" + id, actor);
if ($p.attr("width")) {
@@ -58,22 +65,15 @@
rss.data("id", id);
rss.data("src", $p.attr("src"));
- rss.data("label", page.textContent);
+ rss.data("label", labelElement ? labelElement.textContent : '' );
rss.data("refresh", $p.attr("refresh"));
- rss.data("limit", $p.attr("limit")) || 10;
- rss.data("header", $p.attr("header")) || true;
- rss.data("date", $p.attr("date")) || true;
rss.data("content", $p.attr("content")) || true;
- rss.data("snippet", $p.attr("snippet")) || true;
- rss.data("showerror", $p.attr("showerror")) || true;
- rss.data("ssl", $p.attr("ssl")) || false;
- rss.data("linktarget", $p.attr("linktarget")) || "_new";
- rss.data("link", $p.attr("link")) || true;
rss.data("title", $p.attr("title")) || true;
rss.data("mode", $p.attr("mode") || "last");
- rss.data("itemoffset", 0);
rss.data("timeformat", $p.attr("timeformat"));
+ rss.data("itemoffset", 0);
+
refreshRSSlog(rss, {});
return ret_val;
@@ -83,19 +83,12 @@
width: {type: "string", required: false},
height: {type: "string", required: false},
refresh: {type: "numeric", required: false},
- limit: {type: "numeric", required: false},
- header: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- date: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
content: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- snippet: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- showerror: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- ssl: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- linktarget: {type: "list", required: false, list: {"_new": "_new", "_self": "_self"}},
- link: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
title: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- mode: {type: "list", required: false, list: {'first': 'first', 'last': 'last', 'rollover':'rollover' }}
+ mode: {type: "list", required: false, list: {'first': 'first', 'last': 'last', 'rollover':'rollover' }},
+ timeformat: {type: "string", required: false},
},
- content: {type: "string", required: true}
+ content: false
});
function refreshRSSlog(rss, data) {
@@ -105,25 +98,17 @@
var label = rss.data("label");
var refresh = rss.data("refresh");
var limit = rss.data("limit");
- //FIXME: eval really needed?? to convert string true/false to bool?
+
- jQuery(function() {
- $(rss).rssfeedlocal({
- src: src,
- limit: rss.data("limit"),
- header: eval(rss.data("header")),
- date: eval(rss.data("date")),
- content: rss.data("content"),
- snippet: eval(rss.data("snippet")),
- showerror: eval(rss.data("showerror")),
- ssl: eval(rss.data("ssl")),
- linktarget: rss.data("linktarget"),
- link: eval(rss.data("link")),
- title: eval(rss.data("title")),
- mode: rss.data("mode"),
- timeformat: rss.data("timeformat"),
- });
- });
+ $(function() {
+ $(rss).rssfeedlocal({
+ src: src,
+ content: rss.data("content"),
+ title: eval(rss.data("title")),
+ mode: rss.data("mode"),
+ timeformat: rss.data("timeformat"),
+ });
+ });
if (typeof (refresh) != "undefined" && refresh) {
// reload regularly
@@ -131,7 +116,7 @@
refreshRSSlog(rss, data)
}, refresh * 1000, rss, data);
}
- //rss.data("itemoffset") = itemoffset;
+
return false;
}
@@ -141,14 +126,9 @@
var defaults = {
src: '',
- header: false,
html: '{date}: {text}',
wrapper: 'li',
dataType: 'xml',
- limit: 10,
- linktarget: 'new',
- date: true,
- link: true,
title: true
}
var options = jQuery.extend(defaults, options);
@@ -193,7 +173,6 @@
var itemnum = items.length;
var itemoffset = 0; // correct if mode='first' or itemnum<=displayrows
-
if (itemnum>displayrows) { // no need to check mode if items are less than rows
if (o.mode=='last') {
itemoffset=itemnum-displayrows;
@@ -207,51 +186,33 @@
}
}
- var row = 'odd';
+ var row = 'rsslogodd';
var last = itemoffset+displayrows;
if (last>itemnum) {
last=itemnum;
}
for (var i=itemoffset; i<last; i++) {
var idx = i;
- if (i>=itemnum) {
- idx = idx - itemnum;
- }
+ idx = (i>=itemnum) ? (idx = idx - itemnum) : idx;
var item = items[idx];
var itemHtml=o.html;
- /*if (o.link)
- itemHtml = o.html.replace(/{title}/, '<a href="'
- + jQuery(item).find('guid').text()
- + '" target="' + o.linktarget + '">'
- + jQuery(item).find('title').text() + '</a><br />');
- else if (o.title)
- itemHtml = o.html.replace(/{title}/,
- jQuery(item).find('title').text() + '<br />');
- else
- itemHtml = o.html.replace(/{title}/, ''); */
-
+
itemHtml = itemHtml.replace(/{text}/, jQuery(item).find('description').text());
var entryDate = new Date($(item).find('pubDate').text());
- if (o.date && entryDate) {
- if (o.timeformat) {
- itemHtml = itemHtml.replace(/{date}/, entryDate.toLocaleFormat(o.timeformat) + ' ');
- } else {
- itemHtml = itemHtml.replace(/{date}/, entryDate.toLocaleDateString() + ' ' + entryDate.toLocaleTimeString() + ' ');
- }
+ if (entryDate) {
+ itemHtml = (o.timeformat) ?
+ (itemHtml.replace(/{date}/, entryDate.toLocaleFormat(o.timeformat) + ' ')) :
+ (itemHtml.replace(/{date}/, entryDate.toLocaleDateString() + ' ' + entryDate.toLocaleTimeString() + ' '));
} else {
itemHtml = itemHtml.replace(/{date}/, '');
}
- jQuery(c).append(jQuery('<' + o.wrapper + ' class="rssRow ' + row + '">').append(itemHtml));
+ jQuery(c).append(jQuery('<' + o.wrapper + ' class="rsslogRow ' + row + '">').append(itemHtml));
// Alternate row classes
- if (row == 'odd') {
- row = 'even';
- } else {
- row = 'odd';
- }
+ row = (row == 'rsslogodd') ? 'rsslogeven' : 'rsslogodd';
};
$('li', c).wrapAll("<ul>");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <csc...@us...> - 2012-01-21 16:41:58
|
Revision: 663
http://openautomation.svn.sourceforge.net/openautomation/?rev=663&view=rev
Author: cschleiffer
Date: 2012-01-21 16:41:52 +0000 (Sat, 21 Jan 2012)
Log Message:
-----------
Option to show current status in multitrigger widget
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/visu_config.xsd
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2012-01-19 19:35:25 UTC (rev 662)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2012-01-21 16:41:52 UTC (rev 663)
@@ -430,6 +430,7 @@
content: false
});
+
this.addCreator('toggle', {
create: function( page, path ) {
var $p = $(page);
@@ -501,6 +502,7 @@
var labelElement = $p.find('label')[0];
var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
var address = {};
+ var showstatus = $p.attr("showstatus") || "false";
$p.find('address').each( function(){
var src = this.textContent;
var transform = this.getAttribute('transform');
@@ -529,6 +531,9 @@
'align' : $p.attr('align'),
'type' : 'switch'
} ).bind( 'click', this.action );
+ if( showstatus == "true" ) {
+ for( var addr in address ) $actor.bind( addr, this.update );
+ }
buttons.append( $actor );
if( 1 == (buttonCount++ % 2) ) buttons.append( $('<br/>') );
}
@@ -548,6 +553,9 @@
'type' : 'switch',
'align' : $p.attr('align')
} ).bind( 'click', this.action );
+ if( showstatus == "true" ) {
+ for( var addr in address ) $actor.bind( addr, this.update );
+ }
buttons.append( $actor );
if( 1 == (buttonCount++ % 2) ) buttons.append( $('<br/>') );
}
@@ -566,6 +574,9 @@
'value' : $p.attr('button3value'),
'type' : 'switch'
} ).bind( 'click', this.action );
+ if( showstatus == "true" ) {
+ for( var addr in address ) $actor.bind( addr, this.update );
+ }
buttons.append( $actor );
if( 1 == buttonCount++ % 2 ) buttons.append( $('<br/>') );
}
@@ -584,6 +595,9 @@
'value' : $p.attr('button4value'),
'type' : 'switch',
} ).bind( 'click', this.action );
+ if( showstatus == "true" ) {
+ for( var addr in address ) $actor.bind( addr, this.update );
+ }
buttons.append( $actor );
if( 1 == buttonCount++ % 2 ) buttons.append( $('<br/>') );
}
@@ -593,9 +607,11 @@
},
update: function(e,d) {
var element = $(this);
- var value = defaultUpdate( e, d, element );
- element.removeClass( value == 0 ? 'switchPressed' : 'switchUnpressed' );
- element.addClass( value == 0 ? 'switchUnpressed' : 'switchPressed' );
+ //var value = defaultUpdate( e, d, element );
+ var thisTransform = element.data().address[ e.type ][0];
+ var value = transformDecode( element.data().address[ e.type ][0], d );
+ element.removeClass( value == element.data().value ? 'switchUnpressed' : 'switchPressed' );
+ element.addClass( value == element.data().value ? 'switchPressed' : 'switchUnpressed' );
},
action: function() {
var data = $(this).data();
@@ -616,7 +632,8 @@
button4value: { type: 'string' , required: false },
mapping: { type: 'mapping' , required: false },
styling: { type: 'styling' , required: false },
- align: { type: 'string' , required: false }
+ align: { type: 'string' , required: false },
+ showstatus: { type: 'list' , required: true, list: {'true': "yes", 'false': "no"} }
},
elements: {
label: { type: 'string', required: false, multi: false },
@@ -861,9 +878,9 @@
} );
var actorinfo = '<div class="actor switchInvisible" ';
- if ( $p.attr( 'align' ) )
+ if ( $p.attr( 'align' ) )
actorinfo += 'style="text-align: '+$p.attr( 'align' )+'" ';
- actorinfo += '" ><div class="value">-</div></div>';
+ actorinfo += '" ><div class="value">-</div></div>';
var $actorinfo = $(actorinfo).data({
'address' : address,
'format' : $p.attr('format'),
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2012-01-19 19:35:25 UTC (rev 662)
+++ CometVisu/trunk/visu/visu_config.xsd 2012-01-21 16:41:52 UTC (rev 663)
@@ -66,7 +66,6 @@
<xsd:attribute name="variant" type="xsd:string" />
<!-- complex elements -->
-
<xsd:element name="pages">
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
@@ -260,8 +259,8 @@
</xsd:choice>
<xsd:attribute ref="styling" use="optional" />
<xsd:attribute ref="mapping" use="optional" />
- <xsd:attribute name="on_value" type="xsd:string" use="optional" />
- <xsd:attribute name="off_value" type="xsd:string" use="optional" />
+ <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:complexType>
@@ -311,6 +310,7 @@
</xsd:choice>
<xsd:attribute ref="mapping" use="optional" />
<xsd:attribute ref="styling" use="optional" />
+ <xsd:attribute name="showstatus" type="xsd:string" use="optional" />
<xsd:attribute name="button1label" type="xsd:string" use="optional" />
<xsd:attribute name="button1value" type="xsd:string" use="optional" />
<xsd:attribute name="button2label" type="xsd:string" use="optional" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j-...@us...> - 2012-01-21 17:23:22
|
Revision: 664
http://openautomation.svn.sourceforge.net/openautomation/?rev=664&view=rev
Author: j-n-k
Date: 2012-01-21 17:23:16 +0000 (Sat, 21 Jan 2012)
Log Message:
-----------
Fix design-toggle issue for rowspan
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_custom.js
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/designs/structure_custom.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_custom.js 2012-01-21 16:41:52 UTC (rev 663)
+++ CometVisu/trunk/visu/designs/structure_custom.js 2012-01-21 17:23:16 UTC (rev 664)
@@ -41,35 +41,46 @@
* to demonstrate all available
*/
VisuDesign_Custom.prototype.addCreator("designtoggle", {
- create: function( page, path ) {
- var ret_val = $('<div class="widget clearfix" />');
- ret_val.addClass( 'switch' );
- var label = '<div class="label">' + page.textContent + '</div>';
- var actor = '<div class="actor switchUnpressed">';
- var value = $('link[href*="designs"]').attr('href').split('/')[1];
- actor += '<div class="value">' + value + '</div>';
- actor += '</div>';
- ret_val.append(label).append($(actor)
- .data({
- 'mapping' : $(page).attr('mapping'),
- 'styling' : $(page).attr('styling'),
- 'value' : value,
- 'type' : 'toggle'
- })
- .bind('click', function() {
- var designs = [ 'pure', 'discreet', 'discreet_sand', 'discreet_slim', 'alaska', 'alaska_slim' ];
- var oldDesign = $('.value',this).text();
- var newDesign = designs[ (designs.indexOf(oldDesign) + 1) % designs.length ];
- $('.value',this).text(newDesign);
- $('link[href*="designs"]').each(function(){
- this.href = this.href.replace( oldDesign, newDesign );
- });
- })
- );
- return ret_val;
- },
- attributes: {
- },
- content: {type: "string", required: true}
+ create: function( page, path ) {
+
+ var ret_val = $('<div class="widget clearfix" />');
+ ret_val.addClass( 'switch' );
+ var label = '<div class="label">' + page.textContent + '</div>';
+ var actor = '<div class="actor switchUnpressed">';
+ var value = $('link[href*="designs"]').attr('href').split('/')[1];
+ actor += '<div class="value">' + value + '</div>';
+ actor += '</div>';
+ ret_val.append(label).append($(actor)
+ .data({
+ 'mapping' : $(page).attr('mapping'),
+ 'styling' : $(page).attr('styling'),
+ 'value' : value,
+ 'type' : 'toggle'
+ })
+ .bind('click', function() {
+ var designs = [ 'pure', 'discreet', 'discreet_sand', 'discreet_slim', 'alaska', 'alaska_slim' ];
+ var oldDesign = $('.value',this).text();
+ var newDesign = designs[ (designs.indexOf(oldDesign) + 1) % designs.length ];
+ $('.value',this).text(newDesign);
+ $('link[href*="designs"]').each(function(){
+ this.href = this.href.replace( oldDesign, newDesign );
+ });
+
+ setTimeout(function() {
+ $('style').each(function(style) {
+ var txt = this.textContent;
+ var idx = txt.search('rowspan');
+ if (idx>0) {
+ rowspanClass(parseInt(txt[idx+7]), this);
+ }
+ });
+ }, 100);
+ })
+ );
+ return ret_val;
+ },
+ attributes: {
+ },
+ content: true
});
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-01-21 16:41:52 UTC (rev 663)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-01-21 17:23:16 UTC (rev 664)
@@ -98,7 +98,7 @@
var basetrans = transformation.split('.')[0];
return transformation in Transform ?
Transform[ transformation ].decode( value ) :
- (basetrans in Transform ? Transform[ basetrans ].decode( value ) : value);
+ (basetrans in Transform ? Transform[ basetrans ].decode( value ) : value);
}
function map( value, element )
@@ -143,12 +143,13 @@
}
$( window ).bind( 'resize', handleResize );
-function rowspanClass(rowspan) {
+function rowspanClass(rowspan, elem) {
var className = 'rowspan'+ rowspan;
- if ( $('<div class="' + className + '" />').height() == 0 ) {
- var dummyDiv = $('<div><div class="widget clearfix text" id="innerDiv" /></div>')
- .appendTo($('body'));
-
+
+ if (( $('<div class="' + className + '" />').height() == 0 ) || elem ) {
+ var dummyDiv = $('<div id="calcrowspan" ><div class="widget clearfix text" id="innerDiv" /></div>')
+ .appendTo(document.body).show();
+
// get css settings of single object
var paddingTop = parseFloat($('#innerDiv').css('padding-top'));
var paddingBottom = parseFloat($('#innerDiv').css('padding-bottom'));
@@ -158,7 +159,7 @@
var borderBottom = parseFloat($('#innerDiv').css('border-bottom-width'));
var singleHeight = parseFloat($('#innerDiv').css('height'));
- dummyDiv.remove();
+ $('#calcrowspan').remove();
// calculate total height
var totalHeight = (rowspan-1) * Math.round((singleHeight+
@@ -167,8 +168,14 @@
+ singleHeight;
// append css style
+
+ if (elem) {
+ $(elem).remove();
+ }
+
$('head').append('<style>.rowspan' + rowspan + ' { height: ' + totalHeight + 'px; } </style>');
}
+
return className;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j-...@us...> - 2012-01-30 20:25:50
|
Revision: 670
http://openautomation.svn.sourceforge.net/openautomation/?rev=670&view=rev
Author: j-n-k
Date: 2012-01-30 20:25:43 +0000 (Mon, 30 Jan 2012)
Log Message:
-----------
Re-engineered colspan/rowspan-calculation (avoid rendering problems)
Re-engineered colspan/rowspan (added .setWidgetStyle)
Re-engineered label creation (added .makeWidgetLabel)
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js
CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2012-01-28 21:33:09 UTC (rev 669)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2012-01-30 20:25:43 UTC (rev 670)
@@ -23,8 +23,34 @@
};
/**
+ * this function implements all widget stylings that are identical (JNK)
+ *
+ * implemented: rowspan, colspan
+ */
+
+$.fn.setWidgetStyle = function(page) {
+ this.data('colspanClass', colspanClass(page.attr('colspan') || 1));
+ this.data('rowspanClass', rowspanClass(page.attr('rowspan') || 1));
+ this.addClass(innerRowspanClass(page.attr('rowspan') || 1));
+ return this;
+ }
+
+ /**
+ * this function implements the widget label (JNK)
+ */
+
+$.fn.makeWidgetLabel = function(page) {
+ var labelElement = page.find('label')[0]; // get first label element
+ if (labelElement) { // if exists, add it
+ this.append($('<div class="label">' + labelElement.textContent + '<div>'));
+ }
+ return this;
+}
+
+/**
* This class defines all the building blocks for a Visu in the "Pure" design
*/
+
function VisuDesign() {
this.creators = {};
@@ -82,8 +108,8 @@
if ($p.attr('visible')=='false') {
ret_val=$('');
} else { // default is visible
- ret_val = $('<div class="widget clearfix"/>');
- ret_val.addClass( 'link' ).addClass('pagelink');
+ ret_val = $('<div class="widget clearfix link pagelink"/>');
+ ret_val.setWidgetStyle($p);
ret_val.append( '<div ' + wstyle + '><a href="javascript:scrollToPage(\''+path+'\')">' + name + '</a></div>' );
}
@@ -201,12 +227,7 @@
create: function( page, path ) {
var $p = $(page);
var ret_val = $('<div class="widget clearfix text" />');
- if ($p.attr("rowspan")) { // add rowspan only if not default
- ret_val.addClass(rowspanClass($p.attr("rowspan")));
- }
- if ($p.attr("colspan")) { // add colspan only if not default
- ret_val.data("colspanClass", colspanClass($p.attr("colspan")));
- }
+ ret_val.setWidgetStyle($p);
var style = '';
if( $p.attr('align') ) style += 'text-align:' + $p.attr('align') + ';';
if( style != '' ) style = 'style="' + style + '"';
@@ -229,14 +250,7 @@
var layout = $p.find('layout')[0];
var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
var ret_val = $('<div class="widget clearfix info" ' + style + ' />');
- if ($p.attr("rowspan")) { // add rowspan only if not default
- ret_val.addClass(rowspanClass($p.attr("rowspan")));
- }
- if ($p.attr("colspan")) { // add colspan only if not default
- ret_val.data("colspanClass", colspanClass($p.attr("colspan")));
- }
- var labelElement = $p.find('label')[0];
- var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
+ ret_val.setWidgetStyle($p).makeWidgetLabel($p);
var address = {};
$p.find('address').each( function(){
var src = this.textContent;
@@ -251,7 +265,7 @@
'styling' : $p.attr('styling')
});
for( var addr in address ) $actor.bind( addr, this.update );
- ret_val.append( label ).append( $actor );
+ ret_val.append( $actor );
return ret_val;
},
update: defaultUpdate,
@@ -276,14 +290,7 @@
var layout = $p.find('layout')[0];
var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
var ret_val = $('<div class="widget clearfix slide" ' + style + ' />');
- if ($p.attr("rowspan")) { // add rowspan only if not default
- ret_val.addClass(rowspanClass($p.attr("rowspan")));
- }
- if ($p.attr("colspan")) { // add colspan only if not default
- ret_val.data("colspanClass", colspanClass($p.attr("colspan")));
- }
- var labelElement = $p.find('label')[0];
- var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
+ ret_val.setWidgetStyle($p).makeWidgetLabel($p);
var address = {};
var datatype_min = undefined;
var datatype_max = undefined;
@@ -325,7 +332,7 @@
start: this.slideStart,
change: this.slideChange
});
- ret_val.append( label ).append( $actor );
+ ret_val.append( $actor );
return ret_val;
},
update: function( e, data ) {
@@ -397,12 +404,7 @@
create: function( page, path ) {
var $p = $(page);
var ret_val = $('<div class="widget clearfix switch" />');
- if ($p.attr("rowspan")) { // add rowspan only if not default
- ret_val.addClass(rowspanClass($p.attr("rowspan")));
- }
- if ($p.attr("colspan")) { // add colspan only if not default
- ret_val.data("colspanClass", colspanClass($p.attr("colspan")));
- }
+ ret_val.setWidgetStyle($p)
var labelElement = $p.find('label')[0];
var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
var address = {};
@@ -467,12 +469,7 @@
create: function( page, path ) {
var $p = $(page);
var ret_val = $('<div class="widget clearfix toggle" />');
- if ($p.attr("rowspan")) { // add rowspan only if not default
- ret_val.addClass(rowspanClass($p.attr("rowspan")));
- }
- if ($p.attr("colspan")) { // add colspan only if not default
- ret_val.data("colspanClass", colspanClass($p.attr("colspan")));
- }
+ ret_val.setWidgetStyle($p);
var labelElement = $p.find('label')[0];
var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
var address = {};
@@ -539,12 +536,7 @@
create: function( page, path ) {
var $p = $(page);
var ret_val = $('<div class="widget clearfix switch" />');
- if ($p.attr("rowspan")) { // add rowspan only if not default
- ret_val.addClass(rowspanClass($p.attr("rowspan")));
- }
- if ($p.attr("colspan")) { // add colspan only if not default
- ret_val.data("colspanClass", colspanClass($p.attr("colspan")));
- }
+ ret_val.setWidgetStyle($p)
var labelElement = $p.find('label')[0];
var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
var address = {};
@@ -695,12 +687,7 @@
var $p = $(page);
var value = $p.attr('value') ? $p.attr('value') : 0;
var ret_val = $('<div class="widget clearfix switch" />');
- if ($p.attr("rowspan")) { // add rowspan only if not default
- ret_val.addClass(rowspanClass($p.attr("rowspan")));
- }
- if ($p.attr("colspan")) { // add colspan only if not default
- ret_val.data("colspanClass", colspanClass($p.attr("colspan")));
- }
+ ret_val.setWidgetStyle($p);
var labelElement = $p.find('label')[0];
var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
var address = {};
@@ -763,14 +750,7 @@
create: function( page, path ) {
var $p = $(page);
var ret_val = $('<div class="widget clearfix image" />');
-
- if ($p.attr("rowspan")) { // add rowspan only if not default
- ret_val.addClass(rowspanClass($p.attr("rowspan")));
- }
- if ($p.attr("colspan")) { // add colspan only if not default
- ret_val.data("colspanClass", colspanClass($p.attr("colspan")));
- }
-
+ ret_val.setWidgetStyle($p);
var labelElement = $p.find('label')[0];
ret_val.append( labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '' );
var style = '';
@@ -806,12 +786,7 @@
create: function( page, path ) {
var $p = $(page);
var ret_val = $('<div class="widget clearfix video" />');
- if ($p.attr("rowspan")) { // add rowspan only if not default
- ret_val.addClass(rowspanClass($p.attr("rowspan")));
- }
- if ($p.attr("colspan")) { // add colspan only if not default
- ret_val.data("colspanClass", colspanClass($p.attr("colspan")));
- }
+ ret_val.setWidgetStyle($p);
var labelElement = $p.find('label')[0];
ret_val.append( labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '' );
var autoplay = ($p.attr('autoplay') && $p.attr('autoplay')=='true') ? ' autoplay="autoplay"' : '';
@@ -841,14 +816,7 @@
create: function( page, path ) {
var $p = $(page);
var ret_val = $('<div class="widget iframe" />');
-
- if ($p.attr("rowspan")) { // add rowspan only if not default
- ret_val.addClass(rowspanClass($p.attr("rowspan")));
- }
- if ($p.attr("colspan")) { // add colspan only if not default
- ret_val.data("colspanClass", colspanClass($p.attr("colspan")));
- }
-
+ ret_val.setWidgetStyle($p);
ret_val.append( '<div class="label">' + page.textContent + '</div>' );
var style = '';
if( $p.attr('width' ) ) {
@@ -888,12 +856,7 @@
create: function( page, path ) {
var $p = $(page);
var ret_val = $('<div class="widget clearfix switch" />');
- if ($p.attr("rowspan")) { // add rowspan only if not default
- ret_val.addClass(rowspanClass($p.attr("rowspan")));
- }
- if ($p.attr("colspan")) { // add colspan only if not default
- ret_val.data("colspanClass", colspanClass($p.attr("colspan")));
- }
+ ret_val.setWidgetStyle($p);
// handle label
var labelElement = $p.find('label')[0];
var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-01-28 21:33:09 UTC (rev 669)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-01-30 20:25:43 UTC (rev 670)
@@ -37,13 +37,13 @@
var configSuffix = "";
if ($.getUrlVar("config")) {
- configSuffix = "_" + $.getUrlVar("config");
+ configSuffix = "_" + $.getUrlVar("config");
}
var clientDesign = "";
if (typeof forceReload == "undefined") {
- var forceReload = false;
+ var forceReload = false;
}
if( $.getUrlVar('forceReload') ) {
forceReload = $.getUrlVar('forceReload') != 'false'; // true unless set to false
@@ -73,24 +73,20 @@
}
$(document).ready(function() {
-
// get the data once the page was loaded
$.ajaxSetup({cache: !forceReload});
window.setTimeout("$.get( 'visu_config" + configSuffix + ".xml', parseXML );", 200);
-
} );
$(window).unload(function() {
visu.stop();
});
-function transformEncode( transformation, value )
-{
+function transformEncode( transformation, value ) {
var basetrans = transformation.split('.')[0];
return transformation in Transform ?
Transform[ transformation ].encode( value ) :
- (basetrans in Transform ? Transform[ basetrans ].encode( value ) : value);
-
+ (basetrans in Transform ? Transform[ basetrans ].encode( value ) : value);
}
function transformDecode( transformation, value )
@@ -147,38 +143,48 @@
var className = 'rowspan'+ rowspan;
if ( $('<div class="' + className + '" />').height() == 0 ) {
- var dummyDiv = $('<div id="calcrowspan" ><div class="widget clearfix text" id="innerDiv" /></div>')
+ 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();
- // get css settings of single object
- var paddingTop = parseFloat($('#innerDiv').css('padding-top'));
- var paddingBottom = parseFloat($('#innerDiv').css('padding-bottom'));
- var marginTop = parseFloat($('#innerDiv').css('margin-top'));
- var marginBottom = parseFloat($('#innerDiv').css('margin-bottom'));
- var borderTop = parseFloat($('#innerDiv').css('border-top-width'));
- var borderBottom = parseFloat($('#innerDiv').css('border-bottom-width'));
- var singleHeight = parseFloat($('#innerDiv').css('height'));
+ var singleHeight = parseFloat($('#containerDiv').css('height'));
$('#calcrowspan').remove();
- // calculate total height
- var totalHeight = (rowspan-1) * Math.round((singleHeight+
- + marginTop + paddingTop + borderTop
- + marginBottom + paddingBottom + borderBottom))
- + singleHeight;
-
// append css style
- $('head').append('<style>.rowspan' + rowspan + ' { height: ' + totalHeight + 'px; overflow:hidden;} </style>');
+ $('head').append('<style>.rowspan' + rowspan + ' { height: ' + rowspan*Math.round(singleHeight) + 'px; overflow:hidden;} </style>');
}
return className;
}
+function innerRowspanClass(rowspan) {
+ var className = 'innerrowspan'+ rowspan;
+
+ if ( $('<div class="' + className + '" />').height() == 0 ) {
+ var dummyDiv = $('<div class="clearfix" id="calcinnerrowspan"><div id="containerDiv" class="widget_container"><div class="widget clearfix text" id="innerDiv" /></div></div>')
+ .appendTo(document.body).show();
+ $('#containerDiv').addClass(rowspanClass(rowspan));
+
+ var outerHeight = parseFloat($('#containerDiv').css('height'));
+ var innerDiv=$('#innerDiv');
+ var margin=Math.round(parseFloat(innerDiv.css('marginTop')))+Math.round(parseFloat(innerDiv.css('marginBottom')));
+ var padding=Math.round(parseFloat(innerDiv.css('paddingTop')))+Math.round(parseFloat(innerDiv.css('paddingBottom')));
+ var border=Math.round(parseFloat(innerDiv.css('borderTopWidth')))+Math.round(parseFloat(innerDiv.css('borderBottomWidth')));
+ var innerHeight=outerHeight-margin-padding-border;
+ $('#calcinnerrowspan').remove();
+
+ // append css style
+ $('head').append('<style>.innerrowspan' + rowspan + ' { height: ' + innerHeight + 'px;} </style>');
+ }
+
+ return className;
+}
+
function colspanClass(colspan) {
var className = 'colspan'+ colspan;
- if ( $('<div class="' + className + '" />').width() == 0 ) { // only if not defined
+ if ( $('<div class="' + className + '" />').width() == 0 ) {
var singleWidth=0;
// loop over all stylesheets and classes and find .widget_container
@@ -186,7 +192,7 @@
if (sheet.href ? (sheet.href.search(/basic.css/) > 0) : false) {
$.each(sheet.cssRules, function(idx, cssclass) {
if (cssclass.selectorText=='.widget_container') {
- singleWidth = parseInt((cssclass.style.width).match(/[0-9]*/)[0]);
+ singleWidth = parseFloat((cssclass.style.width).match(/[0-9.]*/)[0]);
return;
}
});
@@ -204,13 +210,12 @@
totalWidth=100;
}
- $('head').append('<style>.colspan' + colspan + ' { width: ' + totalWidth +
- '%; overflow:hidden;} </style>');
+ $('head').append('<style>.colspan' + colspan + ' { width: ' +
+ totalWidth + '%; overflow:hidden;} </style>');
}
return className;
}
-
function parseXML(xml) {
// erst mal den Cache für AJAX-Requests wieder aktivieren
$.ajaxSetup({cache: true});
@@ -416,7 +421,7 @@
.data("textContent", page.textContent);
if (jQuery(retval).is(".widget")) {
- retval = jQuery("<div class='widget_container "+retval.data("colspanClass")+"' />").append(retval);
+ retval = jQuery("<div class='widget_container "+(retval.data("colspanClass") ? retval.data("colspanClass") : '')+" "+(retval.data("rowspanClass") ? retval.data("rowspanClass") : '')+"' />").append(retval);
}
return retval;
Modified: CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js 2012-01-28 21:33:09 UTC (rev 669)
+++ CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js 2012-01-30 20:25:43 UTC (rev 670)
@@ -23,9 +23,8 @@
VisuDesign_Custom.prototype.addCreator("colorchooser", {
create: function( page, path ) {
var $p = $(page);
- var ret_val = $('<div class="widget clearfix" />');
- ret_val.addClass( 'colorChooser' );
-
+ var ret_val = $('<div class="widget clearfix colorChooser" />');
+ ret_val.setWidgetStyle($p);
var labelElement = $p.find('label')[0];
var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
var address = {};
@@ -163,6 +162,8 @@
jQuery.farbtastic( element ).setColor( color );
},
attributes: {
+ rowspan: { type: 'numeric', required: false },
+ colspan: { type: 'numeric', required: false }
},
elements: {
label: { type: 'string', required: true, multi: false },
Modified: CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js 2012-01-28 21:33:09 UTC (rev 669)
+++ CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js 2012-01-30 20:25:43 UTC (rev 670)
@@ -41,16 +41,9 @@
var id = "rss_" + uniqid();
- var ret_val = $('<div class="widget clearfix" />');
- ret_val.addClass( 'rsslog' );
+ var ret_val = $('<div class="widget clearfix rsslog" />');
+ ret_val.setWidgetStyle($p);
- if ($p.attr("rowspan")) { // add rowspan only if not default
- ret_val.addClass(rowspanClass($p.attr("rowspan")));
- }
-
- if ($p.attr("colspan")) { // add colspan only if not default
- ret_val.data("colspanClass", colspanClass($p.attr("colspan")));
- }
var labelElement = $p.find('label')[0];
var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
@@ -71,9 +64,10 @@
rss.data("label", labelElement ? labelElement.textContent : '' );
rss.data("refresh", $p.attr("refresh"));
rss.data("content", $p.attr("content")) || true;
- rss.data("title", $p.attr("title")) || true;
+ rss.data("datetime", $p.attr("datetime")) || true;
rss.data("mode", $p.attr("mode") || "last");
rss.data("timeformat", $p.attr("timeformat"));
+
rss.data("itemoffset", 0);
@@ -87,7 +81,7 @@
height: {type: "string", required: false},
refresh: {type: "numeric", required: false},
content: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- title: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
+ datetime: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
mode: {type: "list", required: false, list: {'first': 'first', 'last': 'last', 'rollover':'rollover' }},
timeformat: {type: "string", required: false},
},
@@ -107,7 +101,7 @@
$(rss).rssfeedlocal({
src: src,
content: rss.data("content"),
- title: eval(rss.data("title")),
+ datetime: eval(rss.data("datetime")),
mode: rss.data("mode"),
timeformat: rss.data("timeformat"),
});
@@ -129,12 +123,17 @@
var defaults = {
src: '',
- html: '{date}: {text}',
+ html: '{text}',
wrapper: 'li',
dataType: 'xml',
- title: true
+ title: true,
+ datetime: true
}
var options = jQuery.extend(defaults, options);
+
+ if (options.datetime) {
+ options.html = '{date}: ' + options.html;
+ }
return this.each(function() {
var o = options;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j-...@us...> - 2012-02-02 16:42:21
|
Revision: 679
http://openautomation.svn.sourceforge.net/openautomation/?rev=679&view=rev
Author: j-n-k
Date: 2012-02-02 16:42:10 +0000 (Thu, 02 Feb 2012)
Log Message:
-----------
Added yaxismin/yaxismax parameters to diagram plugin
Fixed missing / in makeWidgetLabel
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
CometVisu/trunk/visu/visu_config.xsd
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2012-02-01 20:58:36 UTC (rev 678)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2012-02-02 16:42:10 UTC (rev 679)
@@ -70,7 +70,7 @@
$.fn.makeWidgetLabel = function(page) {
var labelElement = page.find('label')[0]; // get first label element
if (labelElement) { // if exists, add it
- this.append($('<div class="label">' + labelElement.textContent + '<div>'));
+ this.append($('<div class="label">' + labelElement.textContent + '</div>'));
}
return this;
}
Modified: CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2012-02-01 20:58:36 UTC (rev 678)
+++ CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2012-02-02 16:42:10 UTC (rev 679)
@@ -32,10 +32,9 @@
var id = "diagram_" + uniqid();
- var ret_val = $('<div class="widget clearfix" />');
- ret_val.addClass( 'diagram' );
- var labelElement = $p.find('label')[0];
- var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
+ var ret_val = $('<div class="widget clearfix diagram" />');
+ ret_val.setWidgetLayout($p).makeWidgetLabel($p);
+
var actor = $("<div class=\"actor\"><div class=\"diagram_inline\" id=\"" + id + "\">loading...</div></div>");
var diagram = $("#" + id, actor);
@@ -46,7 +45,7 @@
diagram.css("height", $p.attr("height"));
}
- ret_val.append(label).append(actor);
+ ret_val.append(actor);
diagram.data("id", id);
diagram.data("rrd", $p.attr("rrd"));
@@ -54,8 +53,10 @@
diagram.data("series", $p.attr("series") || "day");
diagram.data("period", $p.attr("period") || 1);
diagram.data("datasource", $p.attr("datasource") || "AVERAGE");
- diagram.data("label", $p.find('label')[0] ? $p.find('label')[0].textContent : '');
+ diagram.data("label", $('.label', ret_val).text() || '');
diagram.data("refresh", $p.attr("refresh"));
+ diagram.data("yaxismin", $p.attr("yaxismin"));
+ diagram.data("yaxismax", $p.attr("yaxismax"));
diagram.data("linecolor", $p.attr("linecolor") || "");
diagram.data("gridcolor", $p.attr("gridcolor") || "");
@@ -72,7 +73,11 @@
period: {type: "numeric", required: false},
datasource: {type: "list", required: false, list: {'MIN': "Min", 'AVERAGE': "Avg", 'MAX': "Max"}},
refresh: {type: "numeric", required: false},
+ yaxismin: {type: "numeric", required: false},
+ yaxismax: {type: "numeric", required: false},
linecolor: {type: "string", required: false},
+ colspan: {type: "numeric", required: false},
+ rowspan: {type: "numeric", required: false},
gridcolor: {type: "string", required: false}
},
elements: {
@@ -92,10 +97,9 @@
var id = "diagram_" + uniqid();
- var ret_val = $('<div class="widget clearfix" />');
- ret_val.addClass( 'diagram' );
- var labelElement = $p.find('label')[0];
- var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
+ var ret_val = $('<div class="widget clearfix diagram" />');
+ ret_val.setWidgetLayout($p).makeWidgetLabel($p);
+
var actor = $("<div class=\"actor\"><div class=\"diagram_preview\" id=\"" + id + "\">loading...</div></div>");
var diagram = $("#" + id, actor);
@@ -106,7 +110,7 @@
diagram.css("height", $p.attr("height"));
}
- ret_val.append(label).append(actor);
+ ret_val.append(actor);
diagram.data("id", id);
diagram.data("rrd", $p.attr("rrd"));
@@ -114,8 +118,10 @@
diagram.data("series", $p.attr("series") || "day");
diagram.data("period", $p.attr("period") || 1);
diagram.data("datasource", $p.attr("datasource") || "AVERAGE");
- diagram.data("label", $p.find('label')[0] ? $p.find('label')[0].textContent : '');
+ diagram.data("label", $('.label', ret_val).text() || '');
diagram.data("refresh", $p.attr("refresh"));
+ diagram.data("yaxismin", $p.attr("yaxismin"));
+ diagram.data("yaxismax", $p.attr("yaxismax"));
diagram.data("linecolor", $p.attr("linecolor") || "");
diagram.data("gridcolor", $p.attr("gridcolor") || "");
@@ -183,6 +189,8 @@
period: {type: "numeric", required: false},
datasource: {type: "list", required: false, list: {'MIN': "Min", 'AVERAGE': "Avg", 'MAX': "Max"}},
refresh: {type: "numeric", required: false},
+ yaxismin: {type: "numeric", required: false},
+ yaxismax: {type: "numeric", required: false},
linecolor: {type: "string", required: false},
gridcolor: {type: "string", required: false},
tooltip: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
@@ -211,11 +219,8 @@
var id = "diagram_" + uniqid();
- var ret_val = $('<div class="widget clearfix" />');
- ret_val.addClass( 'diagram' );
-
- var labelElement = $p.find('label')[0];
- var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
+ var ret_val = $('<div class="widget clearfix diagram" />');
+ ret_val.setWidgetLayout($p).makeWidgetLabel($p);
var actor = '<div class="actor switchUnpressed ';
if ( $p.attr( 'align' ) )
@@ -236,7 +241,7 @@
});
for( var addr in address ) $actor.bind( addr, this.update );
- ret_val.append(label).append($actor);
+ ret_val.append($actor);
$actor.addClass("clickable");
@@ -248,8 +253,10 @@
bDiagram.data("series", $p.attr("series") || "day");
bDiagram.data("period", $p.attr("period") || 1);
bDiagram.data("datasource", $p.attr("datasource") || "AVERAGE");
- bDiagram.data("label", labelElement.textContent);
+ bDiagram.data("label", $('.label', ret_val).text() || '');
bDiagram.data("refresh", $p.attr("refresh"));
+ bDiagram.data("yaxismin", $p.attr("yaxismin"));
+ bDiagram.data("yaxismax", $p.attr("yaxismax"));
bDiagram.data("linecolor", $p.attr("linecolor") || "");
bDiagram.data("gridcolor", $p.attr("gridcolor") || "");
@@ -259,7 +266,7 @@
bDiagram.data(data);
bDiagram.css({height: "90%"});
- showPopup("unknown", {title: labelElement.textContent, content: bDiagram});
+ showPopup("unknown", {title: bDiagram.data('label'), content: bDiagram});
bDiagram.parent("div").css({height: "100%", width: "90%", margin: "auto"}); // define parent as 100%!
var bDiagramOpts = {yaxis: {labelWidth: null}};
@@ -320,6 +327,8 @@
tooltip: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
linecolor: {type: "string", required: false},
gridcolor: {type: "string", required: false},
+ yaxismin: {type: "numeric", required: false},
+ yaxismax: {type: "numeric", required: false},
format: { type: 'format', required: false },
mapping: { type: 'mapping', required: false },
styling: { type: 'styling', required: false }
@@ -357,6 +366,8 @@
var period = diagram.data("period") || 1;
var linecolor = diagram.data("linecolor") || diagramColors.data;
var gridcolor = diagram.data("gridcolor") || "#81664B";
+ var yaxismin = diagram.data("yaxismin") || null;
+ var yaxismax = diagram.data("yaxismax") || null;
var series = {
hour: {label: "hour", res: "60", start: "hour", end: "now"},
@@ -369,7 +380,9 @@
var options = jQuery.extend(true,
{
yaxes: [{
- tickFormatter: function (v, axis) { return v.toFixed(axis.tickDecimals) + unit; }
+ tickFormatter: function (v, axis) { return v.toFixed(axis.tickDecimals) + unit; },
+ min: yaxismin,
+ max: yaxismax,
}],
xaxes: [{
mode: "time"
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2012-02-01 20:58:36 UTC (rev 678)
+++ CometVisu/trunk/visu/visu_config.xsd 2012-02-02 16:42:10 UTC (rev 679)
@@ -399,7 +399,9 @@
<xsd:attribute name="period" type="xsd:string" use="optional" />
<xsd:attribute name="datasource" type="xsd:string" use="optional" />
<xsd:attribute name="linecolor" type="xsd:string" use="optional" />
- <xsd:attribute name="gridcolor" type="xsd:string" use="optional" />
+ <xsd:attribute name="gridcolor" type="xsd:string" use="optional" />
+ <xsd:attribute name="yaxismin" type="xsd:string" use="optional" />
+ <xsd:attribute name="yaxismax" type="xsd:string" use="optional" />
</xsd:complexType>
<xsd:complexType name="diagram_popup" >
@@ -415,6 +417,8 @@
<xsd:attribute name="tooltip" type="xsd:string" use="optional" />
<xsd:attribute name="linecolor" type="xsd:string" use="optional" />
<xsd:attribute name="gridcolor" type="xsd:string" use="optional" />
+ <xsd:attribute name="yaxismin" type="xsd:string" use="optional" />
+ <xsd:attribute name="yaxismax" type="xsd:string" use="optional" />
</xsd:complexType>
<xsd:complexType name="diagram_info" >
@@ -434,6 +438,8 @@
<xsd:attribute name="tooltip" type="xsd:string" use="optional" />
<xsd:attribute name="linecolor" type="xsd:string" use="optional" />
<xsd:attribute name="gridcolor" type="xsd:string" use="optional" />
+ <xsd:attribute name="yaxismin" type="xsd:string" use="optional" />
+ <xsd:attribute name="yaxismax" type="xsd:string" use="optional" />
</xsd:complexType>
<xsd:complexType name="gweather" >
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j-...@us...> - 2012-02-05 18:04:15
|
Revision: 686
http://openautomation.svn.sourceforge.net/openautomation/?rev=686&view=rev
Author: j-n-k
Date: 2012-02-05 18:04:08 +0000 (Sun, 05 Feb 2012)
Log Message:
-----------
Rename .setWidgetStyle to .setWidgetLayout to avoid
problems with .setWidgetStyling
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js
CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
CometVisu/trunk/visu/plugins/gweather/structure_plugin.js
CometVisu/trunk/visu/plugins/jqclock/structure_plugin.js
CometVisu/trunk/visu/plugins/rss/structure_plugin.js
CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js
CometVisu/trunk/visu/plugins/upnpcontroller/structure_plugin.js
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2012-02-05 17:53:36 UTC (rev 685)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2012-02-05 18:04:08 UTC (rev 686)
@@ -54,7 +54,7 @@
* implemented: rowspan, colspan
*/
-$.fn.setWidgetStyle = function(page) {
+$.fn.setWidgetLayout = function(page) {
this.data('colspanClass', colspanClass(page.attr('colspan') || 1));
if (page.attr('rowspan')) {
this.data('rowspanClass', rowspanClass(page.attr('rowspan') || 1));
@@ -154,7 +154,7 @@
ret_val=$('');
} else { // default is visible
ret_val = $('<div class="widget clearfix link pagelink"/>');
- ret_val.setWidgetStyle($p);
+ ret_val.setWidgetLayout($p);
ret_val.append( '<div ' + wstyle + '><a href="javascript:scrollToPage(\''+path+'\')">' + name + '</a></div>' );
}
@@ -272,7 +272,7 @@
create: function( page, path ) {
var $p = $(page);
var ret_val = $('<div class="widget clearfix text" />');
- ret_val.setWidgetStyle($p);
+ ret_val.setWidgetLayout($p);
var style = '';
if( $p.attr('align') ) style += 'text-align:' + $p.attr('align') + ';';
if( style != '' ) style = 'style="' + style + '"';
@@ -295,7 +295,7 @@
var layout = $p.find('layout')[0];
var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
var ret_val = $('<div class="widget clearfix info" ' + style + ' />');
- ret_val.setWidgetStyle($p).makeWidgetLabel($p);
+ ret_val.setWidgetLayout($p).makeWidgetLabel($p);
var address = makeAddressList($p);
var actor = '<div class="actor"><div class="value">-</div></div>';
@@ -331,7 +331,7 @@
var layout = $p.find('layout')[0];
var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
var ret_val = $('<div class="widget clearfix slide" ' + style + ' />');
- ret_val.setWidgetStyle($p).makeWidgetLabel($p);
+ ret_val.setWidgetLayout($p).makeWidgetLabel($p);
var address = {};
var datatype_min = undefined;
var datatype_max = undefined;
@@ -445,7 +445,7 @@
create: function( page, path ) {
var $p = $(page);
var ret_val = $('<div class="widget clearfix switch" />');
- ret_val.setWidgetStyle($p)
+ ret_val.setWidgetLayout($p)
var labelElement = $p.find('label')[0];
var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
var address = makeAddressList($p);
@@ -502,7 +502,7 @@
create: function( page, path ) {
var $p = $(page);
var ret_val = $('<div class="widget clearfix toggle" />');
- ret_val.setWidgetStyle($p);
+ ret_val.setWidgetLayout($p);
var labelElement = $p.find('label')[0];
var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
var address = makeAddressList($p);
@@ -562,7 +562,7 @@
create: function( page, path ) {
var $p = $(page);
var ret_val = $('<div class="widget clearfix switch" />');
- ret_val.setWidgetStyle($p)
+ ret_val.setWidgetLayout($p)
var labelElement = $p.find('label')[0];
var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
var address = makeAddressList($p);
@@ -706,7 +706,7 @@
var $p = $(page);
var value = $p.attr('value') ? $p.attr('value') : 0;
var ret_val = $('<div class="widget clearfix switch" />');
- ret_val.setWidgetStyle($p);
+ ret_val.setWidgetLayout($p);
var labelElement = $p.find('label')[0];
var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
var address = makeAddressList($p);
@@ -762,7 +762,7 @@
create: function( page, path ) {
var $p = $(page);
var ret_val = $('<div class="widget clearfix image" />');
- ret_val.setWidgetStyle($p);
+ ret_val.setWidgetLayout($p);
var labelElement = $p.find('label')[0];
ret_val.append( labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '' );
var style = '';
@@ -798,7 +798,7 @@
create: function( page, path ) {
var $p = $(page);
var ret_val = $('<div class="widget clearfix video" />');
- ret_val.setWidgetStyle($p);
+ ret_val.setWidgetLayout($p);
var labelElement = $p.find('label')[0];
ret_val.append( labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '' );
var autoplay = ($p.attr('autoplay') && $p.attr('autoplay')=='true') ? ' autoplay="autoplay"' : '';
@@ -828,7 +828,7 @@
create: function( page, path ) {
var $p = $(page);
var ret_val = $('<div class="widget iframe" />');
- ret_val.setWidgetStyle($p);
+ ret_val.setWidgetLayout($p);
ret_val.append( '<div class="label">' + page.textContent + '</div>' );
var style = '';
if( $p.attr('width' ) ) {
@@ -868,7 +868,7 @@
create: function( page, path ) {
var $p = $(page);
var ret_val = $('<div class="widget clearfix switch" />');
- ret_val.setWidgetStyle($p);
+ ret_val.setWidgetLayout($p);
// handle label
var labelElement = $p.find('label')[0];
var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
@@ -1196,7 +1196,6 @@
return { x: 0, y: 0 }; // sanity return
}
-
function defaultUpdate( e, data, passedElement )
{
var element = passedElement || $(this);
Modified: CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js 2012-02-05 17:53:36 UTC (rev 685)
+++ CometVisu/trunk/visu/plugins/colorchooser/structure_plugin.js 2012-02-05 18:04:08 UTC (rev 686)
@@ -24,7 +24,7 @@
create: function( page, path ) {
var $p = $(page);
var ret_val = $('<div class="widget clearfix colorChooser" />');
- ret_val.setWidgetStyle($p);
+ ret_val.setWidgetLayout($p);
var labelElement = $p.find('label')[0];
var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
var address = {};
Modified: CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2012-02-05 17:53:36 UTC (rev 685)
+++ CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2012-02-05 18:04:08 UTC (rev 686)
@@ -33,7 +33,7 @@
var id = "diagram_" + uniqid();
var ret_val = $('<div class="widget clearfix diagram" />');
- ret_val.setWidgetStyle($p).makeWidgetLabel($p);
+ ret_val.setWidgetLayout($p).makeWidgetLabel($p);
var actor = $("<div class=\"actor\"><div class=\"diagram_inline\" id=\"" + id + "\">loading...</div></div>");
var diagram = $("#" + id, actor);
Modified: CometVisu/trunk/visu/plugins/gweather/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/gweather/structure_plugin.js 2012-02-05 17:53:36 UTC (rev 685)
+++ CometVisu/trunk/visu/plugins/gweather/structure_plugin.js 2012-02-05 18:04:08 UTC (rev 686)
@@ -32,8 +32,8 @@
var id = "gweather_" + uniqid();
- var ret_val = $('<div class="widget clearfix" />');
- ret_val.addClass( 'gweather' );
+ var ret_val = $('<div class="widget clearfix gweather" />');
+ ret_val.setWidgetLayout($p);
var label = '<div class="label">' + page.textContent + '</div>';
var actor = $("<div class=\"actor\"><div class=\"gweather\" id=\"" + id + "\">loading</div></div>");
var gweather = $("#" + id, actor);
Modified: CometVisu/trunk/visu/plugins/jqclock/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/jqclock/structure_plugin.js 2012-02-05 17:53:36 UTC (rev 685)
+++ CometVisu/trunk/visu/plugins/jqclock/structure_plugin.js 2012-02-05 18:04:08 UTC (rev 686)
@@ -32,13 +32,8 @@
var id = "jqclock_" + uniqid();
var ret_val = $('<div class="widget clearfix jqclock" />');
- if ($p.attr("rowspan")) { // add rowspan only if not default
- ret_val.addClass(rowspanClass($p.attr("rowspan")));
- }
- if ($p.attr("colspan")) { // add colspan only if not default
- ret_val.data("colspanClass", colspanClass($p.attr("colspan")));
- }
-
+ ret_val.setWidgetLayout($p);
+
var label = '<div class="label">' + page.textContent + '</div>';
var actor = $("<div class=\"actor\"><div class=\"jqclock_inline\" id=\"" + id + "\"></div></div>");
var jqclock = $("#"+id,actor);
Modified: CometVisu/trunk/visu/plugins/rss/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/rss/structure_plugin.js 2012-02-05 17:53:36 UTC (rev 685)
+++ CometVisu/trunk/visu/plugins/rss/structure_plugin.js 2012-02-05 18:04:08 UTC (rev 686)
@@ -39,8 +39,8 @@
var id = "rss_" + uniqid();
- var ret_val = $('<div class="widget clearfix" />');
- ret_val.addClass( 'rss' );
+ var ret_val = $('<div class="widget clearfix rss" />');
+ ret_val.setWidgetLayout($p);
var label = '<div class="label">' + page.textContent + '</div>';
var actor = $("<div class=\"actor\"><div class=\"rss_inline\" id=\"" + id + "\"></div>");
var rss = $("#" + id, actor);
Modified: CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js 2012-02-05 17:53:36 UTC (rev 685)
+++ CometVisu/trunk/visu/plugins/rsslog/structure_plugin.js 2012-02-05 18:04:08 UTC (rev 686)
@@ -42,7 +42,7 @@
var id = "rss_" + uniqid();
var ret_val = $('<div class="widget clearfix rsslog" />');
- ret_val.setWidgetStyle($p);
+ ret_val.setWidgetLayout($p);
var labelElement = $p.find('label')[0];
var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
Modified: CometVisu/trunk/visu/plugins/upnpcontroller/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/upnpcontroller/structure_plugin.js 2012-02-05 17:53:36 UTC (rev 685)
+++ CometVisu/trunk/visu/plugins/upnpcontroller/structure_plugin.js 2012-02-05 18:04:08 UTC (rev 686)
@@ -35,8 +35,8 @@
var id = "upnpcontroller_" + uniqid();
upnpcontroller_uid = id;
- var ret_val = $('<div class="widget" />');
- ret_val.addClass( 'upnpcontroller' );
+ var ret_val = $('<div class="widget upnpcontroller" />');
+ ret_val.setWidgetLayout($p);
var label = '<div class="label">' + $p.attr("label") + '</div>';
var actor = $("<div class=\"actor\"><div class=\"upnpcontroller\" id=\"" + id + "\">loading</div></div>");
var upnpcontroller = $("#" + id, actor);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-02-05 19:49:41
|
Revision: 689
http://openautomation.svn.sourceforge.net/openautomation/?rev=689&view=rev
Author: makki1
Date: 2012-02-05 19:49:35 +0000 (Sun, 05 Feb 2012)
Log Message:
-----------
imagetrigger-widget: WiP but basics work, plenty things pending
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/visu_config.xsd
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2012-02-05 18:41:40 UTC (rev 688)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2012-02-05 19:49:35 UTC (rev 689)
@@ -794,6 +794,133 @@
content: false
});
+ this.addCreator("imagetrigger", {
+ create: function( page, path ) {
+ var $p = $(page);
+ var ret_val = $('<div class="widget clearfix image" />');
+ ret_val.setWidgetLayout($p);
+ ret_val.addClass ('imagetrigger');
+ var value = $p.attr('value') ? $p.attr('value') : 0;
+ var labelElement = $p.find('label')[0];
+ ret_val.append( labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '' );
+ var address = {};
+ $p.find('address').each( function(){
+ var src = this.textContent;
+ ga_list.push( src )
+ address[ '_' + src ] = [
+ this.getAttribute('transform'), {
+ 'readonly' : this.getAttribute('readonly'),
+ 'writeonly' : this.getAttribute('writeonly')
+ }
+ ];
+ //[ transform, readonly=='true', writeonly=='true' ];
+ });
+ var style = ' style=" ';
+ style += $p.attr('width' ) ? 'width:' + $p.attr('width' ) + ';' : 'width: 100%;';
+ style += $p.attr('height' ) ? 'height:' + $p.attr('height' ) + ';"' : '"';
+
+ var actor = '<div class="actor">';
+ /*
+ if ( $p.attr('type')=='bitmask' )
+ for (var i = 0; i <= 7; i++)
+ actor += '<img src="" ' + style + ' class="image" />';
+ else
+ */
+ if ( $p.attr('type')=='show' )
+ actor += '<img src="' + $p.attr('src') + '.' + $p.attr('suffix') + '" ' + style + ' />';
+ else
+ actor += '<img src="" ' + style + ' />';
+ actor += '</div>';
+ /*
+ var map = $p.attr('mapping');
+ if( mappings[map] && mappings[map][value] )
+ actor += '<div class="value">' + mappings[map][value] + '</div>';
+ else
+ actor += '<div class="value">' + value + '</div>'; //no value if no mapping
+ */
+ actor += '</div>';
+ var refresh = $p.attr('refresh') ? $p.attr('refresh')*1000 : 0;
+ var $actor = $(actor).data( {
+ 'address': address,
+ 'refresh': refresh,
+ 'src': $p.attr('src'),
+ 'suffix': $p.attr('suffix'),
+ 'type': $p.attr('type'),
+ 'mapping': map,
+ 'sendValue': $p.attr('sendValue') || ""
+ } )
+ .each(setupRefreshAction) // abuse "each" to call in context... refresh is broken with select right now
+ .bind( 'click', this.action );
+ for( var addr in address ) {
+ $actor.bind( addr, this.update );
+ }
+ ret_val.append( $actor );
+ return ret_val;
+ },
+ update: function(e,d) {
+ var data = $(this).data();
+ if ( data.address[e.type][1].writeonly == "true")
+ return; // skip writeonly FIXME: writeonly shouldnt bind to update at all
+ var val = transformDecode(data.address[e.type][0], d);
+ if (data.type == "show")
+ if (val == 0)
+ $(this).children().hide();
+ else
+ $(this).children().attr("src", data.src + '.' + data.suffix ).show();
+ else if (data.type == "select")
+ if (val == 0)
+ $(this).children().hide();
+ else
+ $(this).children().attr("src", data.src + val + '.' + data.suffix ).show();
+ /*
+ else if (data.type == "bitmask")
+ if (val == 0) { //hide all
+ $(this).children().remove(); //.hide()
+ } else {
+ for (var i = 0; i <= 7; i++) {
+ var mask = Math.pow(2,i);
+ if ((mask & val) == mask) { //show
+ $(this).children().append('<img src="' + data.src + mask + '.' + data.suffix + '" />');
+ }
+ }
+ }
+ */
+
+ //FIXME: add value if mapping exists
+ //FIXME: get image name from mapping
+ //FIXME: add bitmask for multiple images
+ //FIXME: add SVG-magics
+ },
+ action: function() {
+ var data = $(this).data();
+ sendValue = data.sendValue;
+ for( var addr in data.address ) {
+ if( data.address[addr][1].readonly == "true" )
+ continue; // skip read only
+ if( data.sendValue == "" )
+ continue; // skip empty
+ visu.write( addr.substr(1), transformEncode( data.address[addr][0], sendValue ) );
+ }
+ },
+ attributes: {
+ src: { type: 'uri' , required: true },
+ width: { type: 'string' , required: false },
+ height: { type: 'string' , required: false },
+ refresh: { type: 'numeric', required: false },
+ colspan: { type: 'numeric', required: false },
+ rowspan: { type: 'numeric', required: false },
+ sendValue: { type: 'numeric', required: false },
+ type: { type: 'list' , required: true, list: {'show': 'show', 'select': 'select' /* , 'bitmask': 'bitmask' */ } },
+ mapping: { type: 'mapping', required: false },
+ suffix: { type: 'list' , required: false, list: {'png': '.png', 'jpg': '.jpg', 'gif': '.gif', 'svg': '.svg', 'bmp': '.bmp'} }
+ },
+ elements: {
+ label: { type: 'string', required: false, multi: false },
+ address: { type: 'address', required: true, multi: true }
+ },
+ content: false
+ });
+
this.addCreator('video', {
create: function( page, path ) {
var $p = $(page);
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2012-02-05 18:41:40 UTC (rev 688)
+++ CometVisu/trunk/visu/visu_config.xsd 2012-02-05 19:49:35 UTC (rev 689)
@@ -27,6 +27,7 @@
<xsd:extension base="addr">
<xsd:attribute ref="transform" use="required" />
<xsd:attribute ref="readonly" use="optional" />
+ <xsd:attribute ref="writeonly" use="optional" />
<xsd:attribute name="type" type="xsd:string" use="optional" />
<xsd:attribute name="variant" type="xsd:string" use="optional" />
</xsd:extension>
@@ -62,6 +63,7 @@
<xsd:attribute name="value" type="xsd:string" />
<xsd:attribute name="readonly" type="xsd:boolean" />
+<xsd:attribute name="writeonly" type="xsd:boolean" />
<xsd:attribute name="align" type="xsd:string" />
<xsd:attribute name="variant" type="xsd:string" />
@@ -173,6 +175,7 @@
<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" />
<!-- available plugins - include not checked -->
@@ -220,6 +223,7 @@
<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" />
<!-- available plugins - include not checked -->
@@ -357,6 +361,21 @@
<xsd:attribute name="refresh" type="xsd:decimal" />
</xsd:complexType>
+<xsd:complexType name="imagetrigger">
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
+ <xsd:element name="label" type="xsd:string" />
+ <xsd:element name="address" type="address" minOccurs="1"/>
+ </xsd:choice>
+ <xsd:attribute name="src" type="xsd:string"/>
+ <xsd:attribute name="suffix" type="xsd:string" use="required" />
+ <xsd:attribute name="type" type="xsd:string" use="optional" />
+ <xsd:attribute name="width" type="dimension" />
+ <xsd:attribute name="height" type="dimension" />
+ <xsd:attribute name="refresh" type="xsd:decimal" />
+ <xsd:attribute ref="mapping" use="optional" />
+ <xsd:attribute name="sendValue" type="xsd:string" use="optional" />
+</xsd:complexType>
+
<xsd:complexType name="video">
<xsd:choice maxOccurs="unbounded" minOccurs="0">
<xsd:element name="label" type="xsd:string" maxOccurs="1" />
@@ -387,7 +406,7 @@
</xsd:complexType>
<xsd:complexType name="diagram_inline">
- <xsd:choice maxOccurs="unbounded" minOccurs="1">
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
<xsd:element name="label" type="xsd:string" maxOccurs="1" />
</xsd:choice>
<xsd:attribute name="rrd" type="xsd:string" use="required" />
@@ -405,7 +424,7 @@
</xsd:complexType>
<xsd:complexType name="diagram_popup" >
- <xsd:choice maxOccurs="unbounded" minOccurs="1">
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
<xsd:element name="label" type="xsd:string" maxOccurs="1" />
</xsd:choice>
<xsd:attribute name="rrd" type="xsd:string" use="required" />
@@ -422,7 +441,7 @@
</xsd:complexType>
<xsd:complexType name="diagram_info" >
- <xsd:choice maxOccurs="unbounded" minOccurs="1">
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
<xsd:element name="label" type="xsd:string" maxOccurs="1" />
<xsd:element name="address" type="address" minOccurs="1"/>
</xsd:choice>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j-...@us...> - 2012-02-08 18:38:51
|
Revision: 690
http://openautomation.svn.sourceforge.net/openautomation/?rev=690&view=rev
Author: j-n-k
Date: 2012-02-08 18:38:45 +0000 (Wed, 08 Feb 2012)
Log Message:
-----------
1) Fix for missing colspan/rowspan-attributes in <page>
2) performance improvement in colspan/rowspan calculation
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2012-02-05 19:49:35 UTC (rev 689)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2012-02-08 18:38:45 UTC (rev 690)
@@ -186,6 +186,8 @@
ga: { type: 'addr', required: false },
visible: { type: 'string', required: false },
type: { type: 'string', required: false },
+ colspan: { type: 'numeric', required: false },
+ rowspan: { type: 'numeric', required: false }
backdrop: { type: 'string', required: false }
},
elements: {
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-02-05 19:49:35 UTC (rev 689)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-02-08 18:38:45 UTC (rev 690)
@@ -142,7 +142,7 @@
function rowspanClass(rowspan) {
var className = 'rowspan'+ rowspan;
- if ( $('<div class="' + className + '" />').height() == 0 ) {
+ if ( !$('head').data(className) ) {
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();
@@ -152,7 +152,7 @@
// append css style
- $('head').append('<style>.rowspan' + rowspan + ' { height: ' + rowspan*Math.round(singleHeight) + 'px; overflow:hidden;} </style>');
+ $('head').append('<style>.rowspan' + rowspan + ' { height: ' + rowspan*Math.round(singleHeight) + 'px; overflow:hidden;} </style>').data(className, 1);
}
return className;
@@ -161,7 +161,7 @@
function innerRowspanClass(rowspan) {
var className = 'innerrowspan'+ rowspan;
- if ( $('<div class="' + className + '" />').height() == 0 ) {
+ if ( !$('head').data(className)) {
var dummyDiv = $('<div class="clearfix" id="calcinnerrowspan"><div id="containerDiv" class="widget_container"><div class="widget clearfix text" id="innerDiv" /></div></div>')
.appendTo(document.body).show();
$('#containerDiv').addClass(rowspanClass(rowspan));
@@ -175,7 +175,8 @@
$('#calcinnerrowspan').remove();
// append css style
- $('head').append('<style>.innerrowspan' + rowspan + ' { height: ' + innerHeight + 'px;} </style>');
+ $('head').append('<style>.innerrowspan' + rowspan + ' { height: ' + innerHeight + 'px;} </style>').data(className, 1);
+
}
return className;
@@ -184,7 +185,7 @@
function colspanClass(colspan) {
var className = 'colspan'+ colspan;
- if ( $('<div class="' + className + '" />').width() == 0 ) {
+ if ( !$('head').data(className) ) {
var singleWidth=0;
// loop over all stylesheets and classes and find .widget_container
@@ -211,7 +212,7 @@
}
$('head').append('<style>.colspan' + colspan + ' { width: ' +
- totalWidth + '%; overflow:hidden;} </style>');
+ totalWidth + '%; overflow:hidden;} </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: <j-...@us...> - 2012-02-10 17:34:39
|
Revision: 693
http://openautomation.svn.sourceforge.net/openautomation/?rev=693&view=rev
Author: j-n-k
Date: 2012-02-10 17:34:28 +0000 (Fri, 10 Feb 2012)
Log Message:
-----------
Added missing strftime-library
Modified Paths:
--------------
CometVisu/trunk/visu/index.html
Added Paths:
-----------
CometVisu/trunk/visu/lib/strftime-min.js
CometVisu/trunk/visu/lib/strftime.js
Modified: CometVisu/trunk/visu/index.html
===================================================================
--- CometVisu/trunk/visu/index.html 2012-02-09 19:27:42 UTC (rev 692)
+++ CometVisu/trunk/visu/index.html 2012-02-10 17:34:28 UTC (rev 693)
@@ -11,6 +11,7 @@
<script src="lib/jquery.js" type="text/javascript"></script>
<script src="lib/compatibility.js" type="text/javascript"></script>
<script src="lib/jquery-ui.js" type="text/javascript"></script>
+ <script src="lib/strftime.js" type="text/javascript"></script>
<script src="lib/scrollable.js" type="text/javascript"></script>
<script src="lib/jquery.ui.touch-punch.js" type="text/javascript"></script>
<script src="lib/cometvisu-client.js" type="text/javascript"></script>
Added: CometVisu/trunk/visu/lib/strftime-min.js
===================================================================
--- CometVisu/trunk/visu/lib/strftime-min.js (rev 0)
+++ CometVisu/trunk/visu/lib/strftime-min.js 2012-02-10 17:34:28 UTC (rev 693)
@@ -0,0 +1 @@
+Date.ext={};Date.ext.util={};Date.ext.util.xPad=function(x,pad,r){if(typeof (r)=="undefined"){r=10}for(;parseInt(x,10)<r&&r>1;r/=10){x=pad.toString()+x}return x.toString()};Date.prototype.locale="en-GB";if(document.getElementsByTagName("html")&&document.getElementsByTagName("html")[0].lang){Date.prototype.locale=document.getElementsByTagName("html")[0].lang}Date.ext.locales={};Date.ext.locales.en={a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %T %Z",p:["AM","PM"],P:["am","pm"],x:"%d/%m/%y",X:"%T"};Date.ext.locales["en-US"]=Date.ext.locales.en;Date.ext.locales["en-US"].c="%a %d %b %Y %r %Z";Date.ext.locales["en-US"].x="%D";Date.ext.locales["en-US"].X="%r";Date.ext.locales["en-GB"]=Date.ext.locales.en;Date.ext.locales["en-AU"]=Date.ext.locales["en-GB"];Date.ext.formats={a:function(d){return Date.ext.locales[d.locale].a[d.getDay()]},A:function(d){return Date.ext.locales[d.locale].A[d.getDay()]},b:function(d){return Date.ext.locales[d.locale].b[d.getMonth()]},B:function(d){return Date.ext.locales[d.locale].B[d.getMonth()]},c:"toLocaleString",C:function(d){return Date.ext.util.xPad(parseInt(d.getFullYear()/100,10),0)},d:["getDate","0"],e:["getDate"," "],g:function(d){return Date.ext.util.xPad(parseInt(Date.ext.util.G(d)/100,10),0)},G:function(d){var y=d.getFullYear();var V=parseInt(Date.ext.formats.V(d),10);var W=parseInt(Date.ext.formats.W(d),10);if(W>V){y++}else{if(W===0&&V>=52){y--}}return y},H:["getHours","0"],I:function(d){var I=d.getHours()%12;return Date.ext.util.xPad(I===0?12:I,0)},j:function(d){var ms=d-new Date(""+d.getFullYear()+"/1/1 GMT");ms+=d.getTimezoneOffset()*60000;var doy=parseInt(ms/60000/60/24,10)+1;return Date.ext.util.xPad(doy,0,100)},m:function(d){return Date.ext.util.xPad(d.getMonth()+1,0)},M:["getMinutes","0"],p:function(d){return Date.ext.locales[d.locale].p[d.getHours()>=12?1:0]},P:function(d){return Date.ext.locales[d.locale].P[d.getHours()>=12?1:0]},S:["getSeconds","0"],u:function(d){var dow=d.getDay();return dow===0?7:dow},U:function(d){var doy=parseInt(Date.ext.formats.j(d),10);var rdow=6-d.getDay();var woy=parseInt((doy+rdow)/7,10);return Date.ext.util.xPad(woy,0)},V:function(d){var woy=parseInt(Date.ext.formats.W(d),10);var dow1_1=(new Date(""+d.getFullYear()+"/1/1")).getDay();var idow=woy+(dow1_1>4||dow1_1<=1?0:1);if(idow==53&&(new Date(""+d.getFullYear()+"/12/31")).getDay()<4){idow=1}else{if(idow===0){idow=Date.ext.formats.V(new Date(""+(d.getFullYear()-1)+"/12/31"))}}return Date.ext.util.xPad(idow,0)},w:"getDay",W:function(d){var doy=parseInt(Date.ext.formats.j(d),10);var rdow=7-Date.ext.formats.u(d);var woy=parseInt((doy+rdow)/7,10);return Date.ext.util.xPad(woy,0,10)},y:function(d){return Date.ext.util.xPad(d.getFullYear()%100,0)},Y:"getFullYear",z:function(d){var o=d.getTimezoneOffset();var H=Date.ext.util.xPad(parseInt(Math.abs(o/60),10),0);var M=Date.ext.util.xPad(o%60,0);return(o>0?"-":"+")+H+M},Z:function(d){return d.toString().replace(/^.*\(([^)]+)\)$/,"$1")},"%":function(d){return"%"}};Date.ext.aggregates={c:"locale",D:"%m/%d/%y",h:"%b",n:"\n",r:"%I:%M:%S %p",R:"%H:%M",t:"\t",T:"%H:%M:%S",x:"locale",X:"locale"};Date.ext.aggregates.z=Date.ext.formats.z(new Date());Date.ext.aggregates.Z=Date.ext.formats.Z(new Date());Date.ext.unsupported={};Date.prototype.strftime=function(fmt){if(!(this.locale in Date.ext.locales)){if(this.locale.replace(/-[a-zA-Z]+$/,"") in Date.ext.locales){this.locale=this.locale.replace(/-[a-zA-Z]+$/,"")}else{this.locale="en-GB"}}var d=this;while(fmt.match(/%[cDhnrRtTxXzZ]/)){fmt=fmt.replace(/%([cDhnrRtTxXzZ])/g,function(m0,m1){var f=Date.ext.aggregates[m1];return(f=="locale"?Date.ext.locales[d.locale][m1]:f)})}var str=fmt.replace(/%([aAbBCdegGHIjmMpPSuUVwWyY%])/g,function(m0,m1){var f=Date.ext.formats[m1];if(typeof (f)=="string"){return d[f]()}else{if(typeof (f)=="function"){return f.call(d,d)}else{if(typeof (f)=="object"&&typeof (f[0])=="string"){return Date.ext.util.xPad(d[f[0]](),f[1])}else{return m1}}}});d=null;return str};
Added: CometVisu/trunk/visu/lib/strftime.js
===================================================================
--- CometVisu/trunk/visu/lib/strftime.js (rev 0)
+++ CometVisu/trunk/visu/lib/strftime.js 2012-02-10 17:34:28 UTC (rev 693)
@@ -0,0 +1,732 @@
+/*
+ strftime for Javascript
+ Copyright (c) 2008, Philip S Tellis <ph...@bl...>
+ All rights reserved.
+
+ This code is distributed under the terms of the BSD licence
+
+ Redistribution and use of this software in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of
+ conditions and the following disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * The names of the contributors to this file may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * \file strftime.js
+ * \author Philip S Tellis \<ph...@bl...\>
+ * \version 1.3
+ * \date 2008/06
+ * \brief Javascript implementation of strftime
+ *
+ * Implements strftime for the Date object in javascript based on the PHP implementation described at
+ * http://www.php.net/strftime This is in turn based on the Open Group specification defined
+ * at http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html This implementation does not
+ * include modified conversion specifiers (i.e., Ex and Ox)
+ *
+ * The following format specifiers are supported:
+ *
+ * \copydoc formats
+ *
+ * \%a, \%A, \%b and \%B should be localised for non-English locales.
+ *
+ * \par Usage:
+ * This library may be used as follows:
+ * \code
+ * var d = new Date();
+ *
+ * var ymd = d.strftime('%Y/%m/%d');
+ * var iso = d.strftime('%Y-%m-%dT%H:%M:%S%z');
+ *
+ * \endcode
+ *
+ * \sa \link Date.prototype.strftime Date.strftime \endlink for a description of each of the supported format specifiers
+ * \sa Date.ext.locales for localisation information
+ * \sa http://www.php.net/strftime for the PHP implementation which is the basis for this
+ * \sa http://tech.bluesmoon.info/2008/04/strftime-in-javascript.html for feedback
+ */
+
+//! Date extension object - all supporting objects go in here.
+Date.ext = {};
+
+//! Utility methods
+Date.ext.util = {};
+
+/**
+\brief Left pad a number with something
+\details Takes a number and pads it to the left with the passed in pad character
+\param x The number to pad
+\param pad The string to pad with
+\param r [optional] Upper limit for pad. A value of 10 pads to 2 digits, a value of 100 pads to 3 digits.
+ Default is 10.
+
+\return The number left padded with the pad character. This function returns a string and not a number.
+*/
+Date.ext.util.xPad=function(x, pad, r)
+{
+ if(typeof(r) == 'undefined')
+ {
+ r=10;
+ }
+ for( ; parseInt(x, 10)<r && r>1; r/=10)
+ x = pad.toString() + x;
+ return x.toString();
+};
+
+/**
+\brief Currently selected locale.
+\details
+The locale for a specific date object may be changed using \code Date.locale = "new-locale"; \endcode
+The default will be based on the lang attribute of the HTML tag of your document
+*/
+Date.prototype.locale = 'en-GB';
+//! \cond FALSE
+if(document.getElementsByTagName('html') && document.getElementsByTagName('html')[0].lang)
+{
+ Date.prototype.locale = document.getElementsByTagName('html')[0].lang;
+}
+//! \endcond
+
+/**
+\brief Localised strings for days of the week and months of the year.
+\details
+To create your own local strings, add a locale object to the locales object.
+The key of your object should be the same as your locale name. For example:
+ en-US,
+ fr,
+ fr-CH,
+ de-DE
+Names are case sensitive and are described at http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
+Your locale object must contain the following keys:
+\param a Short names of days of week starting with Sunday
+\param A Long names days of week starting with Sunday
+\param b Short names of months of the year starting with January
+\param B Long names of months of the year starting with February
+\param c The preferred date and time representation in your locale
+\param p AM or PM in your locale
+\param P am or pm in your locale
+\param x The preferred date representation for the current locale without the time.
+\param X The preferred time representation for the current locale without the date.
+
+\sa Date.ext.locales.en for a sample implementation
+\sa \ref localisation for detailed documentation on localising strftime for your own locale
+*/
+Date.ext.locales = { };
+
+/**
+ * \brief Localised strings for English (British).
+ * \details
+ * This will be used for any of the English dialects unless overridden by a country specific one.
+ * This is the default locale if none specified
+ */
+Date.ext.locales.en = {
+ a: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
+ A: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
+ b: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ B: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
+ c: '%a %d %b %Y %T %Z',
+ p: ['AM', 'PM'],
+ P: ['am', 'pm'],
+ x: '%d/%m/%y',
+ X: '%T'
+};
+
+//! \cond FALSE
+// Localised strings for US English
+Date.ext.locales['en-US'] = Date.ext.locales.en;
+Date.ext.locales['en-US'].c = '%a %d %b %Y %r %Z';
+Date.ext.locales['en-US'].x = '%D';
+Date.ext.locales['en-US'].X = '%r';
+
+// Localised strings for British English
+Date.ext.locales['en-GB'] = Date.ext.locales.en;
+
+// Localised strings for Australian English
+Date.ext.locales['en-AU'] = Date.ext.locales['en-GB'];
+//! \endcond
+
+//! \brief List of supported format specifiers.
+/**
+ * \details
+ * \arg \%a - abbreviated weekday name according to the current locale
+ * \arg \%A - full weekday name according to the current locale
+ * \arg \%b - abbreviated month name according to the current locale
+ * \arg \%B - full month name according to the current locale
+ * \arg \%c - preferred date and time representation for the current locale
+ * \arg \%C - century number (the year divided by 100 and truncated to an integer, range 00 to 99)
+ * \arg \%d - day of the month as a decimal number (range 01 to 31)
+ * \arg \%D - same as %m/%d/%y
+ * \arg \%e - day of the month as a decimal number, a single digit is preceded by a space (range ' 1' to '31')
+ * \arg \%g - like %G, but without the century
+ * \arg \%G - The 4-digit year corresponding to the ISO week number
+ * \arg \%h - same as %b
+ * \arg \%H - hour as a decimal number using a 24-hour clock (range 00 to 23)
+ * \arg \%I - hour as a decimal number using a 12-hour clock (range 01 to 12)
+ * \arg \%j - day of the year as a decimal number (range 001 to 366)
+ * \arg \%m - month as a decimal number (range 01 to 12)
+ * \arg \%M - minute as a decimal number
+ * \arg \%n - newline character
+ * \arg \%p - either `AM' or `PM' according to the given time value, or the corresponding strings for the current locale
+ * \arg \%P - like %p, but lower case
+ * \arg \%r - time in a.m. and p.m. notation equal to %I:%M:%S %p
+ * \arg \%R - time in 24 hour notation equal to %H:%M
+ * \arg \%S - second as a decimal number
+ * \arg \%t - tab character
+ * \arg \%T - current time, equal to %H:%M:%S
+ * \arg \%u - weekday as a decimal number [1,7], with 1 representing Monday
+ * \arg \%U - week number of the current year as a decimal number, starting with
+ * the first Sunday as the first day of the first week
+ * \arg \%V - The ISO 8601:1988 week number of the current year as a decimal number,
+ * range 01 to 53, where week 1 is the first week that has at least 4 days
+ * in the current year, and with Monday as the first day of the week.
+ * \arg \%w - day of the week as a decimal, Sunday being 0
+ * \arg \%W - week number of the current year as a decimal number, starting with the
+ * first Monday as the first day of the first week
+ * \arg \%x - preferred date representation for the current locale without the time
+ * \arg \%X - preferred time representation for the current locale without the date
+ * \arg \%y - year as a decimal number without a century (range 00 to 99)
+ * \arg \%Y - year as a decimal number including the century
+ * \arg \%z - numerical time zone representation
+ * \arg \%Z - time zone name or abbreviation
+ * \arg \%% - a literal `\%' character
+ */
+Date.ext.formats = {
+ a: function(d) { return Date.ext.locales[d.locale].a[d.getDay()]; },
+ A: function(d) { return Date.ext.locales[d.locale].A[d.getDay()]; },
+ b: function(d) { return Date.ext.locales[d.locale].b[d.getMonth()]; },
+ B: function(d) { return Date.ext.locales[d.locale].B[d.getMonth()]; },
+ c: 'toLocaleString',
+ C: function(d) { return Date.ext.util.xPad(parseInt(d.getFullYear()/100, 10), 0); },
+ d: ['getDate', '0'],
+ e: ['getDate', ' '],
+ g: function(d) { return Date.ext.util.xPad(parseInt(Date.ext.util.G(d)/100, 10), 0); },
+ G: function(d) {
+ var y = d.getFullYear();
+ var V = parseInt(Date.ext.formats.V(d), 10);
+ var W = parseInt(Date.ext.formats.W(d), 10);
+
+ if(W > V) {
+ y++;
+ } else if(W===0 && V>=52) {
+ y--;
+ }
+
+ return y;
+ },
+ H: ['getHours', '0'],
+ I: function(d) { var I=d.getHours()%12; return Date.ext.util.xPad(I===0?12:I, 0); },
+ j: function(d) {
+ var ms = d - new Date('' + d.getFullYear() + '/1/1 GMT');
+ ms += d.getTimezoneOffset()*60000;
+ var doy = parseInt(ms/60000/60/24, 10)+1;
+ return Date.ext.util.xPad(doy, 0, 100);
+ },
+ m: function(d) { return Date.ext.util.xPad(d.getMonth()+1, 0); },
+ M: ['getMinutes', '0'],
+ p: function(d) { return Date.ext.locales[d.locale].p[d.getHours() >= 12 ? 1 : 0 ]; },
+ P: function(d) { return Date.ext.locales[d.locale].P[d.getHours() >= 12 ? 1 : 0 ]; },
+ S: ['getSeconds', '0'],
+ u: function(d) { var dow = d.getDay(); return dow===0?7:dow; },
+ U: function(d) {
+ var doy = parseInt(Date.ext.formats.j(d), 10);
+ var rdow = 6-d.getDay();
+ var woy = parseInt((doy+rdow)/7, 10);
+ return Date.ext.util.xPad(woy, 0);
+ },
+ V: function(d) {
+ var woy = parseInt(Date.ext.formats.W(d), 10);
+ var dow1_1 = (new Date('' + d.getFullYear() + '/1/1')).getDay();
+ // First week is 01 and not 00 as in the case of %U and %W,
+ // so we add 1 to the final result except if day 1 of the year
+ // is a Monday (then %W returns 01).
+ // We also need to subtract 1 if the day 1 of the year is
+ // Friday-Sunday, so the resulting equation becomes:
+ var idow = woy + (dow1_1 > 4 || dow1_1 <= 1 ? 0 : 1);
+ if(idow == 53 && (new Date('' + d.getFullYear() + '/12/31')).getDay() < 4)
+ {
+ idow = 1;
+ }
+ else if(idow === 0)
+ {
+ idow = Date.ext.formats.V(new Date('' + (d.getFullYear()-1) + '/12/31'));
+ }
+
+ return Date.ext.util.xPad(idow, 0);
+ },
+ w: 'getDay',
+ W: function(d) {
+ var doy = parseInt(Date.ext.formats.j(d), 10);
+ var rdow = 7-Date.ext.formats.u(d);
+ var woy = parseInt((doy+rdow)/7, 10);
+ return Date.ext.util.xPad(woy, 0, 10);
+ },
+ y: function(d) { return Date.ext.util.xPad(d.getFullYear()%100, 0); },
+ Y: 'getFullYear',
+ z: function(d) {
+ var o = d.getTimezoneOffset();
+ var H = Date.ext.util.xPad(parseInt(Math.abs(o/60), 10), 0);
+ var M = Date.ext.util.xPad(o%60, 0);
+ return (o>0?'-':'+') + H + M;
+ },
+ Z: function(d) { return d.toString().replace(/^.*\(([^)]+)\)$/, '$1'); },
+ '%': function(d) { return '%'; }
+};
+
+/**
+\brief List of aggregate format specifiers.
+\details
+Aggregate format specifiers map to a combination of basic format specifiers.
+These are implemented in terms of Date.ext.formats.
+
+A format specifier that maps to 'locale' is read from Date.ext.locales[current-locale].
+
+\sa Date.ext.formats
+*/
+Date.ext.aggregates = {
+ c: 'locale',
+ D: '%m/%d/%y',
+ h: '%b',
+ n: '\n',
+ r: '%I:%M:%S %p',
+ R: '%H:%M',
+ t: '\t',
+ T: '%H:%M:%S',
+ x: 'locale',
+ X: 'locale'
+};
+
+//! \cond FALSE
+// Cache timezone values because they will never change for a given JS instance
+Date.ext.aggregates.z = Date.ext.formats.z(new Date());
+Date.ext.aggregates.Z = Date.ext.formats.Z(new Date());
+//! \endcond
+
+//! List of unsupported format specifiers.
+/**
+ * \details
+ * All format specifiers supported by the PHP implementation are supported by
+ * this javascript implementation.
+ */
+Date.ext.unsupported = { };
+
+
+/**
+ * \brief Formats the date according to the specified format.
+ * \param fmt The format to format the date in. This may be a combination of the following:
+ * \copydoc formats
+ *
+ * \return A string representation of the date formatted based on the passed in parameter
+ * \sa http://www.php.net/strftime for documentation on format specifiers
+*/
+Date.prototype.strftime=function(fmt)
+{
+ // Fix locale if declared locale hasn't been defined
+ // After the first call this condition should never be entered unless someone changes the locale
+ if(!(this.locale in Date.ext.locales))
+ {
+ if(this.locale.replace(/-[a-zA-Z]+$/, '') in Date.ext.locales)
+ {
+ this.locale = this.locale.replace(/-[a-zA-Z]+$/, '');
+ }
+ else
+ {
+ this.locale = 'en-GB';
+ }
+ }
+
+ var d = this;
+ // First replace aggregates
+ while(fmt.match(/%[cDhnrRtTxXzZ]/))
+ {
+ fmt = fmt.replace(/%([cDhnrRtTxXzZ])/g, function(m0, m1)
+ {
+ var f = Date.ext.aggregates[m1];
+ return (f == 'locale' ? Date.ext.locales[d.locale][m1] : f);
+ });
+ }
+
+
+ // Now replace formats - we need a closure so that the date object gets passed through
+ var str = fmt.replace(/%([aAbBCdegGHIjmMpPSuUVwWyY%])/g, function(m0, m1)
+ {
+ var f = Date.ext.formats[m1];
+ if(typeof(f) == 'string') {
+ return d[f]();
+ } else if(typeof(f) == 'function') {
+ return f.call(d, d);
+ } else if(typeof(f) == 'object' && typeof(f[0]) == 'string') {
+ return Date.ext.util.xPad(d[f[0]](), f[1]);
+ } else {
+ return m1;
+ }
+ });
+ d=null;
+ return str;
+};
+
+/**
+ * \mainpage strftime for Javascript
+ *
+ * \section toc Table of Contents
+ * - \ref intro_sec
+ * - <a class="el" href="strftime.js">Download full source</a> / <a class="el" href="strftime-min.js">minified</a>
+ * - \subpage usage
+ * - \subpage format_specifiers
+ * - \subpage localisation
+ * - \link strftime.js API Documentation \endlink
+ * - \subpage demo
+ * - \subpage changelog
+ * - \subpage faq
+ * - <a class="el" href="http://tech.bluesmoon.info/2008/04/strftime-in-javascript.html">Feedback</a>
+ * - \subpage copyright_licence
+ *
+ * \section intro_sec Introduction
+ *
+ * C and PHP developers have had access to a built in strftime function for a long time.
+ * This function is an easy way to format dates and times for various display needs.
+ *
+ * This library brings the flexibility of strftime to the javascript Date object
+ *
+ * Use this library if you frequently need to format dates in javascript in a variety of ways. For example,
+ * if you have PHP code that writes out formatted dates, and want to mimic the functionality using
+ * progressively enhanced javascript, then this library can do exactly what you want.
+ *
+ *
+ *
+ *
+ * \page usage Example usage
+ *
+ * \section usage_sec Usage
+ * This library may be used as follows:
+ * \code
+ * var d = new Date();
+ *
+ * var ymd = d.strftime('%Y/%m/%d');
+ * var iso = d.strftime('%Y-%m-%dT%H:%M:%S%z');
+ *
+ * \endcode
+ *
+ * \subsection examples Examples
+ *
+ * To get the current time in hours and minutes:
+ * \code
+ * var d = new Date();
+ * d.strftime("%H:%M");
+ * \endcode
+ *
+ * To get the current time with seconds in AM/PM notation:
+ * \code
+ * var d = new Date();
+ * d.strftime("%r");
+ * \endcode
+ *
+ * To get the year and day of the year for August 23, 2009:
+ * \code
+ * var d = new Date('2009/8/23');
+ * d.strftime("%Y-%j");
+ * \endcode
+ *
+ * \section demo_sec Demo
+ *
+ * Try your own examples on the \subpage demo page. You can use any of the supported
+ * \subpage format_specifiers.
+ *
+ *
+ *
+ *
+ * \page localisation Localisation
+ * You can localise strftime by implementing the short and long forms for days of the
+ * week and months of the year, and the localised aggregates for the preferred date
+ * and time representation for your locale. You need to add your locale to the
+ * Date.ext.locales object.
+ *
+ * \section localising_fr Localising for french
+ *
+ * For example, this is how we'd add French language strings to the locales object:
+ * \dontinclude index.html
+ * \skip Generic french
+ * \until };
+ * The % format specifiers are all defined in \ref formats. You can use any of those.
+ *
+ * This locale definition may be included in your own source file, or in the HTML file
+ * including \c strftime.js, however it must be defined \em after including \c strftime.js
+ *
+ * The above definition includes generic french strings and formats that are used in France.
+ * Other french speaking countries may have other representations for dates and times, so we
+ * need to override this for them. For example, Canadian french uses a Y-m-d date format,
+ * while French french uses d.m.Y. We fix this by defining Canadian french to be the same
+ * as generic french, and then override the format specifiers for \c x for the \c fr-CA locale:
+ * \until End french
+ *
+ * You can now use any of the French locales at any time by setting \link Date.prototype.locale Date.locale \endlink
+ * to \c "fr", \c "fr-FR", \c "fr-CA", or any other french dialect:
+ * \code
+ * var d = new Date("2008/04/22");
+ * d.locale = "fr";
+ *
+ * d.strftime("%A, %d %B == %x");
+ * \endcode
+ * will return:
+ * \code
+ * mardi, 22 avril == 22.04.2008
+ * \endcode
+ * While changing the locale to "fr-CA":
+ * \code
+ * d.locale = "fr-CA";
+ *
+ * d.strftime("%A, %d %B == %x");
+ * \endcode
+ * will return:
+ * \code
+ * mardi, 22 avril == 2008-04-22
+ * \endcode
+ *
+ * You can use any of the format specifiers defined at \ref formats
+ *
+ * The locale for all dates defaults to the value of the \c lang attribute of your HTML document if
+ * it is set, or to \c "en" otherwise.
+ * \note
+ * Your locale definitions \b MUST be added to the locale object before calling
+ * \link Date.prototype.strftime Date.strftime \endlink.
+ *
+ * \sa \ref formats for a list of format specifiers that can be used in your definitions
+ * for c, x and X.
+ *
+ * \section locale_names Locale names
+ *
+ * Locale names are defined in RFC 1766. Typically, a locale would be a two letter ISO639
+ * defined language code and an optional ISO3166 defined country code separated by a -
+ *
+ * eg: fr-FR, de-DE, hi-IN
+ *
+ * \sa http://www.ietf.org/rfc/rfc1766.txt
+ * \sa http://www.loc.gov/standards/iso639-2/php/code_list.php
+ * \sa http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm
+ *
+ * \section locale_fallback Locale fallbacks
+ *
+ * If a locale object corresponding to the fully specified locale isn't found, an attempt will be made
+ * to fall back to the two letter language code. If a locale object corresponding to that isn't found
+ * either, then the locale will fall back to \c "en". No warning will be issued.
+ *
+ * For example, if we define a locale for de:
+ * \until };
+ * Then set the locale to \c "de-DE":
+ * \code
+ * d.locale = "de-DE";
+ *
+ * d.strftime("%a, %d %b");
+ * \endcode
+ * In this case, the \c "de" locale will be used since \c "de-DE" has not been defined:
+ * \code
+ * Di, 22 Apr
+ * \endcode
+ *
+ * Swiss german will return the same since it will also fall back to \c "de":
+ * \code
+ * d.locale = "de-CH";
+ *
+ * d.strftime("%a, %d %b");
+ * \endcode
+ * \code
+ * Di, 22 Apr
+ * \endcode
+ *
+ * We need to override the \c a specifier for Swiss german, since it's different from German german:
+ * \until End german
+ * We now get the correct results:
+ * \code
+ * d.locale = "de-CH";
+ *
+ * d.strftime("%a, %d %b");
+ * \endcode
+ * \code
+ * Die, 22 Apr
+ * \endcode
+ *
+ * \section builtin_locales Built in locales
+ *
+ * This library comes with pre-defined locales for en, en-GB, en-US and en-AU.
+ *
+ *
+ *
+ *
+ * \page format_specifiers Format specifiers
+ *
+ * \section specifiers Format specifiers
+ * strftime has several format specifiers defined by the Open group at
+ * http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html
+ *
+ * PHP added a few of its own, defined at http://www.php.net/strftime
+ *
+ * This javascript implementation supports all the PHP specifiers
+ *
+ * \subsection supp Supported format specifiers:
+ * \copydoc formats
+ *
+ * \subsection unsupportedformats Unsupported format specifiers:
+ * \copydoc unsupported
+ *
+ *
+ *
+ *
+ * \page demo strftime demo
+ * <div style="float:right;width:45%;">
+ * \copydoc formats
+ * </div>
+ * \htmlinclude index.html
+ *
+ *
+ *
+ *
+ * \page faq FAQ
+ *
+ * \section how_tos Usage
+ *
+ * \subsection howtouse Is there a manual on how to use this library?
+ *
+ * Yes, see \ref usage
+ *
+ * \subsection wheretoget Where can I get a minified version of this library?
+ *
+ * The minified version is available <a href="strftime-min.js" title="Minified strftime.js">here</a>.
+ *
+ * \subsection which_specifiers Which format specifiers are supported?
+ *
+ * See \ref format_specifiers
+ *
+ * \section whys Why?
+ *
+ * \subsection why_lib Why this library?
+ *
+ * I've used the strftime function in C, PHP and the Unix shell, and found it very useful
+ * to do date formatting. When I needed to do date formatting in javascript, I decided
+ * that it made the most sense to just reuse what I'm already familiar with.
+ *
+ * \subsection why_another Why another strftime implementation for Javascript?
+ *
+ * Yes, there are other strftime implementations for Javascript, but I saw problems with
+ * all of them that meant I couldn't use them directly. Some implementations had bad
+ * designs. For example, iterating through all possible specifiers and scanning the string
+ * for them. Others were tied to specific libraries like prototype.
+ *
+ * Trying to extend any of the existing implementations would have required only slightly
+ * less effort than writing this from scratch. In the end it took me just about 3 hours
+ * to write the code and about 6 hours battling with doxygen to write these docs.
+ *
+ * I also had an idea of how I wanted to implement this, so decided to try it.
+ *
+ * \subsection why_extend_date Why extend the Date class rather than subclass it?
+ *
+ * I tried subclassing Date and failed. I didn't want to waste time on figuring
+ * out if there was a problem in my code or if it just wasn't possible. Adding to the
+ * Date.prototype worked well, so I stuck with it.
+ *
+ * I did have some worries because of the way for..in loops got messed up after json.js added
+ * to the Object.prototype, but that isn't an issue here since {} is not a subclass of Date.
+ *
+ * My last doubt was about the Date.ext namespace that I created. I still don't like this,
+ * but I felt that \c ext at least makes clear that this is external or an extension.
+ *
+ * It's quite possible that some future version of javascript will add an \c ext or a \c locale
+ * or a \c strftime property/method to the Date class, but this library should probably
+ * check for capabilities before doing what it does.
+ *
+ * \section curiosity Curiosity
+ *
+ * \subsection how_big How big is the code?
+ *
+ * \arg 26K b...
[truncated message content] |
|
From: <j-...@us...> - 2012-02-11 19:40:28
|
Revision: 695
http://openautomation.svn.sourceforge.net/openautomation/?rev=695&view=rev
Author: j-n-k
Date: 2012-02-11 19:40:21 +0000 (Sat, 11 Feb 2012)
Log Message:
-----------
Modified colspan (see discussion in KNX-UF):
- a column has a width of 8.33333%
- all widgetcontainer have a colspanX-class, where X is the number of columns
- if no colspan-attribute is set for the widget, colspan0 is uses
- colspan-classes are defined in design/textglobal.css
- each design defines a default widget width colspan0
- pure, discreet, sicreet_sand, alaska: width: 49.99998%
- alaska_slim, discreet_slim: 33.33332%
- pitchblack: 8.33333%
Modified Paths:
--------------
CometVisu/trunk/visu/designs/alaska/basic.css
CometVisu/trunk/visu/designs/alaska_slim/basic.css
CometVisu/trunk/visu/designs/discreet/basic.css
CometVisu/trunk/visu/designs/discreet_sand/basic.css
CometVisu/trunk/visu/designs/discreet_slim/basic.css
CometVisu/trunk/visu/designs/pitchblack/basic.css
CometVisu/trunk/visu/designs/pure/basic.css
CometVisu/trunk/visu/designs/structure_custom.js
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/lib/templateengine.js
Added Paths:
-----------
CometVisu/trunk/visu/designs/textglobal.css
Modified: CometVisu/trunk/visu/designs/alaska/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska/basic.css 2012-02-11 13:18:38 UTC (rev 694)
+++ CometVisu/trunk/visu/designs/alaska/basic.css 2012-02-11 19:40:21 UTC (rev 695)
@@ -87,8 +87,11 @@
text-decoration: none;
}
+.colspan0 { /* multiple of 8.33333% ! */
+ width: 49.9998%;
+}
+
.widget_container {
- width: 50%;
float: left;
}
Modified: CometVisu/trunk/visu/designs/alaska_slim/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska_slim/basic.css 2012-02-11 13:18:38 UTC (rev 694)
+++ CometVisu/trunk/visu/designs/alaska_slim/basic.css 2012-02-11 19:40:21 UTC (rev 695)
@@ -82,8 +82,11 @@
text-decoration: none;
}
+.colspan0 { /* multiple of 8.33333% ! */
+ width: 33.33332%;
+}
+
.widget_container {
- width: 33%;
float: left;
}
Modified: CometVisu/trunk/visu/designs/discreet/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet/basic.css 2012-02-11 13:18:38 UTC (rev 694)
+++ CometVisu/trunk/visu/designs/discreet/basic.css 2012-02-11 19:40:21 UTC (rev 695)
@@ -81,9 +81,12 @@
vertical-align: middle;
}
+.colspan0 { /* multiple of 8.33333% ! */
+ width: 49.9998%;
+}
+
.widget_container {
- width: 50%;
- float: left;
+ float: left;
}
.widget_container .widget_container {
Modified: CometVisu/trunk/visu/designs/discreet_sand/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet_sand/basic.css 2012-02-11 13:18:38 UTC (rev 694)
+++ CometVisu/trunk/visu/designs/discreet_sand/basic.css 2012-02-11 19:40:21 UTC (rev 695)
@@ -74,8 +74,11 @@
vertical-align: middle;
}
+.colspan0 { /* multiple of 8.33333% ! */
+ width: 49.9998%;
+}
+
.widget_container {
- width: 50%;
float: left;
}
Modified: CometVisu/trunk/visu/designs/discreet_slim/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet_slim/basic.css 2012-02-11 13:18:38 UTC (rev 694)
+++ CometVisu/trunk/visu/designs/discreet_slim/basic.css 2012-02-11 19:40:21 UTC (rev 695)
@@ -74,8 +74,11 @@
vertical-align: middle;
}
+.colspan0 { /* multiple of 8.33333% ! */
+ width: 33.33332%;
+}
+
.widget_container {
- width: 33%;
float: left;
}
Modified: CometVisu/trunk/visu/designs/pitchblack/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/pitchblack/basic.css 2012-02-11 13:18:38 UTC (rev 694)
+++ CometVisu/trunk/visu/designs/pitchblack/basic.css 2012-02-11 19:40:21 UTC (rev 695)
@@ -241,10 +241,13 @@
vertical-align: middle;
}
-.widget_container {
+.colspan0 { /* multiple of 8.33333% ! */
width: 8.33333%;
}
+.widget_container {
+}
+
.widget_container .widget_container, .link > div, .link a , .switchPressed,
.switchUnpressed, * html>body .clearfix, .info > div, .actor .value , .text>div{
width: 100%;
Modified: CometVisu/trunk/visu/designs/pure/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/pure/basic.css 2012-02-11 13:18:38 UTC (rev 694)
+++ CometVisu/trunk/visu/designs/pure/basic.css 2012-02-11 19:40:21 UTC (rev 695)
@@ -62,9 +62,12 @@
vertical-align: middle;
}
+.colspan0 { /* multiple of 8.33333% ! */
+ width: 49.9998%;
+}
+
.widget_container {
- width: 50%;
- float: left;
+ float: left;
}
.widget_container .widget_container {
Modified: CometVisu/trunk/visu/designs/structure_custom.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_custom.js 2012-02-11 13:18:38 UTC (rev 694)
+++ CometVisu/trunk/visu/designs/structure_custom.js 2012-02-11 19:40:21 UTC (rev 695)
@@ -42,18 +42,17 @@
*/
VisuDesign_Custom.prototype.addCreator("designtoggle", {
create: function( page, path ) {
-
- var ret_val = $('<div class="widget clearfix" />');
- ret_val.addClass( 'switch' );
- var label = '<div class="label">' + page.textContent + '</div>';
+ var $p = $(page);
+ var ret_val = $('<div class="widget clearfix switch" />');
+ ret_val.setWidgetLayout($p).makeWidgetLabel($p);
var actor = '<div class="actor switchUnpressed">';
- var value = $('link[href*="designs"]').attr('href').split('/')[1];
+ var value = $('link[href*="basic.css"]').attr('href').split('/')[1];
actor += '<div class="value">' + value + '</div>';
actor += '</div>';
- ret_val.append(label).append($(actor)
+ ret_val.append($(actor)
.data({
- 'mapping' : $(page).attr('mapping'),
- 'styling' : $(page).attr('styling'),
+ 'mapping' : $p.attr('mapping'),
+ 'styling' : $p.attr('styling'),
'value' : value,
'type' : 'toggle'
})
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2012-02-11 13:18:38 UTC (rev 694)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2012-02-11 19:40:21 UTC (rev 695)
@@ -55,7 +55,7 @@
*/
$.fn.setWidgetLayout = function(page) {
- this.data('colspanClass', colspanClass(page.attr('colspan') || 1));
+ this.data('colspanClass', 'colspan'+(page.attr('colspan') || '0'));
if (page.attr('rowspan')) {
this.data('rowspanClass', rowspanClass(page.attr('rowspan') || 1));
this.addClass(innerRowspanClass(page.attr('rowspan') || 1));
@@ -796,133 +796,6 @@
content: false
});
- this.addCreator("imagetrigger", {
- create: function( page, path ) {
- var $p = $(page);
- var ret_val = $('<div class="widget clearfix image" />');
- ret_val.setWidgetLayout($p);
- ret_val.addClass ('imagetrigger');
- var value = $p.attr('value') ? $p.attr('value') : 0;
- var labelElement = $p.find('label')[0];
- ret_val.append( labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '' );
- var address = {};
- $p.find('address').each( function(){
- var src = this.textContent;
- ga_list.push( src )
- address[ '_' + src ] = [
- this.getAttribute('transform'), {
- 'readonly' : this.getAttribute('readonly'),
- 'writeonly' : this.getAttribute('writeonly')
- }
- ];
- //[ transform, readonly=='true', writeonly=='true' ];
- });
- var style = ' style=" ';
- style += $p.attr('width' ) ? 'width:' + $p.attr('width' ) + ';' : 'width: 100%;';
- style += $p.attr('height' ) ? 'height:' + $p.attr('height' ) + ';"' : '"';
-
- var actor = '<div class="actor">';
- /*
- if ( $p.attr('type')=='bitmask' )
- for (var i = 0; i <= 7; i++)
- actor += '<img src="" ' + style + ' class="image" />';
- else
- */
- if ( $p.attr('type')=='show' )
- actor += '<img src="' + $p.attr('src') + '.' + $p.attr('suffix') + '" ' + style + ' />';
- else
- actor += '<img src="" ' + style + ' />';
- actor += '</div>';
- /*
- var map = $p.attr('mapping');
- if( mappings[map] && mappings[map][value] )
- actor += '<div class="value">' + mappings[map][value] + '</div>';
- else
- actor += '<div class="value">' + value + '</div>'; //no value if no mapping
- */
- actor += '</div>';
- var refresh = $p.attr('refresh') ? $p.attr('refresh')*1000 : 0;
- var $actor = $(actor).data( {
- 'address': address,
- 'refresh': refresh,
- 'src': $p.attr('src'),
- 'suffix': $p.attr('suffix'),
- 'type': $p.attr('type'),
- 'mapping': map,
- 'sendValue': $p.attr('sendValue') || ""
- } )
- .each(setupRefreshAction) // abuse "each" to call in context... refresh is broken with select right now
- .bind( 'click', this.action );
- for( var addr in address ) {
- $actor.bind( addr, this.update );
- }
- ret_val.append( $actor );
- return ret_val;
- },
- update: function(e,d) {
- var data = $(this).data();
- if ( data.address[e.type][1].writeonly == "true")
- return; // skip writeonly FIXME: writeonly shouldnt bind to update at all
- var val = transformDecode(data.address[e.type][0], d);
- if (data.type == "show")
- if (val == 0)
- $(this).children().hide();
- else
- $(this).children().attr("src", data.src + '.' + data.suffix ).show();
- else if (data.type == "select")
- if (val == 0)
- $(this).children().hide();
- else
- $(this).children().attr("src", data.src + val + '.' + data.suffix ).show();
- /*
- else if (data.type == "bitmask")
- if (val == 0) { //hide all
- $(this).children().remove(); //.hide()
- } else {
- for (var i = 0; i <= 7; i++) {
- var mask = Math.pow(2,i);
- if ((mask & val) == mask) { //show
- $(this).children().append('<img src="' + data.src + mask + '.' + data.suffix + '" />');
- }
- }
- }
- */
-
- //FIXME: add value if mapping exists
- //FIXME: get image name from mapping
- //FIXME: add bitmask for multiple images
- //FIXME: add SVG-magics
- },
- action: function() {
- var data = $(this).data();
- sendValue = data.sendValue;
- for( var addr in data.address ) {
- if( data.address[addr][1].readonly == "true" )
- continue; // skip read only
- if( data.sendValue == "" )
- continue; // skip empty
- visu.write( addr.substr(1), transformEncode( data.address[addr][0], sendValue ) );
- }
- },
- attributes: {
- src: { type: 'uri' , required: true },
- width: { type: 'string' , required: false },
- height: { type: 'string' , required: false },
- refresh: { type: 'numeric', required: false },
- colspan: { type: 'numeric', required: false },
- rowspan: { type: 'numeric', required: false },
- sendValue: { type: 'numeric', required: false },
- type: { type: 'list' , required: true, list: {'show': 'show', 'select': 'select' /* , 'bitmask': 'bitmask' */ } },
- mapping: { type: 'mapping', required: false },
- suffix: { type: 'list' , required: false, list: {'png': '.png', 'jpg': '.jpg', 'gif': '.gif', 'svg': '.svg', 'bmp': '.bmp'} }
- },
- elements: {
- label: { type: 'string', required: false, multi: false },
- address: { type: 'address', required: true, multi: true }
- },
- content: false
- });
-
this.addCreator('video', {
create: function( page, path ) {
var $p = $(page);
Added: CometVisu/trunk/visu/designs/textglobal.css
===================================================================
--- CometVisu/trunk/visu/designs/textglobal.css (rev 0)
+++ CometVisu/trunk/visu/designs/textglobal.css 2012-02-11 19:40:21 UTC (rev 695)
@@ -0,0 +1,60 @@
+/*
+ * global CSS declarations for all designs
+ */
+
+/*
+ * colspans, each design needs to define a colspan0
+ * class, this class is the default widget size
+ */
+
+.colspan1 {
+ width: 8.33333%;
+}
+
+.colspan2 {
+ width: 16.66666%;
+}
+
+.colspan3 {
+ width: 24.99999%;
+}
+
+.colspan4 {
+ width: 33.33332%;
+}
+
+.colspan5 {
+ width: 41.66665%;
+}
+
+.colspan6 {
+ width: 49.99998%;
+}
+
+.colspan7 {
+ width: 58.33331%;
+}
+
+.colspan8 {
+ width: 66.66664%;
+}
+
+.colspan9 {
+ width: 74.99997%;
+}
+
+.colspan10 {
+ width: 83.33330%;
+}
+
+.colspan11 {
+ width: 91.66663%;
+}
+
+.colspan12 {
+ width: 99.99996%;
+}
+
+
+
+
Property changes on: CometVisu/trunk/visu/designs/textglobal.css
___________________________________________________________________
Added: svn:executable
+ *
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-02-11 13:18:38 UTC (rev 694)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-02-11 19:40:21 UTC (rev 695)
@@ -153,7 +153,7 @@
// append css style
$('head').append('<style>.rowspan' + rowspan + ' { height: ' + rowspan*Math.round(singleHeight) + 'px; overflow:hidden;} </style>').data(className, 1);
- }
+ }
return className;
}
@@ -175,48 +175,13 @@
$('#calcinnerrowspan').remove();
// append css style
- $('head').append('<style>.innerrowspan' + rowspan + ' { height: ' + innerHeight + 'px;} </style>').data(className, 1);
+ $('head').append('<style>.innerrowspan' + rowspan + ' { height: ' + innerHeight + 'px;} </style>').data(className, 1);
}
return className;
}
-function colspanClass(colspan) {
- var className = 'colspan'+ colspan;
-
- if ( !$('head').data(className) ) {
- var singleWidth=0;
-
- // loop over all stylesheets and classes and find .widget_container
- $.each(document.styleSheets, function(idx, sheet) {
- if (sheet.href ? (sheet.href.search(/basic.css/) > 0) : false) {
- $.each(sheet.cssRules, function(idx, cssclass) {
- if (cssclass.selectorText=='.widget_container') {
- singleWidth = parseFloat((cssclass.style.width).match(/[0-9.]*/)[0]);
- return;
- }
- });
- }
- if (singleWidth > 0) { // match already found
- return;
- }
- });
-
- var totalWidth = singleWidth * colspan;
-
- if (totalWidth>100) { // check if totalWidth is <=100
- alert('colspan="'+colspan+'" leads to width:' + totalWidth +
- '% which is >100% and not allowed. Corrected to 100%');
- totalWidth=100;
- }
-
- $('head').append('<style>.colspan' + colspan + ' { width: ' +
- totalWidth + '%; overflow:hidden;} </style>').data(className, 1);
- }
-
- return className;
-}
function parseXML(xml) {
// erst mal den Cache für AJAX-Requests wieder aktivieren
$.ajaxSetup({cache: true});
@@ -243,7 +208,7 @@
selectDesign();
}
-
+ $( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/textglobal.css" />' );
$( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/' + clientDesign + '/basic.css" />' );
$( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/' + clientDesign + '/mobile.css" media="only screen and (max-device-width: 480px)" />' );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-02-13 22:13:50
|
Revision: 705
http://openautomation.svn.sourceforge.net/openautomation/?rev=705&view=rev
Author: makki1
Date: 2012-02-13 22:13:43 +0000 (Mon, 13 Feb 2012)
Log Message:
-----------
change text-align in pure-design (switch/un/unpressed) to center; add/change designglobals(was textglobals.css) to include basic colors for stylings; add examples with such stylings; add custom.css to each design to allow override specific settings locally
Modified Paths:
--------------
CometVisu/trunk/visu/designs/design_preview.html
CometVisu/trunk/visu/designs/pure/basic.css
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/visu_config_demo.xml
Added Paths:
-----------
CometVisu/trunk/visu/designs/alaska/custom.css
CometVisu/trunk/visu/designs/alaska_slim/custom.css
CometVisu/trunk/visu/designs/designglobals.css
CometVisu/trunk/visu/designs/discreet/custom.css
CometVisu/trunk/visu/designs/discreet_sand/custom.css
CometVisu/trunk/visu/designs/discreet_slim/custom.css
CometVisu/trunk/visu/designs/pitchblack/custom.css
CometVisu/trunk/visu/designs/pure/custom.css
Removed Paths:
-------------
CometVisu/trunk/visu/designs/textglobal.css
Added: CometVisu/trunk/visu/designs/alaska/custom.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska/custom.css (rev 0)
+++ CometVisu/trunk/visu/designs/alaska/custom.css 2012-02-13 22:13:43 UTC (rev 705)
@@ -0,0 +1,3 @@
+/*
+ * custom local css to overload declarations in each design (basic.css)
+ */
Added: CometVisu/trunk/visu/designs/alaska_slim/custom.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska_slim/custom.css (rev 0)
+++ CometVisu/trunk/visu/designs/alaska_slim/custom.css 2012-02-13 22:13:43 UTC (rev 705)
@@ -0,0 +1,3 @@
+/*
+ * custom local css to overload declarations in each design (basic.css)
+ */
Modified: CometVisu/trunk/visu/designs/design_preview.html
===================================================================
--- CometVisu/trunk/visu/designs/design_preview.html 2012-02-13 12:31:17 UTC (rev 704)
+++ CometVisu/trunk/visu/designs/design_preview.html 2012-02-13 22:13:43 UTC (rev 705)
@@ -20,8 +20,10 @@
<script type="text/javascript">
var design = $.getUrlVar("design");
+ $( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/designglobals.css" />' );
$( 'head' ).append( '<link rel="stylesheet" type="text/css" href="' + design + '/basic.css" />' );
$( 'head' ).append( '<link rel="stylesheet" type="text/css" href="' + design + '/mobile.css" media="only screen and (max-device-width: 480px)" />' );
+ $( 'head' ).append( '<link rel="stylesheet" type="text/css" href="' + design + '/custom.css" />' );
</script>
</body>
</html>
Copied: CometVisu/trunk/visu/designs/designglobals.css (from rev 704, CometVisu/trunk/visu/designs/textglobal.css)
===================================================================
--- CometVisu/trunk/visu/designs/designglobals.css (rev 0)
+++ CometVisu/trunk/visu/designs/designglobals.css 2012-02-13 22:13:43 UTC (rev 705)
@@ -0,0 +1,135 @@
+/*
+ * global CSS declarations for all designs
+ */
+
+/*
+ * colspans, each design needs to define a colspan0
+ * class, this class is the default widget size
+ */
+
+.colspan1 {
+ width: 8.33333%;
+}
+
+.colspan2 {
+ width: 16.66666%;
+}
+
+.colspan3 {
+ width: 24.99999%;
+}
+
+.colspan4 {
+ width: 33.33332%;
+}
+
+.colspan5 {
+ width: 41.66665%;
+}
+
+.colspan6 {
+ width: 49.99998%;
+}
+
+.colspan7 {
+ width: 58.33331%;
+}
+
+.colspan8 {
+ width: 66.66664%;
+}
+
+.colspan9 {
+ width: 74.99997%;
+}
+
+.colspan10 {
+ width: 83.33330%;
+}
+
+.colspan11 {
+ width: 91.66663%;
+}
+
+.colspan12 {
+ width: 99.99996%;
+}
+
+/*
+ * global color declarations for stylings in all designs
+ * may be overloaded by designs
+ */
+
+.red
+{
+ color:#FF0000;
+}
+.white
+{
+ color:#FFFFFF;
+}
+.cyan
+{
+ color:#00FFFF;
+}
+.silver
+{
+ color:#C0C0C0;
+}
+.blue
+{
+ color:#0000FF;
+}
+.grey
+{
+ color:#808080;
+}
+.darkblue
+{
+ color:#0000A0;
+}
+.black
+{
+ color:#000000;
+}
+.lightblue
+{
+ color:#ADD8E6;
+}
+.orange
+{
+ color:#FFA500;
+}
+.purple
+{
+ color:#800080;
+}
+.brown
+{
+ color:#A52A2A;
+}
+.yellow
+{
+ color:#FFFF00;
+}
+.maroon
+{
+ color:#800000;
+}
+.lime
+{
+ color:#00FF00;
+}
+.green
+{
+ color:#008000;
+}
+.fuchsia
+{
+ color:#FF00FF;
+}
+.olive
+{
+ color:#808000;
+}
+
Added: CometVisu/trunk/visu/designs/discreet/custom.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet/custom.css (rev 0)
+++ CometVisu/trunk/visu/designs/discreet/custom.css 2012-02-13 22:13:43 UTC (rev 705)
@@ -0,0 +1,3 @@
+/*
+ * custom local css to overload declarations in each design (basic.css)
+ */
Added: CometVisu/trunk/visu/designs/discreet_sand/custom.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet_sand/custom.css (rev 0)
+++ CometVisu/trunk/visu/designs/discreet_sand/custom.css 2012-02-13 22:13:43 UTC (rev 705)
@@ -0,0 +1,3 @@
+/*
+ * custom local css to overload declarations in each design (basic.css)
+ */
Added: CometVisu/trunk/visu/designs/discreet_slim/custom.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet_slim/custom.css (rev 0)
+++ CometVisu/trunk/visu/designs/discreet_slim/custom.css 2012-02-13 22:13:43 UTC (rev 705)
@@ -0,0 +1,3 @@
+/*
+ * custom local css to overload declarations in each design (basic.css)
+ */
Added: CometVisu/trunk/visu/designs/pitchblack/custom.css
===================================================================
--- CometVisu/trunk/visu/designs/pitchblack/custom.css (rev 0)
+++ CometVisu/trunk/visu/designs/pitchblack/custom.css 2012-02-13 22:13:43 UTC (rev 705)
@@ -0,0 +1,3 @@
+/*
+ * custom local css to overload declarations in each design (basic.css)
+ */
Modified: CometVisu/trunk/visu/designs/pure/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/pure/basic.css 2012-02-13 12:31:17 UTC (rev 704)
+++ CometVisu/trunk/visu/designs/pure/basic.css 2012-02-13 22:13:43 UTC (rev 705)
@@ -189,6 +189,7 @@
padding: 3px;
width: 5em;
float: left;
+ text-align: center;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
@@ -212,6 +213,7 @@
padding: 3px;
width: 5em;
float: left;
+ text-align: center;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
Added: CometVisu/trunk/visu/designs/pure/custom.css
===================================================================
--- CometVisu/trunk/visu/designs/pure/custom.css (rev 0)
+++ CometVisu/trunk/visu/designs/pure/custom.css 2012-02-13 22:13:43 UTC (rev 705)
@@ -0,0 +1,5 @@
+/*
+ * custom local css to overload declarations in each design (basic.css)
+ */
+
+
Deleted: CometVisu/trunk/visu/designs/textglobal.css
===================================================================
--- CometVisu/trunk/visu/designs/textglobal.css 2012-02-13 12:31:17 UTC (rev 704)
+++ CometVisu/trunk/visu/designs/textglobal.css 2012-02-13 22:13:43 UTC (rev 705)
@@ -1,60 +0,0 @@
-/*
- * global CSS declarations for all designs
- */
-
-/*
- * colspans, each design needs to define a colspan0
- * class, this class is the default widget size
- */
-
-.colspan1 {
- width: 8.33333%;
-}
-
-.colspan2 {
- width: 16.66666%;
-}
-
-.colspan3 {
- width: 24.99999%;
-}
-
-.colspan4 {
- width: 33.33332%;
-}
-
-.colspan5 {
- width: 41.66665%;
-}
-
-.colspan6 {
- width: 49.99998%;
-}
-
-.colspan7 {
- width: 58.33331%;
-}
-
-.colspan8 {
- width: 66.66664%;
-}
-
-.colspan9 {
- width: 74.99997%;
-}
-
-.colspan10 {
- width: 83.33330%;
-}
-
-.colspan11 {
- width: 91.66663%;
-}
-
-.colspan12 {
- width: 99.99996%;
-}
-
-
-
-
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-02-13 12:31:17 UTC (rev 704)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-02-13 22:13:43 UTC (rev 705)
@@ -208,9 +208,10 @@
selectDesign();
}
- $( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/textglobal.css" />' );
+ $( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/designglobals.css" />' );
$( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/' + clientDesign + '/basic.css" />' );
$( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/' + clientDesign + '/mobile.css" media="only screen and (max-device-width: 480px)" />' );
+ $( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/' + clientDesign + '/custom.css" />' );
// start with the plugins
var pluginsToLoad = 0;
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2012-02-13 12:31:17 UTC (rev 704)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2012-02-13 22:13:43 UTC (rev 705)
@@ -57,11 +57,34 @@
<entry value="0">green</entry>
<entry value="1">red</entry>
</styling>
+ <styling name="Grey_Green">
+ <entry value="0">grey</entry>
+ <entry value="1">green</entry>
+ </styling>
+ <styling name="Grey_Red">
+ <entry value="0">grey</entry>
+ <entry value="1">red</entry>
+ </styling>
+ <styling name="Grey_Blue">
+ <entry value="0">grey</entry>
+ <entry value="1">blue</entry>
+ </styling>
+ <styling name="Brown_Purple">
+ <entry value="0">brown</entry>
+ <entry value="1">purple</entry>
+ </styling>
<styling name="Blue_Purple_Red">
<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="Blue_Lightblue_Green_Purple_Red">
+ <entry range_min="-10" range_max="-1">blue</entry>
+ <entry range_min="-1" range_max="10">lightblue</entry>
+ <entry range_min="10" range_max="18">green</entry>
+ <entry range_min="18" range_max="24">purple</entry>
+ <entry range_min="24" range_max="32">red</entry>
+ </styling>
</stylings>
<statusbar>
<status type="html"><![CDATA[
@@ -326,6 +349,37 @@
<address transform="DPT:9">12/7/9</address>
</info>
</page>
+ <page name="Stylings Test" align="center">
+ <switch mapping="On_Off" styling="Green_Red">
+ <label>Switch green/red</label>
+ <address transform="DPT:1.001" readonly="false" type="">12/7/1</address>
+ </switch>
+ <switch mapping="On_Off" styling="Grey_Green">
+ <label>Switch grey/green</label>
+ <address transform="DPT:1.001" readonly="false" type="">12/7/1</address>
+ </switch>
+ <switch mapping="On_Off" styling="Grey_Red">
+ <label>Switch grey/red</label>
+ <address transform="DPT:1.001" readonly="false" type="">12/7/1</address>
+ </switch>
+ <switch mapping="On_Off" styling="Grey_Blue">
+ <label>Switch grey/blue</label>
+ <address transform="DPT:1.001" readonly="false" type="">12/7/1</address>
+ </switch>
+ <switch mapping="On_Off" styling="Brown_Purple">
+ <label>Switch brown/purple</label>
+ <address transform="DPT:1.001" readonly="false" type="">12/7/1</address>
+ </switch>
+ <line/>
+ <info styling="Blue_Lightblue_Green_Purple_Red" format="%.1f °C">
+ <label>Info: with Styling/Ranges</label>
+ <address transform="DPT:9" type="">12/7/10</address>
+ </info>
+ <slide min="-10" max="32">
+ <label>Slider to show ranges in styling</label>
+ <address transform="DPT:9" type="">12/7/10</address>
+ </slide>
+ </page>
<line/>
<text align="center"><b>Plugins</b></text>
<text>Diese Widgets sind Plugins und stehen dann zur Verfügung, wenn sie in
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-04-02 17:42:18
|
Revision: 738
http://openautomation.svn.sourceforge.net/openautomation/?rev=738&view=rev
Author: mayerch
Date: 2012-04-02 17:42:08 +0000 (Mon, 02 Apr 2012)
Log Message:
-----------
Preparation for cleaner file structure and automated build script:
* separation of CometVisu libraries and external dependencies
Modified Paths:
--------------
CometVisu/trunk/visu/index.html
CometVisu/trunk/visu/lib/cometvisu-client.js
Added Paths:
-----------
CometVisu/trunk/visu/dependencies/
CometVisu/trunk/visu/dependencies/jquery-ui.js
CometVisu/trunk/visu/dependencies/jquery-ui.min.js
CometVisu/trunk/visu/dependencies/jquery.jnotify.js
CometVisu/trunk/visu/dependencies/jquery.js
CometVisu/trunk/visu/dependencies/jquery.min.js
CometVisu/trunk/visu/dependencies/jquery.svg.min.js
CometVisu/trunk/visu/dependencies/jquery.tools.min.js
CometVisu/trunk/visu/dependencies/jquery.ui.touch-punch.js
CometVisu/trunk/visu/dependencies/jquery.ui.touch-punch.min.js
CometVisu/trunk/visu/dependencies/scrollable.js
CometVisu/trunk/visu/dependencies/scrollable.min.js
CometVisu/trunk/visu/dependencies/strftime-min.js
CometVisu/trunk/visu/dependencies/strftime.js
Removed Paths:
-------------
CometVisu/trunk/visu/lib/jquery-ui.js
CometVisu/trunk/visu/lib/jquery-ui.min.js
CometVisu/trunk/visu/lib/jquery.jnotify.js
CometVisu/trunk/visu/lib/jquery.js
CometVisu/trunk/visu/lib/jquery.min.js
CometVisu/trunk/visu/lib/jquery.svg.min.js
CometVisu/trunk/visu/lib/jquery.tools.min.js
CometVisu/trunk/visu/lib/jquery.ui.touch-punch.js
CometVisu/trunk/visu/lib/jquery.ui.touch-punch.min.js
CometVisu/trunk/visu/lib/scrollable.js
CometVisu/trunk/visu/lib/scrollable.min.js
CometVisu/trunk/visu/lib/strftime-min.js
CometVisu/trunk/visu/lib/strftime.js
Property Changed:
----------------
CometVisu/trunk/visu/
Property changes on: CometVisu/trunk/visu
___________________________________________________________________
Modified: svn:externals
- lib/jsfloorplan.js https://openautomation.svn.sourceforge.net/svnroot/openautomation/JSFloorPlan/trunk/src/jsfloorplan.js
lib/Three.js https://openautomation.svn.sourceforge.net/svnroot/openautomation/JSFloorPlan/trunk/lib/Three.js
lib/poly2tri.js https://openautomation.svn.sourceforge.net/svnroot/openautomation/JSFloorPlan/trunk/lib/poly2tri.js
media/demo_texture_512x512.png https://openautomation.svn.sourceforge.net/svnroot/openautomation/JSFloorPlan/trunk/media/demo_texture_512x512.png
+ dependencies/jsfloorplan.js https://openautomation.svn.sourceforge.net/svnroot/openautomation/JSFloorPlan/trunk/src/jsfloorplan.js
dependencies/Three.js https://openautomation.svn.sourceforge.net/svnroot/openautomation/JSFloorPlan/trunk/lib/Three.js
dependencies/poly2tri.js https://openautomation.svn.sourceforge.net/svnroot/openautomation/JSFloorPlan/trunk/lib/poly2tri.js
media/demo_texture_512x512.png https://openautomation.svn.sourceforge.net/svnroot/openautomation/JSFloorPlan/trunk/media/demo_texture_512x512.png
Copied: CometVisu/trunk/visu/dependencies/jquery-ui.js (from rev 737, CometVisu/trunk/visu/lib/jquery-ui.js)
===================================================================
--- CometVisu/trunk/visu/dependencies/jquery-ui.js (rev 0)
+++ CometVisu/trunk/visu/dependencies/jquery-ui.js 2012-04-02 17:42:08 UTC (rev 738)
@@ -0,0 +1,11767 @@
+/*!
+ * 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
+ */
+(function( $, undefined ) {
+
+// prevent duplicate loading
+// this is only a problem because we proxy existing functions
+// and we don't want to double proxy them
+$.ui = $.ui || {};
+if ( $.ui.version ) {
+ return;
+}
+
+$.extend( $.ui, {
+ version: "1.8.16",
+
+ 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,
+ NUMPAD_ENTER: 108,
+ NUMPAD_MULTIPLY: 106,
+ NUMPAD_SUBTRACT: 109,
+ PAGE_DOWN: 34,
+ PAGE_UP: 33,
+ PERIOD: 190,
+ RIGHT: 39,
+ SHIFT: 16,
+ SPACE: 32,
+ TAB: 9,
+ UP: 38,
+ WINDOWS: 91 // COMMAND
+ }
+});
+
+// plugins
+$.fn.extend({
+ propAttr: $.fn.prop || $.fn.attr,
+
+ _focus: $.fn.focus,
+ focus: function( delay, fn ) {
+ return typeof delay === "number" ?
+ this.each(function() {
+ var elem = this;
+ setTimeout(function() {
+ $( elem ).focus();
+ if ( fn ) {
+ fn.call( elem );
+ }
+ }, delay );
+ }) :
+ this._focus.apply( this, arguments );
+ },
+
+ scrollParent: function() {
+ var scrollParent;
+ if (($.browser.msie && (/(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));
+ }).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));
+ }).eq(0);
+ }
+
+ return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
+ },
+
+ zIndex: function( zIndex ) {
+ if ( zIndex !== undefined ) {
+ return this.css( "zIndex", zIndex );
+ }
+
+ if ( this.length ) {
+ var elem = $( this[ 0 ] ), position, value;
+ while ( elem.length && elem[ 0 ] !== document ) {
+ // Ignore z-index if position is set to a value where z-index is ignored by the browser
+ // This makes behavior of this function consistent across browsers
+ // WebKit always returns auto if the element is positioned
+ position = elem.css( "position" );
+ if ( position === "absolute" || position === "relative" || position === "fixed" ) {
+ // IE returns 0 when zIndex is not specified
+ // other browsers return a string
+ // we ignore the case of nested elements with an explicit value of 0
+ // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
+ value = parseInt( elem.css( "zIndex" ), 10 );
+ if ( !isNaN( value ) && value !== 0 ) {
+ return value;
+ }
+ }
+ elem = elem.parent();
+ }
+ }
+
+ return 0;
+ },
+
+ disableSelection: function() {
+ return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
+ ".ui-disableSelection", function( event ) {
+ event.preventDefault();
+ });
+ },
+
+ 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;
+ }
+ 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();
+ if ( "area" === nodeName ) {
+ var map = element.parentNode,
+ mapName = map.name,
+ img;
+ 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)
+ // the element and all of its ancestors must be visible
+ && visible( element );
+}
+
+function visible( element ) {
+ return !$( element ).parents().andSelf().filter(function() {
+ return $.curCSS( this, "visibility" ) === "hidden" ||
+ $.expr.filters.hidden( this );
+ }).length;
+}
+
+$.extend( $.expr[ ":" ], {
+ data: function( elem, i, match ) {
+ return !!$.data( elem, match[ 3 ] );
+ },
+
+ focusable: function( element ) {
+ return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
+ },
+
+ tabbable: function( element ) {
+ var tabIndex = $.attr( element, "tabindex" ),
+ isTabIndexNaN = isNaN( tabIndex );
+ return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
+ }
+});
+
+// support
+$(function() {
+ var body = document.body,
+ div = body.appendChild( div = document.createElement( "div" ) );
+
+ $.extend( div.style, {
+ minHeight: "100px",
+ height: "auto",
+ padding: 0,
+ borderWidth: 0
+ });
+
+ $.support.minHeight = div.offsetHeight === 100;
+ $.support.selectstart = "onselectstart" in div;
+
+ // set display to none to avoid a layout bug in IE
+ // http://dev.jquery.com/ticket/4014
+ body.removeChild( div ).style.display = "none";
+});
+
+
+
+
+
+// deprecated
+$.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 ) {
+ 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 ) {
+ return;
+ }
+
+ for ( var 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 );
+ },
+
+ // 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
+ el[ scroll ] = 1;
+ has = ( el[ scroll ] > 0 );
+ 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
+ return ( x > reference ) && ( x < ( reference + size ) );
+ },
+ isOver: function( y, x, top, left, height, width ) {
+ //Determines when x, y coordinates is over "b" element
+ return $.ui.isOverAxis( y, top, height ) && $.ui.isOverAxis( x, left, width );
+ }
+});
+
+})( 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 );
+ });
+ };
+}
+
+$.widget = function( name, base, prototype ) {
+ var namespace = name.split( "." )[ 0 ],
+ fullName;
+ name = name.split( "." )[ 1 ];
+ fullName = namespace + "-" + name;
+
+ if ( !prototype ) {
+ prototype = base;
+ base = $.Widget;
+ }
+
+ // create selector for plugin
+ $.expr[ ":" ][ fullName ] = function( elem ) {
+ return !!$.data( elem, name );
+ };
+
+ $[ namespace ] = $[ namespace ] || {};
+ $[ namespace ][ name ] = function( options, element ) {
+ // allow instantiation without initializing for simple inheritance
+ if ( arguments.length ) {
+ this._createWidget( options, element );
+ }
+ };
+
+ var 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, {
+ namespace: namespace,
+ widgetName: name,
+ widgetEventPrefix: $[ namespace ][ name ].prototype.widgetEventPrefix || name,
+ widgetBaseClass: fullName
+ }, prototype );
+
+ $.widget.bridge( name, $[ namespace ][ name ] );
+};
+
+$.widget.bridge = function( name, object ) {
+ $.fn[ name ] = function( options ) {
+ var isMethodCall = typeof options === "string",
+ args = Array.prototype.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) ) :
+ 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 );
+ if ( methodValue !== instance && methodValue !== undefined ) {
+ returnValue = methodValue;
+ return false;
+ }
+ });
+ } else {
+ this.each(function() {
+ var instance = $.data( this, name );
+ if ( instance ) {
+ instance.option( options || {} )._init();
+ } else {
+ $.data( this, name, new object( options, this ) );
+ }
+ });
+ }
+
+ return returnValue;
+ };
+};
+
+$.Widget = function( options, element ) {
+ // allow instantiation without initializing for simple inheritance
+ if ( arguments.length ) {
+ this._createWidget( options, element );
+ }
+};
+
+$.Widget.prototype = {
+ widgetName: "widget",
+ widgetEventPrefix: "",
+ options: {
+ disabled: false
+ },
+ _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 );
+ this.element = $( element );
+ this.options = $.extend( true, {},
+ this.options,
+ this._getCreateOptions(),
+ options );
+
+ var self = this;
+ this.element.bind( "remove." + this.widgetName, function() {
+ self.destroy();
+ });
+
+ this._create();
+ this._trigger( "create" );
+ this._init();
+ },
+ _getCreateOptions: function() {
+ return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ];
+ },
+ _create: function() {},
+ _init: function() {},
+
+ destroy: function() {
+ this.element
+ .unbind( "." + this.widgetName )
+ .removeData( this.widgetName );
+ this.widget()
+ .unbind( "." + this.widgetName )
+ .removeAttr( "aria-disabled" )
+ .removeClass(
+ this.widgetBaseClass + "-disabled " +
+ "ui-state-disabled" );
+ },
+
+ widget: function() {
+ return this.element;
+ },
+
+ option: function( key, value ) {
+ var options = key;
+
+ if ( arguments.length === 0 ) {
+ // don't return a reference to the internal hash
+ return $.extend( {}, this.options );
+ }
+
+ if (typeof key === "string" ) {
+ if ( value === undefined ) {
+ return this.options[ key ];
+ }
+ options = {};
+ options[ key ] = value;
+ }
+
+ this._setOptions( options );
+
+ return this;
+ },
+ _setOptions: function( options ) {
+ var self = this;
+ $.each( options, function( key, value ) {
+ self._setOption( key, value );
+ });
+
+ return this;
+ },
+ _setOption: function( key, value ) {
+ this.options[ key ] = value;
+
+ if ( key === "disabled" ) {
+ this.widget()
+ [ value ? "addClass" : "removeClass"](
+ this.widgetBaseClass + "-disabled" + " " +
+ "ui-state-disabled" )
+ .attr( "aria-disabled", value );
+ }
+
+ return this;
+ },
+
+ enable: function() {
+ return this._setOption( "disabled", false );
+ },
+ disable: function() {
+ return this._setOption( "disabled", true );
+ },
+
+ _trigger: function( type, event, data ) {
+ var callback = this.options[ type ];
+
+ event = $.Event( event );
+ event.type = ( type === this.widgetEventPrefix ?
+ type :
+ this.widgetEventPrefix + type ).toLowerCase();
+ data = data || {};
+
+ // copy original event properties over to the new event
+ // this would happen if we could call $.event.fix instead of $.Event
+ // but we don't have a way to force an event to be fixed multiple times
+ if ( event.originalEvent ) {
+ for ( var i = $.event.props.length, prop; i; ) {
+ prop = $.event.props[ --i ];
+ event[ prop ] = event.originalEvent[ prop ];
+ }
+ }
+
+ this.element.trigger( event, data );
+
+ return !( $.isFunction(callback) &&
+ callback.call( this.element[0], event, data ) === false ||
+ event.isDefaultPrevented() );
+ }
+};
+
+})( jQuery );
+/*!
+ * jQuery UI Mouse 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/Mouse
+ *
+ * Depends:
+ * jquery.ui.widget.js
+ */
+(function( $, undefined ) {
+
+var mouseHandled = false;
+$( document ).mouseup( function( e ) {
+ mouseHandled = false;
+});
+
+$.widget("ui.mouse", {
+ options: {
+ cancel: ':input,option',
+ distance: 1,
+ delay: 0
+ },
+ _mouseInit: function() {
+ var self = this;
+
+ this.element
+ .bind('mousedown.'+this.widgetName, function(event) {
+ return self._mouseDown(event);
+ })
+ .bind('click.'+this.widgetName, function(event) {
+ if (true === $.data(event.target, self.widgetName + '.preventClickEvent')) {
+ $.removeData(event.target, self.widgetName + '.preventClickEvent');
+ event.stopImmediatePropagation();
+ return false;
+ }
+ });
+
+ this.started = false;
+ },
+
+ // TODO: make sure destroying one instance of mouse doesn't mess with
+ // other instances of mouse
+ _mouseDestroy: function() {
+ this.element.unbind('.'+this.widgetName);
+ },
+
+ _mouseDown: function(event) {
+ // don't let more than one widget handle mouseStart
+ if( mouseHandled ) { return };
+
+ // we may have missed mouseup (out of window)
+ (this._mouseStarted && this._mouseUp(event));
+
+ this._mouseDownEvent = event;
+
+ var self = this,
+ btnIsLeft = (event.which == 1),
+ // event.target.nodeName works around a bug in IE 8 with
+ // disabled inputs (#7620)
+ elIsCancel = (typeof this.options.cancel == "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
+ if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
+ return true;
+ }
+
+ this.mouseDelayMet = !this.options.delay;
+ if (!this.mouseDelayMet) {
+ this._mouseDelayTimer = setTimeout(function() {
+ self.mouseDelayMet = true;
+ }, this.options.delay);
+ }
+
+ if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+ this._mouseStarted = (this._mouseStart(event) !== false);
+ if (!this._mouseStarted) {
+ event.preventDefault();
+ return true;
+ }
+ }
+
+ // Click event may never have fired (Gecko & Opera)
+ if (true === $.data(event.target, this.widgetName + '.preventClickEvent')) {
+ $.removeData(event.target, this.widgetName + '.preventClickEvent');
+ }
+
+ // these delegates are required to keep context
+ this._mouseMoveDelegate = function(event) {
+ return self._mouseMove(event);
+ };
+ this._mouseUpDelegate = function(event) {
+ return self._mouseUp(event);
+ };
+ $(document)
+ .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+ .bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+
+ event.preventDefault();
+
+ mouseHandled = true;
+ return true;
+ },
+
+ _mouseMove: function(event) {
+ // IE mouseup check - mouseup happened when mouse was out of window
+ if ($.browser.msie && !(document.documentMode >= 9) && !event.button) {
+ return this._mouseUp(event);
+ }
+
+ if (this._mouseStarted) {
+ this._mouseDrag(event);
+ return event.preventDefault();
+ }
+
+ if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+ this._mouseStarted =
+ (this._mouseStart(this._mouseDownEvent, event) !== false);
+ (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
+ }
+
+ return !this._mouseStarted;
+ },
+
+ _mouseUp: function(event) {
+ $(document)
+ .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+ .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+
+ if (this._mouseStarted) {
+ this._mouseStarted = false;
+
+ if (event.target == this._mouseDownEvent.target) {
+ $.data(event.target, this.widgetName + '.preventClickEvent', true);
+ }
+
+ this._mouseStop(event);
+ }
+
+ return false;
+ },
+
+ _mouseDistanceMet: function(event) {
+ return (Math.max(
+ Math.abs(this._mouseDownEvent.pageX - event.pageX),
+ Math.abs(this._mouseDownEvent.pageY - event.pageY)
+ ) >= this.options.distance
+ );
+ },
+
+ _mouseDelayMet: function(event) {
+ return this.mouseDelayMet;
+ },
+
+ // These are placeholder methods, to be overriden by extending plugin
+ _mouseStart: function(event) {},
+ _mouseDrag: function(event) {},
+ _mouseStop: function(event) {},
+ _mouseCapture: function(event) { return true; }
+});
+
+})(jQuery);
+/*
+ * jQuery UI Position 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/Position
+ */
+(function( $, undefined ) {
+
+$.ui = $.ui || {};
+
+var horizontalPositions = /left|center|right/,
+ verticalPositions = /top|center|bottom/,
+ center = "center",
+ _position = $.fn.position,
+ _offset = $.fn.offset;
+
+$.fn.position = function( options ) {
+ if ( !options || !options.of ) {
+ return _position.apply( this, arguments );
+ }
+
+ // make a copy, we don't want to modify arguments
+ options = $.extend( {}, options );
+
+ var target = $( options.of ),
+ targetElem = target[0],
+ collision = ( options.collision || "flip" ).split( " " ),
+ offset = options.offset ? options.offset.split( " " ) : [ 0, 0 ],
+ targetWidth,
+ targetHeight,
+ basePosition;
+
+ if ( targetElem.nodeType === 9 ) {
+ targetWidth = target.width();
+ targetHeight = target.height();
+ basePosition = { top: 0, left: 0 };
+ // TODO: use $.isWindow() in 1.9
+ } else if ( targetElem.setTimeout ) {
+ targetWidth = target.width();
+ targetHeight = target.height();
+ basePosition = { top: target.scrollTop(), left: target.scrollLeft() };
+ } else if ( targetElem.preventDefault ) {
+ // force left top to allow flipping
+ options.at = "left top";
+ targetWidth = targetHeight = 0;
+ basePosition = { top: options.of.pageY, left: options.of.pageX };
+ } else {
+ targetWidth = target.outerWidth();
+ targetHeight = target.outerHeight();
+ basePosition = target.offset();
+ }
+
+ // force my and at to have valid horizontal and veritcal positions
+ // if a value is missing or invalid, it will be converted to center
+ $.each( [ "my", "at" ], function() {
+ var pos = ( options[this] || "" ).split( " " );
+ if ( pos.length === 1) {
+ pos = horizontalPositions.test( pos[0] ) ?
+ pos.concat( [center] ) :
+ verticalPositions.test( pos[0] ) ?
+ [ center ].concat( pos ) :
+ [ center, center ];
+ }
+ pos[ 0 ] = horizontalPositions.test( pos[0] ) ? pos[ 0 ] : center;
+ pos[ 1 ] = verticalPositions.test( pos[1] ) ? pos[ 1 ] : center;
+ options[ this ] = pos;
+ });
+
+ // normalize collision option
+ if ( collision.length === 1 ) {
+ collision[ 1 ] = collision[ 0 ];
+ }
+
+ // normalize offset option
+ offset[ 0 ] = parseInt( offset[0], 10 ) || 0;
+ if ( offset.length === 1 ) {
+ offset[ 1 ] = offset[ 0 ];
+ }
+ offset[ 1 ] = parseInt( offset[1], 10 ) || 0;
+
+ if ( options.at[0] === "right" ) {
+ basePosition.left += targetWidth;
+ } else if ( options.at[0] === center ) {
+ basePosition.left += targetWidth / 2;
+ }
+
+ if ( options.at[1] === "bottom" ) {
+ basePosition.top += targetHeight;
+ } else if ( options.at[1] === center ) {
+ basePosition.top += targetHeight / 2;
+ }
+
+ basePosition.left += offset[ 0 ];
+ basePosition.top += offset[ 1 ];
+
+ return this.each(function() {
+ var elem = $( this ),
+ elemWidth = elem.outerWidth(),
+ elemHeight = elem.outerHeight(),
+ marginLeft = parseInt( $.curCSS( this, "marginLeft", true ) ) || 0,
+ marginTop = parseInt( $.curCSS( this, "marginTop", true ) ) || 0,
+ collisionWidth = elemWidth + marginLeft +
+ ( parseInt( $.curCSS( this, "marginRight", true ) ) || 0 ),
+ collisionHeight = elemHeight + marginTop +
+ ( parseInt( $.curCSS( this, "marginBottom", true ) ) || 0 ),
+ position = $.extend( {}, basePosition ),
+ collisionPosition;
+
+ if ( options.my[0] === "right" ) {
+ position.left -= elemWidth;
+ } else if ( options.my[0] === center ) {
+ position.left -= elemWidth / 2;
+ }
+
+ if ( options.my[1] === "bottom" ) {
+ position.top -= elemHeight;
+ } else if ( options.my[1] === center ) {
+ position.top -= elemHeight / 2;
+ }
+
+ // prevent fractions (see #5280)
+ position.left = Math.round( position.left );
+ position.top = Math.round( position.top );
+
+ collisionPosition = {
+ left: position.left - marginLeft,
+ top: position.top - marginTop
+ };
+
+ $.each( [ "left", "top" ], function( i, dir ) {
+ if ( $.ui.position[ collision[i] ] ) {
+ $.ui.position[ collision[i] ][ dir ]( position, {
+ targetWidth: targetWidth,
+ targetHeight: targetHeight,
+ elemWidth: elemWidth,
+ elemHeight: elemHeight,
+ collisionPosition: collisionPosition,
+ collisionWidth: collisionWidth,
+ collisionHeight: collisionHeight,
+ offset: offset,
+ my: options.my,
+ at: options.at
+ });
+ }
+ });
+
+ if ( $.fn.bgiframe ) {
+ elem.bgiframe();
+ }
+ elem.offset( $.extend( position, { using: options.using } ) );
+ });
+};
+
+$.ui.position = {
+ fit: {
+ left: function( position, data ) {
+ var win = $( window ),
+ over = data.collisionPosition.left + data.collisionWidth - win.width() - win.scrollLeft();
+ position.left = over > 0 ? position.left - over : Math.max( position.left - data.collisionPosition.left, position.left );
+ },
+ top: function( position, data ) {
+ var win = $( window ),
+ over = data.collisionPosition.top + data.collisionHeight - win.height() - win.scrollTop();
+ position.top = over > 0 ? position.top - over : Math.max( position.top - data.collisionPosition.top, position.top );
+ }
+ },
+
+ flip: {
+ left: function( position, data ) {
+ if ( data.at[0] === center ) {
+ return;
+ }
+ var win = $( window ),
+ over = data.collisionPosition.left + data.collisionWidth - win.width() - win.scrollLeft(),
+ myOffset = data.my[ 0 ] === "left" ?
+ -data.elemWidth :
+ data.my[ 0 ] === "right" ?
+ data.elemWidth :
+ 0,
+ atOffset = data.at[ 0 ] === "left" ?
+ data.targetWidth :
+ -data.targetWidth,
+ offset = -2 * data.offset[ 0 ];
+ position.left += data.collisionPosition.left < 0 ?
+ myOffset + atOffset + offset :
+ over > 0 ?
+ myOffset + atOffset + offset :
+ 0;
+ },
+ top: function( position, data ) {
+ if ( data.at[1] === center ) {
+ return;
+ }
+ var win = $( window ),
+ over = data.collisionPosition.top + data.collisionHeight - win.height() - win.scrollTop(),
+ myOffset = data.my[ 1 ] === "top" ?
+ -data.elemHeight :
+ data.my[ 1 ] === "bottom" ?
+ data.elemHeight :
+ 0,
+ atOffset = data.at[ 1 ] === "top" ?
+ data.targetHeight :
+ -data.targetHeight,
+ offset = -2 * data.offset[ 1 ];
+ position.top += data.collisionPosition.top < 0 ?
+ myOffset + atOffset + offset :
+ over > 0 ?
+ myOffset + atOffset + offset :
+ 0;
+ }
+ }
+};
+
+// offset setter from jQuery 1.4
+if ( !$.o...
[truncated message content] |
|
From: <ma...@us...> - 2012-04-15 13:16:20
|
Revision: 756
http://openautomation.svn.sourceforge.net/openautomation/?rev=756&view=rev
Author: mayerch
Date: 2012-04-15 13:16:14 +0000 (Sun, 15 Apr 2012)
Log Message:
-----------
- Fix bug that prevented page switch by GA
- Added page switch by GA to the demo config
Modified Paths:
--------------
CometVisu/trunk/visu/structure/pure/page.js
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/structure/pure/page.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/page.js 2012-04-15 08:39:43 UTC (rev 755)
+++ CometVisu/trunk/visu/structure/pure/page.js 2012-04-15 13:16:14 UTC (rev 756)
@@ -89,8 +89,8 @@
address[ '_' + $p.attr('floor') ] = [ 'DPT:5.004', 0, 'floor' ];
container.bind( '_' + $p.attr('floor'), this.update );
};
- container.data( 'address', address );
}
+ container.data( 'address', address );
$( childs ).each( function(i){
container.append( create_pages( childs[i], path + '_' + i, flavour, type ) );
} );
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2012-04-15 08:39:43 UTC (rev 755)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2012-04-15 13:16:14 UTC (rev 756)
@@ -209,6 +209,10 @@
<label>Polikarpov I-15bis - Ogg Theora</label>
</video>
</page>
+ <trigger value="1">
+ <label>Seitenwechsel per GA</label>
+ <address transform="DPT:1.001" readonly="false" type="">12/7/100</address>
+ </trigger>
<line/>
<page name="iframe Test" align="center" >
<iframe src="http://www.cometvisu.org" width="500px" height="500px"/>
@@ -236,7 +240,7 @@
<page name="Flavour: Boron" align="center" flavour="boron">
<text align="center">CometVisu Boron flavour</text>
<line/>
- <page name="Subpage">
+ <page name="Subpage" ga="12/7/100">
<text>An empty page</text>
<line/>
</page>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-04-15 19:00:14
|
Revision: 758
http://openautomation.svn.sourceforge.net/openautomation/?rev=758&view=rev
Author: mayerch
Date: 2012-04-15 19:00:08 +0000 (Sun, 15 Apr 2012)
Log Message:
-----------
Show 2D pages in demo config (+ little bugfix)
(Note: The "fixed" and "scaled" is still to be implemented)
Modified Paths:
--------------
CometVisu/trunk/visu/structure/pure/_common.js
CometVisu/trunk/visu/structure/pure/iframe.js
CometVisu/trunk/visu/structure/pure/image.js
CometVisu/trunk/visu/structure/pure/imagetrigger.js
CometVisu/trunk/visu/structure/pure/info.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/text.js
CometVisu/trunk/visu/structure/pure/toggle.js
CometVisu/trunk/visu/structure/pure/trigger.js
CometVisu/trunk/visu/structure/pure/video.js
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/structure/pure/_common.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/_common.js 2012-04-15 13:56:35 UTC (rev 757)
+++ CometVisu/trunk/visu/structure/pure/_common.js 2012-04-15 19:00:08 UTC (rev 758)
@@ -355,6 +355,8 @@
function extractLayout( layout, defaultValues )
{
+ if (typeof defaultValue === 'undefined') defaultValues = [];
+
var ret_val = 'position:absolute;';
if( layout.getAttribute('x' ) ) ret_val += 'left:' + layout.getAttribute('x' ) + ';';
else if( defaultValues[ 'x' ] ) ret_val += 'left:' + defaultValues[ 'x' ] + ';';
Modified: CometVisu/trunk/visu/structure/pure/iframe.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/iframe.js 2012-04-15 13:56:35 UTC (rev 757)
+++ CometVisu/trunk/visu/structure/pure/iframe.js 2012-04-15 19:00:08 UTC (rev 758)
@@ -18,7 +18,7 @@
basicdesign.addCreator('iframe', {
create: function( element, path ) {
var $e = $(element);
- var layout = $e.find('layout')[0];
+ var layout = $e.children('layout')[0];
var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
var ret_val = $('<div class="widget iframe" ' + style + '/>');
ret_val.setWidgetLayout($e);
Modified: CometVisu/trunk/visu/structure/pure/image.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/image.js 2012-04-15 13:56:35 UTC (rev 757)
+++ CometVisu/trunk/visu/structure/pure/image.js 2012-04-15 19:00:08 UTC (rev 758)
@@ -18,7 +18,7 @@
basicdesign.addCreator('image', {
create: function( element, path ) {
var $e = $(element);
- var layout = $e.find('layout')[0];
+ var layout = $e.children('layout')[0];
var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
var ret_val = $('<div class="widget clearfix image" ' + style + '/>');
ret_val.setWidgetLayout($e);
Modified: CometVisu/trunk/visu/structure/pure/imagetrigger.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/imagetrigger.js 2012-04-15 13:56:35 UTC (rev 757)
+++ CometVisu/trunk/visu/structure/pure/imagetrigger.js 2012-04-15 19:00:08 UTC (rev 758)
@@ -35,7 +35,7 @@
}
];
});
- var layout = $e.find('layout')[0];
+ var layout = $e.children('layout')[0];
var style = layout ? 'style="' + extractLayout( layout, {width:'100%'} ) + '"' : '';
var actor = '<div class="actor">';
Modified: CometVisu/trunk/visu/structure/pure/info.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/info.js 2012-04-15 13:56:35 UTC (rev 757)
+++ CometVisu/trunk/visu/structure/pure/info.js 2012-04-15 19:00:08 UTC (rev 758)
@@ -18,7 +18,7 @@
basicdesign.addCreator('info', {
create: function( element, path, flavour, type ) {
var $e = $(element);
- var layout = $e.find('layout')[0];
+ var layout = $e.children('layout')[0];
var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
var ret_val = $('<div class="widget clearfix info" ' + style + ' />');
//type == '3d' && ret_val.data( extractLayout3d( layout ) ).bind( 'update3d', this.update3d );
Modified: CometVisu/trunk/visu/structure/pure/infotrigger.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/infotrigger.js 2012-04-15 13:56:35 UTC (rev 757)
+++ CometVisu/trunk/visu/structure/pure/infotrigger.js 2012-04-15 19:00:08 UTC (rev 758)
@@ -18,7 +18,7 @@
basicdesign.addCreator('infotrigger', {
create: function( element, path ) {
var $e = $(element);
- var layout = $e.find('layout')[0];
+ var layout = $e.children('layout')[0];
var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
var ret_val = $('<div class="widget clearfix switch" ' + style + '/>');
ret_val.setWidgetLayout($e);
Modified: CometVisu/trunk/visu/structure/pure/multitrigger.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/multitrigger.js 2012-04-15 13:56:35 UTC (rev 757)
+++ CometVisu/trunk/visu/structure/pure/multitrigger.js 2012-04-15 19:00:08 UTC (rev 758)
@@ -18,7 +18,7 @@
basicdesign.addCreator('multitrigger', {
create: function( element, path ) {
var $e = $(element);
- var layout = $e.find('layout')[0];
+ var layout = $e.children('layout')[0];
var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
var ret_val = $('<div class="widget clearfix switch" ' + style + '/>');
ret_val.setWidgetLayout($e)
Modified: CometVisu/trunk/visu/structure/pure/page.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/page.js 2012-04-15 13:56:35 UTC (rev 757)
+++ CometVisu/trunk/visu/structure/pure/page.js 2012-04-15 19:00:08 UTC (rev 758)
@@ -40,7 +40,7 @@
if ($p.attr('visible')=='false') {
ret_val=$('');
} else { // default is visible
- var layout = $p.find('layout')[0];
+ var layout = $p.children('layout')[0];
var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
ret_val = $('<div class="widget clearfix link pagelink" ' + style + '/>');
ret_val.setWidgetLayout($p);
Modified: CometVisu/trunk/visu/structure/pure/slide.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/slide.js 2012-04-15 13:56:35 UTC (rev 757)
+++ CometVisu/trunk/visu/structure/pure/slide.js 2012-04-15 19:00:08 UTC (rev 758)
@@ -18,7 +18,7 @@
basicdesign.addCreator('slide', {
create: function( element, path ) {
var $e = $(element);
- var layout = $e.find('layout')[0];
+ var layout = $e.children('layout')[0];
var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
var ret_val = $('<div class="widget clearfix slide" ' + style + ' />');
ret_val.setWidgetLayout($e).makeWidgetLabel($e);
Modified: CometVisu/trunk/visu/structure/pure/switch.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/switch.js 2012-04-15 13:56:35 UTC (rev 757)
+++ CometVisu/trunk/visu/structure/pure/switch.js 2012-04-15 19:00:08 UTC (rev 758)
@@ -18,7 +18,7 @@
basicdesign.addCreator('switch', {
create: function( element, path ) {
var $e = $(element);
- var layout = $e.find('layout')[0];
+ var layout = $e.children('layout')[0];
var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
var ret_val = $('<div class="widget clearfix switch" ' + style + '/>');
ret_val.setWidgetLayout($e)
Modified: CometVisu/trunk/visu/structure/pure/text.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/text.js 2012-04-15 13:56:35 UTC (rev 757)
+++ CometVisu/trunk/visu/structure/pure/text.js 2012-04-15 19:00:08 UTC (rev 758)
@@ -18,7 +18,7 @@
basicdesign.addCreator('text', {
create: function( element, path ) {
var $e = $(element);
- var layout = $e.find('layout')[0];
+ var layout = $e.children('layout')[0];
var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
var ret_val = $('<div class="widget clearfix text" ' + style + '/>');
ret_val.setWidgetLayout($e);
Modified: CometVisu/trunk/visu/structure/pure/toggle.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/toggle.js 2012-04-15 13:56:35 UTC (rev 757)
+++ CometVisu/trunk/visu/structure/pure/toggle.js 2012-04-15 19:00:08 UTC (rev 758)
@@ -18,7 +18,7 @@
basicdesign.addCreator('toggle', {
create: function( element, path ) {
var $e = $(element);
- var layout = $e.find('layout')[0];
+ var layout = $e.children('layout')[0];
var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
var ret_val = $('<div class="widget clearfix toggle" ' + style + '/>');
ret_val.setWidgetLayout($e);
Modified: CometVisu/trunk/visu/structure/pure/trigger.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/trigger.js 2012-04-15 13:56:35 UTC (rev 757)
+++ CometVisu/trunk/visu/structure/pure/trigger.js 2012-04-15 19:00:08 UTC (rev 758)
@@ -18,7 +18,7 @@
basicdesign.addCreator('trigger', {
create: function( element, path ) {
var $e = $(element);
- var layout = $e.find('layout')[0];
+ var layout = $e.children('layout')[0];
var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
var value = $e.attr('value') ? $e.attr('value') : 0;
var ret_val = $('<div class="widget clearfix switch" ' + style + ' />');
Modified: CometVisu/trunk/visu/structure/pure/video.js
===================================================================
--- CometVisu/trunk/visu/structure/pure/video.js 2012-04-15 13:56:35 UTC (rev 757)
+++ CometVisu/trunk/visu/structure/pure/video.js 2012-04-15 19:00:08 UTC (rev 758)
@@ -18,7 +18,7 @@
basicdesign.addCreator('video', {
create: function( element, path ) {
var $e = $(element);
- var layout = $e.find('layout')[0];
+ var layout = $e.children('layout')[0];
var style = layout ? 'style="' + extractLayout( layout ) + '"' : '';
var ret_val = $('<div class="widget clearfix video" ' + style + '/>');
ret_val.setWidgetLayout($e);
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2012-04-15 13:56:35 UTC (rev 757)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2012-04-15 19:00:08 UTC (rev 758)
@@ -384,6 +384,51 @@
<address transform="DPT:9" type="">12/7/10</address>
</slide>
</page>
+ <page name="2D fixed Bitmap" type="2d" backdrop="media/demo_2d_backdrop_nikolaushaus.png" align="center">
+ <switch mapping="On_Off" styling="Red_Green">
+ <layout x="200px" y="300px" width="600px" />
+ <address transform="DPT:1.001" readonly="false" type="">12/7/1</address>
+ </switch>
+ <trigger value="0" mapping="On_Off">
+ <layout x="0px" y="500px" width="600px" />
+ <address transform="DPT:1.001" readonly="false" type="">12/7/1</address>
+ </trigger>
+ <trigger value="1" mapping="On_Off">
+ <layout x="360px" y="500px" width="600px" />
+ <address transform="DPT:1.001" readonly="false" type="">12/7/1</address>
+ </trigger>
+ </page>
+ <page name="2D scaled Bitmap" type="2d" backdrop="media/demo_2d_backdrop_nikolaushaus.png" align="center">
+ <switch mapping="On_Off" styling="Red_Green">
+ <layout x="45%" y="45%" width="600px" />
+ <address transform="DPT:1.001" readonly="false" type="">12/7/1</address>
+ </switch>
+ <trigger value="0" mapping="On_Off">
+ <layout x="5%" y="70%" width="600px" />
+ <address transform="DPT:1.001" readonly="false" type="">12/7/1</address>
+ </trigger>
+ <trigger value="1" mapping="On_Off">
+ <layout x="90%" y="70%" width="600px" />
+ <address transform="DPT:1.001" readonly="false" type="">12/7/1</address>
+ </trigger>
+ </page>
+ <page name="2D SVG" type="2d" backdrop="media/demo_2d_backdrop_nikolaushaus.svg" align="center">
+ <switch mapping="On_Off" styling="Red_Green">
+ <layout x="200px" y="300px" width="600px" />
+ <address transform="DPT:1.001" readonly="false" type="">12/7/1</address>
+ </switch>
+ <trigger value="0" mapping="On_Off">
+ <layout x="0px" y="500px" width="600px" />
+ <address transform="DPT:1.001" readonly="false" type="">12/7/1</address>
+ </trigger>
+ <trigger value="1" mapping="On_Off">
+ <layout x="360px" y="500px" width="600px" />
+ <address transform="DPT:1.001" readonly="false" type="">12/7/1</address>
+ </trigger>
+ </page>
+ <page name="3D" align="center">
+ <text>Not in this demo yet...</text>
+ </page>
<line/>
<text align="center"><b>Plugins</b></text>
<text>Diese Widgets sind Plugins und stehen dann zur Verfügung, wenn sie in
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-05-06 12:19:58
|
Revision: 792
http://openautomation.svn.sourceforge.net/openautomation/?rev=792&view=rev
Author: mayerch
Date: 2012-05-06 12:19:51 +0000 (Sun, 06 May 2012)
Log Message:
-----------
New feature: allow full JavaScript formulas for a mapping
Modified Paths:
--------------
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-05-06 11:12:01 UTC (rev 791)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-05-06 12:19:51 UTC (rev 792)
@@ -106,15 +106,23 @@
function map( value, element ) {
var map = element.data('mapping');
- if( map && mappings[map] && (mappings[map][value] || mappings[map]['range']) ) {
- if( mappings[map]['range'] ) value = parseFloat( value );
- if( mappings[map][value] ) return mappings[map][value];
-
- var range = mappings[map]['range'];
- for( var min in range ) {
- if( min > value ) continue;
- if( range[min][0] < value ) continue; // check max
- return range[min][1];
+ if( map && mappings[map] )
+ {
+ var m = mappings[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];
+ }
}
}
return value;
@@ -230,18 +238,27 @@
// then the mappings
$( 'meta > mappings mapping', xml ).each( function(i){
- var name = $(this).attr('name');
+ var $this = $(this);
+ var name = $this.attr('name');
mappings[ name ] = {};
- $(this).find('entry').each( function(){
- if( $(this).attr('value') )
- {
- mappings[ name ][ $(this).attr('value') ] = $(this).text();
- } else {
- if( ! mappings[ name ][ 'range' ] ) mappings[ name ][ 'range' ] = {};
- mappings[ name ][ 'range' ][ parseFloat($(this).attr('range_min')) ] =
- [ parseFloat( $(this).attr('range_max') ), $(this).text() ];
- }
- });
+ var formula = $this.find('formula');
+ if( formula.length > 0 )
+ {
+ eval( 'var func = function(x){' + formula.text() + '; return y;}' );
+ mappings[ name ][ 'formula' ] = func;
+ } else {
+ $this.find('entry').each( function(){
+ var $localThis = $(this);
+ if( $localThis.attr('value') )
+ {
+ mappings[ name ][ $localThis.attr('value') ] = $localThis.text();
+ } else {
+ if( ! mappings[ name ][ 'range' ] ) mappings[ name ][ 'range' ] = {};
+ mappings[ name ][ 'range' ][ parseFloat($localThis.attr('range_min')) ] =
+ [ parseFloat( $localThis.attr('range_max') ), $localThis.text() ];
+ }
+ });
+ }
});
// then the stylings
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2012-05-06 11:12:01 UTC (rev 791)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2012-05-06 12:19:51 UTC (rev 792)
@@ -47,6 +47,9 @@
<entry value="4">Sat</entry>
<entry value="5">Kino</entry>
</mapping>
+ <mapping name="One1000th">
+ <formula>y = x/1000;</formula>
+ </mapping>
</mappings>
<stylings>
<styling name="Red_Green">
@@ -365,6 +368,11 @@
<label>Format "%+.2f":</label>
<address transform="DPT:9">12/7/9</address>
</info>
+ <line/>
+ <info format="%.4f" mapping="One1000th">
+ <label>Format "%.4f + Formel":</label>
+ <address transform="DPT:9">12/7/9</address>
+ </info>
</page>
<page name="Stylings Test" align="center">
<switch mapping="On_Off" styling="Green_Red">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-05-17 20:48:11
|
Revision: 826
http://openautomation.svn.sourceforge.net/openautomation/?rev=826&view=rev
Author: mayerch
Date: 2012-05-17 20:48:03 +0000 (Thu, 17 May 2012)
Log Message:
-----------
Highly improved icon handling:
- ability to redirect in the icon definition
- support for types
- support for flavours
- icon support in <text>
- show all of this in the demo config
Changed colspan/rowspan handling: the spans have to be defined in the <layout> now
Modified Paths:
--------------
CometVisu/trunk/visu/designs/designglobals.css
CometVisu/trunk/visu/designs/pure/design_setup.js
CometVisu/trunk/visu/lib/iconhandler.js
CometVisu/trunk/visu/structure/pure/_common.js
CometVisu/trunk/visu/structure/pure/text.js
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/designs/designglobals.css
===================================================================
--- CometVisu/trunk/visu/designs/designglobals.css 2012-05-17 20:40:11 UTC (rev 825)
+++ CometVisu/trunk/visu/designs/designglobals.css 2012-05-17 20:48:03 UTC (rev 826)
@@ -32,10 +32,6 @@
clear: both;
}
-.icon {
- height: 2em;
-}
-
/*
* colspans, each design needs to define a colspan0
* class, this class is the default widget size
Modified: CometVisu/trunk/visu/designs/pure/design_setup.js
===================================================================
--- CometVisu/trunk/visu/designs/pure/design_setup.js 2012-05-17 20:40:11 UTC (rev 825)
+++ CometVisu/trunk/visu/designs/pure/design_setup.js 2012-05-17 20:48:03 UTC (rev 826)
@@ -22,120 +22,270 @@
//////////////////////////////////////////////////////////////////////////////
icons.insert({
- 'audio_audio' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_audio.png' } } },
- 'audio_eject' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_eject.png' } } },
- 'audio_ff' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_ff.png' } } },
- 'audio_mute' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_mute.png' } } },
- 'audio_pause' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_pause.png' } } },
- 'audio_playliste' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_playliste.png' } } },
- 'audio_play' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_play.png' } } },
- 'audio_rec' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_rec.png' } } },
- 'audio_rew' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_rew.png' } } },
- 'audio_sound' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_sound.png' } } },
- 'audio_stop' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_stop.png' } } },
- 'fts_fenster_gekippt' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_fenster_gekippt.png' } } },
- 'fts_fenster_offen' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_fenster_offen.png' } } },
- 'fts_fenster' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_fenster.png' } } },
- 'fts_garage' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_garage.png' } } },
- 'fts_markise' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_markise.png' } } },
- 'fts_rollo' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_rollo.png' } } },
- 'fts_tuer_offen' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_tuer_offen.png' } } },
- 'fts_tuer' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_tuer.png' } } },
- 'it_fernsehen' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_fernsehen.png' } } },
- 'it_funk_dcf77' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_funk_dcf77.png' } } },
- 'it_internet' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_internet.png' } } },
- 'it_kamera' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_kamera.png' } } },
- 'it_nas' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_nas.png' } } },
- 'it_netz' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_netz.png' } } },
- 'it_netzwerk' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_netzwerk.png' } } },
- 'it_pc' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_pc.png' } } },
- 'it_radio' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_radio.png' } } },
- 'it_router' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_router.png' } } },
- 'it_server' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_server.png' } } },
- 'it_smartphone' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_smartphone.png' } } },
- 'it_telefon' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_telefon.png' } } },
- 'it_wlan' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_wlan.png' } } },
- 'licht_esstisch' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_esstisch.png' } } },
- 'licht_indirekt' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_indirekt.png' } } },
- 'licht_led' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_led.png' } } },
- 'licht_lichterkette' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_lichterkette.png' } } },
- 'licht_licht' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_licht.png' } } },
- 'licht_party' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_party.png' } } },
- 'licht_regelung' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_regelung.png' } } },
- 'licht_stehlampe' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_stehlampe.png' } } },
- 'meld_achtung' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/meld_achtung.png' } } },
- 'meld_medizin' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/meld_medizin.png' } } },
- 'meld_post_offen' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/meld_post_offen.png' } } },
- 'meld_post' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/meld_post.png' } } },
- 'meld_service' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/meld_service.png' } } },
- 'meld_steckdose' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/meld_steckdose.png' } } },
- 'sani_bewaesserung' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_bewaesserung.png' } } },
- 'sani_fussbodenheizung' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_fussbodenheizung.png' } } },
- 'sani_heizung' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_heizung.png' } } },
- 'sani_kessel_temp' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_kessel_temp.png' } } },
- 'sani_lueftung' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_lueftung.png' } } },
- 'sani_lueftung_regelung': { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_lueftung_regelung.png' } } },
- 'sani_pumpe' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_pumpe.png' } } },
- 'sani_solar' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_solar.png' } } },
- 'sani_solar_temp' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_solar_temp.png' } } },
- 'sani_wasserhahn' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_wasserhahn.png' } } },
- 'secur_alarmanlage' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/secur_alarmanlage.png' } } },
- 'secur_codierung' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/secur_codierung.png' } } },
- 'secur_frostschutz' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/secur_frostschutz.png' } } },
- 'secur_hitzeschutz' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/secur_hitzeschutz.png' } } },
- 'secur_offen' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/secur_offen.png' } } },
- 'secur_rauchmelder' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/secur_rauchmelder.png' } } },
- 'secur_zu' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/secur_zu.png' } } },
- 'steuer_ab' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_ab.png' } } },
- 'steuer_alles_ein_aus' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_alles_ein_aus.png' } } },
- 'steuer_auf' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_auf.png' } } },
- 'steuer_aussen_ein_aus' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_aussen_ein_aus.png' } } },
- 'steuer_ein_aus' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_ein_aus.png' } } },
- 'steuer_home' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_home.png' } } },
- 'steuer_minus' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_minus.png' } } },
- 'steuer_plus' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_plus.png' } } },
- 'steuer_standby' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_standby.png' } } },
- 'steuer_vor' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_vor.png' } } },
- 'steuer_x' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_x.png' } } },
- 'steuer_zurueck' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_zurueck.png' } } },
- 'szene_essen' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_essen.png' } } },
- 'szene_garten' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_garten.png' } } },
- 'szene_kochen' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_kochen.png' } } },
- 'szene_making_love' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_making_love.png' } } },
- 'szene_nacht' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_nacht.png' } } },
- 'szene_party' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_party.png' } } },
- 'szene_pool' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_pool.png' } } },
- 'szene_schlafen' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_schlafen.png' } } },
- 'szene_schwimmen' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_schwimmen.png' } } },
- 'szene_szene' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_szene.png' } } },
- 'szene_terrasse' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_terrasse.png' } } },
- 'szene_toilette' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_toilette.png' } } },
- 'szene_weihnachten' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_weihnachten.png' } } },
- 'temp_aussen' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/temp_aussen.png' } } },
- 'temp_frost' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/temp_frost.png' } } },
- 'temp_innen' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/temp_innen.png' } } },
- 'temp_regelung' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/temp_regelung.png' } } },
- 'temp_temperatur' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/temp_temperatur.png' } } },
- 'user_abwesend' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/user_abwesend.png' } } },
- 'user_anwesend' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/user_anwesend.png' } } },
- 'user_ext_away' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/user_ext_away.png' } } },
- 'wetter_bewoelkt' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_bewoelkt.png' } } },
- 'wetter_feuchtigkeit' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_feuchtigkeit.png' } } },
- 'wetter_gewitter' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_gewitter.png' } } },
- 'wetter_pollen' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_pollen.png' } } },
- 'wetter_regen' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_regen.png' } } },
- 'wetter_schnee' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_schnee.png' } } },
- 'wetter_sommer' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_sommer.png' } } },
- 'wetter_sonne' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_sonne.png' } } },
- 'wetter_unwetter' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_unwetter.png' } } },
- 'wetter_wind' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_wind.png' } } },
- 'wetter_winter' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_winter.png' } } },
- 'zeit_automatik' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/zeit_automatik.png' } } },
- 'zeit_diagramm' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/zeit_diagramm.png' } } },
- 'zeit_ecomode' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/zeit_ecomode.png' } } },
- 'zeit_handbetrieb' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/zeit_handbetrieb.png' } } },
- 'zeit_kalender' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/zeit_kalender.png' } } },
- 'zeit_notiz' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/zeit_notiz.png' } } },
- 'zeit_statistik' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/zeit_statistik.png' } } },
- 'zeit_uhr' : { '*': { '*': { 'uri': 'icon/knx-uf-iconset/128x128_ws/zeit_uhr.png' } } }
+ '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': '...
[truncated message content] |
|
From: <ma...@us...> - 2012-05-20 14:08:30
|
Revision: 833
http://openautomation.svn.sourceforge.net/openautomation/?rev=833&view=rev
Author: mayerch
Date: 2012-05-20 14:08:22 +0000 (Sun, 20 May 2012)
Log Message:
-----------
* Added design_setup.js to all remaining designs - preconfigured with the knx-uf-icon set
* Change colspanDefault handling to more reliable JavaScript function
Modified Paths:
--------------
CometVisu/trunk/visu/designs/pitchblack/basic.css
CometVisu/trunk/visu/designs/planet/design_setup.js
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/structure/pure/_common.js
Added Paths:
-----------
CometVisu/trunk/visu/designs/alaska/design_setup.js
CometVisu/trunk/visu/designs/alaska_slim/design_setup.js
CometVisu/trunk/visu/designs/discreet/design_setup.js
CometVisu/trunk/visu/designs/discreet_sand/design_setup.js
CometVisu/trunk/visu/designs/discreet_slim/design_setup.js
CometVisu/trunk/visu/designs/pitchblack/design_setup.js
Added: CometVisu/trunk/visu/designs/alaska/design_setup.js
===================================================================
--- CometVisu/trunk/visu/designs/alaska/design_setup.js (rev 0)
+++ CometVisu/trunk/visu/designs/alaska/design_setup.js 2012-05-20 14:08:22 UTC (rev 833)
@@ -0,0 +1,291 @@
+//
+// Design setup for the pure design
+//
+// Copyright (C) 2012 by Christian Mayer
+// cometvisu (at) ChristianMayer.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 2 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.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+icons.insert({
+ 'CometVisu' : { '*' : '128',
+ '16' : { '*' : 'sodium' ,
+ 'black' : { 'uri': 'icon/comet_16_000000.png' },
+ 'white' : { 'uri': 'icon/comet_16_ffffff.png' },
+ 'antimony' : { 'uri': 'icon/comet_16_00ddff.png' },
+ 'boron' : { 'uri': 'icon/comet_16_00ff11.png' },
+ 'lithium' : { 'uri': 'icon/comet_16_ff0000.png' },
+ 'potassium' : { 'uri': 'icon/comet_16_d00055.png' },
+ 'sodium' : { 'uri': 'icon/comet_16_ff8000.png' } },
+ '32' : { '*' : 'sodium' ,
+ 'black' : { 'uri': 'icon/comet_32_000000.png' },
+ 'white' : { 'uri': 'icon/comet_32_ffffff.png' },
+ 'antimony' : { 'uri': 'icon/comet_32_00ddff.png' },
+ 'boron' : { 'uri': 'icon/comet_32_00ff11.png' },
+ 'lithium' : { 'uri': 'icon/comet_32_ff0000.png' },
+ 'potassium' : { 'uri': 'icon/comet_32_d00055.png' },
+ 'sodium' : { 'uri': 'icon/comet_32_ff8000.png' } },
+ '64' : { '*' : 'sodium' ,
+ 'black' : { 'uri': 'icon/comet_64_000000.png' },
+ 'white' : { 'uri': 'icon/comet_64_ffffff.png' },
+ 'antimony' : { 'uri': 'icon/comet_64_00ddff.png' },
+ 'boron' : { 'uri': 'icon/comet_64_00ff11.png' },
+ 'lithium' : { 'uri': 'icon/comet_64_ff0000.png' },
+ 'potassium' : { 'uri': 'icon/comet_64_d00055.png' },
+ 'sodium' : { 'uri': 'icon/comet_64_ff8000.png' } },
+ '128': { '*' : 'sodium' ,
+ 'black' : { 'uri': 'icon/comet_128_000000.png' },
+ 'white' : { 'uri': 'icon/comet_128_ffffff.png' },
+ 'antimony' : { 'uri': 'icon/comet_128_00ddff.png' },
+ 'boron' : { 'uri': 'icon/comet_128_00ff11.png' },
+ 'lithium' : { 'uri': 'icon/comet_128_ff0000.png' },
+ 'potassium' : { 'uri': 'icon/comet_128_d00055.png' },
+ 'sodium' : { 'uri': 'icon/comet_128_ff8000.png' } } },
+ 'audio_audio' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_audio.png' , 'style': 'height: 2em;' },
+ 'sodium' : { 'uri': 'icon/knx-uf-iconset/128x128_or/audio_audio.png' , 'style': 'height: 2em;' } } },
+ 'audio_eject' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_eject.png' , 'style': 'height: 2em;' } } },
+ 'audio_ff' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_ff.png' , 'style': 'height: 2em;' } } },
+ 'audio_mute' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_mute.png' , 'style': 'height: 2em;' } } },
+ 'audio_pause' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_pause.png' , 'style': 'height: 2em;' } } },
+ 'audio_playliste' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_playliste.png' , 'style': 'height: 2em;' } } },
+ 'audio_play' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_play.png' , 'style': 'height: 2em;' } } },
+ 'audio_rec' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_rec.png' , 'style': 'height: 2em;' } } },
+ 'audio_rew' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_rew.png' , 'style': 'height: 2em;' } } },
+ 'audio_sound' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_sound.png' , 'style': 'height: 2em;' } } },
+ 'audio_stop' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/audio_stop.png' , 'style': 'height: 2em;' } } },
+ 'fts_fenster_gekippt' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_fenster_gekippt.png' , 'style': 'height: 2em;' } } },
+ 'fts_fenster_offen' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_fenster_offen.png' , 'style': 'height: 2em;' } } },
+ 'fts_fenster' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_fenster.png' , 'style': 'height: 2em;' } } },
+ 'fts_garage' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_garage.png' , 'style': 'height: 2em;' } } },
+ 'fts_markise' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_markise.png' , 'style': 'height: 2em;' } } },
+ 'fts_rollo' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_rollo.png' , 'style': 'height: 2em;' } } },
+ 'fts_tuer_offen' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_tuer_offen.png' , 'style': 'height: 2em;' } } },
+ 'fts_tuer' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/fts_tuer.png' , 'style': 'height: 2em;' } } },
+ 'it_fernsehen' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_fernsehen.png' , 'style': 'height: 2em;' } } },
+ 'it_funk_dcf77' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_funk_dcf77.png' , 'style': 'height: 2em;' } } },
+ 'it_internet' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_internet.png' , 'style': 'height: 2em;' } } },
+ 'it_kamera' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_kamera.png' , 'style': 'height: 2em;' } } },
+ 'it_nas' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_nas.png' , 'style': 'height: 2em;' } } },
+ 'it_netz' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_netz.png' , 'style': 'height: 2em;' } } },
+ 'it_netzwerk' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_netzwerk.png' , 'style': 'height: 2em;' } } },
+ 'it_pc' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_pc.png' , 'style': 'height: 2em;' } } },
+ 'it_radio' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_radio.png' , 'style': 'height: 2em;' } } },
+ 'it_router' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_router.png' , 'style': 'height: 2em;' } } },
+ 'it_server' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_server.png' , 'style': 'height: 2em;' } } },
+ 'it_smartphone' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_smartphone.png' , 'style': 'height: 2em;' } } },
+ 'it_telefon' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_telefon.png' , 'style': 'height: 2em;' } } },
+ 'it_wlan' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/it_wlan.png' , 'style': 'height: 2em;' } } },
+ 'licht_esstisch' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_esstisch.png' , 'style': 'height: 2em;' } } },
+ 'licht_indirekt' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_indirekt.png' , 'style': 'height: 2em;' } } },
+ 'licht_led' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_led.png' , 'style': 'height: 2em;' } } },
+ 'licht_lichterkette' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_lichterkette.png' , 'style': 'height: 2em;' } } },
+ 'licht_licht' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_licht.png' , 'style': 'height: 2em;' } } },
+ 'licht_party' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_party.png' , 'style': 'height: 2em;' } } },
+ 'licht_regelung' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_regelung.png' , 'style': 'height: 2em;' } } },
+ 'licht_stehlampe' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/licht_stehlampe.png' , 'style': 'height: 2em;' } } },
+ 'meld_achtung' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/meld_achtung.png' , 'style': 'height: 2em;' } } },
+ 'meld_medizin' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/meld_medizin.png' , 'style': 'height: 2em;' } } },
+ 'meld_post_offen' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/meld_post_offen.png' , 'style': 'height: 2em;' } } },
+ 'meld_post' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/meld_post.png' , 'style': 'height: 2em;' } } },
+ 'meld_service' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/meld_service.png' , 'style': 'height: 2em;' } } },
+ 'meld_steckdose' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/meld_steckdose.png' , 'style': 'height: 2em;' } } },
+ 'sani_bewaesserung' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_bewaesserung.png' , 'style': 'height: 2em;' } } },
+ 'sani_fussbodenheizung' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_fussbodenheizung.png' , 'style': 'height: 2em;' } } },
+ 'sani_heizung' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_heizung.png' , 'style': 'height: 2em;' } } },
+ 'sani_kessel_temp' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_kessel_temp.png' , 'style': 'height: 2em;' } } },
+ 'sani_lueftung' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_lueftung.png' , 'style': 'height: 2em;' } } },
+ 'sani_lueftung_regelung': { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_lueftung_regelung.png' , 'style': 'height: 2em;' } } },
+ 'sani_pumpe' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_pumpe.png' , 'style': 'height: 2em;' } } },
+ 'sani_solar' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_solar.png' , 'style': 'height: 2em;' } } },
+ 'sani_solar_temp' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_solar_temp.png' , 'style': 'height: 2em;' } } },
+ 'sani_wasserhahn' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/sani_wasserhahn.png' , 'style': 'height: 2em;' } } },
+ 'secur_alarmanlage' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/secur_alarmanlage.png' , 'style': 'height: 2em;' } } },
+ 'secur_codierung' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/secur_codierung.png' , 'style': 'height: 2em;' } } },
+ 'secur_frostschutz' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/secur_frostschutz.png' , 'style': 'height: 2em;' } } },
+ 'secur_hitzeschutz' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/secur_hitzeschutz.png' , 'style': 'height: 2em;' } } },
+ 'secur_offen' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/secur_offen.png' , 'style': 'height: 2em;' } } },
+ 'secur_rauchmelder' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/secur_rauchmelder.png' , 'style': 'height: 2em;' } } },
+ 'secur_zu' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/secur_zu.png' , 'style': 'height: 2em;' } } },
+ 'steuer_ab' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_ab.png' , 'style': 'height: 2em;' } } },
+ 'steuer_alles_ein_aus' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_alles_ein_aus.png' , 'style': 'height: 2em;' } } },
+ 'steuer_auf' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_auf.png' , 'style': 'height: 2em;' } } },
+ 'steuer_aussen_ein_aus' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_aussen_ein_aus.png' , 'style': 'height: 2em;' } } },
+ 'steuer_ein_aus' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_ein_aus.png' , 'style': 'height: 2em;' } } },
+ 'steuer_home' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_home.png' , 'style': 'height: 2em;' } } },
+ 'steuer_minus' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_minus.png' , 'style': 'height: 2em;' } } },
+ 'steuer_plus' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_plus.png' , 'style': 'height: 2em;' } } },
+ 'steuer_standby' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_standby.png' , 'style': 'height: 2em;' } } },
+ 'steuer_vor' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_vor.png' , 'style': 'height: 2em;' } } },
+ 'steuer_x' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_x.png' , 'style': 'height: 2em;' } } },
+ 'steuer_zurueck' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/steuer_zurueck.png' , 'style': 'height: 2em;' } } },
+ 'szene_essen' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_essen.png' , 'style': 'height: 2em;' } } },
+ 'szene_garten' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_garten.png' , 'style': 'height: 2em;' } } },
+ 'szene_kochen' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_kochen.png' , 'style': 'height: 2em;' } } },
+ 'szene_making_love' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_making_love.png' , 'style': 'height: 2em;' } } },
+ 'szene_nacht' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_nacht.png' , 'style': 'height: 2em;' } } },
+ 'szene_party' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_party.png' , 'style': 'height: 2em;' } } },
+ 'szene_pool' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_pool.png' , 'style': 'height: 2em;' } } },
+ 'szene_schlafen' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_schlafen.png' , 'style': 'height: 2em;' } } },
+ 'szene_schwimmen' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_schwimmen.png' , 'style': 'height: 2em;' } } },
+ 'szene_szene' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_szene.png' , 'style': 'height: 2em;' } } },
+ 'szene_terrasse' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_terrasse.png' , 'style': 'height: 2em;' } } },
+ 'szene_toilette' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_toilette.png' , 'style': 'height: 2em;' } } },
+ 'szene_weihnachten' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/szene_weihnachten.png' , 'style': 'height: 2em;' } } },
+ 'temp_aussen' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/temp_aussen.png' , 'style': 'height: 2em;' } } },
+ 'temp_frost' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/temp_frost.png' , 'style': 'height: 2em;' } } },
+ 'temp_innen' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/temp_innen.png' , 'style': 'height: 2em;' } } },
+ 'temp_regelung' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/temp_regelung.png' , 'style': 'height: 2em;' } } },
+ 'temp_temperatur' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/temp_temperatur.png' , 'style': 'height: 2em;' } } },
+ 'user_abwesend' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/user_abwesend.png' , 'style': 'height: 2em;' } } },
+ 'user_anwesend' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/user_anwesend.png' , 'style': 'height: 2em;' } } },
+ 'user_ext_away' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/user_ext_away.png' , 'style': 'height: 2em;' } } },
+ 'wetter_bewoelkt' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_bewoelkt.png' , 'style': 'height: 2em;' } } },
+ 'wetter_feuchtigkeit' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_feuchtigkeit.png' , 'style': 'height: 2em;' } } },
+ 'wetter_gewitter' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_gewitter.png' , 'style': 'height: 2em;' } } },
+ 'wetter_pollen' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_pollen.png' , 'style': 'height: 2em;' } } },
+ 'wetter_regen' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_regen.png' , 'style': 'height: 2em;' } } },
+ 'wetter_schnee' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_schnee.png' , 'style': 'height: 2em;' } } },
+ 'wetter_sommer' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_sommer.png' , 'style': 'height: 2em;' } } },
+ 'wetter_sonne' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_sonne.png' , 'style': 'height: 2em;' } } },
+ 'wetter_unwetter' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_unwetter.png' , 'style': 'height: 2em;' } } },
+ 'wetter_wind' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_wind.png' , 'style': 'height: 2em;' } } },
+ 'wetter_winter' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/wetter_winter.png' , 'style': 'height: 2em;' } } },
+ 'zeit_automatik' : { '*': { '*' : 'white',
+ 'white' : { 'uri': 'icon/knx-uf-iconset/128x128_ws/zeit_automat...
[truncated message content] |
|
From: <ma...@us...> - 2012-05-20 16:35:54
|
Revision: 834
http://openautomation.svn.sourceforge.net/openautomation/?rev=834&view=rev
Author: mayerch
Date: 2012-05-20 16:35:47 +0000 (Sun, 20 May 2012)
Log Message:
-----------
Allow designs to set up the amount of columns in the navbar
Modified Paths:
--------------
CometVisu/trunk/visu/designs/planet/design_setup.js
CometVisu/trunk/visu/designs/pure/design_setup.js
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/designs/planet/design_setup.js
===================================================================
--- CometVisu/trunk/visu/designs/planet/design_setup.js 2012-05-20 14:08:22 UTC (rev 833)
+++ CometVisu/trunk/visu/designs/planet/design_setup.js 2012-05-20 16:35:47 UTC (rev 834)
@@ -22,6 +22,9 @@
//////////////////////////////////////////////////////////////////////////////
//$('head').data('colspanDefault', 6 ); // 6 is already the default
+$('#navbarLeft').data('columns', 1 );
+$('#main').data('columns', 12 );
+$('#navbarRight').data('columns', 1 );
icons.insert({
'CometVisu' : { '*' : '128',
Modified: CometVisu/trunk/visu/designs/pure/design_setup.js
===================================================================
--- CometVisu/trunk/visu/designs/pure/design_setup.js 2012-05-20 14:08:22 UTC (rev 833)
+++ CometVisu/trunk/visu/designs/pure/design_setup.js 2012-05-20 16:35:47 UTC (rev 834)
@@ -21,6 +21,10 @@
//
//////////////////////////////////////////////////////////////////////////////
+$('#navbarLeft').data('columns', 6 );
+$('#main').data('columns', 12 );
+$('#navbarRight').data('columns', 6 );
+
icons.insert({
'CometVisu' : { '*' : '128',
'16' : { '*' : 'sodium' ,
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-05-20 14:08:22 UTC (rev 833)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-05-20 16:35:47 UTC (rev 834)
@@ -333,7 +333,8 @@
var allContainer = $('.widget_container');
allContainer.each(function(i, e) {
var ourColspan = $(e).children('*:first-child').data('colspan');
- var ourWidth = ourColspan/12*100;
+ var areaColspan = $(e).parentsUntil('#centerContainer').last().data('columns') || 12;
+ var ourWidth = ourColspan/areaColspan*100;
$(e).css('width', ourWidth+'%');
});
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|