Show More
@@ -74,7 +74,6 b' var IPython = (function (IPython) {' | |||
|
74 | 74 | |
|
75 | 75 | OutputArea.prototype.bind_events = function () { |
|
76 | 76 | var that = this; |
|
77 | this._submit_raw_input_proxy = $.proxy(this._submit_raw_input, this); | |
|
78 | 77 | this.prompt_overlay.dblclick(function () { that.toggle_output(); }); |
|
79 | 78 | this.prompt_overlay.click(function () { that.toggle_scroll(); }); |
|
80 | 79 | |
@@ -451,29 +450,34 b' var IPython = (function (IPython) {' | |||
|
451 | 450 | }; |
|
452 | 451 | |
|
453 | 452 | OutputArea.prototype.append_raw_input = function (content) { |
|
453 | var that = this; | |
|
454 | 454 | this.expand(); |
|
455 | 455 | this.flush_clear_timeout(); |
|
456 | 456 | var area = this.create_output_area(); |
|
457 | ||
|
457 | 458 | area.append( |
|
458 | 459 | $("<div/>") |
|
459 | 460 | .addClass("box-flex1 output_subarea raw_input") |
|
460 | 461 | .append( |
|
461 |
$("< |
|
|
462 | .attr("action", "javascript:$([IPython.events]).trigger('submit_raw_input.OutputArea');") | |
|
463 |
. |
|
|
464 | $("<span/>") | |
|
465 | .addClass("input_prompt") | |
|
466 | .text(content.prompt) | |
|
467 |
) |
|
|
468 | $("<input/>") | |
|
469 |
|
|
|
470 | .addClass("raw_input") | |
|
471 | ) | |
|
462 | $("<span/>") | |
|
463 | .addClass("input_prompt") | |
|
464 | .text(content.prompt) | |
|
465 | ) | |
|
466 | .append( | |
|
467 | $("<input/>") | |
|
468 | .addClass("raw_input") | |
|
469 | .attr('type', 'text') | |
|
470 | .attr("size", 80) | |
|
471 | .keydown(function (event, ui) { | |
|
472 | // make sure we submit on enter, | |
|
473 | // and don't re-execute the *cell* on shift-enter | |
|
474 | if (event.which === utils.keycodes.ENTER) { | |
|
475 | that._submit_raw_input(); | |
|
476 | return false; | |
|
477 | } | |
|
478 | }) | |
|
472 | 479 | ) |
|
473 | ) | |
|
474 | // clear events first | |
|
475 | $([IPython.events]).off('submit_raw_input.OutputArea'); | |
|
476 | $([IPython.events]).on('submit_raw_input.OutputArea', this._submit_raw_input_proxy); | |
|
480 | ); | |
|
477 | 481 | this.element.append(area); |
|
478 | 482 | area.find("input.raw_input").focus(); |
|
479 | 483 | } |
@@ -491,7 +495,6 b' var IPython = (function (IPython) {' | |||
|
491 | 495 | container.parent().remove(); |
|
492 | 496 | // replace with plaintext version in stdout |
|
493 | 497 | this.append_output(content, false); |
|
494 | $([IPython.events]).off('submit_raw_input.OutputArea', this._submit_raw_input_proxy); | |
|
495 | 498 | $([IPython.events]).trigger('send_input_reply.Kernel', value); |
|
496 | 499 | } |
|
497 | 500 |
General Comments 0
You need to be logged in to leave comments.
Login now