unpopup the svg ploygon in zones
parent
ae9139b00c
commit
c73dbc480f
|
@ -175,6 +175,22 @@ window.addEventListener("DOMContentLoaded", function onSkinDCL() {
|
|||
});
|
||||
});
|
||||
|
||||
document.querySelectorAll(".zmlink").forEach(function(el) {
|
||||
el.addEventListener("click", function onClick(evt) {
|
||||
var el = this;
|
||||
var url;
|
||||
if ( el.hasAttribute("href") ) {
|
||||
// <a>
|
||||
url = el.getAttribute("href");
|
||||
} else {
|
||||
// buttons
|
||||
url = el.getAttribute("data-url");
|
||||
}
|
||||
evt.preventDefault();
|
||||
window.location.assign(url);
|
||||
});
|
||||
});
|
||||
|
||||
document.querySelectorAll(".pillList a").forEach(function addOnClick(el) {
|
||||
el.addEventListener("click", submitTab);
|
||||
});
|
||||
|
|
|
@ -73,13 +73,11 @@ xhtmlHeaders(__FILE__, translate('Zones'));
|
|||
<?php
|
||||
foreach( array_reverse($zones) as $zone ) {
|
||||
?>
|
||||
<polygon points="<?php echo $zone['AreaCoords'] ?>" class="popup-link <?php echo $zone['Type']?>" data-on-click-true="streamCmdQuit"
|
||||
data-url="?view=zone&mid=<?php echo $mid ?>&zid=<?php echo $zone['Id'] ?>"
|
||||
data-window-name="zmZone<?php echo $zone['Id'] ?>"
|
||||
data-window-tag="zone"
|
||||
data-window-width="<?php echo $monitor->ViewWidth() ?>"
|
||||
data-window-height="<?php echo $monitor->ViewHeight() ?>"
|
||||
/>
|
||||
<polygon points="<?php echo $zone['AreaCoords'] ?>"
|
||||
class="zmlink <?php echo $zone['Type']?>"
|
||||
data-on-click-true="streamCmdQuit"
|
||||
data-url="?view=zone&mid=<?php echo $mid ?>&zid=<?php echo $zone['Id'] ?>"
|
||||
/>
|
||||
<?php
|
||||
} // end foreach zone
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue