enabled/disabled places/events

This commit is contained in:
j 2012-02-02 05:16:32 +00:00
parent 99b3c7ed38
commit c450fd2a0b
4 changed files with 15 additions and 6 deletions

View file

@ -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:

View file

@ -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:

View file

@ -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'},

View file

@ -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;
};
};