Changeset 49728

Show
Ignore:
Timestamp:
10/18/06 14:15:15 (4 years ago)
Author:
gracinet
Message:

#1761 AJAX edit: wrong behaviour with <select> and empty values

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • CPS3/products/CPSUtil/trunk/CHANGES

    r49703 r49728  
    77Bug fixes 
    88~~~~~~~~~ 
    9 - [packaging] bundleman svn property 
     9- #1761: AJAX edit: wrong behaviour with <select> and empty values 
    1010New internal features 
    1111~~~~~~~~~~~~~~~~~~~~~ 
  • CPS3/products/CPSUtil/trunk/skins/scriptaculous/prototype.js.dtml

    r48485 r49728  
    15511551    if (index >= 0) { 
    15521552      opt = element.options[index]; 
    1553       value = opt.value || opt.text; 
     1553      value = opt.value 
     1554      if (value == null) { 
     1555        value = opt.text; 
     1556    } 
    15541557    } 
    15551558    return [element.name, value]; 
     
    15581561  selectMany: function(element) { 
    15591562    var value = []; 
     1563    var attr = ''; 
    15601564    for (var i = 0; i < element.length; i++) { 
    15611565      var opt = element.options[i]; 
    15621566      if (opt.selected) 
    1563         value.push(opt.value || opt.text); 
     1567        attr = opt.value 
     1568    if (attr == null) { 
     1569      attr = opt.text; 
     1570    } 
     1571        value.push(attr); 
    15641572    } 
    15651573    return [element.name, value];