From 0c454831772318b8d3ed07dc7a34f73a7103e584 2014-09-25 23:32:14 From: Jessica B. Hamrick Date: 2014-09-25 23:32:14 Subject: [PATCH] Make cell be undeletable ONLY when metadata is explicitly false --- diff --git a/IPython/html/static/notebook/js/cell.js b/IPython/html/static/notebook/js/cell.js index d764ab7..e0a8165 100644 --- a/IPython/html/static/notebook/js/cell.js +++ b/IPython/html/static/notebook/js/cell.js @@ -422,14 +422,17 @@ define([ }; /** - * is the cell deletable? (true by default) + * is the cell deletable? only false (undeletable) if + * metadata.deletable is explicitly false -- everything else + * counts as true + * * @method is_deletable **/ Cell.prototype.is_deletable = function () { - if (this.metadata.deletable === undefined) { - return true; + if (this.metadata.deletable === false) { + return false; } - return Boolean(this.metadata.deletable); + return true; }; /**