##// END OF EJS Templates
Updating JS URL scheme to use embedded data....
Brian E. Granger -
Show More
@@ -15,12 +15,10 b' var IPython = (function (IPython) {'
15
15
16 var Kernel = function () {
16 var Kernel = function () {
17 this.kernel_id = null;
17 this.kernel_id = null;
18 this.base_url = "/kernels";
19 this.kernel_url = null;
20 this.shell_channel = null;
18 this.shell_channel = null;
21 this.iopub_channel = null;
19 this.iopub_channel = null;
20 this.base_url = $('body').data('baseKernelUrl') + "kernels";
22 this.running = false;
21 this.running = false;
23
24 this.username = "username";
22 this.username = "username";
25 this.session_id = utils.uuid();
23 this.session_id = utils.uuid();
26
24
@@ -52,7 +50,8 b' var IPython = (function (IPython) {'
52 var that = this;
50 var that = this;
53 if (!this.running) {
51 if (!this.running) {
54 var qs = $.param({notebook:notebook_id});
52 var qs = $.param({notebook:notebook_id});
55 $.post(this.base_url + '?' + qs,
53 var url = this.base_url + '?' + qs
54 $.post(url,
56 function (kernel_id) {
55 function (kernel_id) {
57 that._handle_start_kernel(kernel_id, callback);
56 that._handle_start_kernel(kernel_id, callback);
58 },
57 },
@@ -929,7 +929,8 b' var IPython = (function (IPython) {'
929 error : $.proxy(this.notebook_save_failed,this)
929 error : $.proxy(this.notebook_save_failed,this)
930 };
930 };
931 IPython.save_widget.status_saving();
931 IPython.save_widget.status_saving();
932 $.ajax("/notebooks/" + notebook_id, settings);
932 var url = $('body').data('baseProjectUrl') + 'notebooks/' + notebook_id
933 $.ajax(url, settings);
933 };
934 };
934 };
935 };
935
936
@@ -966,7 +967,8 b' var IPython = (function (IPython) {'
966 }
967 }
967 };
968 };
968 IPython.save_widget.status_loading();
969 IPython.save_widget.status_loading();
969 $.ajax("/notebooks/" + notebook_id, settings);
970 var url = $('body').data('baseProjectUrl') + 'notebooks/' + notebook_id
971 $.ajax(url, settings);
970 }
972 }
971
973
972
974
@@ -67,7 +67,8 b' var IPython = (function (IPython) {'
67 dataType : "json",
67 dataType : "json",
68 success : $.proxy(this.list_loaded, this)
68 success : $.proxy(this.list_loaded, this)
69 };
69 };
70 $.ajax("/notebooks", settings);
70 var url = $('body').data('baseProjectUrl') + 'notebooks'
71 $.ajax(url, settings);
71 };
72 };
72
73
73
74
@@ -170,7 +171,8 b' var IPython = (function (IPython) {'
170 parent_item.remove();
171 parent_item.remove();
171 }
172 }
172 };
173 };
173 $.ajax("/notebooks/" + notebook_id, settings);
174 var url = $('body').data('baseProjectUrl') + 'notebooks/' + notebook_id
175 $.ajax(url, settings);
174 $(this).dialog('close');
176 $(this).dialog('close');
175 },
177 },
176 "Cancel": function () {
178 "Cancel": function () {
@@ -217,7 +219,8 b' var IPython = (function (IPython) {'
217 };
219 };
218
220
219 var qs = $.param({name:nbname, format:nbformat});
221 var qs = $.param({name:nbname, format:nbformat});
220 $.ajax('/notebooks?' + qs, settings);
222 var url = $('body').data('baseProjectUrl') + 'notebooks?' + qs
223 $.ajax(url, settings);
221 });
224 });
222 var cancel_button = $('<button>Cancel</button>').button().
225 var cancel_button = $('<button>Cancel</button>').button().
223 click(function (e) {
226 click(function (e) {
General Comments 0
You need to be logged in to leave comments. Login now