Clear all output is implemented.

Brian E. Granger 15 years ago
parent 24a3464921
commit b264e21a6d

@ -443,7 +443,7 @@ var IPython = (function (IPython) {
};
// Cell collapsing
// Cell collapsing and output clearing
Notebook.prototype.collapse = function (index) {
var i = this.index_or_selected(index);
@ -465,6 +465,18 @@ var IPython = (function (IPython) {
};
};
Notebook.prototype.clear_all_output = function () {
var ncells = this.ncells();
var cells = this.cells();
for (var i=0; i<ncells; i++) {
if (cells[i] instanceof IPython.CodeCell) {
cells[i].clear_output();
}
};
};
// Kernel related things
Notebook.prototype.start_kernel = function () {

@ -89,7 +89,15 @@
<button id="to_html">HTML</button>
<button id="to_markdown">Markdown</button>
</span>
<!-- <span class="button_label">Format</span> -->
<span class="button_label">Format</span>
</div>
<div class="section_row">
<span id="toggle_output" class="section_row_buttons">
<button id="collapse_cell">Collapse</button>
<button id="expand_cell">Expand</button>
<button id="clear_all_output">Clear All</button>
</span>
<span class="button_label">Output</span>
</div>
<div class="section_row">
<span id="insert" class="section_row_buttons">
@ -105,13 +113,6 @@
</span>
<span class="button_label">Move</span>
</div>
<div class="section_row">
<span id="toggle_output" class="section_row_buttons">
<button id="collapse_cell">Collapse</button>
<button id="expand_cell">Expand</button>
</span>
<span class="button_label">Output</span>
</div>
<div class="section_row">
<span id="run_cells" class="section_row_buttons">
<button id="run_selected_cell">Selected</button>

Loading…
Cancel
Save