start workign on typeahead

Matthias Bussonnier 11 years ago
parent 735bd7ee36
commit 91fe9f2d01

@ -17,6 +17,7 @@
"requirejs": "~2.1",
"term.js": "chjj/term.js#~0.0.4",
"text-encoding": "~0.1",
"underscore": "components/underscore#~1.5"
"underscore": "components/underscore#~1.5",
"jquery-typeahead": "~2.0.0"
}
}

@ -3,6 +3,8 @@
define(function(require){
"use strict";
var dialog = require("base/js/dialog");
var ActionHandler = function (env) {
this.env = env || {};
@ -329,10 +331,26 @@ define(function(require){
handler : function (env) {
env.pager.collapse();
}
},
'quick-menu': {
help_index : 'aa',
handler : function(env){
var searchfield = $('input').attr('type', 'text');
dialog.modal({
title: 'Execute Action',
body: $('<div/>')
.append(searchfield)
buttons: {
OK: {'class': 'btn-primary'}
}
});
}
}
};
/**
* A bunch of `Advance actions` for Jupyter.
* Cf `Simple Action` plus the following properties.

@ -22,6 +22,7 @@ require([
'notebook/js/kernelselector',
'codemirror/lib/codemirror',
'notebook/js/about',
'typeahead',
// only loaded, not used, please keep sure this is loaded last
'custom/custom'
], function(
@ -45,6 +46,7 @@ require([
kernelselector,
CodeMirror,
about,
typeahead,
// please keep sure that even if not used, this is loaded last
custom
) {

@ -37,8 +37,13 @@
moment: 'components/moment/moment',
codemirror: 'components/codemirror',
termjs: 'components/term.js/src/term',
typeahead: 'components/jquery-typeahead/dist/jquery.typeahead'
},
shim: {
typeahead: {
deps: ["jquery"],
exports: "typeahead"
},
underscore: {
exports: '_'
},

@ -22,9 +22,14 @@ var rjs_config = {
moment: 'components/moment/moment',
codemirror: 'components/codemirror',
termjs: 'components/term.js/src/term',
typeahead: 'components/jquery-typeahead/dist/jquery.typeahead',
contents: 'empty:'
},
shim: {
typeahead: {
deps: ["jquery"],
exports: "typeahead"
},
underscore: {
exports: '_'
},

Loading…
Cancel
Save