Require.js (WIP)

Opened so people can spy on me.  Please ignore random code snippets sitting in files they don't belong in (especially in notebook.js), I'll move them when I get to the correct file.
We can do that in another PR. Mane just add a comment //TODO codesmell ?

Envoyé de mon iPhone

> Le 23 juin 2014 à 06:05, Jonathan Frederic <notifications@github.com> a écrit :
> 
> In IPython/html/static/notebook/js/notebook.js:
> 
> > @@ -21,8 +36,46 @@ var IPython = (function (IPython) {
> >       * @constructor
> >       * @param {String} selector A jQuery selector for the notebook's DOM element
> >       * @param {Object} [options] A config object
> > -     */
> > -    var Notebook = function (selector, options) {
> > +     * @param {Object} [events] An events object
> > +     */
> > +    var Notebook = function (selector, options, events, keyboard_manager, save_widget, config) {
> > +        this.config = config;
> > +        this.events = events;
> > +        this.keyboard_manager = keyboard_manager;
> > +        keyboard_manager.notebook = this;
> > +        this.save_widget = save_widget;
> > +        save_widget.notebook = this;
> I agree, I'd like to change that but I needed it for the mvp. The problem here is that save widget needs an handle to the instance of the notebook, and the notebook needs a handle to the instance of the save widget (circular refs.). This is done a couple of places, I'd be very interested in a best-practice for this.  Pinging @minrk and @takluyver since they may have ideas.
> 
> —
> Reply to this email directly or view it on GitHub.