diff --git a/IPython/html/static/tree/js/main.js b/IPython/html/static/tree/js/main.js index b321b34..ab0e08c 100644 --- a/IPython/html/static/tree/js/main.js +++ b/IPython/html/static/tree/js/main.js @@ -57,18 +57,12 @@ require([ var enable_autorefresh = function(){ //refresh immediately , then start interval - if($('.upload_button').length === 0) - { - session_list.load_sessions(); - cluster_list.load_list(); - } + session_list.load_sessions(); + cluster_list.load_list(); if (!interval_id){ interval_id = setInterval(function(){ - if($('.upload_button').length === 0) - { - session_list.load_sessions(); - cluster_list.load_list(); - } + session_list.load_sessions(); + cluster_list.load_list(); }, time_refresh*1000); } }; diff --git a/IPython/html/static/tree/js/notebooklist.js b/IPython/html/static/tree/js/notebooklist.js index 80fd3c5..d74a154 100644 --- a/IPython/html/static/tree/js/notebooklist.js +++ b/IPython/html/static/tree/js/notebooklist.js @@ -172,6 +172,7 @@ define([ var list = data.content; var len = list.length; this.clear_list(); + var n_uploads = this.element.children('.list_item').length; if (len === 0) { item = this.new_item(0); var span12 = item.children().first(); @@ -179,16 +180,16 @@ define([ span12.append($('
').text(message)); } var path = this.notebook_path; - var offset = 0; + var offset = n_uploads; if (path !== '') { - item = this.new_item(0); + item = this.new_item(offset); model = { type: 'directory', name: '..', path: path, }; this.add_link(model, item); - offset = 1; + offset += 1; } for (var i=0; i