fix view with clips

This commit is contained in:
j 2012-01-19 00:33:29 +05:30
commit b4cc3621ff
4 changed files with 17 additions and 11 deletions

View file

@ -3,6 +3,7 @@
pandora.ui.itemClips = function(options) {
var self = {},
textKey = pandora.getClipTextKey(),
that = Ox.Element()
.css({
height: '192px',
@ -28,7 +29,10 @@ pandora.ui.itemClips = function(options) {
Ox.Log('', 'CLIP', clip)
var id = self.options.id + '/' + clip['in'],
title = Ox.map(clip.annotations, function(annotation) {
return annotation.layer == 'subtitles' ? annotation.value : 0
if(textKey == 'subtitles') {
return annotation.layer == 'subtitles' ? annotation.value : 0;
}
return annotation.value;
}),
url = '/' + self.options.id + '/' + self.height + 'p' + clip['in'] + '.jpg',
$item = Ox.IconItem({

View file

@ -480,7 +480,8 @@ pandora.getClipsQuery = function() {
if (condition.conditions) {
addClipsConditions(condition.conditions);
} else if (
Ox.getIndexById(pandora.site.layers, condition.key) > -1
(condition.key == 'annotations'
||Ox.getIndexById(pandora.site.layers, condition.key) > -1)
&& condition.operator == '='
) {
clipsQuery.conditions.push(condition);