##// END OF EJS Templates
use IPython._target in window.open
Min RK -
Show More
@@ -49,7 +49,7 b' define(['
49
49
50 // File
50 // File
51 this.element.find('#new-file').click(function () {
51 this.element.find('#new-file').click(function () {
52 var w = window.open();
52 var w = window.open(undefined, IPython._target);
53 // Create a new file in the current directory
53 // Create a new file in the current directory
54 var parent = utils.url_path_split(editor.file_path)[0];
54 var parent = utils.url_path_split(editor.file_path)[0];
55 editor.contents.new_untitled(parent, {type: "file"}).then(
55 editor.contents.new_untitled(parent, {type: "file"}).then(
@@ -272,7 +272,7 b' define(['
272
272
273 KernelSelector.prototype.new_notebook = function (kernel_name) {
273 KernelSelector.prototype.new_notebook = function (kernel_name) {
274
274
275 var w = window.open();
275 var w = window.open(undefined, IPython._target);
276 // Create a new notebook in the same path as the current
276 // Create a new notebook in the same path as the current
277 // notebook's path.
277 // notebook's path.
278 var that = this;
278 var that = this;
@@ -76,7 +76,7 b' define(['
76 notebook_path
76 notebook_path
77 ) + "?download=" + download.toString();
77 ) + "?download=" + download.toString();
78
78
79 var w = window.open();
79 var w = window.open(undefined, IPython._target);
80 if (this.notebook.dirty) {
80 if (this.notebook.dirty) {
81 this.notebook.save_notebook().then(function() {
81 this.notebook.save_notebook().then(function() {
82 w.location = url;
82 w.location = url;
@@ -101,7 +101,7 b' define(['
101
101
102 this.element.find('#open_notebook').click(function () {
102 this.element.find('#open_notebook').click(function () {
103 var parent = utils.url_path_split(that.notebook.notebook_path)[0];
103 var parent = utils.url_path_split(that.notebook.notebook_path)[0];
104 window.open(utils.url_join_encode(that.base_url, 'tree', parent));
104 window.open(utils.url_join_encode(that.base_url, 'tree', parent), IPython._target);
105 });
105 });
106 this.element.find('#copy_notebook').click(function () {
106 this.element.find('#copy_notebook').click(function () {
107 that.notebook.copy_notebook();
107 that.notebook.copy_notebook();
@@ -2033,7 +2033,7 b' define(function (require) {'
2033 Notebook.prototype.copy_notebook = function () {
2033 Notebook.prototype.copy_notebook = function () {
2034 var that = this;
2034 var that = this;
2035 var base_url = this.base_url;
2035 var base_url = this.base_url;
2036 var w = window.open();
2036 var w = window.open(undefined, IPython._target);
2037 var parent = utils.url_path_split(this.notebook_path)[0];
2037 var parent = utils.url_path_split(this.notebook_path)[0];
2038 this.contents.copy(this.notebook_path, parent).then(
2038 this.contents.copy(this.notebook_path, parent).then(
2039 function (data) {
2039 function (data) {
@@ -75,7 +75,7 b' define(['
75 /** create and open a new notebook */
75 /** create and open a new notebook */
76 var that = this;
76 var that = this;
77 kernel_name = kernel_name || this.default_kernel;
77 kernel_name = kernel_name || this.default_kernel;
78 var w = window.open();
78 var w = window.open(undefined, IPython._target);
79 this.contents.new_untitled(that.notebook_path, {type: "notebook"}).then(
79 this.contents.new_untitled(that.notebook_path, {type: "notebook"}).then(
80 function (data) {
80 function (data) {
81 var url = utils.url_join_encode(
81 var url = utils.url_join_encode(
@@ -72,7 +72,7 b' define(['
72 if (!NotebookList._bound_singletons) {
72 if (!NotebookList._bound_singletons) {
73 NotebookList._bound_singletons = true;
73 NotebookList._bound_singletons = true;
74 $('#new-file').click(function(e) {
74 $('#new-file').click(function(e) {
75 var w = window.open();
75 var w = window.open(undefined, IPython._target);
76 that.contents.new_untitled(that.notebook_path || '', {type: 'file', ext: '.txt'}).then(function(data) {
76 that.contents.new_untitled(that.notebook_path || '', {type: 'file', ext: '.txt'}).then(function(data) {
77 var url = utils.url_join_encode(
77 var url = utils.url_join_encode(
78 that.base_url, 'edit', data.path
78 that.base_url, 'edit', data.path
@@ -42,7 +42,7 b' define(['
42 };
42 };
43
43
44 TerminalList.prototype.new_terminal = function () {
44 TerminalList.prototype.new_terminal = function () {
45 var w = window.open();
45 var w = window.open(undefined, IPython._target);
46 var base_url = this.base_url;
46 var base_url = this.base_url;
47 var settings = {
47 var settings = {
48 type : "POST",
48 type : "POST",
General Comments 0
You need to be logged in to leave comments. Login now