Show More
@@ -14,8 +14,11 b' var IPython = (function (IPython) {' | |||
|
14 | 14 | var utils = IPython.utils; |
|
15 | 15 | var key = IPython.utils.keycodes; |
|
16 | 16 | |
|
17 | var Notebook = function (selector) { | |
|
18 | this.read_only = IPython.read_only; | |
|
17 | var Notebook = function (selector, options) { | |
|
18 | var options = options || {}; | |
|
19 | this._baseProjectUrl = options.baseProjectUrl; | |
|
20 | this.read_only = options.read_only || IPython.read_only; | |
|
21 | ||
|
19 | 22 | this.element = $(selector); |
|
20 | 23 | this.element.scroll(); |
|
21 | 24 | this.element.data("notebook", this); |
@@ -39,15 +39,17 b' $(document).ready(function () {' | |||
|
39 | 39 | // The header's bottom border is provided by the menu bar so we remove it. |
|
40 | 40 | $('div#header').css('border-bottom-style','none'); |
|
41 | 41 | |
|
42 | var baseProjectUrl = $('body').data('baseProjectUrl') | |
|
43 | ||
|
42 | 44 | IPython.page = new IPython.Page(); |
|
43 | 45 | IPython.markdown_converter = new Markdown.Converter(); |
|
44 | 46 | IPython.layout_manager = new IPython.LayoutManager(); |
|
45 | 47 | IPython.pager = new IPython.Pager('div#pager', 'div#pager_splitter'); |
|
46 | 48 | IPython.quick_help = new IPython.QuickHelp('span#quick_help_area'); |
|
47 | IPython.login_widget = new IPython.LoginWidget('span#login_widget'); | |
|
48 | IPython.notebook = new IPython.Notebook('div#notebook'); | |
|
49 | IPython.login_widget = new IPython.LoginWidget('span#login_widget',{baseProjectUrl:baseProjectUrl}); | |
|
50 | IPython.notebook = new IPython.Notebook('div#notebook',{baseProjectUrl:baseProjectUrl, read_only:IPython.read_only}); | |
|
49 | 51 | IPython.save_widget = new IPython.SaveWidget('span#save_widget'); |
|
50 | IPython.menubar = new IPython.MenuBar('#menubar') | |
|
52 | IPython.menubar = new IPython.MenuBar('#menubar',{baseProjectUrl:baseProjectUrl}) | |
|
51 | 53 | IPython.toolbar = new IPython.MainToolBar('#maintoolbar') |
|
52 | 54 | IPython.tooltip = new IPython.Tooltip() |
|
53 | 55 | IPython.notification_area = new IPython.NotificationArea('#notification_area') |
General Comments 0
You need to be logged in to leave comments.
Login now