diff --git a/pandora/annotaion/models.py b/pandora/annotaion/models.py index bf62525..9606ebf 100644 --- a/pandora/annotaion/models.py +++ b/pandora/annotaion/models.py @@ -51,7 +51,7 @@ class Annotation(models.Model): created = models.DateTimeField(auto_now_add=True) modified = models.DateTimeField(auto_now=True) user = models.ForeignKey(User) - item = models.ForeignKey('item.Item') + item = models.ForeignKey('item.Item', related_name='annotations') #seconds start = models.FloatField(default=-1) diff --git a/pandora/templates/site.json b/pandora/templates/site.json index 269771d..9b13465 100644 --- a/pandora/templates/site.json +++ b/pandora/templates/site.json @@ -68,7 +68,7 @@ }, "sections": [ {"id": "history", "title": "History"}, - {"id": "lists", "title": "My Lists"}, + {"id": "my", "title": "My Lists"}, {"id": "public", "title": "Public Lists"}, {"id": "featured", "title": "Featured Lists"} ], @@ -83,7 +83,7 @@ {"id": "producer", "title": "Producer", "width": 180, "type": "person"}, {"id": "cinematographer", "title": "Cinematographer", "width": 180, "type": "person"}, {"id": "editor", "title": "Editor", "width": 180, "type": "person"}, - {"id": "numberofactors", "title": "Number of Actors", "width": 60, "key": "actor", "type": "length"}, + {"id": "actor", "title": "Number of Actors", "width": 60, "type": "person"}, {"id": "genre", "title": "Genre", "width": 120, "type": "string"}, {"id": "numberofkeywords", "title": "Number of Keywords", "width": 60, "key": "keyword", "type": "length"}, {"id": "wordsinsummary", "title": "Words in Summary", "width": 60, "key": "summary", "type": "words"}, @@ -126,6 +126,24 @@ ], "user": { "group": "guest", + "lists": { + "history": [ + {"id": "all_movies", "title": "All Movies", "query": {}} + ], + "my": [ + {"id": "favorites", "title": "Favorites", "public": true, "items": []}, + {"id": "most_popular", "title": "Most Popular", "query": {}}, + {"id": "recently_viewed", "title": "Recently Viewed", "query": {}}, + {"id": "1960s", "title": "1960s", "query": {"conditions": [{"key": "year", "value": "196", "operator": "^"}], "operator": ""}} + ], + "public": [ + {"id": "rlx_watchme", "title": "rlx: watchme", "public": true, "items": [0, 1, 2, 3, 4]} + ], + "featured": [ + {"id": "situationist_film", "title": "Situationist Film", "query": {}}, + {"id": "timelines", "title": "Timelines", "items": [0, 1, 2, 3, 4, 5, 6, 7, 8]} + ] + }, "preferences": {}, "ui": { "annotationsSize": 256, @@ -139,7 +157,7 @@ "listQuery": {"conditions": [], "operator": ""}, "listView": "icons", "section": "items", - "sections": ["history", "lists", "public", "featured"], + "sections": ["history", "my", "public", "featured"], "showAnnotations": true, "showGroups": true, "showInfo": true, diff --git a/static/50x.html b/static/50x.html index 6b2de3e..85a2aa5 100644 --- a/static/50x.html +++ b/static/50x.html @@ -1 +1 @@ -pan.do/ra is broken. +We'll be back in a minute. diff --git a/static/js/pandora.js b/static/js/pandora.js index f767b28..02e0072 100755 --- a/static/js/pandora.js +++ b/static/js/pandora.js @@ -802,6 +802,7 @@ var pandora = new Ox.App({ width: 40 } ], + columnsVisible: true, id: 'group_' + id, request: function(data, callback) { Ox.print('sending request', data) @@ -1092,6 +1093,17 @@ var pandora = new Ox.App({ delete app.$ui.sectionSelect; app.$ui.sectionbar.append(app.$ui.sectionButtons = ui.sectionButtons()); } + ///* + app.$ui.leftPanel.find('.OxTextList').css({ + width: data + 'px' + }); + app.$ui.leftPanel.find('.OxItem').css({ + width: data + 'px' + }); + app.$ui.leftPanel.find('.OxCell.OxColumnTitle').css({ + width: (data - 80) + 'px' + }); + //*/ Ox.print('resize', data, data / app.ui.infoRatio + 16); app.$ui.leftPanel.size('infoPanel', Math.round(data / app.ui.infoRatio) + 16); }, @@ -1118,6 +1130,7 @@ var pandora = new Ox.App({ columnsMovable: true, columnsRemovable: true, columnsResizable: true, + columnsVisible: true, format: { releasedate: {type: 'date', args: ['%a, %b %e, %Y']}, runtime: {type: 'duration', args: [0, 'medium']}, @@ -2097,7 +2110,7 @@ var pandora = new Ox.App({ var $sections = []; $.each(app.user.ui.sections, function(i, id) { var menu = []; - if (id == 'lists') { + if (id == 'my') { menu = [ { id: 'new', title: 'New List...' }, { id: 'newfromselection', title: 'New List from Selection...' }, @@ -2118,17 +2131,92 @@ var pandora = new Ox.App({ title: Ox.getObjectById(app.config.sections, id).title }); $sections.push($section); - $section.$content.append( - $('