diff --git a/pandora/clip/models.py b/pandora/clip/models.py index aec284af..99cbeb84 100644 --- a/pandora/clip/models.py +++ b/pandora/clip/models.py @@ -32,7 +32,7 @@ class Clip(models.Model): hue = models.FloatField(default=0, db_index=True) saturation = models.FloatField(default=0, db_index=True) lightness = models.FloatField(default=0, db_index=True) - volume = models.FloatField(default=0, db_index=True) + volume = models.FloatField(default=0, null=True, db_index=True) def update_calculated_values(self): self.duration = self.end - self.start diff --git a/static/js/pandora/ui/mapView.js b/static/js/pandora/ui/mapView.js index 323879dc..5d7aac95 100644 --- a/static/js/pandora/ui/mapView.js +++ b/static/js/pandora/ui/mapView.js @@ -43,6 +43,7 @@ pandora.ui.mapView = function(videoRatio) { var id = data.id || ''; updateToolbar(id ? data : null); if (id && id[0] != '_') { + $status.html('loading...'); $list.options({ items: function(data, callback) { var itemQuery; @@ -54,7 +55,7 @@ pandora.ui.mapView = function(videoRatio) { operator: '&' }; } - return pandora.api.findClips(Ox.extend({ + return pandora.api.findAnnotations(Ox.extend({ itemQuery: itemQuery, query: { conditions: [{key: 'place', value: id, operator:'=='}], @@ -193,7 +194,10 @@ pandora.ui.mapView = function(videoRatio) { } function updateStatusbar(items) { - $status.html((items || 'No') + ' clip' + (items == 1 ? '' : 's')); + $status.html( + (items ? Ox.formatNumber(items) : 'No') + + ' clip' + (items == 1 ? '' : 's') + ); } function updateToolbar(place) { @@ -221,4 +225,4 @@ pandora.ui.mapView = function(videoRatio) { return that; -}; +}; \ No newline at end of file