Hide "Action" column when toggling "Details" (#3747)

Turning on "Details" in Repo Overview will now hide the "Action" column to improve display on smaller screens.

Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
Marc Bernard 2020-08-19 01:02:01 -04:00 committed by GitHub
parent 77a002f584
commit 3846dd96a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -232,6 +232,7 @@ function RepoOverViewHelper() {
this.isDetailsDisplayed = false;
this.isOnlyFavoritesDisplayed = false;
this.detailCssClass = findStyleSheetByName(".ro-detail");
this.actionCssClass = findStyleSheetByName(".ro-action");
var icon = document.getElementById("icon-filter-detail");
this.toggleFilterIcon(icon, this.isDetailsDisplayed);
icon = document.getElementById("icon-filter-favorite");
@ -249,6 +250,7 @@ RepoOverViewHelper.prototype.toggleItemsDetail = function(forceDisplay){
if (this.detailCssClass) {
this.isDetailsDisplayed = forceDisplay || !this.isDetailsDisplayed;
this.detailCssClass.style.display = this.isDetailsDisplayed ? "" : "none";
this.actionCssClass.style.display = this.isDetailsDisplayed ? "none" : "";
var icon = document.getElementById("icon-filter-detail");
this.toggleFilterIcon(icon, this.isDetailsDisplayed);
}