From 85f11f01373738ad0c1a8660b15b4f3bafe836d7 Mon Sep 17 00:00:00 2001 From: alecpl Date: Thu, 8 Mar 2012 11:04:27 +0000 Subject: - Larry: Fix decorated selects in Opera --- skins/larry/ui.js | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) (limited to 'skins') diff --git a/skins/larry/ui.js b/skins/larry/ui.js index 8a66a8cc4..480e1719c 100644 --- a/skins/larry/ui.js +++ b/skins/larry/ui.js @@ -176,26 +176,30 @@ function rcube_mail_ui() $('.tabbed').each(function(idx, elem){ init_tabs(elem); }) // decorate select elements - if (!bw.opera) { - $('select.decorated').each(function(){ - var title = $('option', this).first().text(); - if ($('option:selected', this).val() != '') - title = $('option:selected', this).text(); - var select = $(this) - .change(function(){ - var val = $('option:selected', this).text(); - $(this).next().children().html(val); - }); + $('select.decorated').each(function(){ + if (bw.opera) { + $(this).removeClass('decorated'); + return; + } - $('' + title + '') - .css('position', 'absolute') - .offset(select.position()) - .insertAfter(select) - .children().width(select.outerWidth() - 40); + var title = $('option', this).first().text(); + if ($('option:selected', this).val() != '') + title = $('option:selected', this).text(); - select.parent().css('position', 'relative'); - }); - } + var select = $(this) + .change(function(){ + var val = $('option:selected', this).text(); + $(this).next().children().html(val); + }); + + $('' + title + '') + .css('position', 'absolute') + .offset(select.position()) + .insertAfter(select) + .children().width(select.outerWidth() - 40); + + select.parent().css('position', 'relative'); + }); $(document.body) .bind('mouseup', body_mouseup) -- cgit v1.2.3