##// END OF EJS Templates
On tab select, the URL is updated.
Brian Granger -
Show More
@@ -1,35 +1,39 b''
1 //----------------------------------------------------------------------------
1 //----------------------------------------------------------------------------
2 // Copyright (C) 2008-2011 The IPython Development Team
2 // Copyright (C) 2008-2011 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 // On document ready
9 // On document ready
10 //============================================================================
10 //============================================================================
11
11
12
12
13 $(document).ready(function () {
13 $(document).ready(function () {
14
14
15 IPython.page = new IPython.Page();
15 IPython.page = new IPython.Page();
16
16
17 $('div#tabs').tabs();
17 $('div#tabs').tabs();
18 $('div#tabs').on('tabsselect', function (event, ui) {
19 var new_url = $('body').data('baseProjectUrl') + '#' + ui.panel.id;
20 window.history.replaceState({}, '', new_url);
21 });
18 $('div#main_app').addClass('border-box-sizing ui-widget');
22 $('div#main_app').addClass('border-box-sizing ui-widget');
19 $('div#notebooks_toolbar').addClass('ui-widget ui-helper-clearfix');
23 $('div#notebooks_toolbar').addClass('ui-widget ui-helper-clearfix');
20 $('#new_notebook').button().click(function (e) {
24 $('#new_notebook').button().click(function (e) {
21 window.open($('body').data('baseProjectUrl')+'new');
25 window.open($('body').data('baseProjectUrl')+'new');
22 });
26 });
23
27
24 IPython.read_only = $('body').data('readOnly') === 'True';
28 IPython.read_only = $('body').data('readOnly') === 'True';
25 IPython.notebook_list = new IPython.NotebookList('div#notebook_list');
29 IPython.notebook_list = new IPython.NotebookList('div#notebook_list');
26 IPython.cluster_list = new IPython.ClusterList('div#cluster_list');
30 IPython.cluster_list = new IPython.ClusterList('div#cluster_list');
27 IPython.login_widget = new IPython.LoginWidget('span#login_widget');
31 IPython.login_widget = new IPython.LoginWidget('span#login_widget');
28
32
29 IPython.notebook_list.load_list();
33 IPython.notebook_list.load_list();
30 IPython.cluster_list.load_list();
34 IPython.cluster_list.load_list();
31
35
32 IPython.page.show();
36 IPython.page.show();
33
37
34 });
38 });
35
39
General Comments 0
You need to be logged in to leave comments. Login now