mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-12 06:03:37 +00:00
56337a0615
Fix validation of release groups when no group is detected
54 lines
No EOL
1.3 KiB
JavaScript
54 lines
No EOL
1.3 KiB
JavaScript
function generate_bwlist() {
|
|
var realvalues = [];
|
|
|
|
$('#white option').each(function(i, selected) {
|
|
realvalues[i] = $(selected).val();
|
|
});
|
|
$("#whitelist").val(realvalues.join(","));
|
|
|
|
realvalues = [];
|
|
$('#black option').each(function(i, selected) {
|
|
realvalues[i] = $(selected).val();
|
|
});
|
|
$("#blacklist").val(realvalues.join(","));
|
|
};
|
|
|
|
$('#removeW').click(function() {
|
|
!$('#white option:selected').remove().appendTo('#pool');
|
|
});
|
|
|
|
$('#addW').click(function() {
|
|
!$('#pool option:selected').remove().appendTo('#white');
|
|
});
|
|
|
|
$('#addB').click(function() {
|
|
!$('#pool option:selected').remove().appendTo('#black');
|
|
});
|
|
|
|
$('#removeP').click(function() {
|
|
!$('#pool option:selected').remove();
|
|
});
|
|
|
|
$('#removeB').click(function() {
|
|
!$('#black option:selected').remove().appendTo('#pool');
|
|
});
|
|
|
|
$('#addToWhite').click(function() {
|
|
var group = $('#addToPoolText').attr("value");
|
|
if(group == "") { return; }
|
|
$('#addToPoolText').attr("value", "");
|
|
var option = $("<option>");
|
|
option.attr("value",group);
|
|
option.html(group);
|
|
option.appendTo('#white');
|
|
});
|
|
|
|
$('#addToBlack').click(function() {
|
|
var group = $('#addToPoolText').attr("value");
|
|
if(group == "") { return; }
|
|
$('#addToPoolText').attr("value", "");
|
|
var option = $("<option>");
|
|
option.attr("value",group);
|
|
option.html(group);
|
|
option.appendTo('#black');
|
|
}); |