##// END OF EJS Templates
Clear all output is implemented.
Brian E. Granger -
Show More
@@ -443,7 +443,7 b' var IPython = (function (IPython) {'
443 443 };
444 444
445 445
446 // Cell collapsing
446 // Cell collapsing and output clearing
447 447
448 448 Notebook.prototype.collapse = function (index) {
449 449 var i = this.index_or_selected(index);
@@ -465,6 +465,18 b' var IPython = (function (IPython) {'
465 465 };
466 466 };
467 467
468
469 Notebook.prototype.clear_all_output = function () {
470 var ncells = this.ncells();
471 var cells = this.cells();
472 for (var i=0; i<ncells; i++) {
473 if (cells[i] instanceof IPython.CodeCell) {
474 cells[i].clear_output();
475 }
476 };
477 };
478
479
468 480 // Kernel related things
469 481
470 482 Notebook.prototype.start_kernel = function () {
@@ -137,6 +137,9 b' var IPython = (function (IPython) {'
137 137 this.content.find('#expand_cell').click(function () {
138 138 IPython.notebook.expand();
139 139 });
140 this.content.find('#clear_all_output').click(function () {
141 IPython.notebook.clear_all_output();
142 });
140 143 this.content.find('#delete_cell').click(function () {
141 144 IPython.notebook.delete_cell();
142 145 });
@@ -89,7 +89,15 b''
89 89 <button id="to_html">HTML</button>
90 90 <button id="to_markdown">Markdown</button>
91 91 </span>
92 <!-- <span class="button_label">Format</span> -->
92 <span class="button_label">Format</span>
93 </div>
94 <div class="section_row">
95 <span id="toggle_output" class="section_row_buttons">
96 <button id="collapse_cell">Collapse</button>
97 <button id="expand_cell">Expand</button>
98 <button id="clear_all_output">Clear All</button>
99 </span>
100 <span class="button_label">Output</span>
93 101 </div>
94 102 <div class="section_row">
95 103 <span id="insert" class="section_row_buttons">
@@ -106,13 +114,6 b''
106 114 <span class="button_label">Move</span>
107 115 </div>
108 116 <div class="section_row">
109 <span id="toggle_output" class="section_row_buttons">
110 <button id="collapse_cell">Collapse</button>
111 <button id="expand_cell">Expand</button>
112 </span>
113 <span class="button_label">Output</span>
114 </div>
115 <div class="section_row">
116 117 <span id="run_cells" class="section_row_buttons">
117 118 <button id="run_selected_cell">Selected</button>
118 119 <button id="run_all_cells">All</button>
General Comments 0
You need to be logged in to leave comments. Login now