Show More
@@ -162,12 +162,16 b' define([' | |||
|
162 | 162 | * directories. |
|
163 | 163 | * @param {String} error_msg An error message |
|
164 | 164 | */ |
|
165 | ||
|
166 | ||
|
167 | var type_order = {'directory':0,'notebook':1,'file':2}; | |
|
168 | ||
|
165 | 169 | NotebookList.prototype.draw_notebook_list = function (list, error_msg) { |
|
166 | 170 | list.content.sort(function(a, b) { |
|
167 | if (a['type'] < b['type']) { | |
|
171 | if (type_order[a['type']] < type_order[b['type']]) { | |
|
168 | 172 | return -1; |
|
169 | 173 | } |
|
170 | if (a['type'] > b['type']) { | |
|
174 | if (type_order[a['type']] > type_order[b['type']]) { | |
|
171 | 175 | return 1; |
|
172 | 176 | } |
|
173 | 177 | if (a['name'] < b['name']) { |
General Comments 0
You need to be logged in to leave comments.
Login now