config.site, fix redirect

This commit is contained in:
j 2010-09-14 15:49:04 +02:00
parent 2ad4c5eba0
commit 293f6117ca
3 changed files with 12 additions and 11 deletions

View file

@ -565,7 +565,7 @@ def poster(request, id, size=None):
poster_path = movie.poster.path poster_path = movie.poster.path
else: else:
if not size: size='large' if not size: size='large'
return redirect('http:///0xdb.org/%s/poster.%s.jpg' % (movie.movieId, size)) return redirect('http://0xdb.org/%s/poster.%s.jpg' % (movie.movieId, size))
poster_path = os.path.join(settings.STATIC_ROOT, 'png/posterDark.48.png') poster_path = os.path.join(settings.STATIC_ROOT, 'png/posterDark.48.png')
return HttpFileResponse(poster_path, content_type='image/jpeg') return HttpFileResponse(poster_path, content_type='image/jpeg')

View file

@ -3,11 +3,9 @@
***/ ***/
var app = new Ox.App({ var app = new Ox.App({
apiURL: '/api/',
config: '/pandora.json', config: '/pandora.json',
init: 'hello', init: 'hello',
id: site.id,
name: site.name,
requestURL: '/api/'
}).launch(function(data) { }).launch(function(data) {
Ox.print('data', data) Ox.print('data', data)
app.config = data.config; app.config = data.config;
@ -599,7 +597,7 @@ app.constructList = function(view) {
app.$ui.previewDialog.resize(dialogWidth, dialogHeight, function() { app.$ui.previewDialog.resize(dialogWidth, dialogHeight, function() {
app.$ui.previewImage app.$ui.previewImage
.attr({ .attr({
src: item.poster.url.replace(/jpg/, 'large.jpg'), src: item.poster.url
}) })
.one('load', function() { .one('load', function() {
app.$ui.previewImage app.$ui.previewImage
@ -618,7 +616,7 @@ app.constructList = function(view) {
} else { } else {
app.$ui.previewImage = $('<img>') app.$ui.previewImage = $('<img>')
.attr({ .attr({
src: item.poster.url.replace(/jpg/, 'large.jpg') src: item.poster.url
}) })
.css({ .css({
position: 'absolute', position: 'absolute',
@ -797,7 +795,7 @@ app.constructMainMenu = function() {
], ],
id: 'mainMenu', id: 'mainMenu',
menus: [ menus: [
{ id: app.options('id') + 'Menu', title: app.options('name'), items: [ { id: app.config.site.id + 'Menu', title: app.config.site.name, items: [
{ id: 'about', title: 'About' }, { id: 'about', title: 'About' },
{}, {},
{ id: 'home', title: 'Home Screen' }, { id: 'home', title: 'Home Screen' },

View file

@ -1,7 +1,4 @@
{ {
"name": "{{settings.SITENAME}}",
"id": "{{settings.SITEID}}",
"url": "{{settings.URL}}",
"findKeys": [ "findKeys": [
{"id": "all", "title": "All"}, {"id": "all", "title": "All"},
{"id": "title", "title": "Title", "autocomplete": true}, {"id": "title", "title": "Title", "autocomplete": true},
@ -43,6 +40,11 @@
{"id": "map", "title": "on Map"}, {"id": "map", "title": "on Map"},
{"id": "calendar", "title": "on Calendar"} {"id": "calendar", "title": "on Calendar"}
], ],
"site": {
"name": "{{settings.SITENAME}}",
"id": "{{settings.SITEID}}",
"url": "{{settings.URL}}"
},
"sections": [ "sections": [
{"id": "history", "title": "History"}, {"id": "history", "title": "History"},
{"id": "lists", "title": "My Lists"}, {"id": "lists", "title": "My Lists"},
@ -90,7 +92,8 @@
{"id": "files", "title": "Files", "operator": "-", "align": "right", "width": 60}, {"id": "files", "title": "Files", "operator": "-", "align": "right", "width": 60},
{"id": "filename", "title": "Filename", "operator": "", "align": "left", "width": 180}, {"id": "filename", "title": "Filename", "operator": "", "align": "left", "width": 180},
{"id": "published", "title": "Date Published", "operator": "-", "align": "left", "width": 90}, {"id": "published", "title": "Date Published", "operator": "-", "align": "left", "width": 90},
{"id": "modified", "title": "Date Modified", "operator": "-", "align": "left", "width": 90} {"id": "modified", "title": "Date Modified", "operator": "-", "align": "left", "width": 90},
{"id": "popularity", "title": "Popularity", "operator": "-", "align": "left", "width": 60}
], ],
"totals": [ "totals": [
{"id": "items"}, {"id": "items"},