From 5d9b6e7378577f7e2e70feb07ef2cc8558dc14a9 2011-07-21 03:42:32 From: Brian Granger Date: 2011-07-21 03:42:32 Subject: [PATCH] Work on the notebook's code cell. * Cleaned up the js code for creating the code cell. * Added a div around the input text area to allow the text area to have a width of 100%. * Added CodeCell.toJSON. --- diff --git a/IPython/frontend/html/notebook/static/css/notebook.css b/IPython/frontend/html/notebook/static/css/notebook.css index e75e331..274c211 100644 --- a/IPython/frontend/html/notebook/static/css/notebook.css +++ b/IPython/frontend/html/notebook/static/css/notebook.css @@ -188,7 +188,17 @@ div.input_prompt { color: blue; } -textarea.input_area { +div.input_area { + box-flex: 1; + -webkit-box-flex: 1; + -moz-box-flex: 1; + box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; +} + +textarea.input_textarea { + width: 100%; text-align: left; font-family: Monaco, Consolas, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace; font-size: inherit; @@ -199,13 +209,6 @@ textarea.input_area { overflow: auto; outline: none; resize: none; - - box-flex: 1; - -webkit-box-flex: 1; - -moz-box-flex: 1; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; } div.output { diff --git a/IPython/frontend/html/notebook/static/js/notebook.js b/IPython/frontend/html/notebook/static/js/notebook.js index 520d12d..f900925 100644 --- a/IPython/frontend/html/notebook/static/js/notebook.js +++ b/IPython/frontend/html/notebook/static/js/notebook.js @@ -546,21 +546,14 @@ CodeCell.prototype = new Cell(); CodeCell.prototype.create_element = function () { - var cell = $('
').addClass('cell code_cell') - var input = $('
').addClass('input').append( - $('
').addClass('prompt input_prompt') - ).append( - $('