Changeset 15221

Show
Ignore:
Timestamp:
02/23/08 20:07:51 (8 months ago)
Author:
flack
Message:

correctly show the removal status for a preselected list element

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.helper.datamanager2/static/chooser/jquery.chooser_widget.js

    r15220 r15221  
    617617        if (!options.allow_multiple) 
    618618        { 
    619             // Remove activation from each list element 
    620             jQuery('#'+options.widget_id + '_results li.' + CLASSES.ACTIVE).each(function(i) 
    621                 { 
    622                     var id = this.id.match(/_([0-9]+)$/); 
    623                      
    624                     // Skip the selected or match failed 
    625                     if (   !id 
    626                         || !id[1] 
    627                         || id[1] == id) 
    628                     { 
    629                         return; 
    630                     } 
    631                      
    632                     // Inactivate 
    633                     inactivate(id[1]); 
    634                 }); 
     619            // Remove activation from the previously selected list element 
     620            jQuery('#'+ options.widget_id + '_results li.' + CLASSES.ACTIVE).click(); 
    635621        } 
    636622