##// END OF EJS Templates
jslint 1
Matthias BUSSONNIER -
Show More
@@ -41,7 +41,7 b' var IPython = (function (IPython) {'
41 .append($('<option/>').attr('value','heading7').text('Heading 7'))
41 .append($('<option/>').attr('value','heading7').text('Heading 7'))
42 .append($('<option/>').attr('value','heading8').text('Heading 8'))
42 .append($('<option/>').attr('value','heading8').text('Heading 8'))
43 );
43 );
44 }
44 };
45
45
46 MainToolBar.prototype.construct = function() {
46 MainToolBar.prototype.construct = function() {
47 this.add_buttons_group([
47 this.add_buttons_group([
@@ -51,8 +51,8 b' var IPython = (function (IPython) {'
51 icon:'ui-icon-disk',
51 icon:'ui-icon-disk',
52 callback:function(){
52 callback:function(){
53 IPython.notebook.save_notebook();
53 IPython.notebook.save_notebook();
54 },
54 }
55 },
55 }
56 ]);
56 ]);
57 this.add_buttons_group([
57 this.add_buttons_group([
58 {
58 {
@@ -61,7 +61,7 b' var IPython = (function (IPython) {'
61 icon:'ui-icon-scissors',
61 icon:'ui-icon-scissors',
62 callback:function(){
62 callback:function(){
63 IPython.notebook.cut_cell();
63 IPython.notebook.cut_cell();
64 },
64 }
65 },
65 },
66 {
66 {
67 id:'copy_b',
67 id:'copy_b',
@@ -69,7 +69,7 b' var IPython = (function (IPython) {'
69 icon:'ui-icon-copy',
69 icon:'ui-icon-copy',
70 callback:function(){
70 callback:function(){
71 IPython.notebook.copy_cell();
71 IPython.notebook.copy_cell();
72 },
72 }
73 },
73 },
74 {
74 {
75 id:'paste_b',
75 id:'paste_b',
@@ -77,8 +77,8 b' var IPython = (function (IPython) {'
77 icon:'ui-icon-clipboard',
77 icon:'ui-icon-clipboard',
78 callback:function(){
78 callback:function(){
79 IPython.notebook.paste_cell();
79 IPython.notebook.paste_cell();
80 },
80 }
81 },
81 }
82 ],'cut_copy_paste');
82 ],'cut_copy_paste');
83
83
84 this.add_buttons_group([
84 this.add_buttons_group([
@@ -88,7 +88,7 b' var IPython = (function (IPython) {'
88 icon:'ui-icon-arrowthick-1-n',
88 icon:'ui-icon-arrowthick-1-n',
89 callback:function(){
89 callback:function(){
90 IPython.notebook.move_cell_up();
90 IPython.notebook.move_cell_up();
91 },
91 }
92 },
92 },
93 {
93 {
94 id:'move_down_b',
94 id:'move_down_b',
@@ -96,8 +96,8 b' var IPython = (function (IPython) {'
96 icon:'ui-icon-arrowthick-1-s',
96 icon:'ui-icon-arrowthick-1-s',
97 callback:function(){
97 callback:function(){
98 IPython.notebook.move_cell_down();
98 IPython.notebook.move_cell_down();
99 },
99 }
100 },
100 }
101 ],'move_up_down');
101 ],'move_up_down');
102
102
103 this.add_buttons_group([
103 this.add_buttons_group([
@@ -107,7 +107,7 b' var IPython = (function (IPython) {'
107 icon:'ui-icon-arrowthickstop-1-n',
107 icon:'ui-icon-arrowthickstop-1-n',
108 callback:function(){
108 callback:function(){
109 IPython.notebook.insert_cell_above('code');
109 IPython.notebook.insert_cell_above('code');
110 },
110 }
111 },
111 },
112 {
112 {
113 id:'insert_below_b',
113 id:'insert_below_b',
@@ -115,8 +115,8 b' var IPython = (function (IPython) {'
115 icon:'ui-icon-arrowthickstop-1-s',
115 icon:'ui-icon-arrowthickstop-1-s',
116 callback:function(){
116 callback:function(){
117 IPython.notebook.insert_cell_below('code');
117 IPython.notebook.insert_cell_below('code');
118 },
118 }
119 },
119 }
120 ],'insert_above_below');
120 ],'insert_above_below');
121
121
122 this.add_buttons_group([
122 this.add_buttons_group([
@@ -126,7 +126,7 b' var IPython = (function (IPython) {'
126 icon:'ui-icon-play',
126 icon:'ui-icon-play',
127 callback:function(){
127 callback:function(){
128 IPython.notebook.execute_selected_cell();
128 IPython.notebook.execute_selected_cell();
129 },
129 }
130 },
130 },
131 {
131 {
132 id:'interrupt_b',
132 id:'interrupt_b',
@@ -134,12 +134,12 b' var IPython = (function (IPython) {'
134 icon:'ui-icon-stop',
134 icon:'ui-icon-stop',
135 callback:function(){
135 callback:function(){
136 IPython.notebook.kernel.interrupt();
136 IPython.notebook.kernel.interrupt();
137 },
137 }
138 },
138 }
139 ],'run_int');
139 ],'run_int');
140
140
141
141
142 }
142 };
143
143
144 MainToolBar.prototype.bind_events = function () {
144 MainToolBar.prototype.bind_events = function () {
145 var that = this;
145 var that = this;
@@ -164,7 +164,7 b' var IPython = (function (IPython) {'
164 IPython.notebook.to_heading(undefined, 5);
164 IPython.notebook.to_heading(undefined, 5);
165 } else if (cell_type === 'heading6') {
165 } else if (cell_type === 'heading6') {
166 IPython.notebook.to_heading(undefined, 6);
166 IPython.notebook.to_heading(undefined, 6);
167 };
167 }
168 });
168 });
169 $([IPython.events]).on('selected_cell_type_changed.Notebook', function (event, data) {
169 $([IPython.events]).on('selected_cell_type_changed.Notebook', function (event, data) {
170 if (data.cell_type === 'heading') {
170 if (data.cell_type === 'heading') {
@@ -52,14 +52,14 b' var IPython = (function (IPython) {'
52 //
52 //
53 ToolBar.prototype.add_button_group = function(list, group_id){
53 ToolBar.prototype.add_button_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);
57 for(var el in list)
57 }
58 {
58 for(var el in list) {
59 var button = $('<button/>').button({
59 var button = $('<button/>').button({
60 icons : {primary: list[el].icon},
60 icons : {primary: list[el].icon},
61 text : false,
61 text : false,
62 label: list[el].label,
62 label: list[el].label
63 });
63 });
64 var id = list[el].id;
64 var id = list[el].id;
65 if( id != undefined )
65 if( id != undefined )
@@ -69,8 +69,8 b' var IPython = (function (IPython) {'
69 span_group.append(button);
69 span_group.append(button);
70 }
70 }
71 span_group.buttonset();
71 span_group.buttonset();
72 $(this.selector).append(span_group)
72 $(this.selector).append(span_group);
73 }
73 };
74
74
75 ToolBar.prototype.style = function () {
75 ToolBar.prototype.style = function () {
76 this.element.addClass('border-box-sizing').
76 this.element.addClass('border-box-sizing').
General Comments 0
You need to be logged in to leave comments. Login now