use full base_url in html and js

This commit is contained in:
Matthias BUSSONNIER 2012-07-01 21:58:30 +02:00
parent 51d715d00a
commit 3c743846a7
3 changed files with 6 additions and 5 deletions

View File

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

View File

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

View File

@ -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 %}