From 4329bd540854ea71a597b8b9ad3f61c4f2ef3c23 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 12 Jan 2013 06:56:00 +0000 Subject: [PATCH] support unsetting Ox.Select title --- source/Ox.UI/js/Form/Select.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/Ox.UI/js/Form/Select.js b/source/Ox.UI/js/Form/Select.js index 830bd3bd..6d3d199f 100644 --- a/source/Ox.UI/js/Form/Select.js +++ b/source/Ox.UI/js/Form/Select.js @@ -58,10 +58,13 @@ Ox.Select = function(options, self) { self.$title.css({width: getTitleWidth() + 'px'}); }, title: function() { + var title = self.options.title + ? self.options.title + : getItem(self.options.value).title; if (self.options.type == 'text') { - self.$title.html(self.options.title); + self.$title.html(title); } else { - self.$button.options({title: self.options.title}); + self.$button.options({title: title}); } }, width: function() {