From bd66ff0f308fe7451809325de8bc77c5db83b2e9 2013-10-06 20:15:42 From: Matthias Bussonnier Date: 2013-10-06 20:15:42 Subject: [PATCH] Merge pull request #4333 from minrk/notebook-metadata Add Edit Notebook Metadata to Edit menu --- diff --git a/IPython/html/static/base/js/dialog.js b/IPython/html/static/base/js/dialog.js index 1d99bfe..7fbcd7c 100644 --- a/IPython/html/static/base/js/dialog.js +++ b/IPython/html/static/base/js/dialog.js @@ -60,7 +60,7 @@ IPython.dialog = (function (IPython) { }); // destroy dialog on hide, unless explicitly asked not to - if (options.destroy == undefined || options.destroy) { + if (options.destroy === undefined || options.destroy) { dialog.on("hidden", function () { dialog.remove(); }); @@ -75,10 +75,69 @@ IPython.dialog = (function (IPython) { } return dialog.modal(options); - } + }; + + var edit_metadata = function (md, callback, name) { + name = name || "Cell"; + var error_div = $('
').css('color', 'red'); + var message = + "Manually edit the JSON below to manipulate the metadata for this " + name + "." + + " We recommend putting custom metadata attributes in an appropriately named sub-structure," + + " so they don't conflict with those of others."; + + var textarea = $('