web ui - file priority buttons that aren't clickable on a completed file

This commit is contained in:
Mitchell Livingston
2009-03-16 03:04:25 +00:00
parent 2ff89a17e5
commit 7eee62f554
3 changed files with 22 additions and 16 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@@ -672,6 +672,8 @@ TorrentFile.prototype = {
},
setPriority: function(priority) {
if(this.element().hasClass('complete'))
return;
var priority_level = { high: 1, normal: 0, low: -1 }[priority];
if (this._prio == priority_level) { return; }
this._prio = priority_level;
@@ -747,8 +749,8 @@ TorrentFile.prototype = {
target = target.offsetParent;
}
var file = event.data.file;
if (x < 8) { file.setPriority('low'); }
else if (x < 16) { file.setPriority('normal'); }
if (x < 12) { file.setPriority('low'); }
else if (x < 23) { file.setPriority('normal'); }
else { file.setPriority('high'); }
}

View File

@@ -652,33 +652,37 @@ li.inspector_torrent_file_list_entry.complete>.file_wanted_control {
div.file_priority_control {
float: right;
margin: 0 0 0 0;
width: 24px;
height: 12px;
margin: 4px 0 0 0;
width: 35px;
height: 19px;
background-image: url('../images/buttons/file_priority_buttons.png');
background-repeat: no-repeat;
background-color: transparent;
cursor: pointer;
}
div.file_priority_control.high {
background-position: left -12px;
}
div.file_priority_control.high:hover {
background-position: right -12px;
}
div.file_priority_control.normal {
background-position: left -24px;
background-position: left top;
}
div.file_priority_control.normal:hover {
background-position: right -24px;
background-position: right top;
}
div.file_priority_control.high {
background-position: left -19px;
}
div.file_priority_control.high:hover {
background-position: right -19px;
}
div.file_priority_control.low {
background-position: left 0px;
background-position: left -38px;
}
div.file_priority_control.low:hover {
background-position: right 0px;
background-position: right -38px;
}
li.inspector_torrent_file_list_entry.complete div.file_priority_control,
li.inspector_torrent_file_list_entry.complete div.file_priority_control:hover {
background-position: left -57px;
cursor: default;
}
/*--------------------------------------
*