From 85bac6dcd8fd2af3dbb2983eea6cb4d8034aa22c 2013-02-12 18:53:10 From: MinRK Date: 2013-02-12 18:53:10 Subject: [PATCH] add disabled state to undo-delete-cell when unavailable. --- diff --git a/IPython/frontend/html/notebook/static/js/notebook.js b/IPython/frontend/html/notebook/static/js/notebook.js index 43714d7..7c7ecda 100644 --- a/IPython/frontend/html/notebook/static/js/notebook.js +++ b/IPython/frontend/html/notebook/static/js/notebook.js @@ -546,6 +546,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'); if (this.is_valid_cell_index(i)) { var ce = this.get_cell_element(i); ce.remove(); @@ -866,6 +867,7 @@ var IPython = (function (IPython) { this.undelete_backup = null; this.undelete_index = null; } + $('#undelete_cell').addClass('ui-state-disabled'); } // Split/merge diff --git a/IPython/frontend/html/notebook/templates/notebook.html b/IPython/frontend/html/notebook/templates/notebook.html index 0b0e059..be3a76a 100644 --- a/IPython/frontend/html/notebook/templates/notebook.html +++ b/IPython/frontend/html/notebook/templates/notebook.html @@ -78,7 +78,7 @@ class="notebook_app"
  • Paste Cell Below
  • Paste Cell & Replace
  • Delete Cell
  • -
  • Undo Delete Cell
  • +
  • Undo Delete Cell

  • Split Cell
  • Merge Cell Above