From df12d55631aec2288d495b3442b659594b871401 2014-12-11 16:08:13 From: Bussonnier Matthias Date: 2014-12-11 16:08:13 Subject: [PATCH] sort dashbord in frontend --- diff --git a/IPython/html/static/tree/js/notebooklist.js b/IPython/html/static/tree/js/notebooklist.js index 984faf5..fc66c95 100644 --- a/IPython/html/static/tree/js/notebooklist.js +++ b/IPython/html/static/tree/js/notebooklist.js @@ -163,6 +163,21 @@ define([ * @param {String} error_msg An error message */ NotebookList.prototype.draw_notebook_list = function (list, error_msg) { + list.content.sort(function(a, b) { + if (a['type'] < b['type']) { + return -1; + } + if (a['type'] > b['type']) { + return 1; + } + if (a['name'] < b['name']) { + return -1; + } + if (a['name'] > b['name']) { + return 1; + } + return 0; + }); var message = error_msg || 'Notebook list empty.'; var item = null; var model = null;