Merge pull request #3514 from minrk/ui-state-disabled

use bootstrap `disabled` instead of `ui-state-disabled`
This commit is contained in:
Matthias Bussonnier 2013-07-03 01:38:11 -07:00
commit da8f8081b4
2 changed files with 12 additions and 12 deletions

View File

@ -724,7 +724,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();
@ -1005,11 +1005,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;
};
@ -1022,9 +1022,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;
};
};
@ -1123,7 +1123,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

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>