Show More
@@ -163,6 +163,21 b' define([' | |||||
163 | * @param {String} error_msg An error message |
|
163 | * @param {String} error_msg An error message | |
164 | */ |
|
164 | */ | |
165 | NotebookList.prototype.draw_notebook_list = function (list, error_msg) { |
|
165 | NotebookList.prototype.draw_notebook_list = function (list, error_msg) { | |
|
166 | list.content.sort(function(a, b) { | |||
|
167 | if (a['type'] < b['type']) { | |||
|
168 | return -1; | |||
|
169 | } | |||
|
170 | if (a['type'] > b['type']) { | |||
|
171 | return 1; | |||
|
172 | } | |||
|
173 | if (a['name'] < b['name']) { | |||
|
174 | return -1; | |||
|
175 | } | |||
|
176 | if (a['name'] > b['name']) { | |||
|
177 | return 1; | |||
|
178 | } | |||
|
179 | return 0; | |||
|
180 | }); | |||
166 | var message = error_msg || 'Notebook list empty.'; |
|
181 | var message = error_msg || 'Notebook list empty.'; | |
167 | var item = null; |
|
182 | var item = null; | |
168 | var model = null; |
|
183 | var model = null; |
General Comments 0
You need to be logged in to leave comments.
Login now