Revision: 4166 http://vexi.svn.sourceforge.net/vexi/?rev=4166&view=rev Author: clrg Date: 2011-06-29 23:41:53 +0000 (Wed, 29 Jun 2011)
Log Message: ----------- Generic poke widget - use param 'load=path.to.widget,other.path.otherwidget' Added Paths: ----------- trunk/org.vexi-vexi.widgets/src_poke/poke/generic.t Added: trunk/org.vexi-vexi.widgets/src_poke/poke/generic.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_poke/poke/generic.t (rev 0) +++ trunk/org.vexi-vexi.widgets/src_poke/poke/generic.t 2011-06-29 23:41:53 UTC (rev 4166) @@ -0,0 +1,37 @@ +<!-- Copyright 2011 - see COPYING for details [LGPL] --> + +<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="vexi.widget"> + <meta:doc> + <usage> + Use the param 'load' and a comma delimited list of templates to load + e.g. load=vexi.util.clock,vexi.widget.datefield + </usage> + </meta:doc> + + <surface /> + <ui:box> + <ui:box id="col1" orient="vertical" /> + <ui:box id="col2" orient="vertical" /> + + var init = function(tstring) { + var bits = tstring.split('.'); + assert(bits.length>1); + var res = vexi[""][bits[0]]; + for (var i=1; bits.length>i; i++) + res = res[bits[i]]; + return res; + } + + var load = vexi.params["load"]; + var templates = load.split(','); + + for (var i,t in templates) { + var res = init(t); + var col = i%1 ? $col1 : $col2; + col.add(new res()); + } + + vexi.ui.frame = thisbox; + + </ui:box> +</vexi> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn