From 423faa54502d9b57c5b9e3f2bd202277d4f85c71 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Fri, 23 Dec 2011 10:51:35 +0000 Subject: [PATCH] add open control to video player --- source/Ox.UI/js/Video/Ox.VideoPlayer.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/source/Ox.UI/js/Video/Ox.VideoPlayer.js b/source/Ox.UI/js/Video/Ox.VideoPlayer.js index d24d86d3..2940487e 100644 --- a/source/Ox.UI/js/Video/Ox.VideoPlayer.js +++ b/source/Ox.UI/js/Video/Ox.VideoPlayer.js @@ -14,7 +14,7 @@ Ox.VideoPlayer Generic Video Player text Text censored Array of censored ranges controlsBottom <[s]|[]> Bottom controls, from left to right - Can be 'close', fullscreen', 'scale', 'title', 'find', 'menu', + Can be 'close', fullscreen', 'scale', 'title', 'find', 'open', 'play', 'playInToOut', 'previous', 'next', 'mute', 'volume', 'size', 'timeline', 'space', 'position', 'settings'. The 'space' control is empty space that separates left-aligned from right-aligned controls. @@ -594,6 +594,23 @@ Ox.VideoPlayer = function(options, self) { }) .appendTo(self['$controls' + titleCase]); + } else if (control == 'open') { + + self.$openButton = Ox.Button({ + style: 'symbol', + title: 'arrowRight', + tooltip: 'Open in ' + Ox.getObjectById( + pandora.site.itemViews, pandora.user.ui.videoView + ).title + ' View', + type: 'image' + }) + .bindEvent({ + click: function() { + that.triggerEvent('open'); + } + }) + .appendTo(self['$controls' + titleCase]); + } else if (control == 'play') { self.$playButton = Ox.Button({