##// END OF EJS Templates
Further cleanup for celltoolbars.
Brian Granger -
Show More
@@ -23,27 +23,25 b''
23 23 display: block;
24 24 }
25 25
26 .ctb_wrapper{
26 .ctb_hideshow {
27 27 display: none;
28 28 }
29 29
30 .toolbaron .ctb_wrapper{
30 .ctb_show.ctb_hideshow {
31 31 display: block;
32 display: -webkit-box;
33 32 }
34 33
35 .toolbaron .ctb_wrapper + div > div.input_area,
36 .toolbaron .ctb_wrapper + div.text_cell_input{
34 .ctb_show .ctb_hideshow + div > div.input_area,
35 .ctb_show .ctb_hideshow + div.text_cell_input {
37 36 border-top-right-radius: 0px;
38 37 border-top-left-radius: 0px;
39 38 }
40 39
41 .toolbaron > .celltoolbar {
40 .ctb_show > .celltoolbar {
42 41 border-bottom-right-radius: 0px;
43 42 border-bottom-left-radius: 0px;
44 43 }
45 44
46
47 45 .button_container {
48 46 float: right;
49 47 }
@@ -37,10 +37,12 b' var IPython = (function (IPython) {'
37 37 this.inner_element = $('<div/>');
38 38 var ctb_element = $('<div/>').addClass('celltoolbar')
39 39 .append(this.inner_element);
40 this.element = $('<div/>').addClass('ctb_wrapper hbox');
41 40 ctb_element.addClass('box-flex1');
41 var ctb_area = $('<div/>').addClass('ctb_area hbox');
42 42 var ctb_prompt = $('<div/>').addClass('ctb_prompt prompt');
43 this.element.append(ctb_prompt).append(ctb_element);
43 ctb_area.append(ctb_prompt).append(ctb_element);
44 this.element = $('<div/>').addClass('ctb_hideshow')
45 .append(ctb_area);
44 46 };
45 47
46 48
@@ -62,21 +64,21 b' var IPython = (function (IPython) {'
62 64
63 65
64 66 CellToolbar.global_hide = function () {
65 $('body').removeClass('toolbaron');
67 $('body').removeClass('ctb_show');
66 68 }
67 69
68 70
69 71 CellToolbar.global_show = function () {
70 $('body').addClass('toolbaron');
72 $('body').addClass('ctb_show');
71 73 }
72 74
73 75 CellToolbar.prototype.hide = function () {
74 this.element.removeClass('toolbaron');
76 this.element.removeClass('ctb_show');
75 77 }
76 78
77 79
78 80 CellToolbar.prototype.show = function () {
79 this.element.addClass('toolbaron');
81 this.element.addClass('ctb_show');
80 82 }
81 83
82 84
@@ -45,8 +45,10 b' var IPython = (function (IPython) {'
45 45 IPython.Cell.prototype.create_element.apply(this, arguments);
46 46 var cell = $("<div>").addClass('cell text_cell border-box-sizing vbox');
47 47 cell.attr('tabindex','2');
48
48 49 this.celltoolbar = new IPython.CellToolbar(this);
49 50 cell.append(this.celltoolbar.element);
51
50 52 var input_area = $('<div/>').addClass('text_cell_input border-box-sizing');
51 53 this.code_mirror = CodeMirror(input_area.get(0), {
52 54 indentUnit : 4,
General Comments 0
You need to be logged in to leave comments. Login now