fixup bad rebase

This commit is contained in:
MinRK 2013-10-08 17:16:59 -07:00
parent 8b9bb04d12
commit e16a5807c7
4 changed files with 20 additions and 20 deletions

View File

@ -240,7 +240,7 @@ var IPython = (function (IPython) {
* @method execute
*/
CodeCell.prototype.execute = function () {
this.output_area.clear_output(true, true, true);
this.output_area.clear_output();
this.set_input_prompt('*');
this.element.addClass("running");
var callbacks = {
@ -250,7 +250,7 @@ var IPython = (function (IPython) {
'set_next_input': $.proxy(this._handle_set_next_input, this),
'input_request': $.proxy(this._handle_input_request, this)
};
var msg_id = this.session.kernel.execute(this.get_text(), callbacks, {silent: false, store_history: true});
this.last_msg_id = this.session.kernel.execute(this.get_text(), callbacks, {silent: false, store_history: true});
};
/**
@ -386,8 +386,8 @@ var IPython = (function (IPython) {
};
CodeCell.prototype.clear_output = function (stdout, stderr, other) {
this.output_area.clear_output(stdout, stderr, other);
CodeCell.prototype.clear_output = function (wait) {
this.output_area.clear_output(wait);
};

View File

@ -756,7 +756,7 @@ var IPython = (function (IPython) {
var i = this.index_or_selected(index);
var cell = this.get_selected_cell();
this.undelete_backup = cell.toJSON();
$('#undelete_cell').removeClass('ui-state-disabled');
$('#undelete_cell').removeClass('disabled');
if (this.is_valid_cell_index(i)) {
var ce = this.get_cell_element(i);
ce.remove();
@ -1039,11 +1039,11 @@ var IPython = (function (IPython) {
Notebook.prototype.enable_paste = function () {
var that = this;
if (!this.paste_enabled) {
$('#paste_cell_replace').removeClass('ui-state-disabled')
$('#paste_cell_replace').removeClass('disabled')
.on('click', function () {that.paste_cell_replace();});
$('#paste_cell_above').removeClass('ui-state-disabled')
$('#paste_cell_above').removeClass('disabled')
.on('click', function () {that.paste_cell_above();});
$('#paste_cell_below').removeClass('ui-state-disabled')
$('#paste_cell_below').removeClass('disabled')
.on('click', function () {that.paste_cell_below();});
this.paste_enabled = true;
};
@ -1056,9 +1056,9 @@ var IPython = (function (IPython) {
*/
Notebook.prototype.disable_paste = function () {
if (this.paste_enabled) {
$('#paste_cell_replace').addClass('ui-state-disabled').off('click');
$('#paste_cell_above').addClass('ui-state-disabled').off('click');
$('#paste_cell_below').addClass('ui-state-disabled').off('click');
$('#paste_cell_replace').addClass('disabled').off('click');
$('#paste_cell_above').addClass('disabled').off('click');
$('#paste_cell_below').addClass('disabled').off('click');
this.paste_enabled = false;
};
};
@ -1157,7 +1157,7 @@ var IPython = (function (IPython) {
this.undelete_backup = null;
this.undelete_index = null;
}
$('#undelete_cell').addClass('ui-state-disabled');
$('#undelete_cell').addClass('disabled');
}
// Split/merge
@ -1360,7 +1360,7 @@ var IPython = (function (IPython) {
var cells = this.get_cells();
for (var i=0; i<ncells; i++) {
if (cells[i] instanceof IPython.CodeCell) {
cells[i].clear_output(true,true,true);
cells[i].clear_output();
// Make all In[] prompts blank, as well
// TODO: make this configurable (via checkbox?)
cells[i].set_input_prompt();
@ -1873,7 +1873,7 @@ var IPython = (function (IPython) {
* Request a notebook's data from the server.
*
* @method load_notebook
* @param {String} notebook_naem and path A notebook to load
* @param {String} notebook_name and path A notebook to load
*/
Notebook.prototype.load_notebook = function (notebook_name, notebook_path) {
var that = this;
@ -1896,7 +1896,7 @@ var IPython = (function (IPython) {
this.notebook_name
);
$.ajax(url, settings);
};
};
/**
* Success callback for loading a notebook from the server.

View File

@ -31,7 +31,7 @@ var IPython = (function (IPython) {
this.stdin_channel = null;
this.base_url = base_url;
this.running = false;
this.username= "username";
this.username = "username";
this.session_id = utils.uuid();
this._msg_callbacks = {};

View File

@ -86,11 +86,11 @@ class="notebook_app"
<ul class="dropdown-menu">
<li id="cut_cell"><a href="#">Cut Cell</a></li>
<li id="copy_cell"><a href="#">Copy Cell</a></li>
<li id="paste_cell_above" class="ui-state-disabled"><a href="#">Paste Cell Above</a></li>
<li id="paste_cell_below" class="ui-state-disabled"><a href="#">Paste Cell Below</a></li>
<li id="paste_cell_replace" class="ui-state-disabled"><a href="#">Paste Cell &amp; Replace</a></li>
<li id="paste_cell_above" class="disabled"><a href="#">Paste Cell Above</a></li>
<li id="paste_cell_below" class="disabled"><a href="#">Paste Cell Below</a></li>
<li id="paste_cell_replace" class="disabled"><a href="#">Paste Cell &amp; Replace</a></li>
<li id="delete_cell"><a href="#">Delete Cell</a></li>
<li id="undelete_cell" class="ui-state-disabled"><a href="#">Undo Delete Cell</a></li>
<li id="undelete_cell" class="disabled"><a href="#">Undo Delete Cell</a></li>
<li class="divider"></li>
<li id="split_cell"><a href="#">Split Cell</a></li>
<li id="merge_cell_above"><a href="#">Merge Cell Above</a></li>