Show More
@@ -14,14 +14,10 define([ | |||||
14 | this.selector = selector; |
|
14 | this.selector = selector; | |
15 | if (this.selector !== undefined) { |
|
15 | if (this.selector !== undefined) { | |
16 | this.element = $(selector); |
|
16 | this.element = $(selector); | |
17 | this.style(); |
|
|||
18 | this.bind_events(); |
|
17 | this.bind_events(); | |
19 | } |
|
18 | } | |
20 | }; |
|
19 | }; | |
21 |
|
20 | |||
22 | LoginWidget.prototype.style = function () { |
|
|||
23 | this.element.find("button").addClass("btn btn-default btn-sm"); |
|
|||
24 | }; |
|
|||
25 |
|
21 | |||
26 |
|
22 | |||
27 | LoginWidget.prototype.bind_events = function () { |
|
23 | LoginWidget.prototype.bind_events = function () { | |
@@ -44,4 +40,4 define([ | |||||
44 | IPython.LoginWidget = LoginWidget; |
|
40 | IPython.LoginWidget = LoginWidget; | |
45 |
|
41 | |||
46 | return {'LoginWidget': LoginWidget}; |
|
42 | return {'LoginWidget': LoginWidget}; | |
47 | }); No newline at end of file |
|
43 | }); |
@@ -4,7 +4,6 | |||||
4 | var ipython = ipython || {}; |
|
4 | var ipython = ipython || {}; | |
5 | require(['base/js/page'], function(page) { |
|
5 | require(['base/js/page'], function(page) { | |
6 | var page_instance = new page.Page(); |
|
6 | var page_instance = new page.Page(); | |
7 | $('#ipython-main-app').addClass('border-box-sizing'); |
|
|||
8 | page_instance.show(); |
|
7 | page_instance.show(); | |
9 |
|
8 | |||
10 | ipython.page = page_instance; |
|
9 | ipython.page = page_instance; |
@@ -8,15 +8,9 define([ | |||||
8 | "use strict"; |
|
8 | "use strict"; | |
9 |
|
9 | |||
10 | var Page = function () { |
|
10 | var Page = function () { | |
11 | this.style(); |
|
|||
12 | this.bind_events(); |
|
11 | this.bind_events(); | |
13 | }; |
|
12 | }; | |
14 |
|
13 | |||
15 | Page.prototype.style = function () { |
|
|||
16 | $('div#header').addClass('border-box-sizing'); |
|
|||
17 | $('div#site').addClass('border-box-sizing'); |
|
|||
18 | }; |
|
|||
19 |
|
||||
20 | Page.prototype.bind_events = function () { |
|
14 | Page.prototype.bind_events = function () { | |
21 | }; |
|
15 | }; | |
22 |
|
16 | |||
@@ -30,12 +24,14 define([ | |||||
30 | Page.prototype.show_header = function () { |
|
24 | Page.prototype.show_header = function () { | |
31 | // The header and site divs start out hidden to prevent FLOUC. |
|
25 | // The header and site divs start out hidden to prevent FLOUC. | |
32 | // Main scripts should call this method after styling everything. |
|
26 | // Main scripts should call this method after styling everything. | |
|
27 | // TODO: selector are hardcoded, pass as constructor argument | |||
33 | $('div#header').css('display','block'); |
|
28 | $('div#header').css('display','block'); | |
34 | }; |
|
29 | }; | |
35 |
|
30 | |||
36 | Page.prototype.show_site = function () { |
|
31 | Page.prototype.show_site = function () { | |
37 | // The header and site divs start out hidden to prevent FLOUC. |
|
32 | // The header and site divs start out hidden to prevent FLOUC. | |
38 | // Main scripts should call this method after styling everything. |
|
33 | // Main scripts should call this method after styling everything. | |
|
34 | // TODO: selector are hardcoded, pass as constructor argument | |||
39 | $('div#site').css('display','block'); |
|
35 | $('div#site').css('display','block'); | |
40 | }; |
|
36 | }; | |
41 |
|
37 |
@@ -24,6 +24,7 div#header { | |||||
24 | padding-left: 30px; |
|
24 | padding-left: 30px; | |
25 | padding-bottom: 5px; |
|
25 | padding-bottom: 5px; | |
26 | border-bottom: 1px solid @navbar-default-border; |
|
26 | border-bottom: 1px solid @navbar-default-border; | |
|
27 | .border-box-sizing(); | |||
27 | } |
|
28 | } | |
28 |
|
29 | |||
29 | #ipython_notebook { |
|
30 | #ipython_notebook { | |
@@ -50,6 +51,7 div#header { | |||||
50 | #site { |
|
51 | #site { | |
51 | width: 100%; |
|
52 | width: 100%; | |
52 | display: none; |
|
53 | display: none; | |
|
54 | .border-box-sizing(); | |||
53 | } |
|
55 | } | |
54 |
|
56 | |||
55 | /* Smaller buttons */ |
|
57 | /* Smaller buttons */ | |
@@ -69,6 +71,12 span#login_widget { | |||||
69 | float: right; |
|
71 | float: right; | |
70 | } |
|
72 | } | |
71 |
|
73 | |||
|
74 | span#login_widget > .button { | |||
|
75 | .btn(); | |||
|
76 | .btn-default(); | |||
|
77 | .btn-sm(); | |||
|
78 | } | |||
|
79 | ||||
72 | .nav-header { |
|
80 | .nav-header { | |
73 | text-transform: none; |
|
81 | text-transform: none; | |
74 | } |
|
82 | } |
@@ -6,6 +6,7 define([ | |||||
6 | 'jquery', |
|
6 | 'jquery', | |
7 | 'base/js/utils', |
|
7 | 'base/js/utils', | |
8 | ], function(IPython, $, utils) { |
|
8 | ], function(IPython, $, utils) { | |
|
9 | // TODO: remove IPython dependency here | |||
9 | "use strict"; |
|
10 | "use strict"; | |
10 |
|
11 | |||
11 | // monkey patch CM to be able to syntax highlight cell magics |
|
12 | // monkey patch CM to be able to syntax highlight cell magics | |
@@ -177,7 +178,6 define([ | |||||
177 | * @return {Boolean} `true` if CodeMirror should ignore the event, `false` Otherwise |
|
178 | * @return {Boolean} `true` if CodeMirror should ignore the event, `false` Otherwise | |
178 | */ |
|
179 | */ | |
179 | Cell.prototype.handle_codemirror_keyevent = function (editor, event) { |
|
180 | Cell.prototype.handle_codemirror_keyevent = function (editor, event) { | |
180 | var that = this; |
|
|||
181 | var shortcuts = this.keyboard_manager.edit_shortcuts; |
|
181 | var shortcuts = this.keyboard_manager.edit_shortcuts; | |
182 |
|
182 | |||
183 | // if this is an edit_shortcuts shortcut, the global keyboard/shortcut |
|
183 | // if this is an edit_shortcuts shortcut, the global keyboard/shortcut | |
@@ -556,7 +556,7 define([ | |||||
556 | this.code_mirror.setOption('mode', default_mode); |
|
556 | this.code_mirror.setOption('mode', default_mode); | |
557 | }; |
|
557 | }; | |
558 |
|
558 | |||
559 |
// Backwards compat |
|
559 | // Backwards compatibility. | |
560 | IPython.Cell = Cell; |
|
560 | IPython.Cell = Cell; | |
561 |
|
561 | |||
562 | return {'Cell': Cell}; |
|
562 | return {'Cell': Cell}; |
@@ -17,6 +17,9 define([ | |||||
17 | // events: $(Events) instance |
|
17 | // events: $(Events) instance | |
18 | // cell: Cell instance |
|
18 | // cell: Cell instance | |
19 | // notebook: Notebook instance |
|
19 | // notebook: Notebook instance | |
|
20 | // | |||
|
21 | // TODO: This leaks, when cell are deleted | |||
|
22 | // There is still a reference to each celltoolbars. | |||
20 | CellToolbar._instances.push(this); |
|
23 | CellToolbar._instances.push(this); | |
21 | this.notebook = options.notebook; |
|
24 | this.notebook = options.notebook; | |
22 | this.cell = options.cell; |
|
25 | this.cell = options.cell; |
@@ -123,7 +123,7 define([ | |||||
123 | CodeCell.prototype.create_element = function () { |
|
123 | CodeCell.prototype.create_element = function () { | |
124 | Cell.prototype.create_element.apply(this, arguments); |
|
124 | Cell.prototype.create_element.apply(this, arguments); | |
125 |
|
125 | |||
126 |
var cell = $('<div></div>').addClass('cell |
|
126 | var cell = $('<div></div>').addClass('cell code_cell'); | |
127 | cell.attr('tabindex','2'); |
|
127 | cell.attr('tabindex','2'); | |
128 |
|
128 | |||
129 | var input = $('<div></div>').addClass('input'); |
|
129 | var input = $('<div></div>').addClass('input'); |
@@ -42,9 +42,6 require([ | |||||
42 | ) { |
|
42 | ) { | |
43 | "use strict"; |
|
43 | "use strict"; | |
44 |
|
44 | |||
45 | $('#ipython-main-app').addClass('border-box-sizing'); |
|
|||
46 | $('div#notebook_panel').addClass('border-box-sizing'); |
|
|||
47 |
|
||||
48 | var common_options = { |
|
45 | var common_options = { | |
49 | base_url : utils.get_body_data("baseUrl"), |
|
46 | base_url : utils.get_body_data("baseUrl"), | |
50 | ws_url : IPython.utils.get_body_data("wsUrl"), |
|
47 | ws_url : IPython.utils.get_body_data("wsUrl"), |
@@ -50,9 +50,9 define([ | |||||
50 | } |
|
50 | } | |
51 | }; |
|
51 | }; | |
52 |
|
52 | |||
|
53 | // TODO: This has definitively nothing to do with style ... | |||
53 | MenuBar.prototype.style = function () { |
|
54 | MenuBar.prototype.style = function () { | |
54 | var that = this; |
|
55 | var that = this; | |
55 | this.element.addClass('border-box-sizing'); |
|
|||
56 | this.element.find("li").click(function (event, ui) { |
|
56 | this.element.find("li").click(function (event, ui) { | |
57 | // The selected cell loses focus when the menu is entered, so we |
|
57 | // The selected cell loses focus when the menu is entered, so we | |
58 | // re-select it upon selection. |
|
58 | // re-select it upon selection. |
@@ -121,8 +121,7 define([ | |||||
121 | this.notebook_name_blacklist_re = /[\/\\:]/; |
|
121 | this.notebook_name_blacklist_re = /[\/\\:]/; | |
122 | this.nbformat = 3; // Increment this when changing the nbformat |
|
122 | this.nbformat = 3; // Increment this when changing the nbformat | |
123 | this.nbformat_minor = 0; // Increment this when changing the nbformat |
|
123 | this.nbformat_minor = 0; // Increment this when changing the nbformat | |
124 | this.codemirror_mode = 'ipython' |
|
124 | this.codemirror_mode = 'ipython'; | |
125 | this.style(); |
|
|||
126 | this.create_elements(); |
|
125 | this.create_elements(); | |
127 | this.bind_events(); |
|
126 | this.bind_events(); | |
128 | this.save_notebook = function() { // don't allow save until notebook_loaded |
|
127 | this.save_notebook = function() { // don't allow save until notebook_loaded | |
@@ -135,14 +134,6 define([ | |||||
135 | slideshow_celltoolbar.register(this); |
|
134 | slideshow_celltoolbar.register(this); | |
136 | }; |
|
135 | }; | |
137 |
|
136 | |||
138 | /** |
|
|||
139 | * Tweak the notebook's CSS style. |
|
|||
140 | * |
|
|||
141 | * @method style |
|
|||
142 | */ |
|
|||
143 | Notebook.prototype.style = function () { |
|
|||
144 | $('div#notebook').addClass('border-box-sizing'); |
|
|||
145 | }; |
|
|||
146 |
|
137 | |||
147 | /** |
|
138 | /** | |
148 | * Create an HTML and CSS representation of the notebook. |
|
139 | * Create an HTML and CSS representation of the notebook. | |
@@ -2140,8 +2131,7 define([ | |||||
2140 | Notebook.prototype.rename_error = function (xhr, status, error) { |
|
2131 | Notebook.prototype.rename_error = function (xhr, status, error) { | |
2141 | var that = this; |
|
2132 | var that = this; | |
2142 | var dialog_body = $('<div/>').append( |
|
2133 | var dialog_body = $('<div/>').append( | |
2143 | $("<p/>").addClass("rename-message") |
|
2134 | $("<p/>").text('This notebook name already exists.') | |
2144 | .text('This notebook name already exists.') |
|
|||
2145 | ); |
|
2135 | ); | |
2146 | this.events.trigger('notebook_rename_failed.Notebook', [xhr, status, error]); |
|
2136 | this.events.trigger('notebook_rename_failed.Notebook', [xhr, status, error]); | |
2147 | dialog.modal({ |
|
2137 | dialog.modal({ |
@@ -32,13 +32,10 define([ | |||||
32 | }; |
|
32 | }; | |
33 |
|
33 | |||
34 | NotificationArea.prototype.temp_message = function (msg, timeout, css_class) { |
|
34 | NotificationArea.prototype.temp_message = function (msg, timeout, css_class) { | |
35 | var uuid = utils.uuid(); |
|
|||
36 | if( css_class == 'danger') {css_class = 'ui-state-error';} |
|
35 | if( css_class == 'danger') {css_class = 'ui-state-error';} | |
37 | if( css_class == 'warning') {css_class = 'ui-state-highlight';} |
|
36 | if( css_class == 'warning') {css_class = 'ui-state-highlight';} | |
38 | var tdiv = $('<div>') |
|
37 | var tdiv = $('<div>') | |
39 | .attr('id',uuid) |
|
38 | .addClass('notification_widget') | |
40 | .addClass('notification_widget ui-widget ui-widget-content ui-corner-all') |
|
|||
41 | .addClass('border-box-sizing') |
|
|||
42 | .addClass(css_class) |
|
39 | .addClass(css_class) | |
43 | .hide() |
|
40 | .hide() | |
44 | .text(msg); |
|
41 | .text(msg); | |
@@ -94,7 +91,7 define([ | |||||
94 | }); |
|
91 | }); | |
95 |
|
92 | |||
96 | // Implicitly start off in Command mode, switching to Edit mode will trigger event |
|
93 | // Implicitly start off in Command mode, switching to Edit mode will trigger event | |
97 |
$modal_ind_icon.attr('class','command |
|
94 | $modal_ind_icon.attr('class','command_mode_icon').attr('title','Command Mode'); | |
98 |
|
95 | |||
99 | // Kernel events |
|
96 | // Kernel events | |
100 | this.events.on('status_idle.Kernel',function () { |
|
97 | this.events.on('status_idle.Kernel',function () { |
@@ -75,9 +75,7 define([ | |||||
75 | }; |
|
75 | }; | |
76 |
|
76 | |||
77 | Pager.prototype.style = function () { |
|
77 | Pager.prototype.style = function () { | |
78 |
this.pager_splitter_element.addClass(' |
|
78 | this.pager_splitter_element.addClass('ui-widget ui-state-default'); | |
79 | this.pager_element.addClass('border-box-sizing'); |
|
|||
80 | this.pager_element.find(".container").addClass('border-box-sizing'); |
|
|||
81 | this.pager_splitter_element.attr('title', 'Click to Show/Hide pager area, drag to Resize'); |
|
79 | this.pager_splitter_element.attr('title', 'Click to Show/Hide pager area, drag to Resize'); | |
82 | }; |
|
80 | }; | |
83 |
|
81 |
@@ -8,25 +8,21 define([ | |||||
8 | 'base/js/dialog', |
|
8 | 'base/js/dialog', | |
9 | 'base/js/keyboard', |
|
9 | 'base/js/keyboard', | |
10 | 'dateformat', |
|
10 | 'dateformat', | |
11 | ], function(IPython, $, utils, dialog, keyboard) { |
|
11 | ], function(IPython, $, utils, dialog, keyboard, dateformat) { | |
12 | "use strict"; |
|
12 | "use strict"; | |
13 |
|
13 | |||
14 | var SaveWidget = function (selector, options) { |
|
14 | var SaveWidget = function (selector, options) { | |
15 |
// TODO: Remove circula |
|
15 | // TODO: Remove circular ref. | |
16 | this.notebook = undefined; |
|
16 | this.notebook = undefined; | |
17 | this.selector = selector; |
|
17 | this.selector = selector; | |
18 | this.events = options.events; |
|
18 | this.events = options.events; | |
19 | this.keyboard_manager = options.keyboard_manager; |
|
19 | this.keyboard_manager = options.keyboard_manager; | |
20 | if (this.selector !== undefined) { |
|
20 | if (this.selector !== undefined) { | |
21 | this.element = $(selector); |
|
21 | this.element = $(selector); | |
22 | this.style(); |
|
|||
23 | this.bind_events(); |
|
22 | this.bind_events(); | |
24 | } |
|
23 | } | |
25 | }; |
|
24 | }; | |
26 |
|
25 | |||
27 | SaveWidget.prototype.style = function () { |
|
|||
28 | }; |
|
|||
29 |
|
||||
30 |
|
26 | |||
31 | SaveWidget.prototype.bind_events = function () { |
|
27 | SaveWidget.prototype.bind_events = function () { | |
32 | var that = this; |
|
28 | var that = this; | |
@@ -157,7 +153,7 define([ | |||||
157 | } |
|
153 | } | |
158 | var d = new Date(checkpoint.last_modified); |
|
154 | var d = new Date(checkpoint.last_modified); | |
159 | this.set_checkpoint_status( |
|
155 | this.set_checkpoint_status( | |
160 |
"Last Checkpoint: " + d |
|
156 | "Last Checkpoint: " + dateformat(d,'mmm dd HH:MM') | |
161 | ); |
|
157 | ); | |
162 | }; |
|
158 | }; | |
163 |
|
159 | |||
@@ -169,7 +165,7 define([ | |||||
169 | } |
|
165 | } | |
170 | }; |
|
166 | }; | |
171 |
|
167 | |||
172 |
// Backwards compat |
|
168 | // Backwards compatibility. | |
173 | IPython.SaveWidget = SaveWidget; |
|
169 | IPython.SaveWidget = SaveWidget; | |
174 |
|
170 | |||
175 | return {'SaveWidget': SaveWidget}; |
|
171 | return {'SaveWidget': SaveWidget}; |
@@ -70,7 +70,7 define([ | |||||
70 | TextCell.prototype.create_element = function () { |
|
70 | TextCell.prototype.create_element = function () { | |
71 | Cell.prototype.create_element.apply(this, arguments); |
|
71 | Cell.prototype.create_element.apply(this, arguments); | |
72 |
|
72 | |||
73 |
var cell = $("<div>").addClass('cell text_cell |
|
73 | var cell = $("<div>").addClass('cell text_cell'); | |
74 | cell.attr('tabindex','2'); |
|
74 | cell.attr('tabindex','2'); | |
75 |
|
75 | |||
76 | var prompt = $('<div/>').addClass('prompt input_prompt'); |
|
76 | var prompt = $('<div/>').addClass('prompt input_prompt'); | |
@@ -83,8 +83,8 define([ | |||||
83 | var input_area = $('<div/>').addClass('input_area'); |
|
83 | var input_area = $('<div/>').addClass('input_area'); | |
84 | this.code_mirror = new CodeMirror(input_area.get(0), this.cm_config); |
|
84 | this.code_mirror = new CodeMirror(input_area.get(0), this.cm_config); | |
85 | // The tabindex=-1 makes this div focusable. |
|
85 | // The tabindex=-1 makes this div focusable. | |
86 |
var render_area = $('<div/>').addClass('text_cell_render |
|
86 | var render_area = $('<div/>').addClass('text_cell_render rendered_html') | |
87 |
|
|
87 | .attr('tabindex','-1'); | |
88 | inner_cell.append(input_area).append(render_area); |
|
88 | inner_cell.append(input_area).append(render_area); | |
89 | cell.append(inner_cell); |
|
89 | cell.append(inner_cell); | |
90 | this.element = cell; |
|
90 | this.element = cell; |
@@ -79,8 +79,7 define([ | |||||
79 | }; |
|
79 | }; | |
80 |
|
80 | |||
81 | ToolBar.prototype.style = function () { |
|
81 | ToolBar.prototype.style = function () { | |
82 |
this.element.addClass(' |
|
82 | this.element.addClass('toolbar'); | |
83 | .addClass('toolbar'); |
|
|||
84 | }; |
|
83 | }; | |
85 |
|
84 | |||
86 | /** |
|
85 | /** | |
@@ -94,7 +93,7 define([ | |||||
94 | } |
|
93 | } | |
95 | }; |
|
94 | }; | |
96 |
|
95 | |||
97 |
// Backwards compat |
|
96 | // Backwards compatibility. | |
98 | IPython.ToolBar = ToolBar; |
|
97 | IPython.ToolBar = ToolBar; | |
99 |
|
98 | |||
100 | return {'ToolBar': ToolBar}; |
|
99 | return {'ToolBar': ToolBar}; |
@@ -2,19 +2,18 div.cell { | |||||
2 | border: 1px solid transparent; |
|
2 | border: 1px solid transparent; | |
3 | .vbox(); |
|
3 | .vbox(); | |
4 | .corner-all(); |
|
4 | .corner-all(); | |
|
5 | .border-box-sizing(); | |||
5 | border-width: thin; |
|
6 | border-width: thin; | |
6 | border-style: solid; |
|
7 | border-style: solid; | |
7 |
|
8 | |||
8 | &.selected { |
|
9 | &.selected { | |
9 | border-color: @border_color; |
|
10 | border-color: @border_color; | |
10 | } |
|
11 | } | |
11 |
|
12 | |||
12 | &.edit_mode { |
|
13 | &.edit_mode { | |
13 | border-color: green; |
|
14 | border-color: green; | |
14 | } |
|
15 | } | |
15 | } |
|
|||
16 |
|
16 | |||
17 | div.cell { |
|
|||
18 | width: 100%; |
|
17 | width: 100%; | |
19 | padding: 5px 5px 5px 0px; |
|
18 | padding: 5px 5px 5px 0px; | |
20 | /* This acts as a spacer between cells, that is outside the border */ |
|
19 | /* This acts as a spacer between cells, that is outside the border */ |
@@ -2,6 +2,7 | |||||
2 | margin-top: 0px; |
|
2 | margin-top: 0px; | |
3 | margin-bottom: -19px; |
|
3 | margin-bottom: -19px; | |
4 | position: relative; |
|
4 | position: relative; | |
|
5 | .border-box-sizing(); | |||
5 |
|
6 | |||
6 | .navbar { |
|
7 | .navbar { | |
7 | border-top: 1px; |
|
8 | border-top: 1px; |
@@ -15,6 +15,10 body.notebook_app { | |||||
15 | } |
|
15 | } | |
16 | } |
|
16 | } | |
17 |
|
17 | |||
|
18 | #ipython-main-app { | |||
|
19 | .border-box-sizing(); | |||
|
20 | } | |||
|
21 | ||||
18 | span#notebook_name { |
|
22 | span#notebook_name { | |
19 | height: 1em; |
|
23 | height: 1em; | |
20 | line-height: 1em; |
|
24 | line-height: 1em; | |
@@ -27,6 +31,7 div#notebook_panel { | |||||
27 | margin: 0px 0px 0px 0px; |
|
31 | margin: 0px 0px 0px 0px; | |
28 | padding: 0px; |
|
32 | padding: 0px; | |
29 | .box-shadow(@notebook-shadow); |
|
33 | .box-shadow(@notebook-shadow); | |
|
34 | .border-box-sizing(); | |||
30 | } |
|
35 | } | |
31 | div#notebook { |
|
36 | div#notebook { | |
32 | font-size: @notebook_font_size; |
|
37 | font-size: @notebook_font_size; |
@@ -1,10 +1,12 | |||||
1 | div#pager_splitter { |
|
1 | div#pager_splitter { | |
2 | height: 8px; |
|
2 | height: 8px; | |
|
3 | .border-box-sizing(); | |||
3 | } |
|
4 | } | |
4 |
|
5 | |||
5 | #pager-container { |
|
6 | #pager-container { | |
6 | position: relative; |
|
7 | position: relative; | |
7 | padding: 15px 0px; |
|
8 | padding: 15px 0px; | |
|
9 | .border-box-sizing(); | |||
8 | } |
|
10 | } | |
9 |
|
11 | |||
10 | div#pager { |
|
12 | div#pager { | |
@@ -19,4 +21,5 div#pager { | |||||
19 | background-color: @cell_background; |
|
21 | background-color: @cell_background; | |
20 | padding: @code_padding; |
|
22 | padding: @code_padding; | |
21 | } |
|
23 | } | |
|
24 | .border-box-sizing(); | |||
22 | } |
|
25 | } |
@@ -17,6 +17,7 div.text_cell_render { | |||||
17 | border-style: none; |
|
17 | border-style: none; | |
18 | padding: 0.5em 0.5em 0.5em @code_padding; |
|
18 | padding: 0.5em 0.5em 0.5em @code_padding; | |
19 | color: @text-color; |
|
19 | color: @text-color; | |
|
20 | .border-box-sizing(); | |||
20 | } |
|
21 | } | |
21 |
|
22 | |||
22 | a.anchor-link:link { |
|
23 | a.anchor-link:link { |
@@ -18,6 +18,8 | |||||
18 | .btn { |
|
18 | .btn { | |
19 | padding: 2px 8px; |
|
19 | padding: 2px 8px; | |
20 | } |
|
20 | } | |
|
21 | ||||
|
22 | .border-box-sizing(); | |||
21 | } |
|
23 | } | |
22 |
|
24 | |||
23 | .toolbar .btn-group { |
|
25 | .toolbar .btn-group { | |
@@ -40,7 +42,7 | |||||
40 | text-align: right; |
|
42 | text-align: right; | |
41 | margin-left: 5px; |
|
43 | margin-left: 5px; | |
42 | margin-right: 0px; |
|
44 | margin-right: 0px; | |
43 | margin-top: 0px |
|
45 | margin-top: 0px; | |
44 | } |
|
46 | } | |
45 |
|
47 | |||
46 | .toolbar { |
|
48 | .toolbar { |
@@ -316,8 +316,16 div.cell { | |||||
316 | /* Modern browsers */ |
|
316 | /* Modern browsers */ | |
317 | flex: none; |
|
317 | flex: none; | |
318 | border-radius: 4px; |
|
318 | border-radius: 4px; | |
|
319 | box-sizing: border-box; | |||
|
320 | -moz-box-sizing: border-box; | |||
|
321 | -webkit-box-sizing: border-box; | |||
319 | border-width: thin; |
|
322 | border-width: thin; | |
320 | border-style: solid; |
|
323 | border-style: solid; | |
|
324 | width: 100%; | |||
|
325 | padding: 5px 5px 5px 0px; | |||
|
326 | /* This acts as a spacer between cells, that is outside the border */ | |||
|
327 | margin: 0px; | |||
|
328 | outline: none; | |||
321 | } |
|
329 | } | |
322 | div.cell.selected { |
|
330 | div.cell.selected { | |
323 | border-color: #ababab; |
|
331 | border-color: #ababab; | |
@@ -325,13 +333,6 div.cell.selected { | |||||
325 | div.cell.edit_mode { |
|
333 | div.cell.edit_mode { | |
326 | border-color: green; |
|
334 | border-color: green; | |
327 | } |
|
335 | } | |
328 | div.cell { |
|
|||
329 | width: 100%; |
|
|||
330 | padding: 5px 5px 5px 0px; |
|
|||
331 | /* This acts as a spacer between cells, that is outside the border */ |
|
|||
332 | margin: 0px; |
|
|||
333 | outline: none; |
|
|||
334 | } |
|
|||
335 | div.prompt { |
|
336 | div.prompt { | |
336 | /* This needs to be wide enough for 3 digit prompt numbers: In[100]: */ |
|
337 | /* This needs to be wide enough for 3 digit prompt numbers: In[100]: */ | |
337 | min-width: 15ex; |
|
338 | min-width: 15ex; | |
@@ -1109,6 +1110,9 div.text_cell_render { | |||||
1109 | border-style: none; |
|
1110 | border-style: none; | |
1110 | padding: 0.5em 0.5em 0.5em 0.4em; |
|
1111 | padding: 0.5em 0.5em 0.5em 0.4em; | |
1111 | color: #000000; |
|
1112 | color: #000000; | |
|
1113 | box-sizing: border-box; | |||
|
1114 | -moz-box-sizing: border-box; | |||
|
1115 | -webkit-box-sizing: border-box; | |||
1112 | } |
|
1116 | } | |
1113 | a.anchor-link:link { |
|
1117 | a.anchor-link:link { | |
1114 | text-decoration: none; |
|
1118 | text-decoration: none; |
@@ -7609,6 +7609,9 div#header { | |||||
7609 | padding-left: 30px; |
|
7609 | padding-left: 30px; | |
7610 | padding-bottom: 5px; |
|
7610 | padding-bottom: 5px; | |
7611 | border-bottom: 1px solid #e7e7e7; |
|
7611 | border-bottom: 1px solid #e7e7e7; | |
|
7612 | box-sizing: border-box; | |||
|
7613 | -moz-box-sizing: border-box; | |||
|
7614 | -webkit-box-sizing: border-box; | |||
7612 | } |
|
7615 | } | |
7613 | #ipython_notebook { |
|
7616 | #ipython_notebook { | |
7614 | padding-left: 0px; |
|
7617 | padding-left: 0px; | |
@@ -7631,6 +7634,9 div#header { | |||||
7631 | #site { |
|
7634 | #site { | |
7632 | width: 100%; |
|
7635 | width: 100%; | |
7633 | display: none; |
|
7636 | display: none; | |
|
7637 | box-sizing: border-box; | |||
|
7638 | -moz-box-sizing: border-box; | |||
|
7639 | -webkit-box-sizing: border-box; | |||
7634 | } |
|
7640 | } | |
7635 | /* Smaller buttons */ |
|
7641 | /* Smaller buttons */ | |
7636 | .ui-button .ui-button-text { |
|
7642 | .ui-button .ui-button-text { | |
@@ -7646,6 +7652,97 input.ui-button { | |||||
7646 | span#login_widget { |
|
7652 | span#login_widget { | |
7647 | float: right; |
|
7653 | float: right; | |
7648 | } |
|
7654 | } | |
|
7655 | span#login_widget > .button { | |||
|
7656 | display: inline-block; | |||
|
7657 | margin-bottom: 0; | |||
|
7658 | font-weight: normal; | |||
|
7659 | text-align: center; | |||
|
7660 | vertical-align: middle; | |||
|
7661 | cursor: pointer; | |||
|
7662 | background-image: none; | |||
|
7663 | border: 1px solid transparent; | |||
|
7664 | white-space: nowrap; | |||
|
7665 | padding: 6px 12px; | |||
|
7666 | font-size: 13px; | |||
|
7667 | line-height: 1.42857143; | |||
|
7668 | border-radius: 4px; | |||
|
7669 | -webkit-user-select: none; | |||
|
7670 | -moz-user-select: none; | |||
|
7671 | -ms-user-select: none; | |||
|
7672 | user-select: none; | |||
|
7673 | color: #333333; | |||
|
7674 | background-color: #ffffff; | |||
|
7675 | border-color: #cccccc; | |||
|
7676 | padding: 5px 10px; | |||
|
7677 | font-size: 12px; | |||
|
7678 | line-height: 1.5; | |||
|
7679 | border-radius: 3px; | |||
|
7680 | } | |||
|
7681 | span#login_widget > .button:focus, | |||
|
7682 | span#login_widget > .button:active:focus, | |||
|
7683 | span#login_widget > .button.active:focus { | |||
|
7684 | outline: thin dotted; | |||
|
7685 | outline: 5px auto -webkit-focus-ring-color; | |||
|
7686 | outline-offset: -2px; | |||
|
7687 | } | |||
|
7688 | span#login_widget > .button:hover, | |||
|
7689 | span#login_widget > .button:focus { | |||
|
7690 | color: #333333; | |||
|
7691 | text-decoration: none; | |||
|
7692 | } | |||
|
7693 | span#login_widget > .button:active, | |||
|
7694 | span#login_widget > .button.active { | |||
|
7695 | outline: 0; | |||
|
7696 | background-image: none; | |||
|
7697 | -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); | |||
|
7698 | box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); | |||
|
7699 | } | |||
|
7700 | span#login_widget > .button.disabled, | |||
|
7701 | span#login_widget > .button[disabled], | |||
|
7702 | fieldset[disabled] span#login_widget > .button { | |||
|
7703 | cursor: not-allowed; | |||
|
7704 | pointer-events: none; | |||
|
7705 | opacity: 0.65; | |||
|
7706 | filter: alpha(opacity=65); | |||
|
7707 | -webkit-box-shadow: none; | |||
|
7708 | box-shadow: none; | |||
|
7709 | } | |||
|
7710 | span#login_widget > .button:hover, | |||
|
7711 | span#login_widget > .button:focus, | |||
|
7712 | span#login_widget > .button:active, | |||
|
7713 | span#login_widget > .button.active, | |||
|
7714 | .open .dropdown-togglespan#login_widget > .button { | |||
|
7715 | color: #333333; | |||
|
7716 | background-color: #ebebeb; | |||
|
7717 | border-color: #adadad; | |||
|
7718 | } | |||
|
7719 | span#login_widget > .button:active, | |||
|
7720 | span#login_widget > .button.active, | |||
|
7721 | .open .dropdown-togglespan#login_widget > .button { | |||
|
7722 | background-image: none; | |||
|
7723 | } | |||
|
7724 | span#login_widget > .button.disabled, | |||
|
7725 | span#login_widget > .button[disabled], | |||
|
7726 | fieldset[disabled] span#login_widget > .button, | |||
|
7727 | span#login_widget > .button.disabled:hover, | |||
|
7728 | span#login_widget > .button[disabled]:hover, | |||
|
7729 | fieldset[disabled] span#login_widget > .button:hover, | |||
|
7730 | span#login_widget > .button.disabled:focus, | |||
|
7731 | span#login_widget > .button[disabled]:focus, | |||
|
7732 | fieldset[disabled] span#login_widget > .button:focus, | |||
|
7733 | span#login_widget > .button.disabled:active, | |||
|
7734 | span#login_widget > .button[disabled]:active, | |||
|
7735 | fieldset[disabled] span#login_widget > .button:active, | |||
|
7736 | span#login_widget > .button.disabled.active, | |||
|
7737 | span#login_widget > .button[disabled].active, | |||
|
7738 | fieldset[disabled] span#login_widget > .button.active { | |||
|
7739 | background-color: #ffffff; | |||
|
7740 | border-color: #cccccc; | |||
|
7741 | } | |||
|
7742 | span#login_widget > .button .badge { | |||
|
7743 | color: #ffffff; | |||
|
7744 | background-color: #333333; | |||
|
7745 | } | |||
7649 | .nav-header { |
|
7746 | .nav-header { | |
7650 | text-transform: none; |
|
7747 | text-transform: none; | |
7651 | } |
|
7748 | } | |
@@ -7940,8 +8037,16 div.cell { | |||||
7940 | /* Modern browsers */ |
|
8037 | /* Modern browsers */ | |
7941 | flex: none; |
|
8038 | flex: none; | |
7942 | border-radius: 4px; |
|
8039 | border-radius: 4px; | |
|
8040 | box-sizing: border-box; | |||
|
8041 | -moz-box-sizing: border-box; | |||
|
8042 | -webkit-box-sizing: border-box; | |||
7943 | border-width: thin; |
|
8043 | border-width: thin; | |
7944 | border-style: solid; |
|
8044 | border-style: solid; | |
|
8045 | width: 100%; | |||
|
8046 | padding: 5px 5px 5px 0px; | |||
|
8047 | /* This acts as a spacer between cells, that is outside the border */ | |||
|
8048 | margin: 0px; | |||
|
8049 | outline: none; | |||
7945 | } |
|
8050 | } | |
7946 | div.cell.selected { |
|
8051 | div.cell.selected { | |
7947 | border-color: #ababab; |
|
8052 | border-color: #ababab; | |
@@ -7949,13 +8054,6 div.cell.selected { | |||||
7949 | div.cell.edit_mode { |
|
8054 | div.cell.edit_mode { | |
7950 | border-color: green; |
|
8055 | border-color: green; | |
7951 | } |
|
8056 | } | |
7952 | div.cell { |
|
|||
7953 | width: 100%; |
|
|||
7954 | padding: 5px 5px 5px 0px; |
|
|||
7955 | /* This acts as a spacer between cells, that is outside the border */ |
|
|||
7956 | margin: 0px; |
|
|||
7957 | outline: none; |
|
|||
7958 | } |
|
|||
7959 | div.prompt { |
|
8057 | div.prompt { | |
7960 | /* This needs to be wide enough for 3 digit prompt numbers: In[100]: */ |
|
8058 | /* This needs to be wide enough for 3 digit prompt numbers: In[100]: */ | |
7961 | min-width: 15ex; |
|
8059 | min-width: 15ex; | |
@@ -8733,6 +8831,9 div.text_cell_render { | |||||
8733 | border-style: none; |
|
8831 | border-style: none; | |
8734 | padding: 0.5em 0.5em 0.5em 0.4em; |
|
8832 | padding: 0.5em 0.5em 0.5em 0.4em; | |
8735 | color: #000000; |
|
8833 | color: #000000; | |
|
8834 | box-sizing: border-box; | |||
|
8835 | -moz-box-sizing: border-box; | |||
|
8836 | -webkit-box-sizing: border-box; | |||
8736 | } |
|
8837 | } | |
8737 | a.anchor-link:link { |
|
8838 | a.anchor-link:link { | |
8738 | text-decoration: none; |
|
8839 | text-decoration: none; | |
@@ -9385,6 +9486,11 body.notebook_app { | |||||
9385 | padding-right: 0px; |
|
9486 | padding-right: 0px; | |
9386 | } |
|
9487 | } | |
9387 | } |
|
9488 | } | |
|
9489 | #ipython-main-app { | |||
|
9490 | box-sizing: border-box; | |||
|
9491 | -moz-box-sizing: border-box; | |||
|
9492 | -webkit-box-sizing: border-box; | |||
|
9493 | } | |||
9388 | span#notebook_name { |
|
9494 | span#notebook_name { | |
9389 | height: 1em; |
|
9495 | height: 1em; | |
9390 | line-height: 1em; |
|
9496 | line-height: 1em; | |
@@ -9397,6 +9503,9 div#notebook_panel { | |||||
9397 | padding: 0px; |
|
9503 | padding: 0px; | |
9398 | -webkit-box-shadow: inset 1px 4px 9px -6px rgba(0, 0, 0, 0.25); |
|
9504 | -webkit-box-shadow: inset 1px 4px 9px -6px rgba(0, 0, 0, 0.25); | |
9399 | box-shadow: inset 1px 4px 9px -6px rgba(0, 0, 0, 0.25); |
|
9505 | box-shadow: inset 1px 4px 9px -6px rgba(0, 0, 0, 0.25); | |
|
9506 | box-sizing: border-box; | |||
|
9507 | -moz-box-sizing: border-box; | |||
|
9508 | -webkit-box-sizing: border-box; | |||
9400 | } |
|
9509 | } | |
9401 | div#notebook { |
|
9510 | div#notebook { | |
9402 | font-size: 14px; |
|
9511 | font-size: 14px; | |
@@ -9592,24 +9701,6 fieldset[disabled] #kernel_selector_widget > button { | |||||
9592 | -webkit-box-shadow: none; |
|
9701 | -webkit-box-shadow: none; | |
9593 | box-shadow: none; |
|
9702 | box-shadow: none; | |
9594 | } |
|
9703 | } | |
9595 | #kernel_selector_widget > button [class^="icon-"].icon-large, |
|
|||
9596 | #kernel_selector_widget > button [class*=" icon-"].icon-large { |
|
|||
9597 | line-height: .9em; |
|
|||
9598 | } |
|
|||
9599 | #kernel_selector_widget > button [class^="icon-"].icon-spin, |
|
|||
9600 | #kernel_selector_widget > button [class*=" icon-"].icon-spin { |
|
|||
9601 | display: inline-block; |
|
|||
9602 | } |
|
|||
9603 | #kernel_selector_widget > button [class^="icon-"].pull-left.icon-2x, |
|
|||
9604 | #kernel_selector_widget > button [class*=" icon-"].pull-left.icon-2x, |
|
|||
9605 | #kernel_selector_widget > button [class^="icon-"].pull-right.icon-2x, |
|
|||
9606 | #kernel_selector_widget > button [class*=" icon-"].pull-right.icon-2x { |
|
|||
9607 | margin-top: .18em; |
|
|||
9608 | } |
|
|||
9609 | #kernel_selector_widget > button [class^="icon-"].icon-spin.icon-large, |
|
|||
9610 | #kernel_selector_widget > button [class*=" icon-"].icon-spin.icon-large { |
|
|||
9611 | line-height: .8em; |
|
|||
9612 | } |
|
|||
9613 | #kernel_selector_widget > button:hover, |
|
9704 | #kernel_selector_widget > button:hover, | |
9614 | #kernel_selector_widget > button:focus, |
|
9705 | #kernel_selector_widget > button:focus, | |
9615 | #kernel_selector_widget > button:active, |
|
9706 | #kernel_selector_widget > button:active, | |
@@ -9653,6 +9744,9 fieldset[disabled] #kernel_selector_widget > button.active { | |||||
9653 | margin-top: 0px; |
|
9744 | margin-top: 0px; | |
9654 | margin-bottom: -19px; |
|
9745 | margin-bottom: -19px; | |
9655 | position: relative; |
|
9746 | position: relative; | |
|
9747 | box-sizing: border-box; | |||
|
9748 | -moz-box-sizing: border-box; | |||
|
9749 | -webkit-box-sizing: border-box; | |||
9656 | } |
|
9750 | } | |
9657 | #menubar .navbar { |
|
9751 | #menubar .navbar { | |
9658 | border-top: 1px; |
|
9752 | border-top: 1px; | |
@@ -10094,16 +10188,25 fieldset[disabled] .notification_widget.danger.active { | |||||
10094 | } |
|
10188 | } | |
10095 | div#pager_splitter { |
|
10189 | div#pager_splitter { | |
10096 | height: 8px; |
|
10190 | height: 8px; | |
|
10191 | box-sizing: border-box; | |||
|
10192 | -moz-box-sizing: border-box; | |||
|
10193 | -webkit-box-sizing: border-box; | |||
10097 | } |
|
10194 | } | |
10098 | #pager-container { |
|
10195 | #pager-container { | |
10099 | position: relative; |
|
10196 | position: relative; | |
10100 | padding: 15px 0px; |
|
10197 | padding: 15px 0px; | |
|
10198 | box-sizing: border-box; | |||
|
10199 | -moz-box-sizing: border-box; | |||
|
10200 | -webkit-box-sizing: border-box; | |||
10101 | } |
|
10201 | } | |
10102 | div#pager { |
|
10202 | div#pager { | |
10103 | font-size: 14px; |
|
10203 | font-size: 14px; | |
10104 | line-height: 20px; |
|
10204 | line-height: 20px; | |
10105 | overflow: auto; |
|
10205 | overflow: auto; | |
10106 | display: none; |
|
10206 | display: none; | |
|
10207 | box-sizing: border-box; | |||
|
10208 | -moz-box-sizing: border-box; | |||
|
10209 | -webkit-box-sizing: border-box; | |||
10107 | } |
|
10210 | } | |
10108 | div#pager pre { |
|
10211 | div#pager pre { | |
10109 | line-height: 1.21429em; |
|
10212 | line-height: 1.21429em; | |
@@ -10183,6 +10286,9 span#autosave_status { | |||||
10183 | padding: 0px; |
|
10286 | padding: 0px; | |
10184 | margin-left: -5px; |
|
10287 | margin-left: -5px; | |
10185 | margin-top: -5px; |
|
10288 | margin-top: -5px; | |
|
10289 | box-sizing: border-box; | |||
|
10290 | -moz-box-sizing: border-box; | |||
|
10291 | -webkit-box-sizing: border-box; | |||
10186 | } |
|
10292 | } | |
10187 | .toolbar select, |
|
10293 | .toolbar select, | |
10188 | .toolbar label { |
|
10294 | .toolbar label { |
@@ -46,7 +46,7 require([ | |||||
46 | common_options)); |
|
46 | common_options)); | |
47 | login_widget = new loginwidget.LoginWidget('#login_widget', common_options); |
|
47 | login_widget = new loginwidget.LoginWidget('#login_widget', common_options); | |
48 |
|
48 | |||
49 |
$('#new_notebook' |
|
49 | $('#new_notebook').click(function (e) { | |
50 | notebook_list.new_notebook(); |
|
50 | notebook_list.new_notebook(); | |
51 | }); |
|
51 | }); | |
52 |
|
52 |
General Comments 0
You need to be logged in to leave comments.
Login now