support unsetting Ox.Select title

This commit is contained in:
j 2013-01-12 06:56:00 +00:00
parent d7f54bc7e4
commit 4329bd5408

View file

@ -58,10 +58,13 @@ Ox.Select = function(options, self) {
self.$title.css({width: getTitleWidth() + 'px'}); self.$title.css({width: getTitleWidth() + 'px'});
}, },
title: function() { title: function() {
var title = self.options.title
? self.options.title
: getItem(self.options.value).title;
if (self.options.type == 'text') { if (self.options.type == 'text') {
self.$title.html(self.options.title); self.$title.html(title);
} else { } else {
self.$button.options({title: self.options.title}); self.$button.options({title: title});
} }
}, },
width: function() { width: function() {