Changeset 1094cda in github


Ignore:
Timestamp:
Sep 5, 2007 2:53:53 AM (6 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
0d1dd7c
Parents:
a664a67
Message:

Allso trigger events when selecting all/none list entries

File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/js/list.js

    rb2fb950 r1094cda  
    423423    return false; 
    424424 
    425   // reset selection first 
     425  // reset but remember selection first 
     426  var select_before = this.selection.join(','); 
    426427  this.clear_selection(); 
    427428 
     
    435436  } 
    436437 
    437   return true;   
     438  // trigger event if selection changed 
     439  if (this.selection.join(',') != select_before) 
     440    this.trigger_event('select'); 
     441 
     442  return true; 
    438443}, 
    439444 
     
    444449clear_selection: function() 
    445450{ 
    446   for(var n=0; n<this.selection.length; n++) 
     451  var num_select = this.selection.length; 
     452  for (var n=0; n<this.selection.length; n++) 
    447453    if (this.rows[this.selection[n]]) 
    448454    { 
     
    451457    } 
    452458 
    453   this.selection = new Array();     
     459  this.selection = new Array(); 
     460   
     461  if (num_select) 
     462    this.trigger_event('select'); 
    454463}, 
    455464 
Note: See TracChangeset for help on using the changeset viewer.