diff --git a/notebook/static/notebook/js/actions.js b/notebook/static/notebook/js/actions.js index 240a3c79b..e3421ba1c 100644 --- a/notebook/static/notebook/js/actions.js +++ b/notebook/static/notebook/js/actions.js @@ -332,15 +332,25 @@ define(function(require){ env.pager.collapse(); } }, - 'quick-menu': { + 'command-palette': { help_index : 'aa', handler : function(env){ - var searchfield = $('input').attr('type', 'text'); + var searchfield = $('').attr('type', 'text'); + searchfield.typeahead({ + order: "asc", + source: { + groupName: { + data: [ 'abc', 'def', 'ghi', 'jkl' ] + } + }, + callback: { + onInit: function () {console.log('this is init') } + } + }) dialog.modal({ title: 'Execute Action', - body: $('
') - .append(searchfield) + body: $('
').append(searchfield), buttons: { OK: {'class': 'btn-primary'} } diff --git a/notebook/static/notebook/js/keyboardmanager.js b/notebook/static/notebook/js/keyboardmanager.js index f2ef6cd85..05764b955 100644 --- a/notebook/static/notebook/js/keyboardmanager.js +++ b/notebook/static/notebook/js/keyboardmanager.js @@ -84,6 +84,7 @@ define([ KeyboardManager.prototype.get_default_command_shortcuts = function() { return { + 'cmd-shift-P': 'ipython.command-palette', 'shift-space': 'ipython.scroll-up', 'shift-v' : 'ipython.paste-cell-before', 'shift-m' : 'ipython.merge-selected-cells', diff --git a/notebook/templates/page.html b/notebook/templates/page.html index 026342d12..7263e2415 100644 --- a/notebook/templates/page.html +++ b/notebook/templates/page.html @@ -16,6 +16,7 @@ +