From e6c6a19255448086e79a74104423b52f3a732ef9 Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 19 Feb 2012 07:52:08 +0000 Subject: [PATCH] use 'isSubtitle' layer property --- pandora/0xdb.jsonc | 4 ++-- pandora/padma.jsonc | 2 -- static/js/pandora/utils.js | 8 +++----- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/pandora/0xdb.jsonc b/pandora/0xdb.jsonc index 357ba08a..ba0c06b4 100644 --- a/pandora/0xdb.jsonc +++ b/pandora/0xdb.jsonc @@ -545,8 +545,8 @@ "canAddAnnotations": {"staff": true, "admin": true}, "hasEvents": true, "hasPlaces": true, + "isSubtitles": true, "item": "Subtitle", - "overlay": true, "type": "text" } ], @@ -623,7 +623,7 @@ "newsletter": true, "ui": { "annotationsFont": "small", - "annotationsRange": "position", + "annotationsRange": "all", "annotationsSize": 256, "annotationsSort": "position", "clipsColumns": 2, diff --git a/pandora/padma.jsonc b/pandora/padma.jsonc index 09434b46..d31dac58 100644 --- a/pandora/padma.jsonc +++ b/pandora/padma.jsonc @@ -459,7 +459,6 @@ "title": "Descriptions", "canAddAnnotations": {"member": true, "staff": true, "admin": true}, "item": "Description", - "overlay": true, "showInfo": true, "type": "text" }, @@ -468,7 +467,6 @@ "title": "Transcripts", "canAddAnnotations": {"member": true, "staff": true, "admin": true}, "item": "Transcript", - "overlay": true, "showInfo": true, "type": "text" } diff --git a/static/js/pandora/utils.js b/static/js/pandora/utils.js index e974f553..9941bc45 100644 --- a/static/js/pandora/utils.js +++ b/static/js/pandora/utils.js @@ -793,11 +793,9 @@ pandora.getVideoOptions = function(data) { var canPlayClips = data.editable || pandora.site.capabilities.canPlayClips[pandora.user.level] >= data.rightslevel, canPlayVideo = data.editable || pandora.site.capabilities.canPlayVideo[pandora.user.level] >= data.rightslevel, options = {}; - options.subtitles = data.layers.subtitles - ? data.layers.subtitles.map(function(subtitle) { - return {'in': subtitle['in'], out: subtitle.out, text: subtitle.value}; - }) - : []; + options.subtitles = Ox.getObject(data.layers, 'isSubtitle', true) || []).map(function(subtitle) { + return {'in': subtitle['in'], out: subtitle.out, text: subtitle.value}; + }); options.censored = canPlayVideo ? [] : canPlayClips ? ( options.subtitles.length