jupyter-js-filebrowser
Advanced tools
Comparing version 0.2.7 to 0.2.8
@@ -22,6 +22,2 @@ import { IContentsModel } from 'jupyter-js-services'; | ||
/** | ||
* The static type of the constructor. | ||
*/ | ||
'constructor': typeof DirListing; | ||
/** | ||
* Construct a new file browser directory listing widget. | ||
@@ -28,0 +24,0 @@ * |
// Copyright (c) Jupyter Development Team. | ||
// Distributed under the terms of the Modified BSD License. | ||
'use strict'; | ||
var jupyter_js_editor_1 = require('jupyter-js-editor'); | ||
var jupyter_js_services_1 = require('jupyter-js-services'); | ||
@@ -16,11 +15,9 @@ var jupyter_js_utils_1 = require('jupyter-js-utils'); | ||
var FileBrowserHandler = (function () { | ||
function FileBrowserHandler(shell, editorFactory) { | ||
function FileBrowserHandler(shell) { | ||
this._shell = shell; | ||
this._editorFactory = editorFactory; | ||
} | ||
FileBrowserHandler.create = function (shell, editorFactory) { | ||
return new FileBrowserHandler(shell, editorFactory); | ||
FileBrowserHandler.create = function (shell) { | ||
return new FileBrowserHandler(shell); | ||
}; | ||
FileBrowserHandler.prototype.run = function () { | ||
var _this = this; | ||
var baseUrl = jupyter_js_utils_1.getConfigOption('baseUrl'); | ||
@@ -32,15 +29,6 @@ var contents = new jupyter_js_services_1.ContentsManager(baseUrl); | ||
fileBrowser.title.text = 'File Browser'; | ||
fbModel.changed.connect(function (fb, change) { | ||
if (change.name === 'open' && change.newValue.type === 'file') { | ||
var options = { filename: change.newValue.name, | ||
text: change.newValue.content }; | ||
var editorModel = _this._editorFactory.newViewModel(options); | ||
var editor = _this._editorFactory.newEditor(editorModel); | ||
_this._shell.addToMainArea(editor); | ||
} | ||
}); | ||
this._shell.addToLeftArea(fileBrowser, { rank: 10 }); | ||
}; | ||
FileBrowserHandler.requires = [phosphide_1.IAppShell, jupyter_js_editor_1.IEditorFactory]; | ||
FileBrowserHandler.requires = [phosphide_1.IAppShell]; | ||
return FileBrowserHandler; | ||
})(); |
{ | ||
"name": "jupyter-js-filebrowser", | ||
"version": "0.2.7", | ||
"version": "0.2.8", | ||
"description": "File browser widget for Jupyter", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
93292
2661