added admin.js for javascript refractoring of moderation portal
This commit is contained in:
@@ -10,8 +10,6 @@ require_once __DIR__ . '/api/auth.php';
|
|||||||
|
|
||||||
// -----------------------------------------------------------------
|
// -----------------------------------------------------------------
|
||||||
// Loads Municipality Configuration
|
// Loads Municipality Configuration
|
||||||
// ToDo's: Dynamic Loading via URL Slug once multi-tenant Routing
|
|
||||||
// is implemented. Hardcoded Slug for now.
|
|
||||||
// -----------------------------------------------------------------
|
// -----------------------------------------------------------------
|
||||||
$pdo = get_db();
|
$pdo = get_db();
|
||||||
$stmt = $pdo->prepare("SELECT * FROM municipalities WHERE slug = :slug");
|
$stmt = $pdo->prepare("SELECT * FROM municipalities WHERE slug = :slug");
|
||||||
@@ -394,7 +392,7 @@ $news_items = $stmt->fetchAll();
|
|||||||
<!-- Municipality Configuration passed to JavaScript -->
|
<!-- Municipality Configuration passed to JavaScript -->
|
||||||
<!-- ============================================================= -->
|
<!-- ============================================================= -->
|
||||||
<script>
|
<script>
|
||||||
// Municipality Configuration from Database — used by app.js
|
// Municipality Configuration from Database
|
||||||
const MUNICIPALITY = {
|
const MUNICIPALITY = {
|
||||||
id: <?= $municipality['municipality_id'] ?>,
|
id: <?= $municipality['municipality_id'] ?>,
|
||||||
name: "<?= htmlspecialchars($municipality['name'], ENT_QUOTES) ?>",
|
name: "<?= htmlspecialchars($municipality['name'], ENT_QUOTES) ?>",
|
||||||
|
|||||||
0
public/js/admin.js
Normal file
0
public/js/admin.js
Normal file
@@ -3,9 +3,7 @@
|
|||||||
// Initializes Leaflet Map, loads Contributions from the API,
|
// Initializes Leaflet Map, loads Contributions from the API,
|
||||||
// handles CRUD Workflow, and manages all UI Interactions.
|
// handles CRUD Workflow, and manages all UI Interactions.
|
||||||
//
|
//
|
||||||
// Depends on: MUNICIPALITY Object set in Main Page, Leaflet, Geoman,
|
// Depends on: MUNICIPALITY Object set in Citizen Portal
|
||||||
// Sidebar, Geocoder, PolylineMeasure, Fullscreen,
|
|
||||||
// and SweetAlert2 Plugins.
|
|
||||||
// =====================================================================
|
// =====================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user