From f3cf407d0bf535e81e2853a4b6f32bea1e134a11 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 18 Feb 2014 07:52:21 +0000 Subject: [PATCH] dont select results if opening video at position, fixes #1900 --- static/js/UI.js | 6 ++++++ static/js/editor.js | 2 ++ 2 files changed, 8 insertions(+) diff --git a/static/js/UI.js b/static/js/UI.js index 9cab9d74..109ef4eb 100644 --- a/static/js/UI.js +++ b/static/js/UI.js @@ -147,6 +147,12 @@ pandora.UI = (function() { // add default video points add['videoPoints.' + item] = {annotation: '', 'in': 0, out: 0, position: 0}; } + if ( + args['videoPoints.' + item] + && (!pandora.user.ui.item || pandora.user.ui.itemView != 'editor') + ) { + pandora._dontSelectResult = true; + } } if (['timeline', 'player', 'editor'].indexOf(args.itemView) > -1) { diff --git a/static/js/editor.js b/static/js/editor.js index c55b7d5d..2410837b 100644 --- a/static/js/editor.js +++ b/static/js/editor.js @@ -52,6 +52,7 @@ pandora.ui.editor = function(data) { selected: ui.videoPoints[ui.item].annotation ? ui.item + '/' + ui.videoPoints[ui.item].annotation : '', + selectResult: !pandora._dontSelectResult, showAnnotations: ui.showAnnotations, showAnnotationsCalendar: ui.showAnnotationsCalendar, showAnnotationsMap: ui.showAnnotationsMap, @@ -288,6 +289,7 @@ pandora.ui.editor = function(data) { that.options({timeline: data.value}); } }); + pandora._dontSelectResult = false; function updateBrowser() { pandora.$ui.browser.find('img[src*="/' + ui.item + '/"]').each(function() {