Changeset 8498
- Timestamp:
- May 23, 2009, 7:02:47 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web/javascript/torrent.js
r8494 r8498 754 754 refreshWantedHTML: function() { 755 755 var element = this.element(); 756 this.element().toggleClass('skip', !this._wanted); 757 this.element().toggleClass('complete', this._done>=this._size ); 756 var class = element[0].className.replace(/ skip| complete/g, '').split(' '); 757 758 if(!this._wanted) 759 class.push('skip'); 760 if(this._done>=this._size) 761 class.push('complete'); 762 763 element[0].className = class.join(' '); 758 764 }, 759 765 760 766 refreshPriorityHTML: function() { 761 767 var priority = { '1': 'high', '0': 'normal', '-1': 'low' }[new String(this._prio)]; 762 var off_priorities = [ 'high', 'normal', 'low' ].sort(function(a,b) { return (a == priority) ? 1 : -1; });763 this._priority_control.addClass(priority). 764 removeClass(off_priorities[0]).765 removeClass(off_priorities[1]);768 var class = this._priority_control[0].className.replace(/ high| normal| low/g, '').split(' '); 769 770 class.push(priority) 771 this._priority_control[0].className = class.join(' '); 766 772 }, 767 773
Note: See TracChangeset
for help on using the changeset viewer.