##// END OF EJS Templates
create celltoolbar in cell.js and inherit
Matthias BUSSONNIER -
Show More
@@ -50,7 +50,9 var IPython = (function (IPython) {
50 * and will be called by Base Class constructor.
50 * and will be called by Base Class constructor.
51 * @method create_element
51 * @method create_element
52 */
52 */
53 Cell.prototype.create_element = function () {};
53 Cell.prototype.create_element = function () {
54 this.celltoolbar = new IPython.CellToolbar(this);
55 };
54
56
55
57
56 /**
58 /**
@@ -58,7 +58,7 var IPython = (function (IPython) {
58
58
59 /** @method create_element */
59 /** @method create_element */
60 CodeCell.prototype.create_element = function () {
60 CodeCell.prototype.create_element = function () {
61 this.celltoolbar = new IPython.CellToolbar(this);
61 IPython.Cell.prototype.create_element.apply(this, arguments);
62
62
63 var cell = $('<div></div>').addClass('cell border-box-sizing code_cell vbox');
63 var cell = $('<div></div>').addClass('cell border-box-sizing code_cell vbox');
64 cell.append(this.celltoolbar.element);
64 cell.append(this.celltoolbar.element);
@@ -42,8 +42,8 var IPython = (function (IPython) {
42 * @private
42 * @private
43 */
43 */
44 TextCell.prototype.create_element = function () {
44 TextCell.prototype.create_element = function () {
45 IPython.Cell.prototype.create_element.apply(this, arguments);
45 var cell = $("<div>").addClass('cell text_cell border-box-sizing vbox');
46 var cell = $("<div>").addClass('cell text_cell border-box-sizing vbox');
46 this.celltoolbar = new IPython.CellToolbar(this);
47 cell.append(this.celltoolbar.element);
47 cell.append(this.celltoolbar.element);
48 cell.attr('tabindex','2');
48 cell.attr('tabindex','2');
49 var input_area = $('<div/>').addClass('text_cell_input border-box-sizing');
49 var input_area = $('<div/>').addClass('text_cell_input border-box-sizing');
General Comments 0
You need to be logged in to leave comments. Login now