[Yt-svn] commit/yt: MatthewTurk: Backing out 460cf1a04d4d. I don't know how this was the base changeset for

Bitbucket commits-noreply at bitbucket.org
Mon Jul 25 11:50:14 PDT 2011


1 new changeset in yt:

http://bitbucket.org/yt_analysis/yt/changeset/f3054b82dc34/
changeset:   f3054b82dc34
branch:      yt
user:        MatthewTurk
date:        2011-07-25 20:48:26
summary:     Backing out 460cf1a04d4d.  I don't know how this was the base changeset for
anything; was an experiment I never finished in porting to ExtJS 4.
affected #:  3 files (340 bytes)

--- a/yt/gui/reason/html/index.html	Mon Jul 25 14:45:50 2011 -0400
+++ b/yt/gui/reason/html/index.html	Mon Jul 25 14:48:26 2011 -0400
@@ -3,7 +3,7 @@
   <title>Reason YT GUI</title><link rel="stylesheet" type="text/css" href="resources/resources/css/ext-all.css" /><link rel="stylesheet" type="text/css" href="highlighter.css" />
-    <!--<link rel="stylesheet" type="text/css" href="theme/css/xtheme-slate.css" />-->
+    <link rel="stylesheet" type="text/css" href="theme/css/xtheme-slate.css" /><style type="text/css">
     html, body {


--- a/yt/gui/reason/html/js/functions.js	Mon Jul 25 14:45:50 2011 -0400
+++ b/yt/gui/reason/html/js/functions.js	Mon Jul 25 14:48:26 2011 -0400
@@ -30,15 +30,15 @@
 ***********************************************************************/
 
 function enable_input() {
-    /*repl_input.body.removeClass("cell_waiting");*/
-    repl_input.getComponent('input_line').setReadOnly(false);
-    repl_input.getComponent("input_line").focus();
-    /*yt_rpc.ExtDirectParameterFileList.get_list_of_pfs({}, fill_tree);*/
+    repl_input.body.removeClass("cell_waiting");
+    repl_input.get('input_line').setReadOnly(false);
+    repl_input.get("input_line").focus();
+    yt_rpc.ExtDirectParameterFileList.get_list_of_pfs({}, fill_tree);
 }
 
 function disable_input() {
-    repl_input.getComponent('input_line').setReadOnly(true);
-    /*repl_input.body.addClass("cell_waiting");*/
+    repl_input.get('input_line').setReadOnly(true);
+    repl_input.body.addClass("cell_waiting");
 }
 
 function cell_finished(result) {
@@ -62,7 +62,7 @@
                 /* Assume only one locking level */
                 repl_input.locked = false;
             } else {
-                repl_input.getComponent("input_line").setValue("");
+                repl_input.get("input_line").setValue("");
             }
             if (OutputContainer.items.length > 1) {
                 examine = cell;
@@ -84,11 +84,13 @@
 	        OutputContainer.doLayout();
 	        number_images++;
         } else if (payload['type'] == 'cell_contents') {
-	        var input_line = repl_input.getComponent("input_line");
+	        var input_line = repl_input.get("input_line");
 	        input_line.setValue(payload['value']);
             repl_input.locked = true;
         } else if (payload['type'] == 'log_entry') {
-	        logging_store.add({record: payload['log_entry'] });
+	        var record = new logging_store.recordType(
+		        {record: payload['log_entry'] });
+	        logging_store.add(record, number_log_records++);
             new_log = true;
         } else if (payload['type'] == 'widget') {
             var widget_type = payload['widget_type'];
@@ -109,7 +111,7 @@
         }
     });
     if (new_log == true){
-        viewport.getComponent("status-region").getView().focusRow(number_log_records-1);
+        viewport.get("status-region").getView().focusRow(number_log_records-1);
     }
     if (cell_resulted == true) {
         enable_input();
@@ -117,7 +119,7 @@
 }
 
 function display_image(image_id) {
-    var image = Ext.getComponent(image_id);
+    var image = Ext.get(image_id);
     var src = image.dom.src;
     var virtualdom = '<html><title>Image Viewer</title><body><img src="' 
         + src + '"/></body></html>',
@@ -303,13 +305,13 @@
                 allowBlank:false,
                 handler: function(checkbox, checked) {
                     if (checked == true) {
-                        this.ownerCt.getComponent("slice_x_center").disable();
-                        this.ownerCt.getComponent("slice_y_center").disable();
-                        this.ownerCt.getComponent("slice_z_center").disable();
+                        this.ownerCt.get("slice_x_center").disable();
+                        this.ownerCt.get("slice_y_center").disable();
+                        this.ownerCt.get("slice_z_center").disable();
                     } else {
-                        this.ownerCt.getComponent("slice_x_center").enable();
-                        this.ownerCt.getComponent("slice_y_center").enable();
-                        this.ownerCt.getComponent("slice_z_center").enable();
+                        this.ownerCt.get("slice_x_center").enable();
+                        this.ownerCt.get("slice_y_center").enable();
+                        this.ownerCt.get("slice_z_center").enable();
                     }
                 }
             },{
@@ -326,12 +328,12 @@
                 {
                     text: 'Slice',
                     handler: function(b, e){
-                        var center = [Ext.getComponent("slice_x_center").getValue(),
-                                      Ext.getComponent("slice_y_center").getValue(),
-                                      Ext.getComponent("slice_z_center").getValue()];
-                        var axis = Ext.getComponent("slice_axis").getValue();
-                        var field = Ext.getComponent("slice_field").getValue();
-                        var onmax = Ext.getComponent("max_dens").getValue();
+                        var center = [Ext.get("slice_x_center").getValue(),
+                                      Ext.get("slice_y_center").getValue(),
+                                      Ext.get("slice_z_center").getValue()];
+                        var axis = Ext.get("slice_axis").getValue();
+                        var field = Ext.get("slice_field").getValue();
+                        var onmax = Ext.get("max_dens").getValue();
                         yt_rpc.ExtDirectREPL.create_slice({
                             pfname:node.attributes.objdata.varname,
                             center: center, axis:axis, field:field, onmax:onmax},
@@ -416,10 +418,10 @@
                 {
                     text: 'Calculate',
                     handler: function(b, e){
-                        var x_field = Ext.getComponent("x_field").getValue();
-                        var y_field = Ext.getComponent("y_field").getValue();
-                        var z_field = Ext.getComponent("z_field").getValue();
-                        var weight = Ext.getComponent("weight").getValue();
+                        var x_field = Ext.get("x_field").getValue();
+                        var y_field = Ext.get("y_field").getValue();
+                        var z_field = Ext.get("z_field").getValue();
+                        var weight = Ext.get("weight").getValue();
                         yt_rpc.ExtDirectREPL.create_phase({
                                 objname: node.attributes.objdata.varname,
                                 /* Mirror image varnames ... */
@@ -498,10 +500,10 @@
                 {
                     text: 'Project',
                     handler: function(b, e){
-                        var axis = Ext.getComponent("axis").getValue();
-                        var field = Ext.getComponent("field").getValue();
-                        var weight = Ext.getComponent("weightField").getValue();
-                        var onmax = Ext.getComponent("max_dens").getValue();
+                        var axis = Ext.get("axis").getValue();
+                        var field = Ext.get("field").getValue();
+                        var weight = Ext.get("weightField").getValue();
+                        var onmax = Ext.get("max_dens").getValue();
                         yt_rpc.ExtDirectREPL.create_proj({
                                 pfname: node.attributes.objdata.varname,
                                 axis: axis, field: field, weight: weight,


--- a/yt/gui/reason/html/js/reason.js	Mon Jul 25 14:45:50 2011 -0400
+++ b/yt/gui/reason/html/js/reason.js	Mon Jul 25 14:48:26 2011 -0400
@@ -54,10 +54,10 @@
     cell_finished(pp);
 }
 
-var repl_input = new Ext.form.Panel({
+var repl_input = new Ext.FormPanel({
     title: 'YT Input',
     url: 'push',
-    flex: 1.0,
+    flex: 0.2,
     layout: 'fit',
     padding: 5,
     height: '100%',
@@ -75,7 +75,7 @@
                 if (e.getKey() == e.ENTER) {
                     disable_input();
                     yt_rpc.ExtDirectREPL.execute({
-                        code:repl_input.getComponent('input_line').getValue()},
+                        code:repl_input.get('input_line').getValue()},
                     handle_result);
                 }
             },
@@ -93,7 +93,7 @@
 
                         var varname = data.node.attributes.objdata.varname;
                         /* There is possibly a better way to do this, where it's also inserted correctly. */
-                        var line = repl_input.getComponent("input_line");
+                        var line = repl_input.get("input_line");
                         line.setValue(line.getValue() + varname);
                         line.focus();
                         return(true);
@@ -135,14 +135,14 @@
     title: 'YT Output',
     id: 'output_container',
     autoScroll: true,
-    flex: 4.0,
+    flex: 0.8,
     items: []
 });
 
 var examine;
 var notebook;
 
-/*var treePanel = new Ext.tree.TreePanel({
+var treePanel = new Ext.tree.TreePanel({
     iconCls: 'nav',
     id: 'tree-panel',
     layout: 'anchor',
@@ -212,22 +212,12 @@
             }
         }
     }
-});*/
+});
 
 var status_panel;
-
-Ext.define("log", {extend: "Ext.data.Model", fields: ['record']});
-
 var logging_store = new Ext.data.Store({
-    model: 'log',
-    data: [],
-    proxy: {
-        type: 'memory',
-        reader: {
-            type: 'json',
-            root: 'users'
-        }
-    }
+    fields: [{name:'record'}],
+    reader: new Ext.data.ArrayReader({}, [{name: 'record'}]),
 });
 
 var heartbeat_request = false;
@@ -246,7 +236,7 @@
     Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
 
     // Go ahead and create the TreePanel now so that we can use it below
-    viewport = new Ext.container.Viewport({
+    viewport = new Ext.Viewport({
         layout: 'border',
         items: [
 		// lazily created panel (xtype:'panel' is default)
@@ -254,12 +244,9 @@
                 xtype: 'grid',
                 store: logging_store,
                 defaults: { width: 800 },
-                columns: [ {
-                     header: 'Log Message',
-                     dataIndex: 'record',
-                     flex:1.0,
-                     sortable: false,
-                     width:800} ],
+                columns: [ {id:'record', 
+                    sortable: false,
+                    width:800} ],
                 autofill: true,
                 region: 'south',
                 id: "status-region",
@@ -287,6 +274,7 @@
                         xtype: 'toolbar',
                         items: [ main_menu ],
                     },
+                    treePanel,
                 ]
 		  // in this instance the TabPanel is not wrapped by another panel
 		  // since no title is needed, this Panel is added directly
@@ -300,11 +288,8 @@
                 items: [{
                         title: 'YT',
                         id: 'notebook',
-                        layout: {
-                                  type:'vbox',
-                                  align:'stretch',
-                                  pack:'start'
-                                },
+                        layout: 'vbox',
+                        layoutConfig: {align:'stretch'},
                         closable: false,
                         autoScroll: false,
                         iconCls: 'console',
@@ -327,20 +312,28 @@
         w.collapsed ? w.expand() : w.collapse();
     });
     
-    notebook = viewport.getComponent("center-panel").getComponent("notebook");
-    status_panel = viewport.getComponent("status-region").getComponent("status-div");
-    logging_store.add({record: 'Welcome to yt.'});
-    logging_store.add({record: 'After entering a line of code in the YT' +
-                      'Input field, press shift-enter to evaluate.' });
-    logging_store.add({record: '4d3d3d3 engaged.' });
+    notebook = viewport.get("center-panel").get("notebook");
+    status_panel = viewport.get("status-region").get("status-div");
+    
+    var record = new logging_store.recordType(
+        {record: 'Welcome to yt.'});
+    logging_store.add(record, number_log_records++);
+
+    var record = new logging_store.recordType(
+        {record: 'After entering a line of code in the YT Input field, press shift-enter to evaluate.' });
+    logging_store.add(record, number_log_records++);
+
+    var record = new logging_store.recordType(
+        {record: '4d3d3d3 engaged.' });
+    logging_store.add(record, number_log_records++);
 
     if (!Ext.state.Manager.get("reason_welcomed", false)) {
         Ext.MessageBox.alert("Reason v0.5",
         "Welcome to Reason.  <br>Treat the 'YT Input' field as a YT/python intepreter.<br>Press shift-enter to evaluate.",
-        function(b,e){ repl_input.getComponent("input_line").focus(); });
+        function(b,e){ repl_input.get("input_line").focus(); });
         Ext.state.Manager.set("reason_welcomed", true);
     } else { 
-        repl_input.getComponent("input_line").focus();
+        repl_input.get("input_line").focus();
     }
 
     /* Set up the heartbeat */

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list