From 61ca7657b19c042cd884e6d9b55e4b6079e95b35 Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 11 Feb 2013 11:56:04 +0530 Subject: [PATCH] VideoPreview: accept tooltip function --- source/Ox.UI/js/Video/VideoPreview.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/Ox.UI/js/Video/VideoPreview.js b/source/Ox.UI/js/Video/VideoPreview.js index 061a6e80..94c20764 100644 --- a/source/Ox.UI/js/Video/VideoPreview.js +++ b/source/Ox.UI/js/Video/VideoPreview.js @@ -20,7 +20,7 @@ Ox.VideoPreview = function(options, self) { position: void 0, scaleToFill: false, timeline: '', - tooltip: '', + tooltip: null, width: 256 }) .options(options || {}) @@ -76,7 +76,11 @@ Ox.VideoPreview = function(options, self) { self.$frame.attr({src: self.options.getFrame(position)}); }, 250); return '
' : '') + + (self.options.tooltip ? ( + Ox.isFunction(self.options.tooltip) + ? self.options.tooltip() + : self.options.tooltip + ) + '
' : '') + Ox.formatDuration(position, 2) + '
'; }