mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
s/get_data/get_body_data/
This commit is contained in:
parent
e7db8cfd4e
commit
a93040e810
@ -14,7 +14,7 @@ var IPython = (function (IPython) {
|
|||||||
|
|
||||||
var LoginWidget = function (selector, options) {
|
var LoginWidget = function (selector, options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
this.base_url = options.base_url || IPython.utils.get_data("baseUrl");
|
this.base_url = options.base_url || IPython.utils.get_body_data("baseUrl");
|
||||||
this.selector = selector;
|
this.selector = selector;
|
||||||
if (this.selector !== undefined) {
|
if (this.selector !== undefined) {
|
||||||
this.element = $(selector);
|
this.element = $(selector);
|
||||||
|
@ -446,7 +446,7 @@ IPython.utils = (function (IPython) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
var get_data = function(key) {
|
var get_body_data = function(key) {
|
||||||
// get a url-encoded item from body.data and decode it
|
// get a url-encoded item from body.data and decode it
|
||||||
// we should never have any encoded URLs anywhere else in code
|
// we should never have any encoded URLs anywhere else in code
|
||||||
// until we are building an actual request
|
// until we are building an actual request
|
||||||
@ -516,7 +516,7 @@ IPython.utils = (function (IPython) {
|
|||||||
fixCarriageReturn : fixCarriageReturn,
|
fixCarriageReturn : fixCarriageReturn,
|
||||||
autoLinkUrls : autoLinkUrls,
|
autoLinkUrls : autoLinkUrls,
|
||||||
points_to_pixels : points_to_pixels,
|
points_to_pixels : points_to_pixels,
|
||||||
get_data : get_data,
|
get_body_data : get_body_data,
|
||||||
url_path_join : url_path_join,
|
url_path_join : url_path_join,
|
||||||
url_join_encode : url_join_encode,
|
url_join_encode : url_join_encode,
|
||||||
encode_uri_components : encode_uri_components,
|
encode_uri_components : encode_uri_components,
|
||||||
|
@ -47,10 +47,10 @@ function (marked) {
|
|||||||
$('div#notebook_panel').addClass('border-box-sizing');
|
$('div#notebook_panel').addClass('border-box-sizing');
|
||||||
|
|
||||||
var opts = {
|
var opts = {
|
||||||
base_url : IPython.utils.get_data("baseUrl"),
|
base_url : IPython.utils.get_body_data("baseUrl"),
|
||||||
base_kernel_url : IPython.utils.get_data("baseKernelUrl"),
|
base_kernel_url : IPython.utils.get_body_data("baseKernelUrl"),
|
||||||
notebook_path : IPython.utils.get_data("notebookPath"),
|
notebook_path : IPython.utils.get_body_data("notebookPath"),
|
||||||
notebook_name : IPython.utils.get_data('notebookName')
|
notebook_name : IPython.utils.get_body_data('notebookName')
|
||||||
};
|
};
|
||||||
|
|
||||||
IPython.page = new IPython.Page();
|
IPython.page = new IPython.Page();
|
||||||
|
@ -37,7 +37,7 @@ var IPython = (function (IPython) {
|
|||||||
*/
|
*/
|
||||||
var MenuBar = function (selector, options) {
|
var MenuBar = function (selector, options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
this.base_url = options.base_url || IPython.utils.get_data("baseUrl");
|
this.base_url = options.base_url || IPython.utils.get_body_data("baseUrl");
|
||||||
this.selector = selector;
|
this.selector = selector;
|
||||||
if (this.selector !== undefined) {
|
if (this.selector !== undefined) {
|
||||||
this.element = $(selector);
|
this.element = $(selector);
|
||||||
|
@ -21,7 +21,7 @@ var IPython = (function (IPython) {
|
|||||||
this.name = notebook.notebook_name;
|
this.name = notebook.notebook_name;
|
||||||
this.path = notebook.notebook_path;
|
this.path = notebook.notebook_path;
|
||||||
this.base_url = notebook.base_url;
|
this.base_url = notebook.base_url;
|
||||||
this.base_kernel_url = options.base_kernel_url || utils.get_data("baseKernelUrl");
|
this.base_kernel_url = options.base_kernel_url || utils.get_body_data("baseKernelUrl");
|
||||||
};
|
};
|
||||||
|
|
||||||
Session.prototype.start = function(callback) {
|
Session.prototype.start = function(callback) {
|
||||||
|
@ -23,8 +23,8 @@ var IPython = (function (IPython) {
|
|||||||
}
|
}
|
||||||
options = options || {};
|
options = options || {};
|
||||||
this.options = options;
|
this.options = options;
|
||||||
this.base_url = options.base_url || utils.get_data("baseUrl");
|
this.base_url = options.base_url || utils.get_body_data("baseUrl");
|
||||||
this.notebook_path = options.notebook_path || utils.get_data("notebookPath");
|
this.notebook_path = options.notebook_path || utils.get_body_data("notebookPath");
|
||||||
};
|
};
|
||||||
|
|
||||||
ClusterList.prototype.style = function () {
|
ClusterList.prototype.style = function () {
|
||||||
@ -75,8 +75,8 @@ var IPython = (function (IPython) {
|
|||||||
|
|
||||||
var ClusterItem = function (element, options) {
|
var ClusterItem = function (element, options) {
|
||||||
this.element = $(element);
|
this.element = $(element);
|
||||||
this.base_url = options.base_url || utils.get_data("baseUrl");
|
this.base_url = options.base_url || utils.get_body_data("baseUrl");
|
||||||
this.notebook_path = options.notebook_path || utils.get_data("notebookPath");
|
this.notebook_path = options.notebook_path || utils.get_body_data("notebookPath");
|
||||||
this.data = null;
|
this.data = null;
|
||||||
this.style();
|
this.style();
|
||||||
};
|
};
|
||||||
|
@ -19,8 +19,8 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var opts = {
|
var opts = {
|
||||||
base_url : IPython.utils.get_data("baseUrl"),
|
base_url : IPython.utils.get_body_data("baseUrl"),
|
||||||
notebook_path : IPython.utils.get_data("notebookPath"),
|
notebook_path : IPython.utils.get_body_data("notebookPath"),
|
||||||
};
|
};
|
||||||
IPython.notebook_list = new IPython.NotebookList('#notebook_list', opts);
|
IPython.notebook_list = new IPython.NotebookList('#notebook_list', opts);
|
||||||
IPython.cluster_list = new IPython.ClusterList('#cluster_list', opts);
|
IPython.cluster_list = new IPython.ClusterList('#cluster_list', opts);
|
||||||
|
@ -23,8 +23,8 @@ var IPython = (function (IPython) {
|
|||||||
}
|
}
|
||||||
this.notebooks_list = [];
|
this.notebooks_list = [];
|
||||||
this.sessions = {};
|
this.sessions = {};
|
||||||
this.base_url = options.base_url || utils.get_data("baseUrl");
|
this.base_url = options.base_url || utils.get_body_data("baseUrl");
|
||||||
this.notebook_path = options.notebook_path || utils.get_data("notebookPath");
|
this.notebook_path = options.notebook_path || utils.get_body_data("notebookPath");
|
||||||
};
|
};
|
||||||
|
|
||||||
NotebookList.prototype.style = function () {
|
NotebookList.prototype.style = function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user