Replace raw_input_prompt span tag with a pre tag

Also, the input tag becomes a child of the pre tag.
Frederik Hermans 11 years ago
parent 65ca37e6b7
commit a31a64ad69

@ -774,23 +774,23 @@ define([
$("<div/>")
.addClass("box-flex1 output_subarea raw_input_container")
.append(
$("<span/>")
$("<pre/>")
.addClass("raw_input_prompt")
.text(content.prompt)
)
.append(
$("<input/>")
.addClass("raw_input")
.attr('type', input_type)
.attr("size", 47)
.keydown(function (event, ui) {
// make sure we submit on enter,
// and don't re-execute the *cell* on shift-enter
if (event.which === keyboard.keycodes.enter) {
that._submit_raw_input();
return false;
}
})
.append(
$("<input/>")
.addClass("raw_input")
.attr('type', input_type)
.attr("size", 47)
.keydown(function (event, ui) {
// make sure we submit on enter,
// and don't re-execute the *cell* on shift-enter
if (event.which === keyboard.keycodes.enter) {
that._submit_raw_input();
return false;
}
})
)
)
);
@ -807,7 +807,7 @@ define([
OutputArea.prototype._submit_raw_input = function (evt) {
var container = this.element.find("div.raw_input_container");
var theprompt = container.find("span.raw_input_prompt");
var theprompt = container.find("pre.raw_input_prompt");
var theinput = container.find("input.raw_input");
var value = theinput.val();
var echo = value;

@ -164,8 +164,8 @@ div.raw_input_container {
padding-top: 5px;
}
span.raw_input_prompt {
white-space: pre;
pre.raw_input_prompt {
/* nothing needed here. */
}
input.raw_input {

Loading…
Cancel
Save