rrs: fix recipe count not showing up properly if no per-recipe maintainers

If a maintenance plan has no per-recipe maintainers then we don't show
the maintainer filtering drop-down, but we still had javascript code
that unconditionally tried to access it and of course that failed if it
wasn't there. Disable that as well without per-recipe maintainers.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
Paul Eggleton 2018-09-05 11:39:20 +12:00
parent 549c5377db
commit 575b6bc180

View File

@ -223,6 +223,7 @@ $(document).ready(function() {
}
function updateMaintainerSelected() {
{% if maintplan.per_recipe_maintainers %}
$("#selected-maintainer strong").html(maintainer)
maintainerList = document.getElementById("select-maintainer").getElementsByTagName("li")
@ -233,6 +234,7 @@ $(document).ready(function() {
$(maintainerList[i]).removeClass("active")
}
}
{% endif %}
}
function applyFilters() {
@ -311,10 +313,12 @@ $(document).ready(function() {
clearSearch()
});
{% if maintplan.per_recipe_maintainers %}
$("#select-maintainer a").click(function() {
maintainer = this.text
clearSearch()
});
{% endif %}
$("#view-all-recipes").click(function() {
upstreamStatus = 'All'