##// END OF EJS Templates
Misc fixes to the code cell and output area.
Brian Granger -
Show More
@@ -172,7 +172,7 b' div.output_area {'
172 /* This class is for the output subarea inside the output_area and after
172 /* This class is for the output subarea inside the output_area and after
173 the prompt div. */
173 the prompt div. */
174 div.output_subarea {
174 div.output_subarea {
175 padding: 0.4em 6.1em 0.4em 0.4em;
175 padding: 0.4em 0.4em 0.4em 0.4em;
176 }
176 }
177
177
178 /* The rest of the output_* classes are for special styling of the different
178 /* The rest of the output_* classes are for special styling of the different
@@ -83,7 +83,7 b' var IPython = (function (IPython) {'
83 // browser and keyboard layout !
83 // browser and keyboard layout !
84 // Pressing '(' , request tooltip, don't forget to reappend it
84 // Pressing '(' , request tooltip, don't forget to reappend it
85 IPython.tooltip.pending(that);
85 IPython.tooltip.pending(that);
86 } else if (event.which === key.UPARROW) {
86 } else if (event.which === key.UPARROW && event.type === 'keydown') {
87 // If we are not at the top, let CM handle the up arrow and
87 // If we are not at the top, let CM handle the up arrow and
88 // prevent the global keydown handler from handling it.
88 // prevent the global keydown handler from handling it.
89 if (!that.at_top()) {
89 if (!that.at_top()) {
@@ -92,7 +92,7 b' var IPython = (function (IPython) {'
92 } else {
92 } else {
93 return true;
93 return true;
94 };
94 };
95 } else if (event.which === key.DOWNARROW) {
95 } else if (event.which === key.DOWNARROW && event.type === 'keydown') {
96 // If we are not at the bottom, let CM handle the down arrow and
96 // If we are not at the bottom, let CM handle the down arrow and
97 // prevent the global keydown handler from handling it.
97 // prevent the global keydown handler from handling it.
98 if (!that.at_bottom()) {
98 if (!that.at_bottom()) {
@@ -238,7 +238,7 b' var IPython = (function (IPython) {'
238
238
239
239
240 OutputArea.prototype.append_html = function (html, element) {
240 OutputArea.prototype.append_html = function (html, element) {
241 var toinsert = $("<div/>").addClass("box_flex1 output_subarea output_html rendered_html");
241 var toinsert = $("<div/>").addClass("box-flex1 output_subarea output_html rendered_html");
242 toinsert.append(html);
242 toinsert.append(html);
243 element.append(toinsert);
243 element.append(toinsert);
244 };
244 };
@@ -246,8 +246,7 b' var IPython = (function (IPython) {'
246
246
247 OutputArea.prototype.append_javascript = function (js, container) {
247 OutputArea.prototype.append_javascript = function (js, container) {
248 // We just eval the JS code, element appears in the local scope.
248 // We just eval the JS code, element appears in the local scope.
249 var element = $("<div/>").addClass("box_flex1 output_subarea");
249 var element = $("<div/>").addClass("box-flex1 output_subarea");
250 var kernel = this.kernel;
251 container.append(element);
250 container.append(element);
252 // Div for js shouldn't be drawn, as it will add empty height to the area.
251 // Div for js shouldn't be drawn, as it will add empty height to the area.
253 container.hide();
252 container.hide();
@@ -258,7 +257,7 b' var IPython = (function (IPython) {'
258
257
259
258
260 OutputArea.prototype.append_text = function (data, element, extra_class) {
259 OutputArea.prototype.append_text = function (data, element, extra_class) {
261 var toinsert = $("<div/>").addClass("box_flex1 output_subarea output_text");
260 var toinsert = $("<div/>").addClass("box-flex1 output_subarea output_text");
262 // escape ANSI & HTML specials in plaintext:
261 // escape ANSI & HTML specials in plaintext:
263 data = utils.fixConsole(data);
262 data = utils.fixConsole(data);
264 if (extra_class){
263 if (extra_class){
@@ -270,21 +269,21 b' var IPython = (function (IPython) {'
270
269
271
270
272 OutputArea.prototype.append_svg = function (svg, element) {
271 OutputArea.prototype.append_svg = function (svg, element) {
273 var toinsert = $("<div/>").addClass("box_flex1 output_subarea output_svg");
272 var toinsert = $("<div/>").addClass("box-flex1 output_subarea output_svg");
274 toinsert.append(svg);
273 toinsert.append(svg);
275 element.append(toinsert);
274 element.append(toinsert);
276 };
275 };
277
276
278
277
279 OutputArea.prototype.append_png = function (png, element) {
278 OutputArea.prototype.append_png = function (png, element) {
280 var toinsert = $("<div/>").addClass("box_flex1 output_subarea output_png");
279 var toinsert = $("<div/>").addClass("box-flex1 output_subarea output_png");
281 toinsert.append($("<img/>").attr('src','data:image/png;base64,'+png));
280 toinsert.append($("<img/>").attr('src','data:image/png;base64,'+png));
282 element.append(toinsert);
281 element.append(toinsert);
283 };
282 };
284
283
285
284
286 OutputArea.prototype.append_jpeg = function (jpeg, element) {
285 OutputArea.prototype.append_jpeg = function (jpeg, element) {
287 var toinsert = $("<div/>").addClass("box_flex1 output_subarea output_jpeg");
286 var toinsert = $("<div/>").addClass("box-flex1 output_subarea output_jpeg");
288 toinsert.append($("<img/>").attr('src','data:image/jpeg;base64,'+jpeg));
287 toinsert.append($("<img/>").attr('src','data:image/jpeg;base64,'+jpeg));
289 element.append(toinsert);
288 element.append(toinsert);
290 };
289 };
@@ -293,7 +292,7 b' var IPython = (function (IPython) {'
293 OutputArea.prototype.append_latex = function (latex, element) {
292 OutputArea.prototype.append_latex = function (latex, element) {
294 // This method cannot do the typesetting because the latex first has to
293 // This method cannot do the typesetting because the latex first has to
295 // be on the page.
294 // be on the page.
296 var toinsert = $("<div/>").addClass("box_flex1 output_subarea output_latex");
295 var toinsert = $("<div/>").addClass("box-flex1 output_subarea output_latex");
297 toinsert.append(latex);
296 toinsert.append(latex);
298 element.append(toinsert);
297 element.append(toinsert);
299 };
298 };
@@ -99,6 +99,7 b' IPython.utils = (function (IPython) {'
99 SHIFT : 16,
99 SHIFT : 16,
100 CTRL : 17,
100 CTRL : 17,
101 CONTROL : 17,
101 CONTROL : 17,
102 ALT : 18,
102 ESC : 27,
103 ESC : 27,
103 SPACE : 32,
104 SPACE : 32,
104 PGUP : 33,
105 PGUP : 33,
General Comments 0
You need to be logged in to leave comments. Login now