##// END OF EJS Templates
Move md-cell display logic to css
Matthias BUSSONNIER -
Show More
@@ -130,8 +130,6 b' define(['
130 if (cont) {
130 if (cont) {
131 var text_cell = this.element;
131 var text_cell = this.element;
132 var output = text_cell.find("div.text_cell_render");
132 var output = text_cell.find("div.text_cell_render");
133 output.hide();
134 text_cell.find('div.input_area').show();
135 if (this.get_text() === this.placeholder) {
133 if (this.get_text() === this.placeholder) {
136 this.set_text('');
134 this.set_text('');
137 }
135 }
@@ -260,8 +258,6 b' define(['
260 // links in markdown cells should open in new tabs
258 // links in markdown cells should open in new tabs
261 html.find("a[href]").not('[href^="#"]').attr("target", "_blank");
259 html.find("a[href]").not('[href^="#"]').attr("target", "_blank");
262 this.set_rendered(html);
260 this.set_rendered(html);
263 this.element.find('div.input_area').hide();
264 this.element.find("div.text_cell_render").show();
265 this.typeset();
261 this.typeset();
266 }
262 }
267 return cont;
263 return cont;
@@ -283,7 +279,6 b' define(['
283 TextCell.apply(this, [$.extend({}, options, {config: config})]);
279 TextCell.apply(this, [$.extend({}, options, {config: config})]);
284
280
285 // RawCell should always hide its rendered div
281 // RawCell should always hide its rendered div
286 this.element.find('div.text_cell_render').hide();
287 this.cell_type = 'raw';
282 this.cell_type = 'raw';
288 };
283 };
289
284
@@ -426,8 +421,6 b' define(['
426 .text('¶')
421 .text('¶')
427 );
422 );
428 this.set_rendered(h);
423 this.set_rendered(h);
429 this.element.find('div.input_area').hide();
430 this.element.find("div.text_cell_render").show();
431 this.typeset();
424 this.typeset();
432 }
425 }
433 return cont;
426 return cont;
@@ -36,6 +36,15 b' div.cell.text_cell.rendered {'
36 padding: 0px;
36 padding: 0px;
37 }
37 }
38
38
39
40 .text_cell.rendered .input_area {
41 display: none;
42 }
43
44 .text_cell.unrendered .text_cell_render {
45 display:none;
46 }
47
39 .cm-s-heading-1,
48 .cm-s-heading-1,
40 .cm-s-heading-2,
49 .cm-s-heading-2,
41 .cm-s-heading-3,
50 .cm-s-heading-3,
@@ -1170,6 +1170,12 b' h6:hover .anchor-link {'
1170 div.cell.text_cell.rendered {
1170 div.cell.text_cell.rendered {
1171 padding: 0px;
1171 padding: 0px;
1172 }
1172 }
1173 .text_cell.rendered .input_area {
1174 display: none;
1175 }
1176 .text_cell.unrendered .text_cell_render {
1177 display: none;
1178 }
1173 .cm-s-heading-1,
1179 .cm-s-heading-1,
1174 .cm-s-heading-2,
1180 .cm-s-heading-2,
1175 .cm-s-heading-3,
1181 .cm-s-heading-3,
@@ -8942,6 +8942,12 b' h6:hover .anchor-link {'
8942 div.cell.text_cell.rendered {
8942 div.cell.text_cell.rendered {
8943 padding: 0px;
8943 padding: 0px;
8944 }
8944 }
8945 .text_cell.rendered .input_area {
8946 display: none;
8947 }
8948 .text_cell.unrendered .text_cell_render {
8949 display: none;
8950 }
8945 .cm-s-heading-1,
8951 .cm-s-heading-1,
8946 .cm-s-heading-2,
8952 .cm-s-heading-2,
8947 .cm-s-heading-3,
8953 .cm-s-heading-3,
General Comments 0
You need to be logged in to leave comments. Login now