Cell collapse/expand is not called "Toggle".

This commit is contained in:
Brian E. Granger 2011-08-19 15:59:51 -07:00
parent 133b96d086
commit ab384fc787
3 changed files with 17 additions and 3 deletions

View File

@ -352,6 +352,14 @@ var IPython = (function (IPython) {
}; };
CodeCell.prototype.toggle_output = function () {
if (this.collapsed) {
this.expand();
} else {
this.collapse();
};
};
CodeCell.prototype.set_input_prompt = function (number) { CodeCell.prototype.set_input_prompt = function (number) {
var n = number || ' '; var n = number || ' ';
this.input_prompt_number = n this.input_prompt_number = n

View File

@ -480,6 +480,13 @@ var IPython = (function (IPython) {
}; };
Notebook.prototype.toggle_output = function (index) {
var i = this.index_or_selected(index);
this.cells()[i].toggle_output();
this.dirty = true;
};
Notebook.prototype.set_autoindent = function (state) { Notebook.prototype.set_autoindent = function (state) {
var cells = this.cells(); var cells = this.cells();
len = cells.length; len = cells.length;

View File

@ -95,9 +95,8 @@
<span class="button_label">Format</span> <span class="button_label">Format</span>
</div> </div>
<div class="section_row"> <div class="section_row">
<span id="toggle_output" class="section_row_buttons"> <span id="cell_output" class="section_row_buttons">
<button id="collapse_cell">Collapse</button> <button id="toggle_output">Toggle</button>
<button id="expand_cell">Expand</button>
<button id="clear_all_output">ClearAll</button> <button id="clear_all_output">ClearAll</button>
</span> </span>
<span class="button_label">Output</span> <span class="button_label">Output</span>