Move some UI to Stimulus + Lo Pozzo geojson
This commit is contained in:
@@ -1,17 +1,22 @@
|
||||
import { Controller } from "@hotwired/stimulus"
|
||||
|
||||
export default class extends Controller {
|
||||
static targets = ['list', 'menu'];
|
||||
static targets = ['list', 'menu', 'icon'];
|
||||
|
||||
toggleMenu(event) {
|
||||
toggleMenu() {
|
||||
/*
|
||||
const target = event.currentTarget;
|
||||
const id = target.getAttribute('data-id');
|
||||
const icon = this.iconTargets.find(i => i.getAttribute('data-id') === id);
|
||||
*/
|
||||
|
||||
this.menuTarget.classList.toggle('is-hidden');
|
||||
//this.toggleIcon(icon);
|
||||
//this.openList(`#${id}-list`);
|
||||
}
|
||||
|
||||
this.openList(`#${id}-list`);
|
||||
|
||||
console.log(this.menuTarget);
|
||||
close() {
|
||||
this.menuTarget.classList.add('is-hidden');
|
||||
}
|
||||
|
||||
openList(id) {
|
||||
|
||||
14
webgis/js/controllers/modal_controller.js
Normal file
14
webgis/js/controllers/modal_controller.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Controller } from "@hotwired/stimulus"
|
||||
|
||||
export default class extends Controller {
|
||||
static targets = ['close', 'modal'];
|
||||
|
||||
open() {
|
||||
this.modalTarget.classList.add('is-active');
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modalTarget.classList.remove('is-active');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user