Show More
@@ -123,14 +123,42 b' div.section_content {' | |||||
123 | padding: 5px; |
|
123 | padding: 5px; | |
124 | } |
|
124 | } | |
125 |
|
125 | |||
|
126 | #expand_cell, #collapse_cell, #insert_cell_above, #insert_cell_below, | |||
|
127 | #move_cell_up, #move_cell_down, #to_code, #to_text, #run_selected_cell, | |||
|
128 | #run_all_cells { | |||
|
129 | width: 65px; | |||
|
130 | } | |||
|
131 | ||||
|
132 | .cell_section_row { | |||
|
133 | margin: 5px 0px; | |||
|
134 | } | |||
|
135 | ||||
|
136 | .cell_section_row_buttons { | |||
|
137 | float: right; | |||
|
138 | } | |||
|
139 | ||||
|
140 | .cell_section_row_header { | |||
|
141 | float: left; | |||
|
142 | font-size: 0.8em; | |||
|
143 | padding: 0.2em 0em; | |||
|
144 | font-weight: bold; | |||
|
145 | } | |||
126 |
|
146 | |||
127 | span.button_label { |
|
147 | span.button_label { | |
128 |
padding: 0. |
|
148 | padding: 0.2em 1em; | |
129 | font-size: 0.8em; |
|
149 | font-size: 0.8em; | |
|
150 | float: right; | |||
130 | } |
|
151 | } | |
131 |
|
152 | |||
|
153 | /* This is needed because FF was adding a 2px margin top and bottom. */ | |||
|
154 | .cell_section_row .ui-button { | |||
|
155 | margin-top: 0px; | |||
|
156 | margin-bottom: 0px; | |||
|
157 | } | |||
|
158 | ||||
|
159 | ||||
132 | .ui-button .ui-button-text { |
|
160 | .ui-button .ui-button-text { | |
133 |
padding: 0. |
|
161 | padding: 0.2em 0.8em; | |
134 | font-size: 0.7em; |
|
162 | font-size: 0.7em; | |
135 | } |
|
163 | } | |
136 |
|
164 |
@@ -53,16 +53,6 b' $(document).ready(function () {' | |||||
53 | // $("#delete_cell").button("option", "text", false); |
|
53 | // $("#delete_cell").button("option", "text", false); | |
54 | // $("#delete_cell").click(function () {IPython.notebook.delete_cell();}); |
|
54 | // $("#delete_cell").click(function () {IPython.notebook.delete_cell();}); | |
55 |
|
55 | |||
56 | // $("#cell_type").buttonset(); |
|
|||
57 | // $("#to_code").click(function () {IPython.notebook.text_to_code();}); |
|
|||
58 | // $("#to_text").click(function () {IPython.notebook.code_to_text();}); |
|
|||
59 |
|
||||
60 | // $("#sort").buttonset(); |
|
|||
61 | // $("#sort_cells").click(function () {IPython.notebook.sort_cells();}); |
|
|||
62 |
|
||||
63 | // $("#toggle").buttonset(); |
|
|||
64 | // $("#collapse").click(function () {IPython.notebook.collapse();}); |
|
|||
65 | // $("#expand").click(function () {IPython.notebook.expand();}); |
|
|||
66 |
|
56 | |||
67 | }); |
|
57 | }); | |
68 |
|
58 |
@@ -131,65 +131,66 b' var IPython = (function (IPython) {' | |||||
131 | this.content.find('#to_text').click(function () { |
|
131 | this.content.find('#to_text').click(function () { | |
132 | IPython.notebook.code_to_text(); |
|
132 | IPython.notebook.code_to_text(); | |
133 | }); |
|
133 | }); | |
|
134 | this.content.find('#run_selected_cell').click(function () { | |||
|
135 | alert("Not Implemented"); | |||
|
136 | }); | |||
|
137 | this.content.find('#run_all_cells').click(function () { | |||
|
138 | alert("Not Implemented"); | |||
|
139 | }); | |||
134 | }; |
|
140 | }; | |
135 |
|
141 | |||
136 |
|
142 | |||
137 | CellSection.prototype.create_children = function () { |
|
143 | CellSection.prototype.create_children = function () { | |
138 | var row0 = $('<div>'). |
|
|||
139 | append($('<span/>').attr('id','toggle'). |
|
|||
140 | append( $('<button>Collapse</button>').attr('id','collapse_cell') ). |
|
|||
141 | append( $('<button>Expand</button>').attr('id','expand_cell') ) ). |
|
|||
142 | append($('<span/>'). |
|
|||
143 | append($('<button>X</button>').attr('id','delete_cell'))); |
|
|||
144 | row0.find('#toggle').buttonset(); |
|
|||
145 | row0.find('button#delete_cell').button(); |
|
|||
146 | this.content.append(row0); |
|
|||
147 |
|
144 | |||
148 | var row1 = $('<div>'). |
|
145 | this.content.addClass('ui-helper-clearfix'); | |
149 | append($('<span/>').html('Insert').addClass('button_label')). |
|
146 | ||
150 | append($('<span/>').attr('id','insert'). |
|
147 | var row1 = $('<div>').addClass('cell_section_row ui-helper-clearfix'). | |
|
148 | append($('<span/>').addClass('cell_section_row_buttons'). | |||
|
149 | append($('<button>X</button>').attr('id','delete_cell'))). | |||
|
150 | append($('<span/>').html('Actions').addClass('cell_section_row_header')); | |||
|
151 | row1.find('#delete_cell').button(); | |||
|
152 | this.content.append(row1); | |||
|
153 | ||||
|
154 | var row1 = $('<div>').addClass('cell_section_row ui-helper-clearfix'). | |||
|
155 | append($('<span/>').attr('id','insert').addClass('cell_section_row_buttons'). | |||
151 | append( $('<button>Above</button>').attr('id','insert_cell_above') ). |
|
156 | append( $('<button>Above</button>').attr('id','insert_cell_above') ). | |
152 |
append( $('<button>Below</button>').attr('id','insert_cell_below') ) |
|
157 | append( $('<button>Below</button>').attr('id','insert_cell_below') )). | |
|
158 | append($('<span/>').html('Insert').addClass('button_label')); | |||
153 | row1.find('#insert').buttonset(); |
|
159 | row1.find('#insert').buttonset(); | |
154 | this.content.append(row1); |
|
160 | this.content.append(row1); | |
155 |
|
161 | |||
156 | var row2 = $('<div>'). |
|
162 | var row2 = $('<div>').addClass('cell_section_row ui-helper-clearfix'). | |
157 |
append($('<span/>'). |
|
163 | append($('<span/>').attr('id','move').addClass('cell_section_row_buttons'). | |
158 | append($('<span/>').attr('id','move'). |
|
|||
159 | append( $('<button>Up</button>').attr('id','move_cell_up') ). |
|
164 | append( $('<button>Up</button>').attr('id','move_cell_up') ). | |
160 |
append( $('<button>Down</button>').attr('id','move_cell_down') ) ) |
|
165 | append( $('<button>Down</button>').attr('id','move_cell_down') ) ). | |
|
166 | append($('<span/>').html('Move').addClass('button_label')); | |||
161 | row2.find('#move').buttonset(); |
|
167 | row2.find('#move').buttonset(); | |
162 | this.content.append(row2); |
|
168 | this.content.append(row2); | |
163 |
|
169 | |||
164 | var row3 = $('<div>'). |
|
170 | var row3 = $('<div>').addClass('cell_section_row ui-helper-clearfix'). | |
165 |
append($('<span/>'). |
|
171 | append($('<span/>').attr('id','cell_type').addClass('cell_section_row_buttons'). | |
166 | append($('<span/>').attr('id','cell_type'). |
|
|||
167 | append( $('<button>Code</button>').attr('id','to_code') ). |
|
172 | append( $('<button>Code</button>').attr('id','to_code') ). | |
168 |
append( $('<button>Text</button>').attr('id','to_text') ) ) |
|
173 | append( $('<button>Text</button>').attr('id','to_text') ) ). | |
|
174 | append($('<span/>').html('Cell Type').addClass('button_label')); | |||
169 | row3.find('#cell_type').buttonset(); |
|
175 | row3.find('#cell_type').buttonset(); | |
170 | this.content.append(row3) |
|
176 | this.content.append(row3); | |
|
177 | ||||
|
178 | var row0 = $('<div>').addClass('cell_section_row ui-helper-clearfix'). | |||
|
179 | append($('<span/>').attr('id','toggle_output').addClass('cell_section_row_buttons'). | |||
|
180 | append( $('<button>Collapse</button>').attr('id','collapse_cell') ). | |||
|
181 | append( $('<button>Expand</button>').attr('id','expand_cell') ) ). | |||
|
182 | append($('<span/>').html('Output').addClass('button_label')); | |||
|
183 | row0.find('#toggle_output').buttonset(); | |||
|
184 | this.content.append(row0); | |||
|
185 | ||||
|
186 | var row0 = $('<div>').addClass('cell_section_row'). | |||
|
187 | append($('<span/>').attr('id','run_cells').addClass('cell_section_row_buttons'). | |||
|
188 | append( $('<button>Selected</button>').attr('id','run_selected_cell') ). | |||
|
189 | append( $('<button>All</button>').attr('id','run_all_cells') ) ). | |||
|
190 | append($('<span/>').html('Run').addClass('button_label')); | |||
|
191 | row0.find('#run_cells').buttonset(); | |||
|
192 | this.content.append(row0); | |||
171 | }; |
|
193 | }; | |
172 | // <span id="move_cell"> |
|
|||
173 | // <button id="move_up">Move up</button> |
|
|||
174 | // <button id="move_down">Move down</button> |
|
|||
175 | // </span> |
|
|||
176 | // <span id="insert_delete"> |
|
|||
177 | // <button id="insert_cell_before">Before</button> |
|
|||
178 | // <button id="insert_cell_after">After</button> |
|
|||
179 | // <button id="delete_cell">Delete</button> |
|
|||
180 | // </span> |
|
|||
181 | // <span id="cell_type"> |
|
|||
182 | // <button id="to_code">Code</button> |
|
|||
183 | // <button id="to_text">Text</button> |
|
|||
184 | // </span> |
|
|||
185 | // <span id="sort"> |
|
|||
186 | // <button id="sort_cells">Sort</button> |
|
|||
187 | // </span> |
|
|||
188 | // <span id="toggle"> |
|
|||
189 | // <button id="collapse">Collapse</button> |
|
|||
190 | // <button id="expand">Expand</button> |
|
|||
191 | // </span> |
|
|||
192 | // </span> |
|
|||
193 |
|
194 | |||
194 |
|
195 | |||
195 | // KernelSection |
|
196 | // KernelSection |
@@ -16,7 +16,7 b' var IPython = (function (IPython) {' | |||||
16 |
|
16 | |||
17 |
|
17 | |||
18 | TextCell.prototype.create_element = function () { |
|
18 | TextCell.prototype.create_element = function () { | |
19 | var cell = $("<div>").addClass('cell text_cell'). |
|
19 | var cell = $("<div>").addClass('cell text_cell border-box-sizing'). | |
20 | append( |
|
20 | append( | |
21 | $("<textarea>" + this.placeholder + "</textarea>"). |
|
21 | $("<textarea>" + this.placeholder + "</textarea>"). | |
22 | addClass('text_cell_input monospace-font'). |
|
22 | addClass('text_cell_input monospace-font'). |
General Comments 0
You need to be logged in to leave comments.
Login now