use IPython._target in window.open

pull/37/head
Min RK 11 years ago
parent 3cb0732dbf
commit cdb5deef9a

@ -49,7 +49,7 @@ define([
// File
this.element.find('#new-file').click(function () {
var w = window.open();
var w = window.open(undefined, IPython._target);
// Create a new file in the current directory
var parent = utils.url_path_split(editor.file_path)[0];
editor.contents.new_untitled(parent, {type: "file"}).then(

@ -272,7 +272,7 @@ define([
KernelSelector.prototype.new_notebook = function (kernel_name) {
var w = window.open();
var w = window.open(undefined, IPython._target);
// Create a new notebook in the same path as the current
// notebook's path.
var that = this;

@ -76,7 +76,7 @@ define([
notebook_path
) + "?download=" + download.toString();
var w = window.open();
var w = window.open(undefined, IPython._target);
if (this.notebook.dirty) {
this.notebook.save_notebook().then(function() {
w.location = url;
@ -101,7 +101,7 @@ define([
this.element.find('#open_notebook').click(function () {
var parent = utils.url_path_split(that.notebook.notebook_path)[0];
window.open(utils.url_join_encode(that.base_url, 'tree', parent));
window.open(utils.url_join_encode(that.base_url, 'tree', parent), IPython._target);
});
this.element.find('#copy_notebook').click(function () {
that.notebook.copy_notebook();

@ -2033,7 +2033,7 @@ define(function (require) {
Notebook.prototype.copy_notebook = function () {
var that = this;
var base_url = this.base_url;
var w = window.open();
var w = window.open(undefined, IPython._target);
var parent = utils.url_path_split(this.notebook_path)[0];
this.contents.copy(this.notebook_path, parent).then(
function (data) {

@ -75,7 +75,7 @@ define([
/** create and open a new notebook */
var that = this;
kernel_name = kernel_name || this.default_kernel;
var w = window.open();
var w = window.open(undefined, IPython._target);
this.contents.new_untitled(that.notebook_path, {type: "notebook"}).then(
function (data) {
var url = utils.url_join_encode(

@ -72,7 +72,7 @@ define([
if (!NotebookList._bound_singletons) {
NotebookList._bound_singletons = true;
$('#new-file').click(function(e) {
var w = window.open();
var w = window.open(undefined, IPython._target);
that.contents.new_untitled(that.notebook_path || '', {type: 'file', ext: '.txt'}).then(function(data) {
var url = utils.url_join_encode(
that.base_url, 'edit', data.path

@ -42,7 +42,7 @@ define([
};
TerminalList.prototype.new_terminal = function () {
var w = window.open();
var w = window.open(undefined, IPython._target);
var base_url = this.base_url;
var settings = {
type : "POST",

Loading…
Cancel
Save