Show and hide photos on Map,
added dependency exif in app/info.xml Signed-off-by: Arne Hamann <kontakt+github@arne.email>
This commit is contained in:
Родитель
812c6cc890
Коммит
8dfa693add
|
@ -13,6 +13,7 @@
|
|||
<bugs>https://github.com/nextcloud/maps/issues</bugs>
|
||||
<dependencies>
|
||||
<nextcloud min-version="15" max-version="16"/>
|
||||
<lib>exif</lib>
|
||||
</dependencies>
|
||||
<navigations>
|
||||
<navigation>
|
||||
|
|
|
@ -35,6 +35,14 @@ PhotosController.prototype = {
|
|||
}
|
||||
},
|
||||
|
||||
toggleLayer: function() {
|
||||
if (this.map.hasLayer(this.photoLayer)) {
|
||||
this.hideLayer();
|
||||
} else {
|
||||
this.showLayer();
|
||||
}
|
||||
},
|
||||
|
||||
getPhotoMarkerOnClickFunction() {
|
||||
var _app = this;
|
||||
return function(evt) {
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
(function($, OC) {
|
||||
$(function() {
|
||||
//Photos
|
||||
mapController.initMap();
|
||||
photosController.appendToMap(mapController.map);
|
||||
photosController.showLayer();
|
||||
$('#navigation-photos').click(function() {
|
||||
photosController.toggleLayer();
|
||||
});
|
||||
|
||||
// Popup
|
||||
$(document).on('click', '#opening-hours-header', function() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<ul>
|
||||
<li><a href="#">First level entry</a></li>
|
||||
<li id="navigation-photos"><a href="#">Photos</a></li>
|
||||
<li>
|
||||
<a href="#">First level container</a>
|
||||
<ul>
|
||||
|
|
Загрузка…
Ссылка в новой задаче