From 77709fd6296cf90f93dd62ad3fc2b7b0303f7884 Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Thu, 15 Nov 2007 06:22:21 +0000 Subject: more woring cooxdoo code --- qooxdoo/source/class/Smokeping/Application.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'qooxdoo/source/class/Smokeping/Application.js') diff --git a/qooxdoo/source/class/Smokeping/Application.js b/qooxdoo/source/class/Smokeping/Application.js index 49a151d..6578393 100644 --- a/qooxdoo/source/class/Smokeping/Application.js +++ b/qooxdoo/source/class/Smokeping/Application.js @@ -17,8 +17,8 @@ qx.Class.define( var self=this; this.base(arguments); - // this will provide access to the server side of this app - var rpc = new Smokeping.io.Rpc('http://localhost/~oetiker/smq'); + // this will provide access to the server side of this app + var rpc = new Smokeping.io.Rpc('http://localhost/~oetiker/smq/'); var base_url = rpc.getBaseUrl(); @@ -39,25 +39,23 @@ qx.Class.define( prime.add(title); var splitpane = new qx.ui.splitpane.HorizontalSplitPane('1*', '3*'); - splitpane.setEdge(1); + splitpane.setEdge(0); splitpane.setHeight('1*'); splitpane.setShowKnob(true); prime.add(splitpane); - var tree = new Smokeping.ui.TargetTree(rpc,this.tr("Root Node")); + var tree = new Smokeping.ui.TargetTree(rpc); splitpane.addLeft(tree); - var graphs = new qx.ui.layout.VerticalBoxLayout(); - with(graphs){ - setBackgroundColor('white'); - setBorder('inset'); - setWidth('100%'); - setHeight('100%'); - }; + tree.getManager().addEventListener("changeSelection", function(e) { + if (e.getData().length > 0) { + this.debug(e.getData()[0].getUserData('id')); + } + },this); + var graphs = new Smokeping.ui.Graphs(rpc.getBaseUrl()); splitpane.addRight(graphs); - }, close : function(e) -- cgit v1.2.3-24-g4f1b