diff --git a/IPython/html/static/base/js/dialog.js b/IPython/html/static/base/js/dialog.js index 0cb4e4e..4a66302 100644 --- a/IPython/html/static/base/js/dialog.js +++ b/IPython/html/static/base/js/dialog.js @@ -154,5 +154,5 @@ define([ // Backwards compatability. IPython.Dialog = Dialog; - return {'Dialog': Dialog}; + return Dialog; }); diff --git a/IPython/html/static/notebook/js/celltoolbar.js b/IPython/html/static/notebook/js/celltoolbar.js index 72270d5..a5f4c83 100644 --- a/IPython/html/static/notebook/js/celltoolbar.js +++ b/IPython/html/static/notebook/js/celltoolbar.js @@ -5,7 +5,7 @@ define([ 'base/js/namespace', 'jquery', 'notebook/js/textcell', -], function(IPython, $, TextCell) { +], function(IPython, $, textcell) { "use strict"; /** @@ -276,7 +276,7 @@ define([ } // If there are no controls or the cell is a rendered TextCell hide the toolbar. - if (!this.ui_controls_list.length || (this.cell instanceof TextCell && this.cell.rendered)) { + if (!this.ui_controls_list.length || (this.cell instanceof textcell.TextCell && this.cell.rendered)) { this.hide(); } else { this.show(); diff --git a/IPython/html/static/notebook/js/codecell.js b/IPython/html/static/notebook/js/codecell.js index dc1ab08..d7cef5d 100644 --- a/IPython/html/static/notebook/js/codecell.js +++ b/IPython/html/static/notebook/js/codecell.js @@ -57,7 +57,7 @@ define([ this.kernel = kernel || null; this.notebook = notebook; this.collapsed = false; - this.tooltip = new Tooltip(events); + this.tooltip = new tooltip.Tooltip(events); this.events = events; this.config = config; @@ -76,7 +76,7 @@ define([ options = this.mergeopt(CodeCell, options, {cm_config:cm_overwrite_options}); - Cell.apply(this,[options, keyboard_manager, events]); + cell.Cell.apply(this,[options, keyboard_manager, events]); // Attributes we want to override in this subclass. this.cell_type = "code"; @@ -106,7 +106,7 @@ define([ CodeCell.msg_cells = {}; - CodeCell.prototype = new Cell(); + CodeCell.prototype = new cell.Cell(); /** * @method auto_highlight @@ -117,7 +117,7 @@ define([ /** @method create_element */ CodeCell.prototype.create_element = function () { - Cell.prototype.create_element.apply(this, arguments); + cell.Cell.prototype.create_element.apply(this, arguments); var cell = $('
').addClass('cell border-box-sizing code_cell'); cell.attr('tabindex','2'); @@ -125,7 +125,7 @@ define([ var input = $('').addClass('input'); var prompt = $('').addClass('prompt input_prompt'); var inner_cell = $('').addClass('inner_cell'); - this.celltoolbar = new CellToolbar(this, this.events, this.notebook); + this.celltoolbar = new celltoolbar.CellToolbar(this, this.events, this.notebook); inner_cell.append(this.celltoolbar.element); var input_area = $('').addClass('input_area'); this.code_mirror = CodeMirror(input_area.get(0), this.cm_config); @@ -155,13 +155,13 @@ define([ var output = $(''); cell.append(input).append(widget_area).append(output); this.element = cell; - this.output_area = new OutputArea(output, true, this.events, this.keyboard_manager); - this.completer = new Completer(this, this.events); + this.output_area = new outputarea.OutputArea(output, true, this.events, this.keyboard_manager); + this.completer = new completer.Completer(this, this.events); }; /** @method bind_events */ CodeCell.prototype.bind_events = function () { - Cell.prototype.bind_events.apply(this); + cell.Cell.prototype.bind_events.apply(this); var that = this; this.element.focusout( @@ -243,7 +243,7 @@ define([ // keyboard event wasn't one of those unique to code cells, let's see // if it's one of the generic ones (i.e. check edit mode shortcuts) - return Cell.prototype.handle_codemirror_keyevent.apply(this, [editor, event]); + return cell.Cell.prototype.handle_codemirror_keyevent.apply(this, [editor, event]); }; // Kernel related calls. @@ -336,7 +336,7 @@ define([ // Basic cell manipulation. CodeCell.prototype.select = function () { - var cont = Cell.prototype.select.apply(this); + var cont = cell.Cell.prototype.select.apply(this); if (cont) { this.code_mirror.refresh(); this.auto_highlight(); @@ -345,7 +345,7 @@ define([ }; CodeCell.prototype.render = function () { - var cont = Cell.prototype.render.apply(this); + var cont = cell.Cell.prototype.render.apply(this); // Always execute, even if we are already in the rendered state return cont; }; @@ -448,7 +448,7 @@ define([ // JSON serialization CodeCell.prototype.fromJSON = function (data) { - Cell.prototype.fromJSON.apply(this, arguments); + cell.Cell.prototype.fromJSON.apply(this, arguments); if (data.cell_type === 'code') { if (data.input !== undefined) { this.set_text(data.input); @@ -476,7 +476,7 @@ define([ CodeCell.prototype.toJSON = function () { - var data = Cell.prototype.toJSON.apply(this); + var data = cell.Cell.prototype.toJSON.apply(this); data.input = this.get_text(); // is finite protect against undefined and '*' value if (isFinite(this.input_prompt_number)) { @@ -496,7 +496,7 @@ define([ * @return is the action being taken */ CodeCell.prototype.unselect = function () { - var cont = Cell.prototype.unselect.apply(this); + var cont = cell.Cell.prototype.unselect.apply(this); if (cont) { // When a code cell is usnelected, make sure that the corresponding // tooltip and completer to that cell is closed. diff --git a/IPython/html/static/notebook/js/main.js b/IPython/html/static/notebook/js/main.js index 215279e..41b8b9f 100644 --- a/IPython/html/static/notebook/js/main.js +++ b/IPython/html/static/notebook/js/main.js @@ -49,18 +49,18 @@ require([ }; var user_config = $.extend({}, config.default_config); - var page = new Page(); - var layout_manager = new LayoutManager(); - var events = $([new Events()]); - var pager = new Pager('div#pager', 'div#pager_splitter', layout_manager, events); - var keyboard_manager = new KeyboardManager(pager, events); - var save_widget = new SaveWidget('span#save_widget', events); - var notebook = new Notebook('div#notebook', options, events, keyboard_manager, save_widget, user_config); - var login_widget = new LoginWidget('span#login_widget', options); - var toolbar = new MainToolBar('#maintoolbar-container', layout_manager, notebook, events); - var quick_help = new QuickHelp(undefined, keyboard_manager, events); - var menubar = new MenuBar('#menubar', options, notebook, layout_manager, events, save_widget, quick_help); - var notification_area = new NotificationArea('#notification_area', events, save_widget, notebook); + var page = new page.Page(); + var layout_manager = new layoutmanager.LayoutManager(); + var events = $([new events.Events()]); + var pager = new pager.Pager('div#pager', 'div#pager_splitter', layout_manager, events); + var keyboard_manager = new keyboardmanager.KeyboardManager(pager, events); + var save_widget = new savewidget.SaveWidget('span#save_widget', events); + var notebook = new notebook.Notebook('div#notebook', options, events, keyboard_manager, save_widget, user_config); + var login_widget = new loginwidget.LoginWidget('span#login_widget', options); + var toolbar = new maintoolbar.MainToolBar('#maintoolbar-container', layout_manager, notebook, events); + var quick_help = new quickhelp.QuickHelp(undefined, keyboard_manager, events); + var menubar = new menubar.MenuBar('#menubar', options, notebook, layout_manager, events, save_widget, quick_help); + var notification_area = new notificationarea.NotificationArea('#notification_area', events, save_widget, notebook); notification_area.init_notification_widgets(); layout_manager.do_resize(); diff --git a/IPython/html/static/notebook/js/maintoolbar.js b/IPython/html/static/notebook/js/maintoolbar.js index eb1bfea..8b84065 100644 --- a/IPython/html/static/notebook/js/maintoolbar.js +++ b/IPython/html/static/notebook/js/maintoolbar.js @@ -10,7 +10,7 @@ define([ "use strict"; var MainToolBar = function (selector, layout_manager, notebook, events) { - Toolbar.apply(this, arguments); + toolbar.Toolbar.apply(this, arguments); this.events = events; this.notebook = notebook; this.construct(); @@ -19,7 +19,7 @@ define([ this.bind_events(); }; - MainToolBar.prototype = new Toolbar(); + MainToolBar.prototype = new toolbar.Toolbar(); MainToolBar.prototype.construct = function () { this.add_buttons_group([ @@ -152,16 +152,16 @@ define([ select.change(function() { var val = $(this).val(); if (val ==='') { - CellToolbar.global_hide(); + celltoolbar.CellToolbar.global_hide(); delete this.notebook.metadata.celltoolbar; } else { - CellToolbar.global_show(); - CellToolbar.activate_preset(val); + celltoolbar.CellToolbar.global_show(); + celltoolbar.CellToolbar.activate_preset(val); this.notebook.metadata.celltoolbar = val; } }); // Setup the currently registered presets. - var presets = CellToolbar.list_presets(); + var presets = celltoolbar.CellToolbar.list_presets(); for (var i=0; i