From 64ee0d476fef1d0ab112489b18060e0a7997ad42 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 1 Oct 2013 23:42:35 +0200 Subject: [PATCH] Fixed sort of attribute.options. --- .../app/controllers/_application_controller_form.js.coffee | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee b/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee index c7c2de7fd..6fdc20d0c 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee @@ -1099,10 +1099,9 @@ class App.ControllerForm extends App.Controller attribute.options.push row else order = _.sortBy( - _.keys( selection, (item) -> + _.keys(selection), (item) -> selection[item].toString().toLowerCase() - ) - ).reverse() + ) for key in order name_new = selection[key] if attribute.translate