diff --git a/source/Ox.UI/js/List/Ox.List.js b/source/Ox.UI/js/List/Ox.List.js index 67f9b0e2..894e6636 100644 --- a/source/Ox.UI/js/List/Ox.List.js +++ b/source/Ox.UI/js/List/Ox.List.js @@ -1503,6 +1503,12 @@ Ox.List = function(options, self) { return that; } + // needed when a value has changed + // but, fixme: better function name + that.sort = function() { + updateSort(); + } + /*@ sortList sort list (key, operator) -> returns List Element diff --git a/source/Ox.UI/js/List/Ox.TextList.js b/source/Ox.UI/js/List/Ox.TextList.js index bbbf9c1a..101d0630 100644 --- a/source/Ox.UI/js/List/Ox.TextList.js +++ b/source/Ox.UI/js/List/Ox.TextList.js @@ -489,7 +489,7 @@ Ox.TextList = function(options, self) { Ox.forEach(self.options.items, function(item, i) { var value = ( sort.map ? sort.map(item[sort.key]) : item[sort.key] - ).toLowerCase(); + ).toString().toLowerCase(); if (Ox.startsWith(value, query)) { that.$body.options({selected: [item[self.unique]]}); Ox.print('QUERY', query, 'VALUE', value) @@ -826,7 +826,10 @@ Ox.TextList = function(options, self) { } else { that.$body.value(id, key, value); $cell && $cell.html(column.format ? column.format(value) : value); - /* + if (key == self.options.sort[0].key) { + that.$body.sort(); + } + /* fixme: something like this is needed: if (column.unique) { that.$body.setId($item.data('id'), value); $item.data({id: value}); diff --git a/source/Ox.UI/js/Map/Ox.ListMap.js b/source/Ox.UI/js/Map/Ox.ListMap.js index 0adbdd0e..16d4f080 100644 --- a/source/Ox.UI/js/Map/Ox.ListMap.js +++ b/source/Ox.UI/js/Map/Ox.ListMap.js @@ -244,6 +244,7 @@ Ox.ListMap = function(options, self) { .bindEvent({ 'delete': removeItem, init: initList, + // fixme: do we need 0/shift-0? return already zooms to place key_0: function() { self.$map.panToPlace(); },