s/get_data/get_body_data/

This commit is contained in:
MinRK 2014-02-07 11:26:28 -08:00
parent e7db8cfd4e
commit a93040e810
8 changed files with 17 additions and 17 deletions

View File

@ -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);

View File

@ -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,

View File

@ -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();

View File

@ -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);

View File

@ -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) {

View File

@ -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();
};

View File

@ -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);

View File

@ -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 () {