diff --git a/IPython/frontend/html/notebook/static/css/notebook.css b/IPython/frontend/html/notebook/static/css/notebook.css index a66b63e88..9396bf7c4 100644 --- a/IPython/frontend/html/notebook/static/css/notebook.css +++ b/IPython/frontend/html/notebook/static/css/notebook.css @@ -238,7 +238,7 @@ div.output_area { /* This class is for the output subarea inside the output_area and after the prompt div. */ div.output_subarea { - padding: 0.4em 0.4em 0.4em 0.4em; + padding: 0.44em 0.4em 0.4em 1px; } /* The rest of the output_* classes are for special styling of the different diff --git a/IPython/frontend/html/notebook/static/js/codecell.js b/IPython/frontend/html/notebook/static/js/codecell.js index eb841ef6b..22885d623 100644 --- a/IPython/frontend/html/notebook/static/js/codecell.js +++ b/IPython/frontend/html/notebook/static/js/codecell.js @@ -225,10 +225,33 @@ var IPython = (function (IPython) { }; + + + + CodeCell.input_prompt_classical = function (prompt_value, lines_number) { + var ns = prompt_value || " "; + return 'In [' + ns + ']:' + }; + + CodeCell.input_prompt_continuation = function (prompt_value, lines_number) { + var html = [CodeCell.input_prompt_classical(prompt_value, lines_number)]; + for(var i=1; i < lines_number; i++){html.push(['...:'])}; + return html.join('
') + }; + + CodeCell.input_prompt_function = CodeCell.input_prompt_classical; + + CodeCell.prototype.set_input_prompt = function (number) { - this.input_prompt_number = number; - var ns = number || " "; - this.element.find('div.input_prompt').html('In [' + ns + ']:'); + var nline = 1 + if( this.code_mirror != undefined) { + nline = this.code_mirror.lineCount(); + } + if (number){ + this.input_prompt_number = number; + } + var prompt_html = CodeCell.input_prompt_function(this.input_prompt_number, nline); + this.element.find('div.input_prompt').html(prompt_html); }; diff --git a/IPython/frontend/html/notebook/static/js/notebook.js b/IPython/frontend/html/notebook/static/js/notebook.js index 346b6d3de..db7cae52f 100644 --- a/IPython/frontend/html/notebook/static/js/notebook.js +++ b/IPython/frontend/html/notebook/static/js/notebook.js @@ -550,6 +550,11 @@ var IPython = (function (IPython) { }; + Notebook.prototype.insert_cell_at_bottom = function (type){ + var len = this.ncells(); + return this.insert_cell_below(type,len-1); + } + Notebook.prototype.insert_cell_below = function (type, index) { // type = ('code','html','markdown') // index = cell index or undefined to insert below selected