diff --git a/pandora/event/models.py b/pandora/event/models.py index 406ce459..dc43796d 100644 --- a/pandora/event/models.py +++ b/pandora/event/models.py @@ -131,8 +131,7 @@ class Event(models.Model): def make_undefined(self): self.defined = False - self.start = '' - self.end = '' + self.start = self.end = '' self.durationTime = self.endTime = self.startTime = None def get_id(self): @@ -141,7 +140,6 @@ class Event(models.Model): def json(self, user=None): j = { 'id': self.get_id(), - 'defined': self.defined, 'editable': self.editable(user) } if self.user: diff --git a/pandora/place/models.py b/pandora/place/models.py index 75610229..bb9da423 100644 --- a/pandora/place/models.py +++ b/pandora/place/models.py @@ -83,7 +83,6 @@ class Place(models.Model): def json(self, keys=None, user=None): j = { 'id': self.get_id(), - 'defined': self.defined, 'editable': self.editable(user) } if self.user: diff --git a/static/js/pandora.js b/static/js/pandora.js index 9477fee8..e3582c62 100644 --- a/static/js/pandora.js +++ b/static/js/pandora.js @@ -227,6 +227,11 @@ appPanel }); Ox.extend(pandora.site, { + calendar: data.site.layers.some(function(layer) { + return layer.type == 'event' + }) ? 'manual' : data.site.layers.some(function(layer) { + return layer.hasEvents; + }) ? 'auto' : 'none', clipKeys: Ox.map(data.site.clipKeys, function(key) { return Ox.extend(key, { operator: pandora.getSortOperator(key.id) @@ -236,6 +241,11 @@ appPanel return key.find ? key : null; }), itemsSection: pandora.site.itemName.plural.toLowerCase(), + map: data.site.layers.some(function(layer) { + return layer.type == 'place' + }) ? 'manual' : data.site.layers.some(function(layer) { + return layer.hasPlaces; + }) ? 'auto' : 'none', sectionFolders: { items: [ {id: 'personal', title: 'Personal Lists'}, diff --git a/static/js/pandora/navigationView.js b/static/js/pandora/navigationView.js index a827165f..2d6f3348 100644 --- a/static/js/pandora/navigationView.js +++ b/static/js/pandora/navigationView.js @@ -154,7 +154,9 @@ pandora.ui.navigationView = function(type, videoRatio) { operator: '&' }, keys: ['id', 'name', 'start', 'end'], - query: {}, + query: { + conditions: [{key: 'start', value: '', operator: '!='}] + }, range: [0, 1000000] }, function(result) { that.replaceElement(0, @@ -239,4 +241,4 @@ pandora.ui.navigationView = function(type, videoRatio) { return that; -}; \ No newline at end of file +};