create celltoolbar in cell.js and inherit

pull/37/head
Matthias BUSSONNIER 14 years ago
parent 08225b2ed4
commit eb5911a3c1

@ -50,7 +50,9 @@ var IPython = (function (IPython) {
* and will be called by Base Class constructor.
* @method create_element
*/
Cell.prototype.create_element = function () {};
Cell.prototype.create_element = function () {
this.celltoolbar = new IPython.CellToolbar(this);
};
/**

@ -58,7 +58,7 @@ var IPython = (function (IPython) {
/** @method create_element */
CodeCell.prototype.create_element = function () {
this.celltoolbar = new IPython.CellToolbar(this);
IPython.Cell.prototype.create_element.apply(this, arguments);
var cell = $('<div></div>').addClass('cell border-box-sizing code_cell vbox');
cell.append(this.celltoolbar.element);

@ -42,8 +42,8 @@ var IPython = (function (IPython) {
* @private
*/
TextCell.prototype.create_element = function () {
IPython.Cell.prototype.create_element.apply(this, arguments);
var cell = $("<div>").addClass('cell text_cell border-box-sizing vbox');
this.celltoolbar = new IPython.CellToolbar(this);
cell.append(this.celltoolbar.element);
cell.attr('tabindex','2');
var input_area = $('<div/>').addClass('text_cell_input border-box-sizing');

Loading…
Cancel
Save