From 99abbb827ed540154fe9688519b63fecab0cdc85 Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 3 Oct 2011 10:58:47 +0000 Subject: [PATCH] user video player rewind option --- pandora/user/views.py | 2 +- static/js/pandora/ui/clipList.js | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/pandora/user/views.py b/pandora/user/views.py index d9417807..aaceabd8 100644 --- a/pandora/user/views.py +++ b/pandora/user/views.py @@ -367,7 +367,7 @@ def order_query(qs, sort): }.get(e['key'], 'profile__%s'%e['key']) if key == 'profile__numberoflists': qs = qs.annotate(numberoflists=Sum('lists')) - key = 'numberoffiles' + key = 'numberoflists' order = '%s%s' % (operator, key) order_by.append(order) if order_by: diff --git a/static/js/pandora/ui/clipList.js b/static/js/pandora/ui/clipList.js index 41c1bb56..cd867308 100644 --- a/static/js/pandora/ui/clipList.js +++ b/static/js/pandora/ui/clipList.js @@ -5,7 +5,6 @@ pandora.ui.clipList = function(videoRatio) { var ui = pandora.user.ui, fixedRatio = !ui.item ? 16/9 : videoRatio, isClipView = !ui.item ? ui.listView == 'clip' : ui.itemView == 'clips', - $selectedVideo, that = Ox.IconList({ fixedRatio: fixedRatio, @@ -138,6 +137,7 @@ pandora.ui.clipList = function(videoRatio) { paused: true, playInToOut: true, poster: '/' + item + '/' + height + 'p' + points[0] + '.jpg', + rewind: true, width: width, video: partsAndPoints.parts.map(function(i) { return '/' + item + '/96p' + (i + 1) @@ -154,7 +154,6 @@ pandora.ui.clipList = function(videoRatio) { $img.replaceWith($player.$element); $('.OxSelectedVideo').removeClass('OxSelectedVideo'); $player.$element.addClass('OxSelectedVideo'); - $selectedVideo = $player; }); } else if ($video.length) { // item select fires before video click @@ -164,15 +163,11 @@ pandora.ui.clipList = function(videoRatio) { setTimeout(function() { $('.OxSelectedVideo').removeClass('OxSelectedVideo'); $video.addClass('OxSelectedVideo'); - $selectedVideo = $video; }, 300); } !ui.item && pandora.UI.set('listSelection', [item]); } else { $('.OxSelectedVideo').removeClass('OxSelectedVideo'); - $selectedVideo && $selectedVideo.options({ - position: $selectedVideo.options('in') - }); !ui.item && pandora.UI.set('listSelection', []); } }