From e6b634ddef666a4fd575bc1de8ab5c78e46bbeed Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Sun, 6 Nov 2011 00:04:27 +0000 Subject: [PATCH] in button, react to change of tooltip option --- source/Ox.UI/js/Form/Ox.Button.js | 2 +- source/Ox.UI/js/Video/Ox.VideoPlayer.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source/Ox.UI/js/Form/Ox.Button.js b/source/Ox.UI/js/Form/Ox.Button.js index 797f101f..70b335f9 100644 --- a/source/Ox.UI/js/Form/Ox.Button.js +++ b/source/Ox.UI/js/Form/Ox.Button.js @@ -131,7 +131,7 @@ Ox.Button = function(options, self) { } that.triggerEvent('change'); } else if (key == 'tooltip') { - + that.$tooltip.options({title: value}); } else if (key == 'title') { setTitle(value); } else if (key == 'width') { diff --git a/source/Ox.UI/js/Video/Ox.VideoPlayer.js b/source/Ox.UI/js/Video/Ox.VideoPlayer.js index 90be76f2..e3085e3d 100644 --- a/source/Ox.UI/js/Video/Ox.VideoPlayer.js +++ b/source/Ox.UI/js/Video/Ox.VideoPlayer.js @@ -2126,6 +2126,9 @@ Ox.VideoPlayer = function(options, self) { } function togglePaused(from) { + if (!self.loadedMetadata) { + return; + } self.options.paused = !self.options.paused; self.$timeline && self.$timeline.options({ paused: self.options.paused