Show More
@@ -0,0 +1,20 b'' | |||
|
1 | //---------------------------------------------------------------------------- | |
|
2 | // Copyright (C) 2008-2011 The IPython Development Team | |
|
3 | // | |
|
4 | // Distributed under the terms of the BSD License. The full license is in | |
|
5 | // the file COPYING, distributed as part of this software. | |
|
6 | //---------------------------------------------------------------------------- | |
|
7 | ||
|
8 | //============================================================================ | |
|
9 | // On document ready | |
|
10 | //============================================================================ | |
|
11 | ||
|
12 | ||
|
13 | $(document).ready(function () { | |
|
14 | ||
|
15 | IPython.page = new IPython.Page(); | |
|
16 | $('div#main_app').addClass('border-box-sizing ui-widget'); | |
|
17 | IPython.page.show(); | |
|
18 | ||
|
19 | }); | |
|
20 |
@@ -0,0 +1,44 b'' | |||
|
1 | //---------------------------------------------------------------------------- | |
|
2 | // Copyright (C) 2008-2011 The IPython Development Team | |
|
3 | // | |
|
4 | // Distributed under the terms of the BSD License. The full license is in | |
|
5 | // the file COPYING, distributed as part of this software. | |
|
6 | //---------------------------------------------------------------------------- | |
|
7 | ||
|
8 | //============================================================================ | |
|
9 | // Global header/site setup. | |
|
10 | //============================================================================ | |
|
11 | ||
|
12 | var IPython = (function (IPython) { | |
|
13 | ||
|
14 | var Page = function () { | |
|
15 | this.style(); | |
|
16 | this.bind_events(); | |
|
17 | }; | |
|
18 | ||
|
19 | Page.prototype.style = function () { | |
|
20 | $('div#header').addClass('border-box-sizing'). | |
|
21 | addClass('ui-widget ui-widget-content'). | |
|
22 | css('border-top-style','none'). | |
|
23 | css('border-left-style','none'). | |
|
24 | css('border-right-style','none'); | |
|
25 | $('div#site').addClass('border-box-sizing') | |
|
26 | }; | |
|
27 | ||
|
28 | ||
|
29 | Page.prototype.bind_events = function () { | |
|
30 | }; | |
|
31 | ||
|
32 | ||
|
33 | Page.prototype.show = function () { | |
|
34 | // The header and site divs start out hidden to prevent FLOUC. | |
|
35 | // Main scripts should call this method after styling everything. | |
|
36 | $('div#header').css('display','block'); | |
|
37 | $('div#site').css('display','block'); | |
|
38 | }; | |
|
39 | ||
|
40 | IPython.Page = Page; | |
|
41 | ||
|
42 | return IPython; | |
|
43 | ||
|
44 | }(IPython)); |
@@ -0,0 +1,19 b'' | |||
|
1 | //---------------------------------------------------------------------------- | |
|
2 | // Copyright (C) 2008-2011 The IPython Development Team | |
|
3 | // | |
|
4 | // Distributed under the terms of the BSD License. The full license is in | |
|
5 | // the file COPYING, distributed as part of this software. | |
|
6 | //---------------------------------------------------------------------------- | |
|
7 | ||
|
8 | //============================================================================ | |
|
9 | // On document ready | |
|
10 | //============================================================================ | |
|
11 | ||
|
12 | ||
|
13 | $(document).ready(function () { | |
|
14 | ||
|
15 | IPython.page = new IPython.Page(); | |
|
16 | IPython.page.show(); | |
|
17 | ||
|
18 | }); | |
|
19 |
@@ -211,6 +211,7 b' class LoginHandler(AuthenticatedHandler):' | |||
|
211 | 211 | read_only=self.read_only, |
|
212 | 212 | logged_in=self.logged_in, |
|
213 | 213 | login_available=self.login_available, |
|
214 | base_project_url=self.application.ipython_app.base_project_url, | |
|
214 | 215 | message=message |
|
215 | 216 | ) |
|
216 | 217 | |
@@ -246,6 +247,7 b' class LogoutHandler(AuthenticatedHandler):' | |||
|
246 | 247 | read_only=self.read_only, |
|
247 | 248 | logged_in=self.logged_in, |
|
248 | 249 | login_available=self.login_available, |
|
250 | base_project_url=self.application.ipython_app.base_project_url, | |
|
249 | 251 | message=message) |
|
250 | 252 | |
|
251 | 253 |
@@ -1,10 +1,4 b'' | |||
|
1 | 1 | |
|
2 | .border-box-sizing { | |
|
3 | box-sizing: border-box; | |
|
4 | -moz-box-sizing: border-box; | |
|
5 | -webkit-box-sizing: border-box; | |
|
6 | } | |
|
7 | ||
|
8 | 2 | /* Flexible box model classes */ |
|
9 | 3 | /* Taken from Alex Russell http://infrequently.org/2009/08/css-3-progress/ */ |
|
10 | 4 | |
@@ -101,30 +95,3 b'' | |||
|
101 | 95 | -moz-box-pack: center; |
|
102 | 96 | box-pack: center; |
|
103 | 97 | } |
|
104 | ||
|
105 | .message { | |
|
106 | border-width: 1px; | |
|
107 | border-style: solid; | |
|
108 | text-align: center; | |
|
109 | padding: 0.5em; | |
|
110 | margin: 0.5em 0; | |
|
111 | } | |
|
112 | ||
|
113 | .message.error { | |
|
114 | background-color: #FFD3D1; | |
|
115 | border-color: red; | |
|
116 | } | |
|
117 | ||
|
118 | .message.warning { | |
|
119 | background-color: #FFD09E; | |
|
120 | border-color: orange; | |
|
121 | } | |
|
122 | ||
|
123 | .message.info { | |
|
124 | background-color: #CBFFBA; | |
|
125 | border-color: green; | |
|
126 | } | |
|
127 | ||
|
128 | #content_panel { | |
|
129 | margin: 0.5em; | |
|
130 | } No newline at end of file |
@@ -78,6 +78,14 b' span#notebook_name {' | |||
|
78 | 78 | font-size: 85%; |
|
79 | 79 | } |
|
80 | 80 | |
|
81 | ||
|
82 | div#main_app { | |
|
83 | /* Initially hidden to prevent FLOUC */ | |
|
84 | display: none; | |
|
85 | width: 100%; | |
|
86 | position: relative; | |
|
87 | } | |
|
88 | ||
|
81 | 89 | span#quick_help_area { |
|
82 | 90 | position: static; |
|
83 | 91 | padding: 5px 0px; |
@@ -14,7 +14,7 b' body {' | |||
|
14 | 14 | right: 0px; |
|
15 | 15 | top: 0px; |
|
16 | 16 | bottom: 0px; |
|
17 |
overflow: |
|
|
17 | overflow: visible; | |
|
18 | 18 | } |
|
19 | 19 | |
|
20 | 20 | |
@@ -41,11 +41,9 b' span#ipython_notebook h1 img {' | |||
|
41 | 41 | color: black; |
|
42 | 42 | } |
|
43 | 43 | |
|
44 | div#main_app { | |
|
45 | /* Initially hidden to prevent FLOUC */ | |
|
44 | #site { | |
|
45 | width: 100% | |
|
46 | 46 | display: none; |
|
47 | width: 100%; | |
|
48 | position: relative; | |
|
49 | 47 | } |
|
50 | 48 | |
|
51 | 49 | /* We set the fonts by hand here to override the values in the theme */ |
@@ -63,11 +61,17 b' div#main_app {' | |||
|
63 | 61 | font-size: 77%; |
|
64 | 62 | } |
|
65 | 63 | |
|
64 | input.ui-button { | |
|
65 | padding: 0.3em 0.9em; | |
|
66 | } | |
|
67 | ||
|
66 | 68 | span#login_widget { |
|
67 | 69 | float: right; |
|
68 | 70 | } |
|
69 | 71 | |
|
70 | /* generic class for hidden objects */ | |
|
71 | .hidden { | |
|
72 | display: none; | |
|
72 | .border-box-sizing { | |
|
73 | box-sizing: border-box; | |
|
74 | -moz-box-sizing: border-box; | |
|
75 | -webkit-box-sizing: border-box; | |
|
73 | 76 | } |
|
77 |
@@ -5,46 +5,17 b'' | |||
|
5 | 5 | * Author: IPython Development Team |
|
6 | 6 | */ |
|
7 | 7 | |
|
8 | ||
|
9 | body { | |
|
10 | background-color: white; | |
|
11 | /* This makes sure that the body covers the entire window and needs to | |
|
12 | be in a different element than the display: box in wrapper below */ | |
|
13 | position: absolute; | |
|
14 | left: 0px; | |
|
15 | right: 0px; | |
|
16 | top: 0px; | |
|
17 | bottom: 0px; | |
|
18 | overflow: auto; | |
|
19 | } | |
|
20 | ||
|
21 | #left_panel { | |
|
8 | #main_app { | |
|
9 | width: 920px; | |
|
10 | margin: auto; | |
|
22 | 11 | } |
|
23 | 12 | |
|
24 | #drop_zone { | |
|
25 | height: 200px; | |
|
26 | width: 200px | |
|
27 | } | |
|
28 | ||
|
29 | #content_panel { | |
|
30 | width: 600px; | |
|
31 | } | |
|
32 | ||
|
33 | #content_toolbar { | |
|
13 | #notebooks_toolbar { | |
|
34 | 14 | padding: 5px; |
|
35 | 15 | height: 25px; |
|
36 | 16 | line-height: 25px; |
|
37 | 17 | } |
|
38 | 18 | |
|
39 | #header_border { | |
|
40 | width: 100%; | |
|
41 | height: 2px; | |
|
42 | } | |
|
43 | ||
|
44 | #app_hbox { | |
|
45 | width: 100%; | |
|
46 | } | |
|
47 | ||
|
48 | 19 | #drag_info { |
|
49 | 20 | float: left; |
|
50 | 21 | } |
|
1 | NO CONTENT: file renamed from IPython/frontend/html/notebook/static/js/layout.js to IPython/frontend/html/notebook/static/js/layoutmanager.js |
@@ -12,19 +12,11 b'' | |||
|
12 | 12 | |
|
13 | 13 | $(document).ready(function () { |
|
14 | 14 | |
|
15 | $('div#header').addClass('border-box-sizing'); | |
|
16 | $('div#header_border').addClass('border-box-sizing ui-widget ui-widget-content'); | |
|
17 | ||
|
15 | IPython.page = new IPython.Page(); | |
|
16 | $('input#login_submit').button(); | |
|
18 | 17 | $('div#main_app').addClass('border-box-sizing ui-widget'); |
|
19 | $('div#app_hbox').addClass('hbox'); | |
|
20 | ||
|
21 | $('div#left_panel').addClass('box-flex'); | |
|
22 | $('div#right_panel').addClass('box-flex'); | |
|
23 | $('input#signin').button(); | |
|
24 | ||
|
25 | // These have display: none in the css file and are made visible here to prevent FLOUC. | |
|
26 | $('div#header').css('display','block'); | |
|
27 | $('div#main_app').css('display','block'); | |
|
18 | IPython.page.show(); | |
|
19 | $('input#password_input').focus(); | |
|
28 | 20 | |
|
29 | 21 | }); |
|
30 | 22 |
@@ -24,6 +24,8 b' var IPython = (function (IPython) {' | |||
|
24 | 24 | this.element.find('button#logout').button(); |
|
25 | 25 | this.element.find('button#login').button(); |
|
26 | 26 | }; |
|
27 | ||
|
28 | ||
|
27 | 29 | LoginWidget.prototype.bind_events = function () { |
|
28 | 30 | var that = this; |
|
29 | 31 | this.element.find("button#logout").click(function () { |
@@ -21,7 +21,6 b' var IPython = (function (IPython) {' | |||
|
21 | 21 | }; |
|
22 | 22 | |
|
23 | 23 | NotebookList.prototype.style = function () { |
|
24 | this.element.addClass('ui-widget ui-widget-content'); | |
|
25 | 24 | $('div#project_name').addClass('ui-widget ui-widget-header'); |
|
26 | 25 | }; |
|
27 | 26 |
@@ -99,7 +99,6 b' $(document).ready(function () {' | |||
|
99 | 99 | // hide various elements from read-only view |
|
100 | 100 | $('div#pager').remove(); |
|
101 | 101 | $('div#pager_splitter').remove(); |
|
102 | $('span#login_widget').removeClass('hidden'); | |
|
103 | 102 | |
|
104 | 103 | // set the notebook name field as not modifiable |
|
105 | 104 | $('#notebook_name').attr('disabled','disabled') |
@@ -12,31 +12,21 b'' | |||
|
12 | 12 | |
|
13 | 13 | $(document).ready(function () { |
|
14 | 14 | |
|
15 | $('div#header').addClass('border-box-sizing'); | |
|
16 | $('div#header_border').addClass('border-box-sizing ui-widget ui-widget-content'); | |
|
15 | IPython.page = new IPython.Page(); | |
|
17 | 16 | |
|
18 | 17 | $('div#main_app').addClass('border-box-sizing ui-widget'); |
|
19 | $('div#app_hbox').addClass('hbox'); | |
|
20 | ||
|
21 | $('div#content_toolbar').addClass('ui-widget ui-helper-clearfix'); | |
|
22 | ||
|
18 | $('div#notebooks_toolbar').addClass('ui-widget ui-helper-clearfix'); | |
|
23 | 19 | $('#new_notebook').button().click(function (e) { |
|
24 | 20 | window.open($('body').data('baseProjectUrl')+'new'); |
|
25 | 21 | }); |
|
26 | 22 | |
|
27 | $('div#left_panel').addClass('box-flex'); | |
|
28 | $('div#right_panel').addClass('box-flex'); | |
|
29 | ||
|
30 | IPython.read_only = $('meta[name=read_only]').attr("content") == 'True'; | |
|
23 | IPython.read_only = $('body').data('readOnly') === 'True'; | |
|
31 | 24 | IPython.notebook_list = new IPython.NotebookList('div#notebook_list'); |
|
32 | 25 | IPython.login_widget = new IPython.LoginWidget('span#login_widget'); |
|
33 | 26 | |
|
34 | 27 | IPython.notebook_list.load_list(); |
|
35 | 28 | |
|
36 | // These have display: none in the css file and are made visible here to prevent FLOUC. | |
|
37 | $('div#header').css('display','block'); | |
|
38 | $('div#main_app').css('display','block'); | |
|
39 | ||
|
29 | IPython.page.show(); | |
|
40 | 30 | |
|
41 | 31 | }); |
|
42 | 32 |
@@ -1,26 +1,42 b'' | |||
|
1 |
{% extends |
|
|
1 | {% extends page.html %} | |
|
2 | 2 | |
|
3 |
{% block |
|
|
3 | {% block stylesheet %} | |
|
4 | 4 | |
|
5 | {% if login_available %} | |
|
5 | <link rel="stylesheet" href="{{static_url("css/login.css") }}" type="text/css"/> | |
|
6 | ||
|
7 | {% end %} | |
|
8 | ||
|
9 | ||
|
10 | {% block login_widget %} | |
|
11 | {% end %} | |
|
12 | ||
|
13 | ||
|
14 | {% block site %} | |
|
6 | 15 | |
|
16 | <div id="main_app"> | |
|
17 | ||
|
18 | {% if login_available %} | |
|
7 | 19 | <form action="/login?next={{url_escape(next)}}" method="post"> |
|
8 |
Password: <input type="password" name="password" id=" |
|
|
9 |
<input type="submit" value=" |
|
|
20 | Password: <input type="password" name="password" id="password_input"> | |
|
21 | <input type="submit" value="Log in" id="login_submit"> | |
|
10 | 22 | </form> |
|
11 | ||
|
12 | 23 | {% end %} |
|
13 | 24 | |
|
25 | {% if message %} | |
|
26 | {% for key in message %} | |
|
27 | <div class="message {{key}}"> | |
|
28 | {{message[key]}} | |
|
29 | </div> | |
|
30 | {% end %} | |
|
14 | 31 | {% end %} |
|
15 | 32 | |
|
16 | {% block login_widget %} | |
|
33 | <div/> | |
|
34 | ||
|
17 | 35 | {% end %} |
|
18 | 36 | |
|
37 | ||
|
19 | 38 | {% block script %} |
|
20 | <script type="text/javascript"> | |
|
21 | $(document).ready(function() { | |
|
22 | IPython.login_widget = new IPython.LoginWidget('span#login_widget'); | |
|
23 | $('#focus').focus(); | |
|
24 | }); | |
|
25 | </script> | |
|
39 | ||
|
40 | <script src="{{static_url("js/loginmain.js") }}" type="text/javascript" charset="utf-8"></script> | |
|
41 | ||
|
26 | 42 | {% end %} |
@@ -1,28 +1,40 b'' | |||
|
1 |
{% extends |
|
|
1 | {% extends page.html %} | |
|
2 | 2 | |
|
3 |
{% block |
|
|
4 | <ul> | |
|
5 | {% if read_only or not login_available %} | |
|
3 | {% block stylesheet %} | |
|
6 | 4 | |
|
7 | Proceed to the <a href="/">list of notebooks</a>.</li> | |
|
5 | <link rel="stylesheet" href="{{static_url("css/logout.css") }}" type="text/css"/> | |
|
8 | 6 | |
|
9 |
|
|
|
7 | {% end %} | |
|
10 | 8 | |
|
11 | Proceed to the <a href="/login">login page</a>.</li> | |
|
12 | 9 | |
|
10 | {% block login_widget %} | |
|
13 | 11 |
|
|
14 | 12 | |
|
15 | </ul> | |
|
13 | {% block site %} | |
|
16 | 14 | |
|
15 | <div id="main_app"> | |
|
16 | ||
|
17 | {% if message %} | |
|
18 | {% for key in message %} | |
|
19 | <div class="message {{key}}"> | |
|
20 | {{message[key]}} | |
|
21 | </div> | |
|
22 | {% end %} | |
|
17 | 23 | {% end %} |
|
18 | 24 | |
|
19 | {% block login_widget %} | |
|
25 | {% if read_only or not login_available %} | |
|
26 | Proceed to the <a href="/">dashboard</a>. | |
|
27 | {% else %} | |
|
28 | Proceed to the <a href="/login">login page</a>. | |
|
29 | {% end %} | |
|
30 | ||
|
31 | ||
|
32 | <div/> | |
|
33 | ||
|
20 | 34 | {% end %} |
|
21 | 35 | |
|
22 | 36 | {% block script %} |
|
23 | <script type="text/javascript"> | |
|
24 | $(document).ready(function() { | |
|
25 | IPython.login_widget = new IPython.LoginWidget('span#login_widget'); | |
|
26 | }); | |
|
27 | </script> | |
|
37 | ||
|
38 | <script src="{{static_url("js/logoutmain.js") }}" type="text/javascript" charset="utf-8"></script> | |
|
39 | ||
|
28 | 40 | {% end %} |
@@ -8,8 +8,8 b'' | |||
|
8 | 8 | |
|
9 | 9 | <link rel="stylesheet" href="{{static_url("jquery/css/themes/base/jquery-ui.min.css") }}" type="text/css" /> |
|
10 | 10 | <link rel="stylesheet" href="{{static_url("css/boilerplate.css") }}" type="text/css" /> |
|
11 |
<link rel="stylesheet" href="{{static_url("css/ |
|
|
12 |
<link rel="stylesheet" href="{{static_url("css/ |
|
|
11 | <link rel="stylesheet" href="{{static_url("css/fbm.css") }}" type="text/css" /> | |
|
12 | <link rel="stylesheet" href="{{static_url("css/page.css") }}" type="text/css"/> | |
|
13 | 13 | {% block stylesheet %} |
|
14 | 14 | {% end %} |
|
15 | 15 | |
@@ -21,7 +21,7 b'' | |||
|
21 | 21 | <body {% block params %}{% end %}> |
|
22 | 22 | |
|
23 | 23 | <div id="header"> |
|
24 | <span id="ipython_notebook"><h1><img src='{{static_url("ipynblogo.png") }}' alt='IPython Notebook'/></h1></span> | |
|
24 | <span id="ipython_notebook"><h1><a href={{base_project_url}} alt='dashboard'><img src='{{static_url("ipynblogo.png") }}' alt='IPython Notebook'/></a></h1></span> | |
|
25 | 25 | |
|
26 | 26 | {% block login_widget %} |
|
27 | 27 | |
@@ -39,43 +39,15 b'' | |||
|
39 | 39 | {% end %} |
|
40 | 40 | </div> |
|
41 | 41 | |
|
42 | <div id="header_border"></div> | |
|
43 | ||
|
44 | <div id="main_app"> | |
|
45 | ||
|
46 | <div id="app_hbox"> | |
|
47 | ||
|
48 | <div id="left_panel"> | |
|
49 | {% block left_panel %} | |
|
50 | {% end %} | |
|
51 | </div> | |
|
52 | ||
|
53 | <div id="content_panel"> | |
|
54 | {% if message %} | |
|
55 | ||
|
56 | {% for key in message %} | |
|
57 | <div class="message {{key}}"> | |
|
58 | {{message[key]}} | |
|
59 | </div> | |
|
60 | {% end %} | |
|
42 | <div id="site"> | |
|
43 | {% block site %} | |
|
61 | 44 |
|
|
62 | ||
|
63 | {% block content_panel %} | |
|
64 | {% end %} | |
|
65 | </div> | |
|
66 | <div id="right_panel"> | |
|
67 | {% block right_panel %} | |
|
68 | {% end %} | |
|
69 | </div> | |
|
70 | ||
|
71 | </div> | |
|
72 | ||
|
73 | 45 | </div> |
|
74 | 46 | |
|
75 | 47 | <script src="{{static_url("jquery/js/jquery-1.7.1.min.js") }}" type="text/javascript" charset="utf-8"></script> |
|
76 | 48 | <script src="{{static_url("jquery/js/jquery-ui.min.js") }}" type="text/javascript" charset="utf-8"></script> |
|
77 | 49 | <script src="{{static_url("js/namespace.js") }}" type="text/javascript" charset="utf-8"></script> |
|
78 |
<script src="{{static_url("js/ |
|
|
50 | <script src="{{static_url("js/page.js") }}" type="text/javascript" charset="utf-8"></script> | |
|
79 | 51 | <script src="{{static_url("js/loginwidget.js") }}" type="text/javascript" charset="utf-8"></script> |
|
80 | 52 | |
|
81 | 53 | {% block script %} |
@@ -1,27 +1,26 b'' | |||
|
1 |
{% extends |
|
|
1 | {% extends page.html %} | |
|
2 | 2 | |
|
3 | {% block title %} | |
|
4 | IPython Dashboard | |
|
5 | {% end %} | |
|
3 | {% block title %}IPython Dashboard{% end %} | |
|
6 | 4 | |
|
7 | 5 | {% block stylesheet %} |
|
8 | 6 | <link rel="stylesheet" href="{{static_url("css/projectdashboard.css") }}" type="text/css" /> |
|
9 | 7 | {% end %} |
|
10 | 8 | |
|
11 | {% block meta %} | |
|
12 | <meta name="read_only" content="{{read_only}}"/> | |
|
13 | {% end %} | |
|
14 | 9 | |
|
15 | 10 | {% block params %} |
|
16 | 11 | data-project={{project}} |
|
17 | 12 | data-base-project-url={{base_project_url}} |
|
18 | 13 | data-base-kernel-url={{base_kernel_url}} |
|
14 | data-read-only={{read_only}} | |
|
19 | 15 | {% end %} |
|
20 | 16 | |
|
21 |
{% block |
|
|
17 | {% block site %} | |
|
18 | ||
|
19 | <div id="main_app"> | |
|
20 | ||
|
22 | 21 | {% if logged_in or not read_only %} |
|
23 | 22 | |
|
24 |
<div id=" |
|
|
23 | <div id="notebooks_toolbar"> | |
|
25 | 24 | <span id="drag_info">Drag files onto the list to import |
|
26 | 25 | notebooks.</span> |
|
27 | 26 | |
@@ -35,6 +34,9 b' data-base-kernel-url={{base_kernel_url}}' | |||
|
35 | 34 | <div id="notebook_list"> |
|
36 | 35 | <div id="project_name"><h2>{{project}}</h2></div> |
|
37 | 36 | </div> |
|
37 | ||
|
38 | </div> | |
|
39 | ||
|
38 | 40 | {% end %} |
|
39 | 41 | |
|
40 | 42 | {% block script %} |
General Comments 0
You need to be logged in to leave comments.
Login now