Show More
@@ -24,25 +24,6 b' var IPython = (function (IPython) {' | |||||
24 |
|
24 | |||
25 | MainToolBar.prototype = new IPython.ToolBar(); |
|
25 | MainToolBar.prototype = new IPython.ToolBar(); | |
26 |
|
26 | |||
27 | MainToolBar.prototype.add_drop_down_list = function () { |
|
|||
28 | var select = $(this.selector) |
|
|||
29 | .append($('<select/>') |
|
|||
30 | .attr('id','cell_type') |
|
|||
31 | .addClass('ui-widget ui-widget-content') |
|
|||
32 | .append($('<option/>').attr('value','code').text('Code')) |
|
|||
33 | .append($('<option/>').attr('value','markdown').text('Markdown')) |
|
|||
34 | .append($('<option/>').attr('value','raw').text('Raw Text')) |
|
|||
35 | .append($('<option/>').attr('value','heading1').text('Heading 1')) |
|
|||
36 | .append($('<option/>').attr('value','heading2').text('Heading 2')) |
|
|||
37 | .append($('<option/>').attr('value','heading3').text('Heading 3')) |
|
|||
38 | .append($('<option/>').attr('value','heading4').text('Heading 4')) |
|
|||
39 | .append($('<option/>').attr('value','heading5').text('Heading 5')) |
|
|||
40 | .append($('<option/>').attr('value','heading6').text('Heading 6')) |
|
|||
41 | .append($('<option/>').attr('value','heading7').text('Heading 7')) |
|
|||
42 | .append($('<option/>').attr('value','heading8').text('Heading 8')) |
|
|||
43 | ); |
|
|||
44 | }; |
|
|||
45 |
|
||||
46 | MainToolBar.prototype.construct = function () { |
|
27 | MainToolBar.prototype.construct = function () { | |
47 | this.add_buttons_group([ |
|
28 | this.add_buttons_group([ | |
48 | { |
|
29 | { | |
@@ -141,6 +122,25 b' var IPython = (function (IPython) {' | |||||
141 |
|
122 | |||
142 | }; |
|
123 | }; | |
143 |
|
124 | |||
|
125 | MainToolBar.prototype.add_drop_down_list = function () { | |||
|
126 | var select = $(this.selector) | |||
|
127 | .append($('<select/>') | |||
|
128 | .attr('id','cell_type') | |||
|
129 | .addClass('ui-widget ui-widget-content') | |||
|
130 | .append($('<option/>').attr('value','code').text('Code')) | |||
|
131 | .append($('<option/>').attr('value','markdown').text('Markdown')) | |||
|
132 | .append($('<option/>').attr('value','raw').text('Raw Text')) | |||
|
133 | .append($('<option/>').attr('value','heading1').text('Heading 1')) | |||
|
134 | .append($('<option/>').attr('value','heading2').text('Heading 2')) | |||
|
135 | .append($('<option/>').attr('value','heading3').text('Heading 3')) | |||
|
136 | .append($('<option/>').attr('value','heading4').text('Heading 4')) | |||
|
137 | .append($('<option/>').attr('value','heading5').text('Heading 5')) | |||
|
138 | .append($('<option/>').attr('value','heading6').text('Heading 6')) | |||
|
139 | .append($('<option/>').attr('value','heading7').text('Heading 7')) | |||
|
140 | .append($('<option/>').attr('value','heading8').text('Heading 8')) | |||
|
141 | ); | |||
|
142 | }; | |||
|
143 | ||||
144 | MainToolBar.prototype.bind_events = function () { |
|
144 | MainToolBar.prototype.bind_events = function () { | |
145 | var that = this; |
|
145 | var that = this; | |
146 |
|
146 |
@@ -50,7 +50,7 b' var IPython = (function (IPython) {' | |||||
50 | // "my_button_group_id" |
|
50 | // "my_button_group_id" | |
51 | // ) |
|
51 | // ) | |
52 | // |
|
52 | // | |
53 | ToolBar.prototype.add_button_group = function (list, group_id) { |
|
53 | ToolBar.prototype.add_buttons_group = function (list, group_id) { | |
54 | var span_group = $('<span/>'); |
|
54 | var span_group = $('<span/>'); | |
55 | if( group_id != undefined ) { |
|
55 | if( group_id != undefined ) { | |
56 | span_group.attr('id',group_id); |
|
56 | span_group.attr('id',group_id); | |
@@ -83,7 +83,9 b' var IPython = (function (IPython) {' | |||||
83 |
|
83 | |||
84 | ToolBar.prototype.toggle = function () { |
|
84 | ToolBar.prototype.toggle = function () { | |
85 | this.element.toggle(); |
|
85 | this.element.toggle(); | |
86 |
IPython.layout_manager |
|
86 | if (IPython.layout_manager != undefined) { | |
|
87 | IPython.layout_manager.do_resize(); | |||
|
88 | } | |||
87 | }; |
|
89 | }; | |
88 |
|
90 | |||
89 |
|
91 |
General Comments 0
You need to be logged in to leave comments.
Login now