diff options
Diffstat (limited to 'modules-available/locations/templates/locations.html')
-rw-r--r-- | modules-available/locations/templates/locations.html | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules-available/locations/templates/locations.html b/modules-available/locations/templates/locations.html index 2f4af8af..125c101a 100644 --- a/modules-available/locations/templates/locations.html +++ b/modules-available/locations/templates/locations.html @@ -55,7 +55,7 @@ <span>{{locationname}}</span> {{/show-only}} {{^show-only}} - <a id={{locationid}} href="#" onclick="slxOpenLocation(this, {{locationid}}); return false"> + <a id="loc-{{locationid}}" href="#" onclick="slxOpenLocation(this, {{locationid}}); return false"> {{locationname}} <b class="caret"></b> </a> @@ -170,7 +170,7 @@ var newRowCounter = 0; document.addEventListener("DOMContentLoaded", function() { var id = window.location.hash.substring(1); if (id !== "") { - var loc_dom = document.getElementById(id); + var loc_dom = document.getElementById("loc-" + id); slxOpenLocation(loc_dom, id); } }); @@ -260,7 +260,9 @@ function deleteSubnetWarning(locid) { } function loadOpeningTimes(locid) { - $("#openingTimesModal" + locid).find('.modal-body').load("?do=Locations&page=details&action=getOpeningtimes&locid=" + locid) + var $e = $("#openingTimesModal" + locid).find('.modal-body'); + if (!$e.is(':empty')) return; + $e.load("?do=Locations&page=details&action=getOpeningtimes&locid=" + locid) } // --> |