From 8f52f8e4a2346d90d914ca45a164ee7f721244e9 Mon Sep 17 00:00:00 2001 From: Luke Faraone Date: Thu, 7 Mar 2013 11:37:53 -0500 Subject: [PATCH] Sort the streams sidebar the same way as the subscriptions page. Closes trac #1050. (imported from commit 8a6d5e067b7f726071e5797d70132cab689bbb49) --- zephyr/static/js/ui.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/zephyr/static/js/ui.js b/zephyr/static/js/ui.js index 9e81ced7d7..af3e28574e 100644 --- a/zephyr/static/js/ui.js +++ b/zephyr/static/js/ui.js @@ -907,12 +907,7 @@ function sort_narrow_list() { var items = $('#stream_filters li').get(); var parent = $('#stream_filters'); items.sort(function(a,b){ - var keyA = $(a).text(); - var keyB = $(b).text(); - - if (keyA < keyB) return -1; - if (keyA > keyB) return 1; - return 0; + return $(a).data('name').localeCompare($(b).data('name')); }); parent.empty();