Show More
@@ -5,5 +5,6 b' var IPython = IPython || {};' | |||||
5 | define([], function(){ |
|
5 | define([], function(){ | |
6 | "use strict"; |
|
6 | "use strict"; | |
7 | IPython.version = "3.0.0-dev"; |
|
7 | IPython.version = "3.0.0-dev"; | |
|
8 | IPython._target = '_blank'; | |||
8 | return IPython; |
|
9 | return IPython; | |
9 | }); |
|
10 | }); |
@@ -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( |
@@ -273,7 +273,7 b' define([' | |||||
273 |
|
273 | |||
274 | KernelSelector.prototype.new_notebook = function (kernel_name) { |
|
274 | KernelSelector.prototype.new_notebook = function (kernel_name) { | |
275 |
|
275 | |||
276 | var w = window.open(); |
|
276 | var w = window.open(undefined, IPython._target); | |
277 | // Create a new notebook in the same path as the current |
|
277 | // Create a new notebook in the same path as the current | |
278 | // notebook's path. |
|
278 | // notebook's path. | |
279 | var that = this; |
|
279 | 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( |
@@ -73,7 +73,7 b' define([' | |||||
73 | if (!NotebookList._bound_singletons) { |
|
73 | if (!NotebookList._bound_singletons) { | |
74 | NotebookList._bound_singletons = true; |
|
74 | NotebookList._bound_singletons = true; | |
75 | $('#new-file').click(function(e) { |
|
75 | $('#new-file').click(function(e) { | |
76 | var w = window.open(); |
|
76 | var w = window.open(undefined, IPython._target); | |
77 | that.contents.new_untitled(that.notebook_path || '', {type: 'file', ext: '.txt'}).then(function(data) { |
|
77 | that.contents.new_untitled(that.notebook_path || '', {type: 'file', ext: '.txt'}).then(function(data) { | |
78 | var url = utils.url_join_encode( |
|
78 | var url = utils.url_join_encode( | |
79 | that.base_url, 'edit', data.path |
|
79 | that.base_url, 'edit', data.path | |
@@ -568,7 +568,7 b' define([' | |||||
568 | // directory nav doesn't open new tabs |
|
568 | // directory nav doesn't open new tabs | |
569 | // files, notebooks do |
|
569 | // files, notebooks do | |
570 | if (model.type !== "directory") { |
|
570 | if (model.type !== "directory") { | |
571 |
link.attr('target', |
|
571 | link.attr('target',IPython._target); | |
572 | } |
|
572 | } | |
573 | }; |
|
573 | }; | |
574 |
|
574 |
@@ -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", | |
@@ -93,7 +93,7 b' define([' | |||||
93 | item.find(".item_icon").addClass("fa fa-terminal"); |
|
93 | item.find(".item_icon").addClass("fa fa-terminal"); | |
94 | var link = item.find("a.item_link") |
|
94 | var link = item.find("a.item_link") | |
95 | .attr('href', utils.url_join_encode(this.base_url, "terminals", name)); |
|
95 | .attr('href', utils.url_join_encode(this.base_url, "terminals", name)); | |
96 | link.attr('target', '_blank'); |
|
96 | link.attr('target', IPython._target||'_blank'); | |
97 | this.add_shutdown_button(name, item); |
|
97 | this.add_shutdown_button(name, item); | |
98 | }; |
|
98 | }; | |
99 |
|
99 |
General Comments 0
You need to be logged in to leave comments.
Login now