Browse Source

Merge pull request #215 from blink1073/jquery

Fix mainmenu and notebook services
S. Chris Colbert 8 years ago
parent
commit
29b6f48ffb
2 changed files with 44 additions and 44 deletions
  1. 37 37
      src/mainmenu/plugin.ts
  2. 7 7
      src/notebook/plugin.ts

+ 37 - 37
src/mainmenu/plugin.ts

@@ -13,43 +13,6 @@ import {
 } from 'phosphor-menus';
 
 
-/**
- * The main menu extension.
- *
- * #### Notes
- * The main menu extension adds a menu bar to the top area
- * of the application shell.
- *
- */
-export
-const mainMenuExtension = {
-  id: 'jupyter.extensions.mainMenu',
-  activate: activateMainMenu
-};
-
-
-/**
- * A service providing an interface to the main menu.
- */
-export
-const mainMenuProvider = {
-  id: 'jupyter.services.mainMenu',
-  provides: MainMenu,
-  resolve: () => {
-    return Private.mainMenu;
-  }
-};
-
-
-/**
- * Activate the main menu extension.
- */
-function activateMainMenu(app: Application): void {
-  Private.menuBar.id = 'jp-MainMenu';
-  app.shell.addToTopArea(Private.menuBar);
-}
-
-
 /**
  * The main menu class.  It is intended to be used as a singleton.
  */
@@ -90,6 +53,43 @@ namespace MainMenu {
 }
 
 
+/**
+ * The main menu extension.
+ *
+ * #### Notes
+ * The main menu extension adds a menu bar to the top area
+ * of the application shell.
+ *
+ */
+export
+const mainMenuExtension = {
+  id: 'jupyter.extensions.mainMenu',
+  activate: activateMainMenu
+};
+
+
+/**
+ * A service providing an interface to the main menu.
+ */
+export
+const mainMenuProvider = {
+  id: 'jupyter.services.mainMenu',
+  provides: MainMenu,
+  resolve: () => {
+    return Private.mainMenu;
+  }
+};
+
+
+/**
+ * Activate the main menu extension.
+ */
+function activateMainMenu(app: Application): void {
+  Private.menuBar.id = 'jp-MainMenu';
+  app.shell.addToTopArea(Private.menuBar);
+}
+
+
 /**
  * A namespace for private data.
  */

+ 7 - 7
src/notebook/plugin.ts

@@ -75,6 +75,13 @@ const cmdIds = {
 };
 
 
+/**
+ * A class that tracks notebook widgets.
+ */
+export
+class NotebookTracker extends WidgetTracker<NotebookPanel> { }
+
+
 /**
  * The notebook file handler extension.
  */
@@ -99,13 +106,6 @@ const notebookTrackerProvider = {
 };
 
 
-/**
- * A class that tracks notebook widgets.
- */
-export
-class NotebookTracker extends WidgetTracker<NotebookPanel> { }
-
-
 /**
  * Activate the notebook handler extension.
  */