diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2012-03-08 11:04:27 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2012-03-08 11:04:27 +0000 |
| commit | 8a7585c64bfc7e4bce32dfd63c42ced2a07df7b5 (patch) | |
| tree | 7898355fb2e748aa8320ce9f4af6164a127d0b74 /roundcubemail/skins/larry | |
| parent | 57072e9fe59ab34560d3f787b7aa6b554cdc96cb (diff) | |
- Larry: Fix decorated selects in Opera
git-svn-id: https://svn.roundcube.net/trunk@5985 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/skins/larry')
| -rw-r--r-- | roundcubemail/skins/larry/ui.js | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/roundcubemail/skins/larry/ui.js b/roundcubemail/skins/larry/ui.js index 8a66a8cc4..480e1719c 100644 --- a/roundcubemail/skins/larry/ui.js +++ b/roundcubemail/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; + } - $('<a class="menuselector dropdownselector"><span class="handle">' + title + '</span></a>') - .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); + }); + + $('<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) .bind('mouseup', body_mouseup) |
