mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +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) {
|
||||
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;
|
||||
if (this.selector !== undefined) {
|
||||
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
|
||||
// we should never have any encoded URLs anywhere else in code
|
||||
// until we are building an actual request
|
||||
@ -516,7 +516,7 @@ IPython.utils = (function (IPython) {
|
||||
fixCarriageReturn : fixCarriageReturn,
|
||||
autoLinkUrls : autoLinkUrls,
|
||||
points_to_pixels : points_to_pixels,
|
||||
get_data : get_data,
|
||||
get_body_data : get_body_data,
|
||||
url_path_join : url_path_join,
|
||||
url_join_encode : url_join_encode,
|
||||
encode_uri_components : encode_uri_components,
|
||||
|
@ -47,10 +47,10 @@ function (marked) {
|
||||
$('div#notebook_panel').addClass('border-box-sizing');
|
||||
|
||||
var opts = {
|
||||
base_url : IPython.utils.get_data("baseUrl"),
|
||||
base_kernel_url : IPython.utils.get_data("baseKernelUrl"),
|
||||
notebook_path : IPython.utils.get_data("notebookPath"),
|
||||
notebook_name : IPython.utils.get_data('notebookName')
|
||||
base_url : IPython.utils.get_body_data("baseUrl"),
|
||||
base_kernel_url : IPython.utils.get_body_data("baseKernelUrl"),
|
||||
notebook_path : IPython.utils.get_body_data("notebookPath"),
|
||||
notebook_name : IPython.utils.get_body_data('notebookName')
|
||||
};
|
||||
|
||||
IPython.page = new IPython.Page();
|
||||
|
@ -37,7 +37,7 @@ var IPython = (function (IPython) {
|
||||
*/
|
||||
var MenuBar = function (selector, 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;
|
||||
if (this.selector !== undefined) {
|
||||
this.element = $(selector);
|
||||
|
@ -21,7 +21,7 @@ var IPython = (function (IPython) {
|
||||
this.name = notebook.notebook_name;
|
||||
this.path = notebook.notebook_path;
|
||||
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) {
|
||||
|
@ -23,8 +23,8 @@ var IPython = (function (IPython) {
|
||||
}
|
||||
options = options || {};
|
||||
this.options = options;
|
||||
this.base_url = options.base_url || utils.get_data("baseUrl");
|
||||
this.notebook_path = options.notebook_path || utils.get_data("notebookPath");
|
||||
this.base_url = options.base_url || utils.get_body_data("baseUrl");
|
||||
this.notebook_path = options.notebook_path || utils.get_body_data("notebookPath");
|
||||
};
|
||||
|
||||
ClusterList.prototype.style = function () {
|
||||
@ -75,8 +75,8 @@ var IPython = (function (IPython) {
|
||||
|
||||
var ClusterItem = function (element, options) {
|
||||
this.element = $(element);
|
||||
this.base_url = options.base_url || utils.get_data("baseUrl");
|
||||
this.notebook_path = options.notebook_path || utils.get_data("notebookPath");
|
||||
this.base_url = options.base_url || utils.get_body_data("baseUrl");
|
||||
this.notebook_path = options.notebook_path || utils.get_body_data("notebookPath");
|
||||
this.data = null;
|
||||
this.style();
|
||||
};
|
||||
|
@ -19,8 +19,8 @@ $(document).ready(function () {
|
||||
});
|
||||
|
||||
var opts = {
|
||||
base_url : IPython.utils.get_data("baseUrl"),
|
||||
notebook_path : IPython.utils.get_data("notebookPath"),
|
||||
base_url : IPython.utils.get_body_data("baseUrl"),
|
||||
notebook_path : IPython.utils.get_body_data("notebookPath"),
|
||||
};
|
||||
IPython.notebook_list = new IPython.NotebookList('#notebook_list', opts);
|
||||
IPython.cluster_list = new IPython.ClusterList('#cluster_list', opts);
|
||||
|
@ -23,8 +23,8 @@ var IPython = (function (IPython) {
|
||||
}
|
||||
this.notebooks_list = [];
|
||||
this.sessions = {};
|
||||
this.base_url = options.base_url || utils.get_data("baseUrl");
|
||||
this.notebook_path = options.notebook_path || utils.get_data("notebookPath");
|
||||
this.base_url = options.base_url || utils.get_body_data("baseUrl");
|
||||
this.notebook_path = options.notebook_path || utils.get_body_data("notebookPath");
|
||||
};
|
||||
|
||||
NotebookList.prototype.style = function () {
|
||||
|
Loading…
Reference in New Issue
Block a user