- Larry: Fix decorated selects in Opera

pull/1/head
alecpl 13 years ago
parent da042d319a
commit 85f11f0137

@ -176,26 +176,30 @@ function rcube_mail_ui()
$('.tabbed').each(function(idx, elem){ init_tabs(elem); }) $('.tabbed').each(function(idx, elem){ init_tabs(elem); })
// decorate select elements // decorate select elements
if (!bw.opera) { $('select.decorated').each(function(){
$('select.decorated').each(function(){ if (bw.opera) {
var title = $('option', this).first().text(); $(this).removeClass('decorated');
if ($('option:selected', this).val() != '') return;
title = $('option:selected', this).text(); }
var select = $(this)
.change(function(){
var val = $('option:selected', this).text();
$(this).next().children().html(val);
});
$('<a class="menuselector dropdownselector"><span class="handle">' + title + '</span></a>') var title = $('option', this).first().text();
.css('position', 'absolute') if ($('option:selected', this).val() != '')
.offset(select.position()) title = $('option:selected', this).text();
.insertAfter(select)
.children().width(select.outerWidth() - 40);
select.parent().css('position', 'relative'); var select = $(this)
}); .change(function(){
} var val = $('option:selected', this).text();
$(this).next().children().html(val);
});
$('<a class="menuselector dropdownselector"><span class="handle">' + title + '</span></a>')
.css('position', 'absolute')
.offset(select.position())
.insertAfter(select)
.children().width(select.outerWidth() - 40);
select.parent().css('position', 'relative');
});
$(document.body) $(document.body)
.bind('mouseup', body_mouseup) .bind('mouseup', body_mouseup)

Loading…
Cancel
Save