only return matching annotations in findClips if query contains annotation conditions

This commit is contained in:
j 2012-01-05 18:01:56 +05:30
commit 09389f84dc
5 changed files with 52 additions and 7 deletions

View file

@ -4,7 +4,10 @@
pandora.ui.clipsView = function(videoRatio) {
var that = Ox.SplitPanel({
var textKey = Ox.getObjectById(pandora.site.layers, 'subtitles')
? 'subtitles'
: 'annotations',
that = Ox.SplitPanel({
elements: [
{
element: Ox.Bar({size: 24})
@ -26,7 +29,7 @@ pandora.ui.clipsView = function(videoRatio) {
.bindEvent({
submit: function(data) {
pandora.UI.set('itemFind', data.value ? {
conditions: [{key: 'subtitles', value: data.value, operator: '='}],
conditions: [{key: textKey, value: data.value, operator: '='}],
operator: '&'
} : pandora.site.user.ui.itemFind);
// since this is the only way itemFind can change,
@ -48,4 +51,4 @@ pandora.ui.clipsView = function(videoRatio) {
return that;
};
};