Show More
@@ -352,6 +352,14 b' var IPython = (function (IPython) {' | |||||
352 | }; |
|
352 | }; | |
353 |
|
353 | |||
354 |
|
354 | |||
|
355 | CodeCell.prototype.toggle_output = function () { | |||
|
356 | if (this.collapsed) { | |||
|
357 | this.expand(); | |||
|
358 | } else { | |||
|
359 | this.collapse(); | |||
|
360 | }; | |||
|
361 | }; | |||
|
362 | ||||
355 | CodeCell.prototype.set_input_prompt = function (number) { |
|
363 | CodeCell.prototype.set_input_prompt = function (number) { | |
356 | var n = number || ' '; |
|
364 | var n = number || ' '; | |
357 | this.input_prompt_number = n |
|
365 | this.input_prompt_number = n |
@@ -480,6 +480,13 b' var IPython = (function (IPython) {' | |||||
480 | }; |
|
480 | }; | |
481 |
|
481 | |||
482 |
|
482 | |||
|
483 | Notebook.prototype.toggle_output = function (index) { | |||
|
484 | var i = this.index_or_selected(index); | |||
|
485 | this.cells()[i].toggle_output(); | |||
|
486 | this.dirty = true; | |||
|
487 | }; | |||
|
488 | ||||
|
489 | ||||
483 | Notebook.prototype.set_autoindent = function (state) { |
|
490 | Notebook.prototype.set_autoindent = function (state) { | |
484 | var cells = this.cells(); |
|
491 | var cells = this.cells(); | |
485 | len = cells.length; |
|
492 | len = cells.length; |
@@ -130,18 +130,15 b' var IPython = (function (IPython) {' | |||||
130 | this.content.find('#insert').buttonset(); |
|
130 | this.content.find('#insert').buttonset(); | |
131 | this.content.find('#move').buttonset(); |
|
131 | this.content.find('#move').buttonset(); | |
132 | this.content.find('#cell_type').buttonset(); |
|
132 | this.content.find('#cell_type').buttonset(); | |
133 |
this.content.find('# |
|
133 | this.content.find('#cell_output').buttonset(); | |
134 | this.content.find('#run_cells').buttonset(); |
|
134 | this.content.find('#run_cells').buttonset(); | |
135 | }; |
|
135 | }; | |
136 |
|
136 | |||
137 |
|
137 | |||
138 | CellSection.prototype.bind_events = function () { |
|
138 | CellSection.prototype.bind_events = function () { | |
139 | PanelSection.prototype.bind_events.apply(this); |
|
139 | PanelSection.prototype.bind_events.apply(this); | |
140 |
this.content.find('# |
|
140 | this.content.find('#toggle_output').click(function () { | |
141 |
IPython.notebook. |
|
141 | IPython.notebook.toggle_output(); | |
142 | }); |
|
|||
143 | this.content.find('#expand_cell').click(function () { |
|
|||
144 | IPython.notebook.expand(); |
|
|||
145 | }); |
|
142 | }); | |
146 | this.content.find('#clear_all_output').click(function () { |
|
143 | this.content.find('#clear_all_output').click(function () { | |
147 | IPython.notebook.clear_all_output(); |
|
144 | IPython.notebook.clear_all_output(); | |
@@ -164,9 +161,6 b' var IPython = (function (IPython) {' | |||||
164 | this.content.find('#to_code').click(function () { |
|
161 | this.content.find('#to_code').click(function () { | |
165 | IPython.notebook.to_code(); |
|
162 | IPython.notebook.to_code(); | |
166 | }); |
|
163 | }); | |
167 | // this.content.find('#to_html').click(function () { |
|
|||
168 | // IPython.notebook.to_html(); |
|
|||
169 | // }); |
|
|||
170 | this.content.find('#to_markdown').click(function () { |
|
164 | this.content.find('#to_markdown').click(function () { | |
171 | IPython.notebook.to_markdown(); |
|
165 | IPython.notebook.to_markdown(); | |
172 | }); |
|
166 | }); |
@@ -95,9 +95,8 b'' | |||||
95 | <span class="button_label">Format</span> |
|
95 | <span class="button_label">Format</span> | |
96 | </div> |
|
96 | </div> | |
97 | <div class="section_row"> |
|
97 | <div class="section_row"> | |
98 |
<span id=" |
|
98 | <span id="cell_output" class="section_row_buttons"> | |
99 |
<button id=" |
|
99 | <button id="toggle_output">Toggle</button> | |
100 | <button id="expand_cell">Expand</button> |
|
|||
101 | <button id="clear_all_output">ClearAll</button> |
|
100 | <button id="clear_all_output">ClearAll</button> | |
102 | </span> |
|
101 | </span> | |
103 | <span class="button_label">Output</span> |
|
102 | <span class="button_label">Output</span> |
General Comments 0
You need to be logged in to leave comments.
Login now