mirror of
https://github.com/morpheus65535/bazarr
synced 2025-01-30 10:51:52 +00:00
show release info instead of a drop-down
manual search now displays release info instead of a drop-down if there is only one release
This commit is contained in:
parent
c60a64790d
commit
60723d8fd1
2 changed files with 21 additions and 9 deletions
|
@ -590,11 +590,17 @@
|
|||
render: function (data) {
|
||||
const array_release_info = data.release_info;
|
||||
let i;
|
||||
let text = '<div class="dropdown"><button class="btn btn-secondary btn-sm dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="\tfas fa-comment-dots"></i> ' + array_release_info.length + '</button><div class="dropdown-menu" aria-labelledby="dropdownMenuButton">';
|
||||
for (i = 0; i < array_release_info.length; i++) {
|
||||
text += '<a class="dropdown-item" href="#">' + array_release_info[i] + '</a>';
|
||||
let text;
|
||||
if (array_release_info.length == 1) {
|
||||
text = '<div style="font-size: 75%;font-weight: 400;">' + array_release_info[0] + '</div>';
|
||||
}
|
||||
else {
|
||||
text = '<div class="dropdown"><button class="btn btn-secondary btn-sm dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="\tfas fa-comment-dots"></i> ' + array_release_info.length + '</button><div class="dropdown-menu" aria-labelledby="dropdownMenuButton">';
|
||||
for (i = 0; i < array_release_info.length; i++) {
|
||||
text += '<a class="dropdown-item" href="#">' + array_release_info[i] + '</a>';
|
||||
}
|
||||
text += '</div></div>';
|
||||
}
|
||||
text += '</div></div>';
|
||||
return text;
|
||||
}
|
||||
},
|
||||
|
|
|
@ -468,11 +468,17 @@
|
|||
render: function ( data ) {
|
||||
const array_release_info = data.release_info;
|
||||
let i;
|
||||
let text = '<div class="dropdown"><button class="btn btn-secondary btn-sm dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="\tfas fa-comment-dots"></i> '+array_release_info.length+'</button><div class="dropdown-menu" aria-labelledby="dropdownMenuButton">';
|
||||
for (i = 0; i < array_release_info.length; i++) {
|
||||
text += '<a class="dropdown-item" href="#">' + array_release_info[i] + '</a>';
|
||||
}
|
||||
text += '</div></div>';
|
||||
let text;
|
||||
if (array_release_info.length == 1) {
|
||||
text = '<div style="font-size: 75%;font-weight: 400;">' + array_release_info[0] + '</div>';
|
||||
}
|
||||
else {
|
||||
text = '<div class="dropdown"><button class="btn btn-secondary btn-sm dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="\tfas fa-comment-dots"></i> ' + array_release_info.length + '</button><div class="dropdown-menu" aria-labelledby="dropdownMenuButton">';
|
||||
for (i = 0; i < array_release_info.length; i++) {
|
||||
text += '<a class="dropdown-item" href="#">' + array_release_info[i] + '</a>';
|
||||
}
|
||||
text += '</div></div>';
|
||||
}
|
||||
return text;
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue