diff --git a/atlas/templates/atlas/collection_viva.html b/atlas/templates/atlas/collection_viva.html index deeedbb8..c1832990 100644 --- a/atlas/templates/atlas/collection_viva.html +++ b/atlas/templates/atlas/collection_viva.html @@ -6,8 +6,8 @@ {% for case in cases %}
  • Case {{forloop.counter}}: {{case.title}}   - - + +
  • {% endfor %} @@ -30,16 +30,16 @@ var win2 = false; console.log('clicked', url) $('#case-title').text($(this).data('title')); $('#viewer').attr('src', url) - //if (win2 == false || win2.closed) { - // win2 = openSecondaryWindow(url); - // console.log('opened', win2) - //} else { - // win2.location.href = url - //} }); $('.open-case').click(function() { var url = $(this).data('target'); - win2 = openSecondaryWindow(url); + if (win2 == false || win2.closed) { + win2 = openSecondaryWindow(url); + console.log('opened', win2) + } else { + win2.location.href = url + } + //win2 = openSecondaryWindow(url); }) }); function openSecondaryWindow(url) {