Skip to content

Commit

Permalink
Merge pull request #47 from reactiveops/bb/expand-ui
Browse files Browse the repository at this point in the history
expand UI when query param is present
  • Loading branch information
rbren authored Apr 5, 2019
2 parents beb7791 + b2887e8 commit 4ec8614
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions public/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,9 @@ $(function () {
console.log('parent', $(e.srcElement).parent('.resource-info'));
$(e.srcElement).parents('.resource-info').toggleClass('expanded');
});

var expandMatch = window.location.search.match(/expand=(\w+)(\W|$)/);
if (expandMatch && expandMatch[1] !== 'false' && expandMatch[1] !== '0') {
$('.resource-info').addClass('expanded');
}
});

0 comments on commit 4ec8614

Please sign in to comment.