diff --git a/IPython/frontend/html/notebook/handlers.py b/IPython/frontend/html/notebook/handlers.py index bf5a2ec..5449599 100644 --- a/IPython/frontend/html/notebook/handlers.py +++ b/IPython/frontend/html/notebook/handlers.py @@ -70,13 +70,13 @@ class NBBrowserHandler(AuthenticatedHandler): class LoginHandler(AuthenticatedHandler): def get(self): - self.render('login.html') + self.render('login.html', next='/') def post(self): - pwd = self.get_argument("password", default=u'') + pwd = self.get_argument('password', default=u'') if self.application.password and pwd == self.application.password: - self.set_secure_cookie("user", str(uuid.uuid4())) - url = self.get_argument("next", default="/") + self.set_secure_cookie('user', str(uuid.uuid4())) + url = self.get_argument('next', default='/') self.redirect(url) diff --git a/IPython/frontend/html/notebook/static/js/login_main.js b/IPython/frontend/html/notebook/static/js/login_main.js new file mode 100644 index 0000000..420f935 --- /dev/null +++ b/IPython/frontend/html/notebook/static/js/login_main.js @@ -0,0 +1,29 @@ +//---------------------------------------------------------------------------- +// Copyright (C) 2008-2011 The IPython Development Team +// +// Distributed under the terms of the BSD License. The full license is in +// the file COPYING, distributed as part of this software. +//---------------------------------------------------------------------------- + +//============================================================================ +// On document ready +//============================================================================ + + +$(document).ready(function () { + + $('div#header').addClass('border-box-sizing'); + $('div#header_border').addClass('border-box-sizing ui-widget ui-widget-content'); + + $('div#main_app').addClass('border-box-sizing ui-widget'); + $('div#app_hbox').addClass('hbox'); + + $('div#left_panel').addClass('box-flex'); + $('div#right_panel').addClass('box-flex'); + + // These have display: none in the css file and are made visible here to prevent FLOUC. + $('div#header').css('display','block'); + $('div#main_app').css('display','block'); + +}); + diff --git a/IPython/frontend/html/notebook/templates/login.html b/IPython/frontend/html/notebook/templates/login.html index 817b833..d00e512 100644 --- a/IPython/frontend/html/notebook/templates/login.html +++ b/IPython/frontend/html/notebook/templates/login.html @@ -10,18 +10,10 @@ - + - +
-
+ Password:
@@ -52,8 +44,7 @@ - - +