From b584d74bf006c7132af73b6b340ac7f207838cb7 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 9 Jan 2014 17:09:54 -0500 Subject: [PATCH] Sort images by date in tag deletion window, since DB IDs are not always increasing --- static/js/controllers.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/js/controllers.js b/static/js/controllers.js index b4433590f..6e55dfe54 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -240,6 +240,11 @@ function RepoCtrl($scope, Restangular, ApiService, $routeParams, $rootScope, $lo } images.sort(function(a, b) { + var result = new Date(b.created) - new Date(a.created); + if (result != 0) { + return result; + } + return b.dbid - a.dbid; });