##// END OF EJS Templates
Fix spurious appearance of #fontarea at end of document.
mcelrath -
Show More
@@ -1,68 +1,68
1 1 //----------------------------------------------------------------------------
2 2 // Copyright (C) 2008-2011 The IPython Development Team
3 3 //
4 4 // Distributed under the terms of the BSD License. The full license is in
5 5 // the file COPYING, distributed as part of this software.
6 6 //----------------------------------------------------------------------------
7 7
8 8 //============================================================================
9 9 // On document ready
10 10 //============================================================================
11 11
12 12
13 13 $(document).ready(function () {
14 14
15 15 IPython.init_mathjax();
16 16
17 17 IPython.read_only = $('body').data('readOnly') === 'True';
18 18 $('div#main_app').addClass('border-box-sizing ui-widget');
19 19 $('div#notebook_panel').addClass('border-box-sizing ui-widget');
20 20 // The header's bottom border is provided by the menu bar so we remove it.
21 21 $('div#header').css('border-bottom-style','none');
22 22
23 23 IPython.page = new IPython.Page();
24 24 IPython.markdown_converter = new Markdown.Converter();
25 25 IPython.layout_manager = new IPython.LayoutManager();
26 26 IPython.pager = new IPython.Pager('div#pager', 'div#pager_splitter');
27 27 IPython.quick_help = new IPython.QuickHelp('span#quick_help_area');
28 28 IPython.login_widget = new IPython.LoginWidget('span#login_widget');
29 29 IPython.notebook = new IPython.Notebook('div#notebook');
30 30 IPython.save_widget = new IPython.SaveWidget('span#save_widget');
31 31 IPython.menubar = new IPython.MenuBar('#menubar')
32 32 IPython.toolbar = new IPython.ToolBar('#toolbar')
33 33 IPython.tooltip = new IPython.Tooltip()
34 34 IPython.notification_widget = new IPython.NotificationWidget('#notification')
35 35
36 36 IPython.layout_manager.do_resize();
37 37
38 38 $('body').append('<div id="fonttest"><pre><span id="test1">x</span>'+
39 39 '<span id="test2" style="font-weight: bold;">x</span>'+
40 40 '<span id="test3" style="font-style: italic;">x</span></pre></div>')
41 41 var nh = $('#test1').innerHeight();
42 42 var bh = $('#test2').innerHeight();
43 43 var ih = $('#test3').innerHeight();
44 44 if(nh != bh || nh != ih) {
45 45 $('head').append('<style>.CodeMirror span { vertical-align: bottom; }</style>');
46 $('#fonttest').remove();
47 46 }
47 $('#fonttest').remove();
48 48
49 49 if(IPython.read_only){
50 50 // hide various elements from read-only view
51 51 $('div#pager').remove();
52 52 $('div#pager_splitter').remove();
53 53
54 54 // set the notebook name field as not modifiable
55 55 $('#notebook_name').attr('disabled','disabled')
56 56 }
57 57
58 58 IPython.page.show();
59 59
60 60 IPython.layout_manager.do_resize();
61 61 $([IPython.events]).on('notebook_loaded.Notebook', function () {
62 62 IPython.layout_manager.do_resize();
63 63 IPython.save_widget.update_url();
64 64 })
65 65 IPython.notebook.load_notebook($('body').data('notebookId'));
66 66
67 67 });
68 68
General Comments 0
You need to be logged in to leave comments. Login now