Changeset 1060
- Timestamp:
- 2008-08-21 09:18:23 (3 months ago)
- Files:
-
- trunk/chrome/content/dta/manager/tree.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/chrome/content/dta/manager/tree.js
r1027 r1060 529 529 try { 530 530 let empty = this.current == null; 531 for each (let o in $('info', 'remove', 'movetop', 'moveup', 'movedown', 'movebottom', 'toolmovetop', 'toolmoveup', 'toolmovedown', 'toolmovebottom')) {532 o.setAttribute('disabled', empty);533 }534 531 535 532 let states = { … … 538 535 is: function(s) this._state & s, 539 536 isOf: QueueItem.prototype.isOf, 540 count: this.selection.count 537 count: this.selection.count, 538 rows: this.rowCount, 539 min: this.rowCount, 540 max: 0 541 541 }; 542 542 for (let d in this.selected) { 543 543 states._state |= d.state; 544 544 states.resumable |= d.resumable; 545 states.min = Math.min(d.position, states.min); 546 states.max = Math.max(d.position, states.max); 545 547 } 546 548 let cur = this.current; … … 571 573 modifySome($('export'), function(d) !!d.count); 572 574 modifySome($('addchunk', 'removechunk', 'force'), function(d) d.isOf(QUEUED, RUNNING, PAUSED, CANCELED)); 575 modifySome($('movetop', 'moveup', 'toolmovetop', 'toolmoveup'), function(d) d.min > 0); 576 modifySome($('movedown', 'movebottom', 'toolmovedown', 'toolmovebottom'), function(d) d.max != d.rows - 1); 573 577 } 574 578 catch (ex) {
