From 52013410857756ddcd36d30dfdba2f00f338fe88 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 6 Mar 2018 14:46:43 +0530 Subject: [PATCH] enable download dialog --- static/js/editor.js | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/static/js/editor.js b/static/js/editor.js index db4c9dc0..3e229963 100644 --- a/static/js/editor.js +++ b/static/js/editor.js @@ -3,7 +3,9 @@ 'use strict'; pandora.ui.editor = function(data) { + var ui = pandora.user.ui, + rightsLevel = data.rightslevel, that = Ox.VideoAnnotationPanel({ annotationsCalendarSize: ui.annotationsCalendarSize, @@ -162,13 +164,20 @@ pandora.ui.editor = function(data) { pandora.$ui[dialog] = pandora.ui[dialog](data).open(); }, downloadvideo: function() { - document.location.href = pandora.getDownloadLink(ui.item, data.rightslevel); + pandora.ui.downloadVideoDialog({ + item: ui.item, + rightsLevel: rightsLevel, + title: data.title + }).open(); }, - downloadselection: function(data) { - document.location.href = '/' + ui.item - + '/' + Ox.max(pandora.site.video.resolutions) - + 'p.' + pandora.site.video.downloadFormat - + '?t=' + data['in'] + ',' + data.out; + downloadselection: function(selection) { + pandora.ui.downloadVideoDialog({ + item: ui.item, + 'in': selection['in'], + out: selection.out, + rightsLevel: rightsLevel, + title: data.title + }).open(); }, editannotation: function(data) { Ox.Log('', 'editAnnotation', data);