Compare commits

..

3 commits

Author SHA1 Message Date
j
6c1aa50ed2 only run adjustRatio after image is loaded 2018-05-09 17:27:52 +01:00
j
2727c3d27d only numbers in imdbId 2018-05-09 17:27:34 +01:00
j
099c2610e6 ignore unknown tasks 2018-05-09 15:12:25 +01:00
3 changed files with 21 additions and 15 deletions

View file

@ -44,7 +44,10 @@ def cancelTask(request, data):
if not isinstance(ids, list): if not isinstance(ids, list):
ids = [ids] ids = [ids]
for id in ids: for id in ids:
try:
task = models.Task.get(id) task = models.Task.get(id)
except models.Task.DoesNotExist:
continue
if task.user != request.user and not request.user.profile.capability('canSeeAllTasks'): if task.user != request.user and not request.user.profile.capability('canSeeAllTasks'):
response = json_response(status=403, text='permission denied') response = json_response(status=403, text='permission denied')
return render_to_json_response(response) return render_to_json_response(response)

View file

@ -261,7 +261,7 @@ pandora.ui.home = function() {
var height = $logo.height(); var height = $logo.height();
if (width == 0 || height == 0) { if (width == 0 || height == 0) {
setTimeout(adjustRatio, 50); setTimeout(adjustRatio, 50);
} } else {
var aspect = width / height; var aspect = width / height;
if (aspect != 2) { if (aspect != 2) {
var top = 320 / aspect; var top = 320 / aspect;
@ -277,6 +277,7 @@ pandora.ui.home = function() {
}) })
} }
} }
}
that.fadeInScreen = function() { that.fadeInScreen = function() {
that.appendTo(Ox.$body).animate({opacity: 1}, 500, function() { that.appendTo(Ox.$body).animate({opacity: 1}, 500, function() {

View file

@ -623,6 +623,8 @@ pandora.ui.infoView = function(data) {
edit[key] = value edit[key] = value
? Ox.decodeHTMLEntities(value).split('; ').map(Ox.encodeHTMLEntities) ? Ox.decodeHTMLEntities(value).split('; ').map(Ox.encodeHTMLEntities)
: []; : [];
} else if (key == 'imdbId') {
edit[key] = value.match(/\d{7}/)[0];
} else { } else {
edit[key] = value; edit[key] = value;
} }