Skip to content

Commit

Permalink
Fixed a bug in the track visibility selection menus
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian Kniephoff committed Aug 7, 2017
1 parent dff2c42 commit f539859
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions frontend/js/views/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,11 @@ define(["jquery",
tracksSelection: function (event) {
var prefixFilter = "opt-tracks-";

if ($(event.target).hasClass(prefixFilter + "public")) {
var optionElement = $(event.target).closest("[class*='" + prefixFilter + "']");

if (optionElement.hasClass(prefixFilter + "public")) {
annotationsTool.getTracks().showAllPublic();
} else if ($(event.target).hasClass(prefixFilter + "mine")) {
} else if (optionElement.hasClass(prefixFilter + "mine")) {
annotationsTool.getTracks().showMyTracks();
} else {
if (_.isUndefined(this.tracksSelectionModal)) {
Expand All @@ -485,7 +487,7 @@ define(["jquery",
}

$("[class*='opt-tracks']").removeClass("checked");
$("." + event.target.className).addClass("checked");
$("." + optionElement[0].className).addClass("checked");
},

/**
Expand Down

0 comments on commit f539859

Please sign in to comment.