|
|
|
|
@ -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('</br>')
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|