Show More
@@ -41,6 +41,7 b' var IPython = (function (IPython) {' | |||||
41 | mode: 'python', |
|
41 | mode: 'python', | |
42 | theme: 'ipython', |
|
42 | theme: 'ipython', | |
43 | readOnly: this.read_only, |
|
43 | readOnly: this.read_only, | |
|
44 | onUpdate: $.proxy(function(){this.set_input_prompt()},this), | |||
44 | extraKeys: {"Tab": "indentMore","Shift-Tab" : "indentLess",'Backspace':"delSpaceToPrevTabStop"}, |
|
45 | extraKeys: {"Tab": "indentMore","Shift-Tab" : "indentLess",'Backspace':"delSpaceToPrevTabStop"}, | |
45 | onKeyEvent: $.proxy(this.handle_codemirror_keyevent,this) |
|
46 | onKeyEvent: $.proxy(this.handle_codemirror_keyevent,this) | |
46 | }); |
|
47 | }); | |
@@ -210,10 +211,33 b' var IPython = (function (IPython) {' | |||||
210 | }; |
|
211 | }; | |
211 |
|
212 | |||
212 |
|
213 | |||
|
214 | ||||
|
215 | ||||
|
216 | ||||
|
217 | CodeCell.input_prompt_classical = function (prompt_value, lines_number) { | |||
|
218 | var ns = prompt_value || " "; | |||
|
219 | return 'In [' + ns + ']:' | |||
|
220 | }; | |||
|
221 | ||||
|
222 | CodeCell.input_prompt_continuation = function (prompt_value, lines_number) { | |||
|
223 | var html = [CodeCell.input_prompt_classical(prompt_value, lines_number)]; | |||
|
224 | for(var i=1; i < lines_number; i++){html.push(['...:'])}; | |||
|
225 | return html.join('</br>') | |||
|
226 | }; | |||
|
227 | ||||
|
228 | CodeCell.input_prompt_function = CodeCell.input_prompt_classical; | |||
|
229 | ||||
|
230 | ||||
213 | CodeCell.prototype.set_input_prompt = function (number) { |
|
231 | CodeCell.prototype.set_input_prompt = function (number) { | |
214 | this.input_prompt_number = number; |
|
232 | var nline = 1 | |
215 | var ns = number || " "; |
|
233 | if( this.code_mirror != undefined) { | |
216 | this.element.find('div.input_prompt').html('In [' + ns + ']:'); |
|
234 | nline = this.code_mirror.lineCount(); | |
|
235 | } | |||
|
236 | if (number){ | |||
|
237 | this.input_prompt_number = number; | |||
|
238 | } | |||
|
239 | var prompt_html = CodeCell.input_prompt_function(this.input_prompt_number, nline); | |||
|
240 | this.element.find('div.input_prompt').html(prompt_html); | |||
217 | }; |
|
241 | }; | |
218 |
|
242 | |||
219 |
|
243 |
General Comments 0
You need to be logged in to leave comments.
Login now