add 'running' class to running code cells

Will allow special styling of code cells that are running via
`div.code_cell.running` in css.  Currently, no change is made.
MinRK 14 years ago
parent 0e4afee63b
commit f2972ad5c4

@ -191,6 +191,9 @@ div.cell {
div.code_cell {
background-color: white;
}
/* any special styling for code cells that are currently running goes here */
div.code_cell.running {
}
div.prompt {
/* This needs to be wide enough for 3 digit prompt numbers: In[100]: */

@ -691,6 +691,7 @@ var IPython = (function (IPython) {
var cell = this.cell_for_msg(reply.parent_header.msg_id);
if (msg_type === "execute_reply") {
cell.set_input_prompt(content.execution_count);
cell.element.removeClass("running");
this.dirty = true;
} else if (msg_type === "complete_reply") {
cell.finish_completing(content.matched_text, content.matches);
@ -830,6 +831,7 @@ var IPython = (function (IPython) {
if (cell instanceof IPython.CodeCell) {
cell.clear_output(true, true, true);
cell.set_input_prompt('*');
cell.element.addClass("running");
var code = cell.get_code();
var msg_id = that.kernel.execute(cell.get_code());
that.msg_cell_map[msg_id] = cell.cell_id;

Loading…
Cancel
Save