2
0
mirror of https://github.com/jupyter/notebook.git synced 2025-03-13 13:17:50 +08:00

Move md-cell display logic to css

This commit is contained in:
Matthias BUSSONNIER 2014-09-05 11:01:10 -07:00
parent a855d3c96d
commit a9b4bdc03f
4 changed files with 21 additions and 7 deletions
IPython/html/static

@ -130,8 +130,6 @@ define([
if (cont) {
var text_cell = this.element;
var output = text_cell.find("div.text_cell_render");
output.hide();
text_cell.find('div.input_area').show();
if (this.get_text() === this.placeholder) {
this.set_text('');
}
@ -260,8 +258,6 @@ define([
// links in markdown cells should open in new tabs
html.find("a[href]").not('[href^="#"]').attr("target", "_blank");
this.set_rendered(html);
this.element.find('div.input_area').hide();
this.element.find("div.text_cell_render").show();
this.typeset();
}
return cont;
@ -283,7 +279,6 @@ define([
TextCell.apply(this, [$.extend({}, options, {config: config})]);
// RawCell should always hide its rendered div
this.element.find('div.text_cell_render').hide();
this.cell_type = 'raw';
};
@ -426,8 +421,6 @@ define([
.text('¶')
);
this.set_rendered(h);
this.element.find('div.input_area').hide();
this.element.find("div.text_cell_render").show();
this.typeset();
}
return cont;

@ -36,6 +36,15 @@ div.cell.text_cell.rendered {
padding: 0px;
}
.text_cell.rendered .input_area {
display: none;
}
.text_cell.unrendered .text_cell_render {
display:none;
}
.cm-s-heading-1,
.cm-s-heading-2,
.cm-s-heading-3,

@ -1170,6 +1170,12 @@ h6:hover .anchor-link {
div.cell.text_cell.rendered {
padding: 0px;
}
.text_cell.rendered .input_area {
display: none;
}
.text_cell.unrendered .text_cell_render {
display: none;
}
.cm-s-heading-1,
.cm-s-heading-2,
.cm-s-heading-3,

@ -8942,6 +8942,12 @@ h6:hover .anchor-link {
div.cell.text_cell.rendered {
padding: 0px;
}
.text_cell.rendered .input_area {
display: none;
}
.text_cell.unrendered .text_cell_render {
display: none;
}
.cm-s-heading-1,
.cm-s-heading-2,
.cm-s-heading-3,