@@ -160,6 +160,15 @@ define([
160
160
161
161
var input = $ ( '<div></div>' ) . addClass ( 'input' ) ;
162
162
this . input = input ;
163
+
164
+ var run_this_cell = $ ( '<div></div>' ) . addClass ( 'run_this_cell' ) ;
165
+ run_this_cell . prop ( 'title' , 'Run this cell' ) ;
166
+ run_this_cell . append ( '<i class="fa-step-forward fa"></i>' ) ;
167
+ run_this_cell . click ( function ( event ) {
168
+ event . stopImmediatePropagation ( ) ;
169
+ that . execute ( ) ;
170
+ } ) ;
171
+
163
172
var prompt = $ ( '<div/>' ) . addClass ( 'prompt input_prompt' ) ;
164
173
var inner_cell = $ ( '<div/>' ) . addClass ( 'inner_cell' ) ;
165
174
this . celltoolbar = new celltoolbar . CellToolbar ( {
@@ -180,7 +189,7 @@ define([
180
189
this . code_mirror . on ( 'keydown' , $ . proxy ( this . handle_keyevent , this ) ) ;
181
190
$ ( this . code_mirror . getInputField ( ) ) . attr ( "spellcheck" , "false" ) ;
182
191
inner_cell . append ( input_area ) ;
183
- input . append ( prompt ) . append ( inner_cell ) ;
192
+ input . append ( run_this_cell ) . append ( prompt ) . append ( inner_cell ) ;
184
193
185
194
var output = $ ( '<div></div>' ) ;
186
195
cell . append ( input ) . append ( output ) ;
@@ -505,6 +514,7 @@ define([
505
514
}
506
515
this . input_prompt_number = number ;
507
516
var prompt_html = CodeCell . input_prompt_function ( this . input_prompt_number , nline ) ;
517
+
508
518
// This HTML call is okay because the user contents are escaped.
509
519
this . element . find ( 'div.input_prompt' ) . html ( prompt_html ) ;
510
520
this . events . trigger ( 'set_dirty.Notebook' , { value : true } ) ;
0 commit comments