Show More
@@ -260,6 +260,7 var IPython = (function (IPython) { | |||
|
260 | 260 | var that = this; |
|
261 | 261 | var new_buttons = $('<span/>').addClass('item_buttons'); |
|
262 | 262 | var upload_button = $('<button>Upload</button>').button(). |
|
263 | addClass('upload-button'). | |
|
263 | 264 | click(function (e) { |
|
264 | 265 | var nbname = item.find('.item_name > input').attr('value'); |
|
265 | 266 | var nbformat = item.data('nbformat'); |
@@ -37,12 +37,18 $(document).ready(function () { | |||
|
37 | 37 | |
|
38 | 38 | var enable_autorefresh = function(){ |
|
39 | 39 | //refresh immediately , then start interval |
|
40 | if($('upload_button').length == 0) | |
|
41 | { | |
|
40 | 42 | IPython.notebook_list.load_list(); |
|
41 | 43 | IPython.cluster_list.load_list(); |
|
44 | } | |
|
42 | 45 | if (!interval_id){ |
|
43 | 46 | interval_id = setInterval(function(){ |
|
47 | if($('upload_button').length == 0) | |
|
48 | { | |
|
44 | 49 | IPython.notebook_list.load_list(); |
|
45 | 50 | IPython.cluster_list.load_list(); |
|
51 | } | |
|
46 | 52 | }, time_refresh*1000); |
|
47 | 53 | } |
|
48 | 54 | } |
@@ -65,6 +71,9 $(document).ready(function () { | |||
|
65 | 71 | // finally start it, it will refresh immediately |
|
66 | 72 | enable_autorefresh(); |
|
67 | 73 | |
|
74 | IPython.enable_autorefresh = enable_autorefresh; | |
|
75 | IPython.disable_autorefresh = disable_autorefresh; | |
|
76 | ||
|
68 | 77 | IPython.page.show(); |
|
69 | 78 | |
|
70 | 79 | // bound the upload method to the on change of the file select list |
General Comments 0
You need to be logged in to leave comments.
Login now