diff --git a/IPython/html/README.md b/IPython/html/README.md index cbb20a17f..2f3f6f305 100644 --- a/IPython/html/README.md +++ b/IPython/html/README.md @@ -13,9 +13,9 @@ Developers of the IPython Notebook will need to install the following tools: We are moving to a model where our JavaScript dependencies are managed using [bower](http://bower.io/). These packages are installed in `static/components` -and commited into our git repo. Our dependencies are described in the file -`static/bower.json`. To update our bower packages, run `fab components` in this -directory. +and committed into our git repo. Our dependencies are described in the file +`static/components/bower.json`. To update our bower packages, run `fab update` +in this directory. Because CodeMirror does not use proper semantic versioning for its GitHub tags, we maintain our own fork of CodeMirror that is used with bower. This fork should diff --git a/IPython/html/static/notebook/js/main.js b/IPython/html/static/notebook/js/main.js index e4e6d3da4..38c8627e1 100644 --- a/IPython/html/static/notebook/js/main.js +++ b/IPython/html/static/notebook/js/main.js @@ -14,7 +14,8 @@ // which make both this file fail at setting marked configuration, and textcell.js // which search marked into global. require(['components/marked/lib/marked', - 'widgets/js/init'], + 'widgets/js/init', + 'components/bootstrap-tour/build/js/bootstrap-tour.min'], function (marked) { "use strict"; @@ -56,6 +57,7 @@ function (marked) { IPython.layout_manager = new IPython.LayoutManager(); IPython.pager = new IPython.Pager('div#pager', 'div#pager_splitter'); IPython.quick_help = new IPython.QuickHelp(); + IPython.tour = new IPython.NotebookTour(); IPython.login_widget = new IPython.LoginWidget('span#login_widget', opts); IPython.notebook = new IPython.Notebook('div#notebook', opts); IPython.keyboard_manager = new IPython.KeyboardManager(); diff --git a/IPython/html/static/notebook/js/menubar.js b/IPython/html/static/notebook/js/menubar.js index 8eeb4b7f0..bb365dc22 100644 --- a/IPython/html/static/notebook/js/menubar.js +++ b/IPython/html/static/notebook/js/menubar.js @@ -280,6 +280,9 @@ var IPython = (function (IPython) { IPython.notebook.restart_kernel(); }); // Help + this.element.find('#notebook_tour').click(function () { + IPython.tour.start(); + }); this.element.find('#keyboard_shortcuts').click(function () { IPython.quick_help.show_keyboard_shortcuts(); }); diff --git a/IPython/html/static/notebook/js/quickhelp.js b/IPython/html/static/notebook/js/quickhelp.js index 8825e2f76..29cb3def6 100644 --- a/IPython/html/static/notebook/js/quickhelp.js +++ b/IPython/html/static/notebook/js/quickhelp.js @@ -65,7 +65,7 @@ var IPython = (function (IPython) { var i, half, n; // Command mode - var cmd_div = $('
').append($('esc
to enable)enter
to enable)enter
or clicking in the input text area of the cell switches to Edit Mode."
+ }, {
+ element: '.selected',
+ title: "Edit Mode",
+ placement: 'bottom',
+ onShow: function(tour) { edit_mode(); },
+ content: "Notice that the border around the currently active cell changed color. Typing will insert text into the currently active cell."
+ }, {
+ element: '.selected',
+ title: "Back to Command Mode",
+ placement: 'bottom',
+ onShow: function(tour) { IPython.notebook.command_mode(); },
+ content: "Pressing esc
or clicking outside of the input text area takes you back to Command Mode."
+ }, {
+ element: '#keyboard_shortcuts',
+ title: "Keyboard Shortcuts",
+ placement: 'bottom',
+ onShow: function(tour) { $('#help_menu').parent().addClass('open'); },
+ onHide: function(tour) { $('#help_menu').parent().removeClass('open'); },
+ content: "You can click here to get a list of all of the keyboard shortcuts."
+ }, {
+ element: "#kernel_indicator",
+ title: "Kernel Indicator",
+ placement: 'bottom',
+ onShow: function(tour) { $([IPython.events]).trigger('status_idle.Kernel');},
+ content: "This is the Kernel indicator. It looks like this when the Kernel is idle.",
+ }, {
+ element: "#kernel_indicator",
+ title: "Kernel Indicator",
+ placement: 'bottom',
+ onShow: function(tour) { $([IPython.events]).trigger('status_busy.Kernel'); },
+ content: "The Kernel indicator looks like this when the Kernel is busy.",
+ }, {
+ element: ".icon-stop",
+ placement: 'bottom',
+ title: "Interrupting the Kernel",
+ onHide: function(tour) { $([IPython.events]).trigger('status_idle.Kernel'); },
+ content: "To cancel a computation in progress, you can click here."
+ }, {
+ element: "#notification_kernel",
+ placement: 'bottom',
+ onShow: function(tour) { $('.icon-stop').click(); },
+ title: "Notification Area",
+ content: "Messages in response to user actions (Save, Interrupt, etc) appear here."
+ }, {
+ element: "#ipython_notebook",
+ title: "Fin.",
+ placement: 'bottom',
+ backdrop: true,
+ content: "This concludes the IPython Notebook User Interface Tour. Happy hacking!",
+ }
+];
+
+var tour_style = "