mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-06 11:35:24 +08:00
use full base_url in html and js
This commit is contained in:
parent
51d715d00a
commit
3c743846a7
@ -10,6 +10,7 @@
|
||||
//============================================================================
|
||||
|
||||
var IPython = (function (IPython) {
|
||||
var base_url = $('body').data('baseProjectUrl');
|
||||
|
||||
var LoginWidget = function (selector) {
|
||||
this.selector = selector;
|
||||
@ -29,10 +30,10 @@ var IPython = (function (IPython) {
|
||||
LoginWidget.prototype.bind_events = function () {
|
||||
var that = this;
|
||||
this.element.find("button#logout").click(function () {
|
||||
window.location = "logout";
|
||||
window.location = base_url+"logout";
|
||||
});
|
||||
this.element.find("button#login").click(function () {
|
||||
window.location = "login";
|
||||
window.location = base_url+"login";
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
<div id="main_app">
|
||||
|
||||
{% if login_available %}
|
||||
<form action="login?next={{url_escape(next)}}" method="post">
|
||||
<form action="{{base_project_url}}login?next={{url_escape(next)}}" method="post">
|
||||
Password: <input type="password" class='ui-widget ui-widget-content' name="password" id="password_input">
|
||||
<input type="submit" value="Log in" id="login_submit">
|
||||
</form>
|
||||
|
@ -23,9 +23,9 @@
|
||||
{% end %}
|
||||
|
||||
{% if read_only or not login_available %}
|
||||
Proceed to the <a href="">dashboard</a>.
|
||||
Proceed to the <a href="{{base_project_url}}">dashboard</a>.
|
||||
{% else %}
|
||||
Proceed to the <a href="login">login page</a>.
|
||||
Proceed to the <a href="{{base_project_url}}login">login page</a>.
|
||||
{% end %}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user