Show More
@@ -1,411 +1,399 b'' | |||||
1 | /** |
|
1 | /** | |
2 | * Primary styles |
|
2 | * Primary styles | |
3 | * |
|
3 | * | |
4 | * Author: IPython Development Team |
|
4 | * Author: IPython Development Team | |
5 | */ |
|
5 | */ | |
6 |
|
6 | |||
7 |
|
7 | |||
8 | body { |
|
8 | body { | |
9 | overflow: hidden; |
|
9 | overflow: hidden; | |
10 | } |
|
10 | } | |
11 |
|
11 | |||
12 | span#save_widget { |
|
12 | span#save_widget { | |
13 | padding: 5px; |
|
13 | padding: 5px; | |
14 | margin: 0px 0px 0px 300px; |
|
14 | margin: 0px 0px 0px 300px; | |
15 | display:inline-block; |
|
15 | display:inline-block; | |
16 | } |
|
16 | } | |
17 |
|
17 | |||
18 | span#notebook_name { |
|
18 | span#notebook_name { | |
19 | height: 1em; |
|
19 | height: 1em; | |
20 | line-height: 1em; |
|
20 | line-height: 1em; | |
21 | padding: 3px; |
|
21 | padding: 3px; | |
22 | border: none; |
|
22 | border: none; | |
23 | font-size: 146.5%; |
|
23 | font-size: 146.5%; | |
24 | } |
|
24 | } | |
25 |
|
25 | |||
26 | .ui-menubar-item .ui-button .ui-button-text { |
|
26 | .ui-menubar-item .ui-button .ui-button-text { | |
27 | padding: 0.4em 1.0em; |
|
27 | padding: 0.4em 1.0em; | |
28 | font-size: 100%; |
|
28 | font-size: 100%; | |
29 | } |
|
29 | } | |
30 |
|
30 | |||
31 | .ui-menu { |
|
31 | .ui-menu { | |
32 | -moz-box-shadow: 0px 6px 10px -1px #adadad; |
|
32 | -moz-box-shadow: 0px 6px 10px -1px #adadad; | |
33 | -webkit-box-shadow: 0px 6px 10px -1px #adadad; |
|
33 | -webkit-box-shadow: 0px 6px 10px -1px #adadad; | |
34 | box-shadow: 0px 6px 10px -1px #adadad; |
|
34 | box-shadow: 0px 6px 10px -1px #adadad; | |
35 | } |
|
35 | } | |
36 |
|
36 | |||
37 | .ui-menu .ui-menu-item a { |
|
37 | .ui-menu .ui-menu-item a { | |
38 | border: 1px solid transparent; |
|
38 | border: 1px solid transparent; | |
39 | padding: 2px 1.6em; |
|
39 | padding: 2px 1.6em; | |
40 | } |
|
40 | } | |
41 |
|
41 | |||
42 | .ui-menu .ui-menu-item a.ui-state-focus { |
|
42 | .ui-menu .ui-menu-item a.ui-state-focus { | |
43 | margin: 0; |
|
43 | margin: 0; | |
44 | } |
|
44 | } | |
45 |
|
45 | |||
46 | .ui-menu hr { |
|
46 | .ui-menu hr { | |
47 | margin: 0.3em 0; |
|
47 | margin: 0.3em 0; | |
48 | } |
|
48 | } | |
49 |
|
49 | |||
50 | #menubar_container { |
|
50 | #menubar_container { | |
51 | position: relative; |
|
51 | position: relative; | |
52 | } |
|
52 | } | |
53 |
|
53 | |||
54 | #notification_area { |
|
54 | #notification_area { | |
55 | position: absolute; |
|
55 | position: absolute; | |
56 | right: 0px; |
|
56 | right: 0px; | |
57 | top: 0px; |
|
57 | top: 0px; | |
58 | height: 25px; |
|
58 | height: 25px; | |
59 | padding: 3px 6px; |
|
59 | padding: 3px 6px; | |
60 | z-index: 10; |
|
60 | z-index: 10; | |
61 | } |
|
61 | } | |
62 |
|
62 | |||
63 | .notification{ |
|
63 | .notification{ | |
64 | float : right; |
|
64 | float : right; | |
65 | right: 3px; |
|
65 | right: 3px; | |
66 | top: 3px; |
|
66 | top: 3px; | |
67 | height: 25px; |
|
67 | height: 25px; | |
68 | padding: 3px 6px; |
|
68 | padding: 3px 6px; | |
69 | z-index: 10; |
|
69 | z-index: 10; | |
70 | } |
|
70 | } | |
71 |
|
71 | |||
72 | .notification.info |
|
|||
73 | {color : darkblue;} |
|
|||
74 |
|
||||
75 | .notification.safe |
|
|||
76 | {color : darkgreen;} |
|
|||
77 |
|
||||
78 | .notification.warning |
|
|||
79 | {color : darkorange;} |
|
|||
80 |
|
||||
81 | .notification.danger |
|
|||
82 | { color : darkred } |
|
|||
83 |
|
||||
84 | #toolbar { |
|
72 | #toolbar { | |
85 | padding: 3px 15px; |
|
73 | padding: 3px 15px; | |
86 | } |
|
74 | } | |
87 |
|
75 | |||
88 | #cell_type { |
|
76 | #cell_type { | |
89 | font-size: 85%; |
|
77 | font-size: 85%; | |
90 | } |
|
78 | } | |
91 |
|
79 | |||
92 |
|
80 | |||
93 | div#main_app { |
|
81 | div#main_app { | |
94 | width: 100%; |
|
82 | width: 100%; | |
95 | position: relative; |
|
83 | position: relative; | |
96 | } |
|
84 | } | |
97 |
|
85 | |||
98 | span#quick_help_area { |
|
86 | span#quick_help_area { | |
99 | position: static; |
|
87 | position: static; | |
100 | padding: 5px 0px; |
|
88 | padding: 5px 0px; | |
101 | margin: 0px 0px 0px 0px; |
|
89 | margin: 0px 0px 0px 0px; | |
102 | } |
|
90 | } | |
103 |
|
91 | |||
104 | .help_string { |
|
92 | .help_string { | |
105 | float: right; |
|
93 | float: right; | |
106 | width: 170px; |
|
94 | width: 170px; | |
107 | padding: 0px 5px; |
|
95 | padding: 0px 5px; | |
108 | text-align: left; |
|
96 | text-align: left; | |
109 | font-size: 85%; |
|
97 | font-size: 85%; | |
110 | } |
|
98 | } | |
111 |
|
99 | |||
112 | .help_string_label { |
|
100 | .help_string_label { | |
113 | float: right; |
|
101 | float: right; | |
114 | font-size: 85%; |
|
102 | font-size: 85%; | |
115 | } |
|
103 | } | |
116 |
|
104 | |||
117 | div#notebook_panel { |
|
105 | div#notebook_panel { | |
118 | margin: 0px 0px 0px 0px; |
|
106 | margin: 0px 0px 0px 0px; | |
119 | padding: 0px; |
|
107 | padding: 0px; | |
120 | } |
|
108 | } | |
121 |
|
109 | |||
122 | div#notebook { |
|
110 | div#notebook { | |
123 | overflow-y: scroll; |
|
111 | overflow-y: scroll; | |
124 | overflow-x: auto; |
|
112 | overflow-x: auto; | |
125 | width: 100%; |
|
113 | width: 100%; | |
126 | /* This spaces the cell away from the edge of the notebook area */ |
|
114 | /* This spaces the cell away from the edge of the notebook area */ | |
127 | padding: 5px 5px 15px 5px; |
|
115 | padding: 5px 5px 15px 5px; | |
128 | margin: 0px; |
|
116 | margin: 0px; | |
129 | background-color: white; |
|
117 | background-color: white; | |
130 | } |
|
118 | } | |
131 |
|
119 | |||
132 | div#pager_splitter { |
|
120 | div#pager_splitter { | |
133 | height: 8px; |
|
121 | height: 8px; | |
134 | } |
|
122 | } | |
135 |
|
123 | |||
136 | div#pager { |
|
124 | div#pager { | |
137 | padding: 15px; |
|
125 | padding: 15px; | |
138 | overflow: auto; |
|
126 | overflow: auto; | |
139 | display: none; |
|
127 | display: none; | |
140 | } |
|
128 | } | |
141 |
|
129 | |||
142 | div.ui-widget-content { |
|
130 | div.ui-widget-content { | |
143 | border: 1px solid #aaa; |
|
131 | border: 1px solid #aaa; | |
144 | outline: none; |
|
132 | outline: none; | |
145 | } |
|
133 | } | |
146 |
|
134 | |||
147 | .cell { |
|
135 | .cell { | |
148 | border: 1px solid transparent; |
|
136 | border: 1px solid transparent; | |
149 | } |
|
137 | } | |
150 |
|
138 | |||
151 | div.cell { |
|
139 | div.cell { | |
152 | width: 100%; |
|
140 | width: 100%; | |
153 | padding: 5px 5px 5px 0px; |
|
141 | padding: 5px 5px 5px 0px; | |
154 | /* This acts as a spacer between cells, that is outside the border */ |
|
142 | /* This acts as a spacer between cells, that is outside the border */ | |
155 | margin: 2px 0px 2px 0px; |
|
143 | margin: 2px 0px 2px 0px; | |
156 | } |
|
144 | } | |
157 |
|
145 | |||
158 | div.code_cell { |
|
146 | div.code_cell { | |
159 | background-color: white; |
|
147 | background-color: white; | |
160 | } |
|
148 | } | |
161 |
|
149 | |||
162 | /* any special styling for code cells that are currently running goes here */ |
|
150 | /* any special styling for code cells that are currently running goes here */ | |
163 | div.code_cell.running { |
|
151 | div.code_cell.running { | |
164 | } |
|
152 | } | |
165 |
|
153 | |||
166 | div.prompt { |
|
154 | div.prompt { | |
167 | /* This needs to be wide enough for 3 digit prompt numbers: In[100]: */ |
|
155 | /* This needs to be wide enough for 3 digit prompt numbers: In[100]: */ | |
168 | width: 11ex; |
|
156 | width: 11ex; | |
169 | /* This 0.4em is tuned to match the padding on the CodeMirror editor. */ |
|
157 | /* This 0.4em is tuned to match the padding on the CodeMirror editor. */ | |
170 | padding: 0.4em; |
|
158 | padding: 0.4em; | |
171 | margin: 0px; |
|
159 | margin: 0px; | |
172 | font-family: monospace; |
|
160 | font-family: monospace; | |
173 | text-align:right; |
|
161 | text-align:right; | |
174 | } |
|
162 | } | |
175 |
|
163 | |||
176 | div.input { |
|
164 | div.input { | |
177 | page-break-inside: avoid; |
|
165 | page-break-inside: avoid; | |
178 | } |
|
166 | } | |
179 |
|
167 | |||
180 | /* input_area and input_prompt must match in top border and margin for alignment */ |
|
168 | /* input_area and input_prompt must match in top border and margin for alignment */ | |
181 | div.input_area { |
|
169 | div.input_area { | |
182 | color: black; |
|
170 | color: black; | |
183 | border: 1px solid #ddd; |
|
171 | border: 1px solid #ddd; | |
184 | border-radius: 3px; |
|
172 | border-radius: 3px; | |
185 | background: #f7f7f7; |
|
173 | background: #f7f7f7; | |
186 | } |
|
174 | } | |
187 |
|
175 | |||
188 | div.input_prompt { |
|
176 | div.input_prompt { | |
189 | color: navy; |
|
177 | color: navy; | |
190 | border-top: 1px solid transparent; |
|
178 | border-top: 1px solid transparent; | |
191 | } |
|
179 | } | |
192 |
|
180 | |||
193 | div.output_wrapper { |
|
181 | div.output_wrapper { | |
194 | /* This is a spacer between the input and output of each cell */ |
|
182 | /* This is a spacer between the input and output of each cell */ | |
195 | margin-top: 5px; |
|
183 | margin-top: 5px; | |
196 | margin-left: 5px; |
|
184 | margin-left: 5px; | |
197 | /* FF needs explicit width to stretch */ |
|
185 | /* FF needs explicit width to stretch */ | |
198 | width: 100%; |
|
186 | width: 100%; | |
199 | /* this position must be relative to enable descendents to be absolute within it */ |
|
187 | /* this position must be relative to enable descendents to be absolute within it */ | |
200 | position: relative; |
|
188 | position: relative; | |
201 | } |
|
189 | } | |
202 |
|
190 | |||
203 | /* class for the output area when it should be height-limited */ |
|
191 | /* class for the output area when it should be height-limited */ | |
204 | div.output_scroll { |
|
192 | div.output_scroll { | |
205 | /* ideally, this would be max-height, but FF barfs all over that */ |
|
193 | /* ideally, this would be max-height, but FF barfs all over that */ | |
206 | height: 24em; |
|
194 | height: 24em; | |
207 | /* FF needs this *and the wrapper* to specify full width, or it will shrinkwrap */ |
|
195 | /* FF needs this *and the wrapper* to specify full width, or it will shrinkwrap */ | |
208 | width: 100%; |
|
196 | width: 100%; | |
209 |
|
197 | |||
210 | overflow: auto; |
|
198 | overflow: auto; | |
211 | border-radius: 3px; |
|
199 | border-radius: 3px; | |
212 | box-shadow: inset 0 2px 8px rgba(0, 0, 0, .8); |
|
200 | box-shadow: inset 0 2px 8px rgba(0, 0, 0, .8); | |
213 | } |
|
201 | } | |
214 |
|
202 | |||
215 | /* output div while it is collapsed */ |
|
203 | /* output div while it is collapsed */ | |
216 | div.output_collapsed { |
|
204 | div.output_collapsed { | |
217 | margin-right: 5px; |
|
205 | margin-right: 5px; | |
218 | } |
|
206 | } | |
219 |
|
207 | |||
220 | div.out_prompt_overlay { |
|
208 | div.out_prompt_overlay { | |
221 | height: 100%; |
|
209 | height: 100%; | |
222 | padding: 0px; |
|
210 | padding: 0px; | |
223 | position: absolute; |
|
211 | position: absolute; | |
224 | border-radius: 3px; |
|
212 | border-radius: 3px; | |
225 | } |
|
213 | } | |
226 |
|
214 | |||
227 | div.out_prompt_overlay:hover { |
|
215 | div.out_prompt_overlay:hover { | |
228 | /* use inner shadow to get border that is computed the same on WebKit/FF */ |
|
216 | /* use inner shadow to get border that is computed the same on WebKit/FF */ | |
229 | box-shadow: inset 0 0 1px #000; |
|
217 | box-shadow: inset 0 0 1px #000; | |
230 | background: rgba(240, 240, 240, 0.5); |
|
218 | background: rgba(240, 240, 240, 0.5); | |
231 | } |
|
219 | } | |
232 |
|
220 | |||
233 | div.output_prompt { |
|
221 | div.output_prompt { | |
234 | color: darkred; |
|
222 | color: darkred; | |
235 | /* 5px right shift to account for margin in parent container */ |
|
223 | /* 5px right shift to account for margin in parent container */ | |
236 | margin: 0 5px 0 -5px; |
|
224 | margin: 0 5px 0 -5px; | |
237 | } |
|
225 | } | |
238 |
|
226 | |||
239 | /* This class is the outer container of all output sections. */ |
|
227 | /* This class is the outer container of all output sections. */ | |
240 | div.output_area { |
|
228 | div.output_area { | |
241 | padding: 0px; |
|
229 | padding: 0px; | |
242 | page-break-inside: avoid; |
|
230 | page-break-inside: avoid; | |
243 | } |
|
231 | } | |
244 |
|
232 | |||
245 | /* This class is for the output subarea inside the output_area and after |
|
233 | /* This class is for the output subarea inside the output_area and after | |
246 | the prompt div. */ |
|
234 | the prompt div. */ | |
247 | div.output_subarea { |
|
235 | div.output_subarea { | |
248 | padding: 0.4em 0.4em 0.4em 0.4em; |
|
236 | padding: 0.4em 0.4em 0.4em 0.4em; | |
249 | } |
|
237 | } | |
250 |
|
238 | |||
251 | /* The rest of the output_* classes are for special styling of the different |
|
239 | /* The rest of the output_* classes are for special styling of the different | |
252 | output types */ |
|
240 | output types */ | |
253 |
|
241 | |||
254 | /* all text output has this class: */ |
|
242 | /* all text output has this class: */ | |
255 | div.output_text { |
|
243 | div.output_text { | |
256 | text-align: left; |
|
244 | text-align: left; | |
257 | color: black; |
|
245 | color: black; | |
258 | font-family: monospace; |
|
246 | font-family: monospace; | |
259 | } |
|
247 | } | |
260 |
|
248 | |||
261 | /* stdout/stderr are 'text' as well as 'stream', but pyout/pyerr are *not* streams */ |
|
249 | /* stdout/stderr are 'text' as well as 'stream', but pyout/pyerr are *not* streams */ | |
262 | div.output_stream { |
|
250 | div.output_stream { | |
263 | padding-top: 0.0em; |
|
251 | padding-top: 0.0em; | |
264 | padding-bottom: 0.0em; |
|
252 | padding-bottom: 0.0em; | |
265 | } |
|
253 | } | |
266 | div.output_stdout { |
|
254 | div.output_stdout { | |
267 | } |
|
255 | } | |
268 | div.output_stderr { |
|
256 | div.output_stderr { | |
269 | background: #fdd; /* very light red background for stderr */ |
|
257 | background: #fdd; /* very light red background for stderr */ | |
270 | } |
|
258 | } | |
271 |
|
259 | |||
272 | div.output_latex { |
|
260 | div.output_latex { | |
273 | text-align: left; |
|
261 | text-align: left; | |
274 | color: black; |
|
262 | color: black; | |
275 | } |
|
263 | } | |
276 |
|
264 | |||
277 | div.output_html { |
|
265 | div.output_html { | |
278 | } |
|
266 | } | |
279 |
|
267 | |||
280 | div.output_png { |
|
268 | div.output_png { | |
281 | } |
|
269 | } | |
282 |
|
270 | |||
283 | div.output_jpeg { |
|
271 | div.output_jpeg { | |
284 | } |
|
272 | } | |
285 |
|
273 | |||
286 | div.text_cell { |
|
274 | div.text_cell { | |
287 | background-color: white; |
|
275 | background-color: white; | |
288 | padding: 5px 5px 5px 5px; |
|
276 | padding: 5px 5px 5px 5px; | |
289 | } |
|
277 | } | |
290 |
|
278 | |||
291 | div.text_cell_input { |
|
279 | div.text_cell_input { | |
292 | color: black; |
|
280 | color: black; | |
293 | border: 1px solid #ddd; |
|
281 | border: 1px solid #ddd; | |
294 | border-radius: 3px; |
|
282 | border-radius: 3px; | |
295 | background: #f7f7f7; |
|
283 | background: #f7f7f7; | |
296 | } |
|
284 | } | |
297 |
|
285 | |||
298 | div.text_cell_render { |
|
286 | div.text_cell_render { | |
299 | font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif; |
|
287 | font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif; | |
300 | outline: none; |
|
288 | outline: none; | |
301 | resize: none; |
|
289 | resize: none; | |
302 | width: inherit; |
|
290 | width: inherit; | |
303 | border-style: none; |
|
291 | border-style: none; | |
304 | padding: 5px; |
|
292 | padding: 5px; | |
305 | color: black; |
|
293 | color: black; | |
306 | } |
|
294 | } | |
307 |
|
295 | |||
308 | /* The following gets added to the <head> if it is detected that the user has a |
|
296 | /* The following gets added to the <head> if it is detected that the user has a | |
309 | * monospace font with inconsistent normal/bold/italic height. See |
|
297 | * monospace font with inconsistent normal/bold/italic height. See | |
310 | * notebookmain.js. Such fonts will have keywords vertically offset with |
|
298 | * notebookmain.js. Such fonts will have keywords vertically offset with | |
311 | * respect to the rest of the text. The user should select a better font. |
|
299 | * respect to the rest of the text. The user should select a better font. | |
312 | * See: https://github.com/ipython/ipython/issues/1503 |
|
300 | * See: https://github.com/ipython/ipython/issues/1503 | |
313 | * |
|
301 | * | |
314 | * .CodeMirror span { |
|
302 | * .CodeMirror span { | |
315 | * vertical-align: bottom; |
|
303 | * vertical-align: bottom; | |
316 | * } |
|
304 | * } | |
317 | */ |
|
305 | */ | |
318 |
|
306 | |||
319 | .CodeMirror { |
|
307 | .CodeMirror { | |
320 | line-height: 1.231; /* Changed from 1em to our global default */ |
|
308 | line-height: 1.231; /* Changed from 1em to our global default */ | |
321 | } |
|
309 | } | |
322 |
|
310 | |||
323 | .CodeMirror-scroll { |
|
311 | .CodeMirror-scroll { | |
324 | height: auto; /* Changed to auto to autogrow */ |
|
312 | height: auto; /* Changed to auto to autogrow */ | |
325 | /* The CodeMirror docs are a bit fuzzy on if overflow-y should be hidden or visible.*/ |
|
313 | /* The CodeMirror docs are a bit fuzzy on if overflow-y should be hidden or visible.*/ | |
326 | /* We have found that if it is visible, vertical scrollbars appear with font size changes.*/ |
|
314 | /* We have found that if it is visible, vertical scrollbars appear with font size changes.*/ | |
327 | overflow-y: hidden; |
|
315 | overflow-y: hidden; | |
328 | overflow-x: auto; /* Changed from auto to remove scrollbar */ |
|
316 | overflow-x: auto; /* Changed from auto to remove scrollbar */ | |
329 | } |
|
317 | } | |
330 |
|
318 | |||
331 | /* CSS font colors for translated ANSI colors. */ |
|
319 | /* CSS font colors for translated ANSI colors. */ | |
332 |
|
320 | |||
333 |
|
321 | |||
334 | .ansiblack {color: black;} |
|
322 | .ansiblack {color: black;} | |
335 | .ansired {color: darkred;} |
|
323 | .ansired {color: darkred;} | |
336 | .ansigreen {color: darkgreen;} |
|
324 | .ansigreen {color: darkgreen;} | |
337 | .ansiyellow {color: brown;} |
|
325 | .ansiyellow {color: brown;} | |
338 | .ansiblue {color: darkblue;} |
|
326 | .ansiblue {color: darkblue;} | |
339 | .ansipurple {color: darkviolet;} |
|
327 | .ansipurple {color: darkviolet;} | |
340 | .ansicyan {color: steelblue;} |
|
328 | .ansicyan {color: steelblue;} | |
341 | .ansigrey {color: grey;} |
|
329 | .ansigrey {color: grey;} | |
342 | .ansibold {font-weight: bold;} |
|
330 | .ansibold {font-weight: bold;} | |
343 |
|
331 | |||
344 | .completions { |
|
332 | .completions { | |
345 | position: absolute; |
|
333 | position: absolute; | |
346 | z-index: 10; |
|
334 | z-index: 10; | |
347 | overflow: hidden; |
|
335 | overflow: hidden; | |
348 | border: 1px solid grey; |
|
336 | border: 1px solid grey; | |
349 | } |
|
337 | } | |
350 |
|
338 | |||
351 | .completions select { |
|
339 | .completions select { | |
352 | background: white; |
|
340 | background: white; | |
353 | outline: none; |
|
341 | outline: none; | |
354 | border: none; |
|
342 | border: none; | |
355 | padding: 0px; |
|
343 | padding: 0px; | |
356 | margin: 0px; |
|
344 | margin: 0px; | |
357 | overflow: auto; |
|
345 | overflow: auto; | |
358 | font-family: monospace; |
|
346 | font-family: monospace; | |
359 | } |
|
347 | } | |
360 |
|
348 | |||
361 | option.context { |
|
349 | option.context { | |
362 | background-color: #DEF7FF; |
|
350 | background-color: #DEF7FF; | |
363 | } |
|
351 | } | |
364 | option.introspection { |
|
352 | option.introspection { | |
365 | background-color: #EBF4EB; |
|
353 | background-color: #EBF4EB; | |
366 | } |
|
354 | } | |
367 |
|
355 | |||
368 | /*fixed part of the completion*/ |
|
356 | /*fixed part of the completion*/ | |
369 | .completions p b { |
|
357 | .completions p b { | |
370 | font-weight:bold; |
|
358 | font-weight:bold; | |
371 | } |
|
359 | } | |
372 |
|
360 | |||
373 | .completions p { |
|
361 | .completions p { | |
374 | background: #DDF; |
|
362 | background: #DDF; | |
375 | /*outline: none; |
|
363 | /*outline: none; | |
376 | padding: 0px;*/ |
|
364 | padding: 0px;*/ | |
377 | border-bottom: black solid 1px; |
|
365 | border-bottom: black solid 1px; | |
378 | padding: 1px; |
|
366 | padding: 1px; | |
379 | font-family: monospace; |
|
367 | font-family: monospace; | |
380 | } |
|
368 | } | |
381 |
|
369 | |||
382 | pre.dialog { |
|
370 | pre.dialog { | |
383 | background-color: #f7f7f7; |
|
371 | background-color: #f7f7f7; | |
384 | border: 1px solid #ddd; |
|
372 | border: 1px solid #ddd; | |
385 | border-radius: 3px; |
|
373 | border-radius: 3px; | |
386 | padding: 0.4em; |
|
374 | padding: 0.4em; | |
387 | padding-left: 2em; |
|
375 | padding-left: 2em; | |
388 | } |
|
376 | } | |
389 |
|
377 | |||
390 | p.dialog { |
|
378 | p.dialog { | |
391 | padding : 0.2em; |
|
379 | padding : 0.2em; | |
392 | } |
|
380 | } | |
393 |
|
381 | |||
394 | .shortcut_key { |
|
382 | .shortcut_key { | |
395 | display: inline-block; |
|
383 | display: inline-block; | |
396 | width: 15ex; |
|
384 | width: 15ex; | |
397 | text-align: right; |
|
385 | text-align: right; | |
398 | font-family: monospace; |
|
386 | font-family: monospace; | |
399 | } |
|
387 | } | |
400 |
|
388 | |||
401 | .shortcut_descr { |
|
389 | .shortcut_descr { | |
402 | } |
|
390 | } | |
403 |
|
391 | |||
404 | /* Word-wrap output correctly. This is the CSS3 spelling, though Firefox seems |
|
392 | /* Word-wrap output correctly. This is the CSS3 spelling, though Firefox seems | |
405 | to not honor it correctly. Webkit browsers (Chrome, rekonq, Safari) do. |
|
393 | to not honor it correctly. Webkit browsers (Chrome, rekonq, Safari) do. | |
406 | */ |
|
394 | */ | |
407 | pre, code, kbd, samp { white-space: pre-wrap; } |
|
395 | pre, code, kbd, samp { white-space: pre-wrap; } | |
408 |
|
396 | |||
409 | #fonttest { |
|
397 | #fonttest { | |
410 | font-family: monospace; |
|
398 | font-family: monospace; | |
411 | } |
|
399 | } |
@@ -1,48 +1,50 b'' | |||||
1 | //---------------------------------------------------------------------------- |
|
1 | //---------------------------------------------------------------------------- | |
2 | // Copyright (C) 2012 The IPython Development Team |
|
2 | // Copyright (C) 2012 The IPython Development Team | |
3 | // |
|
3 | // | |
4 | // Distributed under the terms of the BSD License. The full license is in |
|
4 | // Distributed under the terms of the BSD License. The full license is in | |
5 | // the file COPYING, distributed as part of this software. |
|
5 | // the file COPYING, distributed as part of this software. | |
6 | //---------------------------------------------------------------------------- |
|
6 | //---------------------------------------------------------------------------- | |
7 |
|
7 | |||
8 | //============================================================================ |
|
8 | //============================================================================ | |
9 | // Notification widget |
|
9 | // Notification widget | |
10 | //============================================================================ |
|
10 | //============================================================================ | |
11 |
|
11 | |||
12 | var IPython = (function (IPython) { |
|
12 | var IPython = (function (IPython) { | |
13 | "use strict"; |
|
13 | "use strict"; | |
14 | var utils = IPython.utils; |
|
14 | var utils = IPython.utils; | |
15 |
|
15 | |||
16 |
|
16 | |||
17 | var NotificationArea = function (selector) { |
|
17 | var NotificationArea = function (selector) { | |
18 | this.selector = selector; |
|
18 | this.selector = selector; | |
19 | if (this.selector !== undefined) { |
|
19 | if (this.selector !== undefined) { | |
20 | this.element = $(selector); |
|
20 | this.element = $(selector); | |
21 | } |
|
21 | } | |
22 | }; |
|
22 | }; | |
23 |
|
23 | |||
24 | NotificationArea.prototype.temp_message = function (msg, timeout, css_class) { |
|
24 | NotificationArea.prototype.temp_message = function (msg, timeout, css_class) { | |
25 | var uuid = utils.uuid(); |
|
25 | var uuid = utils.uuid(); | |
|
26 | if( css_class == 'danger'){css_class = 'ui-state-error'} | |||
|
27 | if( css_class == 'warning'){css_class = 'ui-state-highlight'} | |||
26 | var tdiv = $('<div>') |
|
28 | var tdiv = $('<div>') | |
27 | .attr('id',uuid) |
|
29 | .attr('id',uuid) | |
28 | .addClass('notification ui-widget ui-widget-content ui-corner-all') |
|
30 | .addClass('notification ui-widget ui-widget-content ui-corner-all') | |
29 | .addClass('border-box-sizing') |
|
31 | .addClass('border-box-sizing') | |
30 | .addClass(css_class) |
|
32 | .addClass(css_class) | |
31 | .hide() |
|
33 | .hide() | |
32 | .text(msg); |
|
34 | .text(msg); | |
33 |
|
35 | |||
34 | $(this.selector).append(tdiv); |
|
36 | $(this.selector).append(tdiv); | |
35 | var tmout = Math.max(1500,(timeout||1500)); |
|
37 | var tmout = Math.max(1500,(timeout||1500)); | |
36 | tdiv.fadeIn(100); |
|
38 | tdiv.fadeIn(100); | |
37 |
|
39 | |||
38 | setTimeout(function () { |
|
40 | setTimeout(function () { | |
39 | tdiv.fadeOut(100, function () {tdiv.remove();}); |
|
41 | tdiv.fadeOut(100, function () {tdiv.remove();}); | |
40 | }, tmout) |
|
42 | }, tmout) | |
41 | }; |
|
43 | }; | |
42 |
|
44 | |||
43 | IPython.NotificationArea = NotificationArea; |
|
45 | IPython.NotificationArea = NotificationArea; | |
44 |
|
46 | |||
45 | return IPython; |
|
47 | return IPython; | |
46 |
|
48 | |||
47 | }(IPython)); |
|
49 | }(IPython)); | |
48 |
|
50 |
General Comments 0
You need to be logged in to leave comments.
Login now