Show More
@@ -57,18 +57,12 require([ | |||
|
57 | 57 | |
|
58 | 58 | var enable_autorefresh = function(){ |
|
59 | 59 | //refresh immediately , then start interval |
|
60 | if($('.upload_button').length === 0) | |
|
61 | { | |
|
62 | session_list.load_sessions(); | |
|
63 | cluster_list.load_list(); | |
|
64 | } | |
|
60 | session_list.load_sessions(); | |
|
61 | cluster_list.load_list(); | |
|
65 | 62 | if (!interval_id){ |
|
66 | 63 | interval_id = setInterval(function(){ |
|
67 | if($('.upload_button').length === 0) | |
|
68 |
|
|
|
69 | session_list.load_sessions(); | |
|
70 | cluster_list.load_list(); | |
|
71 | } | |
|
64 | session_list.load_sessions(); | |
|
65 | cluster_list.load_list(); | |
|
72 | 66 | }, time_refresh*1000); |
|
73 | 67 | } |
|
74 | 68 | }; |
@@ -172,6 +172,7 define([ | |||
|
172 | 172 | var list = data.content; |
|
173 | 173 | var len = list.length; |
|
174 | 174 | this.clear_list(); |
|
175 | var n_uploads = this.element.children('.list_item').length; | |
|
175 | 176 | if (len === 0) { |
|
176 | 177 | item = this.new_item(0); |
|
177 | 178 | var span12 = item.children().first(); |
@@ -179,16 +180,16 define([ | |||
|
179 | 180 | span12.append($('<div style="margin:auto;text-align:center;color:grey"/>').text(message)); |
|
180 | 181 | } |
|
181 | 182 | var path = this.notebook_path; |
|
182 |
var offset = |
|
|
183 | var offset = n_uploads; | |
|
183 | 184 | if (path !== '') { |
|
184 |
item = this.new_item( |
|
|
185 | item = this.new_item(offset); | |
|
185 | 186 | model = { |
|
186 | 187 | type: 'directory', |
|
187 | 188 | name: '..', |
|
188 | 189 | path: path, |
|
189 | 190 | }; |
|
190 | 191 | this.add_link(model, item); |
|
191 | offset = 1; | |
|
192 | offset += 1; | |
|
192 | 193 | } |
|
193 | 194 | for (var i=0; i<len; i++) { |
|
194 | 195 | model = list[i]; |
General Comments 0
You need to be logged in to leave comments.
Login now