+FolderDDropControler.prototype.selectCBRange = function(evt) {
+ var target = getTargetedObject(evt);
+ if (target.tagName === 'INPUT' && target.type === 'checkbox') {
+ evt = getEventObject(evt);
+ var shift = evt.shiftKey;
+ if (shift && this.lastCBChecked) {
+ var from = this.getCBIndex(this.lastCBChecked);
+ var to = this.getCBIndex(target);
+ var rows = this.listing.getElementsByTagName('TR');
+ var start = Math.min(from, to);
+ var stop = Math.max(from, to);
+ var i;
+ for (i=start ; i<stop ; i++ ) {
+ rows[i].getElementsByTagName('INPUT')[0].checked = true;
+ }
+ }
+ else if (target.checked) {
+ this.lastCBChecked = target;
+ }
+ else {
+ this.lastCBChecked = undefined;
+ }
+ }
+};
+
+FolderDDropControler.prototype.getCBIndex = function(cb) {
+ var row = cb.parentNode;
+ while(row.tagName !== 'TR') {
+ row = row.parentNode;
+ }
+ return row.pos - this.firstItemPos;
+};
+