diff --git a/IPython/html/static/notebook/js/celltoolbar.js b/IPython/html/static/notebook/js/celltoolbar.js index 03910b2..23c8d20 100644 --- a/IPython/html/static/notebook/js/celltoolbar.js +++ b/IPython/html/static/notebook/js/celltoolbar.js @@ -190,6 +190,22 @@ define([ } }; + /** + * unregister the selected preset, + * + * return true if preset successfully unregistered + * false otherwise + * + **/ + CellToolbar.unregister_preset = function(name){ + if(CellToolbar._presets[name]){ + delete CellToolbar._presets[name]; + events.trigger('unregistered_preset.CellToolbar', {name: name}); + return true + } + return false + } + /** * List the names of the presets that are currently registered. diff --git a/IPython/html/static/notebook/js/maintoolbar.js b/IPython/html/static/notebook/js/maintoolbar.js index d4d500a..0d4ae3e 100644 --- a/IPython/html/static/notebook/js/maintoolbar.js +++ b/IPython/html/static/notebook/js/maintoolbar.js @@ -134,10 +134,19 @@ define([ var name = data.name; select.append($('