Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
fix(ui): geolocation map was broken
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Nov 3, 2017
1 parent 7734651 commit cd5a16d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions setup.php
Expand Up @@ -95,6 +95,11 @@ function plugin_init_flyvemdm() {
$PLUGIN_HOOKS['add_css']['flyvemdm'][] = "css/style.css";
// Warning 'pluginflyvemdmmenu' MUST be lower case
$CFG_GLPI['javascript']['admin']['pluginflyvemdmmenu']['Menu'] = ['charts'];

if (strpos($_SERVER['REQUEST_URI'], "plugins/flyvemdm/front/agent.form.php") !== false) {
$PLUGIN_HOOKS['add_css']['flyvemdm'][] = 'lib/leaflet-1.0.3/leaflet.css';
$PLUGIN_HOOKS['add_javascript']['flyvemdm'][] = 'lib/leaflet-1.0.3/leaflet.js';
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion tpl/computer_geolocation.html
Expand Up @@ -6,7 +6,7 @@
<div>{{ __('view until', 'flyvemdm') }}{{ endDate|raw }}</div>
<div><p><a href="#" class="vsubmit" onclick="loadMarkers()">{{ __('update', 'flyvemdm') }}</a></p></div>
</div>
<script type="text/javascript">
<script type="text/javascript">$(function() {
var map;
var markers = [];

Expand Down Expand Up @@ -64,5 +64,6 @@

showMap();
loadMarkers();
})
</script>
</div>

0 comments on commit cd5a16d

Please sign in to comment.