From: Alan Knowles Date: Wed, 26 May 2010 06:46:00 +0000 (+0800) Subject: Sample/Window.js X-Git-Url: http://git.roojs.org/?a=commitdiff_plain;h=d0a02c75c6abc9858c6b0faea06792f9b991da0c;p=app.Builder.js Sample/Window.js --- diff --git a/Sample/Window.js b/Sample/Window.js index 6880a6333..64af90b9d 100644 --- a/Sample/Window.js +++ b/Sample/Window.js @@ -2502,20 +2502,22 @@ Window=new XObject({ { xtype: Gtk.Button, pack : "pack_start,false,false,0", - label : "Dump HTML to console", + label : "Redraw", listeners : { - "activate":function (self) { - this.get('/RightBrowser.view').el.execute_script( - "console.log(document.body.innerHTML);"); - this.get('/RightBrowser.view').el.execute_script( - "console.log(Builder.dump(Builder));"); + "activate":function (self) + { + + var js = this.get('/LeftTree.model').toJS(); + if (js && js[0]) { + this.get('/RightBrowser.view').renderJS(js[0]); + } } } }, { xtype: Gtk.Button, pack : "add", - label : "Set Default Javascript", + label : "Set extra HTML in render", listeners : { "button_press_event":function (self, event) { this.get('/RooProjectProperties').show();