Changeset 85f11f0 in github


Ignore:
Timestamp:
Mar 8, 2012 6:04:27 AM (15 months ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.8
Children:
efaf2e0
Parents:
da042d3
Message:
  • Larry: Fix decorated selects in Opera
File:
1 edited

Legend:

Unmodified
Added
Removed
  • skins/larry/ui.js

    rfe83748 r85f11f0  
    177177 
    178178    // decorate select elements 
    179     if (!bw.opera) { 
    180       $('select.decorated').each(function(){ 
    181         var title = $('option', this).first().text(); 
    182         if ($('option:selected', this).val() != '') 
    183           title = $('option:selected', this).text(); 
    184         var select = $(this) 
    185           .change(function(){ 
    186             var val = $('option:selected', this).text(); 
    187             $(this).next().children().html(val); 
    188           }); 
    189  
    190         $('<a class="menuselector dropdownselector"><span class="handle">' + title + '</span></a>') 
    191           .css('position', 'absolute') 
    192           .offset(select.position()) 
    193           .insertAfter(select) 
    194           .children().width(select.outerWidth() - 40); 
    195  
    196         select.parent().css('position', 'relative'); 
    197       }); 
    198     } 
     179    $('select.decorated').each(function(){ 
     180      if (bw.opera) { 
     181        $(this).removeClass('decorated'); 
     182        return; 
     183      } 
     184 
     185      var title = $('option', this).first().text(); 
     186      if ($('option:selected', this).val() != '') 
     187        title = $('option:selected', this).text(); 
     188 
     189      var select = $(this) 
     190        .change(function(){ 
     191          var val = $('option:selected', this).text(); 
     192          $(this).next().children().html(val); 
     193        }); 
     194 
     195      $('<a class="menuselector dropdownselector"><span class="handle">' + title + '</span></a>') 
     196        .css('position', 'absolute') 
     197        .offset(select.position()) 
     198        .insertAfter(select) 
     199        .children().width(select.outerWidth() - 40); 
     200 
     201      select.parent().css('position', 'relative'); 
     202    }); 
    199203 
    200204    $(document.body) 
Note: See TracChangeset for help on using the changeset viewer.