diff options
Diffstat (limited to 'qooxdoo/source/class/Tr/Application.js')
-rw-r--r-- | qooxdoo/source/class/Tr/Application.js | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/qooxdoo/source/class/Tr/Application.js b/qooxdoo/source/class/Tr/Application.js new file mode 100644 index 0000000..9e07dbe --- /dev/null +++ b/qooxdoo/source/class/Tr/Application.js @@ -0,0 +1,89 @@ +/* ************************************************************************ + +#module(Tr) +#resource(Tr.image:image) +#embed(Tr.image/*) + +************************************************************************ */ + +qx.Class.define('Tr.Application', +{ + extend: qx.application.Gui, + + members: + { + main: function() + { + var self=this; + this.base(arguments); + + qx.io.Alias.getInstance().add( + 'MT', qx.core.Setting.get('Tr.resourceUri') + ); + + // if we run with a file:// url make sure + // the app finds the Tr service (Tr.cgi) + + Tr.Server.getInstance().setLocalUrl( + 'http://johan.oetiker.ch/~oetiker/tr/' + ); + + var base_layout = new qx.ui.layout.VerticalBoxLayout(); + with(base_layout){ + setPadding(8); + setLocation(0,0); + setWidth('100%'); + setHeight('100%'); + setSpacing(10); + setBackgroundColor('white'); + }; + base_layout.addToDocument(); + var top = new qx.ui.layout.HorizontalBoxLayout(); + top.set({ + height: 'auto' + }); + var title = new qx.ui.basic.Atom(this.tr("Smokeping Traceroute Frontend")); + with(title){ + setTextColor('#b0b0b0'); + setFont(qx.ui.core.Font.fromString('20px bold sans-serif')); + } + top.add(title); + top.add(new qx.ui.basic.HorizontalSpacer()); + top.add(new Tr.ui.ActionButton()); + base_layout.add(top); + var trace = new Tr.ui.TraceTable(); + base_layout.add(trace); + }, + + close : function(e) + { + this.base(arguments); + // return "Tr Web UI: " + // + "Do you really want to close the application?"; + }, + + + terminate : function(e) { + this.base(arguments); + } + + /******************************************************************** + * Functional Block Methods + ********************************************************************/ + + }, + + + + + /* + ***************************************************************************** + SETTINGS + ***************************************************************************** + */ + + settings : { + 'Tr.resourceUri' : './resource' + } +}); + |