enable download dialog

This commit is contained in:
j 2018-03-06 14:46:43 +05:30
parent 559f05655a
commit 5201341085

View file

@ -3,7 +3,9 @@
'use strict'; 'use strict';
pandora.ui.editor = function(data) { pandora.ui.editor = function(data) {
var ui = pandora.user.ui, var ui = pandora.user.ui,
rightsLevel = data.rightslevel,
that = Ox.VideoAnnotationPanel({ that = Ox.VideoAnnotationPanel({
annotationsCalendarSize: ui.annotationsCalendarSize, annotationsCalendarSize: ui.annotationsCalendarSize,
@ -162,13 +164,20 @@ pandora.ui.editor = function(data) {
pandora.$ui[dialog] = pandora.ui[dialog](data).open(); pandora.$ui[dialog] = pandora.ui[dialog](data).open();
}, },
downloadvideo: function() { 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) { downloadselection: function(selection) {
document.location.href = '/' + ui.item pandora.ui.downloadVideoDialog({
+ '/' + Ox.max(pandora.site.video.resolutions) item: ui.item,
+ 'p.' + pandora.site.video.downloadFormat 'in': selection['in'],
+ '?t=' + data['in'] + ',' + data.out; out: selection.out,
rightsLevel: rightsLevel,
title: data.title
}).open();
}, },
editannotation: function(data) { editannotation: function(data) {
Ox.Log('', 'editAnnotation', data); Ox.Log('', 'editAnnotation', data);