### Set Permissions and Install Dependencies (Bash) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/README.md Sets directory permissions for runtime files and copies a configuration template. It then installs project dependencies using npm and composer, and generates minimized JavaScript and CSS files using gulp. ```bash chown -R www-data:www-data protected/runtime cp protected/config/main-production.template.php protected/config/main-production.php ``` ```bash npm install composer install npx gulp ``` -------------------------------- ### Download TOP Document (Example 2) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_AgendaPublic1.html This snippet is another example of a link to download a 'TOP' document, similar to the first example, using a different document ID. ```HTML TOP herunterladen ``` -------------------------------- ### Download TOP Document (Example 5) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_AgendaPublic1.html This snippet is another example of a link to download a 'TOP' document, with a unique document ID. ```HTML TOP herunterladen ``` -------------------------------- ### Download TOP Document (Example 3) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_AgendaPublic1.html This snippet is another example of a link to download a 'TOP' document, with a unique document ID. ```HTML TOP herunterladen ``` -------------------------------- ### Download TOP Document (Example 4) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_AgendaPublic1.html This snippet is another example of a link to download a 'TOP' document, with a unique document ID. ```HTML TOP herunterladen ``` -------------------------------- ### Import Database Schema and Data (Bash) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/README.md Imports the database schema, sample data, and triggers into a MySQL/MariaDB database using the mysql command-line client. It also runs a Yii command to import statistics. ```bash cat docs/schema.sql docs/beispieldaten.sql docs/triggers.sql | mysql -u ris -psec muenchen_transparent protected/yiic importstatistik ``` -------------------------------- ### View Meeting Template Details (Example 2) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_AgendaPublic1.html This snippet provides a link to view the details of a meeting template, using a different ID than the previous example. ```HTML Sitzungsvorlage 20-26 / V 04513 Sitzungsvorlage 20-26 / V 04513 ``` -------------------------------- ### Run Codeception Tests (Bash) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/README.md Imports test data into a dedicated test database and then executes the Codeception test suite. It also includes commands to export changes to the test database and notes that tests are run via PhpBrowser, not Selenium. ```bash cat docs/schema.sql tests/_data/data.sql docs/triggers.sql | mysql -utravis mt-test vendor/bin/codeception run ``` ```bash docs/export-testing-db.sh ``` -------------------------------- ### Database Configuration (PHP) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/README.md Provides a PHP array configuration for connecting to a MySQL/MariaDB database. It includes connection string, username, password, and character set details. ```php 'db' => [ 'connectionString' => 'mysql:host=127.0.0.1;dbname=muenchen_transparent', 'emulatePrepare' => true, 'username' => 'ris', 'password' => 'sec', 'charset' => 'utf8mb4', 'queryCacheID' => 'apcCache', 'schemaCachingDuration' => 3600, ] ``` -------------------------------- ### View Decision Details (Example 5) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_AgendaPublic1.html This snippet provides a link to view decision details, using a distinct identifier. ```HTML Entscheidung ``` -------------------------------- ### Download Decision Document (Example 5) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_AgendaPublic1.html This snippet represents a link to download a decision document, with a new document ID. ```HTML Öffentliches Dokument Beschluss.pdf (16 KB) ``` -------------------------------- ### View Decision Details (Example 2) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_AgendaPublic1.html This snippet provides a link to view decision details, using a different identifier. ```HTML Entscheidung ``` -------------------------------- ### View Decision Details (Example 3) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_AgendaPublic1.html This snippet provides a link to view decision details, using a distinct identifier. ```HTML Entscheidung ``` -------------------------------- ### View Decision Details (Example 4) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_AgendaPublic1.html This snippet provides a link to view decision details, using a distinct identifier. ```HTML Entscheidung ``` -------------------------------- ### View Meeting Template Details (Example 5) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_AgendaPublic1.html This snippet provides a link to view meeting template details, with a different ID. ```HTML Sitzungsvorlage 20-26 / V 04237 Sitzungsvorlage 20-26 / V 04237 ``` -------------------------------- ### Download Decision Document (Example 3) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_AgendaPublic1.html This snippet represents a link to download a decision document, with a new document ID. ```HTML Öffentliches Dokument Beschluss.pdf (17 KB) ``` -------------------------------- ### Download Decision Document (Example 2) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_AgendaPublic1.html This snippet represents a link to download a decision document, with a different document ID. ```HTML Öffentliches Dokument Beschluss.pdf (16 KB) ``` -------------------------------- ### Download Decision Document (Example 4) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_AgendaPublic1.html This snippet represents a link to download a decision document, with a new document ID. ```HTML Öffentliches Dokument Beschluss.pdf (16 KB) ``` -------------------------------- ### View Meeting Template Details (Example 3) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_AgendaPublic1.html This snippet provides a link to view meeting template details, with a different ID. ```HTML Sitzungsvorlage 20-26 / V 02951 Sitzungsvorlage 20-26 / V 02951 ``` -------------------------------- ### View Meeting Template Details (Example 4) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_AgendaPublic1.html This snippet provides a link to view meeting template details, with a different ID. ```HTML Sitzungsvorlage 20-26 / V 04731 Sitzungsvorlage 20-26 / V 04731 ``` -------------------------------- ### OParl Response Validation Example Source: https://github.com/codeformunich/muenchen-transparent/blob/main/docs/oparl.md Illustrates how to update expected OParl responses in JSON files using Codeception. By appending `--env updatejson` to the Codeception command, the stored JSON files can be refreshed with the current API responses. ```bash vendor/bin/codecept run --env updatejson ``` -------------------------------- ### Retrieve Meetings with Files and Agenda Items Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/_data/oparl_expected_results.txt Fetches a list of meetings, including details about associated files (like PDFs) and agenda items. This endpoint provides comprehensive information for a specific meeting, including its state, start time, web links, and related documents. ```json { "data": [ { "id": "http://localhost:8080/oparl/v1.0/meeting/4", "type": "https://schema.oparl.org/1.0/Meeting", "meetingState": "", "start": "2016-04-12T00:00:00+02:00", "web": "http://localhost:8080/termine/4", "created": "2016-05-02T19:53:09+02:00", "modified": "2016-05-02T19:53:10+02:00", "name": "Ausschuss mit Terminen", "organization": [ "http://localhost:8080/oparl/v1.0/organization/gremium/1" ], "auxiliaryFile": [ { "id": "http://localhost:8080/oparl/v1.0/file/7", "type": "https://schema.oparl.org/1.0/File", "name": "Dokument (pdf) mit vielen Eigenschaften", "muenchenTransparent:nameRaw": "Dokument (pdf) mit vielen Eigenschaften", "muenchenTransparent:nameTitelTaw": "Dokument viele Eigenschaften", "accessUrl": "http://localhost:8080/oparl/v1.0/fileaccess/access/7", "downloadUrl": "http://localhost:8080/oparl/v1.0/fileaccess/download/7", "fileName": "7 - Dokument (pdf) mit vielen Eigenschaften.pdf", "web": "http://localhost:8080/dokumente/7", "created": "2016-05-02T19:53:08+02:00", "modified": "2016-05-08T22:57:23+02:00", "mimeType": "application/pdf", "meeting": [ "http://localhost:8080/oparl/v1.0/meeting/4" ], "paper": [ "http://localhost:8080/oparl/v1.0/paper/6" ], "muenchenTransparent:ocrCreator": "omnipage" } ], "agendaItem": [ { "id": "http://localhost:8080/oparl/v1.0/agendaitem/1", "type": "https://schema.oparl.org/1.0/AgendaItem", "number": null, "name": null, "consultation": "http://localhost:8080/oparl/v1.0/consultation/1", "resolutionText": "Tagesorgdnungspunkt mit Dokument mit vielen Eigenschaften" } ] } ], "pagination": { "elementsPerPage": 3, "totalPages": 2 }, "links": { "first": "http://localhost:8080/oparl/v1.0/body/0/list/meeting?id=3" } } ``` -------------------------------- ### View Council Request Details (Example 2) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_AgendaPublic1.html This snippet provides a link to view the details of a council request (StR-Antrag), using a different ID. ```HTML StR-Antrag 20-26 / A 02056 StR-Antrag 20-26 / A 02056 ``` -------------------------------- ### Configure and Initialize PDF Viewer Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/StadtratsvorlageParser_Dokument3.html Configures a PDF viewer component with a specified URL and initializes the PDF handling system. This allows for the display of PDF documents within the application. ```JavaScript RISI.PDF.configureAsPDFViewer('id5', '../../pdfjs/web/viewer.html', 'about:blank'); RISI.PDF.registerAsDocumentSelectionHandler("id5", function(component, data) {RISI.PDF.setPDFViewerDocUrl(component.id,data.pdfurl,data.pdfid,data.pdftyp);}) RISI.PDF.init() ``` -------------------------------- ### Initialize RISI PDF Library Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/AntragParser_Stadtrat1.html Initializes the RISI.PDF library, likely setting up necessary components or configurations for PDF handling. ```JavaScript RISI.PDF.init() ``` -------------------------------- ### RISI PDF Viewer Initialization and Configuration Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/AntragParser_Stadtrat2.html Diese JavaScript-Snippets initialisieren und konfigurieren den RISI PDF Viewer. Sie registrieren Handler für die Dokumentenauswahl und konfigurieren den Viewer mit einer bestimmten URL und Dokumenteninformationen. ```javascript RISI.PDF.registerAsDocumentSelectionHandler("id3", function(component, data) {component.innerHTML = 'von "' + data.pdfname + '.pdf" (' + data.pdffilesizekb + ' KB)'}) RISI.PDF.configureAsPDFViewer('id5', '../../pdfjs/web/viewer.html', 'about:blank'); RISI.PDF.registerAsDocumentSelectionHandler("id5", function(component, data) {RISI.PDF.setPDFViewerDocUrl(component.id,data.pdfurl,data.pdfid,data.pdftyp);}) RISI.PDF.init() ``` -------------------------------- ### Initialize PDF Functionality Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/StadtratsvorlageParser_DokumentBa.html Initializes all PDF-related functionalities within the application. This should be called once to ensure all PDF viewers and handlers are ready. ```JavaScript RISI.PDF.init() ``` -------------------------------- ### HTML: Navigation und Links Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_BA_Data1.html Dies ist ein Ausschnitt aus der HTML-Struktur der Webseite. Er enthält das Logo von muenchen.de, Navigationslinks für verschiedene Bereiche des Ratsinformationssystems wie 'Aktuelles', 'Sitzungen', 'Vorgänge', 'Gremien', 'Fraktionen' und 'Service'. Es gibt auch Links für die Suche, Hilfe, Impressum und einen Login-Bereich. ```HTML [Suche ein- bzw. ausblenden](javascript:toggleSearchBox();) ``` -------------------------------- ### JavaScript: Wicket AJAX Initialization Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/StadtraetInnenParser_Test1_Mitgliedschaften.html Initializes Wicket AJAX with a base URL for person detail retrieval and sets up an event listener for DOM readiness. Upon DOM readiness, it triggers an AJAX POST request to update a specific section of the page related to council member factions. ```JavaScript Wicket.Ajax.baseUrl="person/detail/3312434?8&tab=fraktionen"; ``` ```JavaScript Wicket.Event.add(window, "domready", function(event) { Wicket.Ajax.ajax({"u":"./3312434?8-1.0-typedSectionsPanel-tabcontainer-fraktionenListSection-list-cardheader-sort_filter&tab=fraktionen","m":"POST","c":"id62","e":"change"});; Wicket.Event.publish(Wicket.Event.Topic.AJAX_HANDLERS_BOUND); ;}); ``` -------------------------------- ### Download Document Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_index.html Provides a direct link to download a specific document, such as meeting invitations or agenda revisions. These are typically PDF files. ```HTML Neufassung fuer Videokonferenz oeff.pdf ``` ```HTML Neufassung fuer Videokonferenz (oeff).pdf ``` ```HTML Einladung (oeff).pdf ``` ```HTML Einladung (oeff).pdf ``` -------------------------------- ### Initialize PDF Functionality (JavaScript) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/StadtratsvorlageParser_Dokument2.html Initializes all registered PDF-related functionalities. This function should be called after all PDF handlers and configurations have been set up. ```JavaScript RISI.PDF.init() ``` -------------------------------- ### Configure PDF Viewer (JavaScript) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/StadtratsvorlageParser_Dokument2.html Configures a specific element as a PDF viewer, linking it to a viewer HTML file and an initial blank document. This sets up the basic functionality for displaying PDFs. ```JavaScript RISI.PDF.configureAsPDFViewer('id5', '../../pdfjs/web/viewer.html', 'about:blank'); ``` -------------------------------- ### Initialize PDF Module (JavaScript) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_BA_Agenda1.html Initializes the RISI PDF module, making its functionalities available for use. This is a prerequisite for any other PDF-related operations. ```JavaScript RISI.PDF.init() ``` -------------------------------- ### JavaScript: Initialize and Check Collapsible Elements Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_AgendaDecision1.html This snippet sets up event listeners for window resize and load events. On resize, it checks the sizes of collapsible elements. On load, it initializes the collapse functionality. This is likely part of a responsive design implementation. ```JavaScript window.addEventListener('resize', RISI.COLLAPSE.checkCollapsableSizes); window.addEventListener('load', RISI.COLLAPSE.init); ``` -------------------------------- ### Retrieve Meetings with Dates Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/_data/oparl_expected_results.txt This snippet demonstrates how to retrieve a list of meetings from the API. It includes details such as the meeting ID, type, start date, web link, creation and modification timestamps, name, and associated organization. The response is paginated. ```JSON { "data": [ { "id": "http://localhost:8080/oparl/v1.0/meeting/1", "type": "https://schema.oparl.org/1.0/Meeting", "meetingState": "", "start": "2016-01-01T09:00:00+01:00", "web": "http://localhost:8080/termine/1", "created": "2016-05-02T19:53:09+02:00", "modified": "2016-05-02T19:53:10+02:00", "name": "Ausschuss mit Terminen", "organization": [ "http://localhost:8080/oparl/v1.0/organization/gremium/1" ], "auxiliaryFile": [], "agendaItem": [] }, { "id": "http://localhost:8080/oparl/v1.0/meeting/2", "type": "https://schema.oparl.org/1.0/Meeting", "meetingState": "", "start": "2016-02-01T09:00:00+01:00", "web": "http://localhost:8080/termine/2", "created": "2016-05-02T19:53:09+02:00", "modified": "2016-05-02T19:53:10+02:00", "name": "Ausschuss mit Terminen", "organization": [ "http://localhost:8080/oparl/v1.0/organization/gremium/1" ], "auxiliaryFile": [], "agendaItem": [] }, { "id": "http://localhost:8080/oparl/v1.0/meeting/3", "type": "https://schema.oparl.org/1.0/Meeting", "meetingState": "", "start": "2015-12-01T09:00:00+01:00", "web": "http://localhost:8080/termine/3", "created": "2016-05-02T19:53:09+02:00", "modified": "2016-05-02T19:53:10+02:00", "name": "Ausschuss mit Terminen", "organization": [ "http://localhost:8080/oparl/v1.0/organization/gremium/1" ], "auxiliaryFile": [], "agendaItem": [] } ], "pagination": { "elementsPerPage": 3, "totalPages": 2 }, "links": { "first": "http://localhost:8080/oparl/v1.0/body/0/list/meeting", "next": "http://localhost:8080/oparl/v1.0/body/0/list/meeting?id=3" } } ``` -------------------------------- ### Configure PDF Viewer Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/StadtratsvorlageParser_DokumentBa.html Configures a component to act as a PDF viewer, specifying the viewer's URL and a blank initial document. This allows for embedding and displaying PDF documents within the application. ```JavaScript RISI.PDF.configureAsPDFViewer('id1d3', '../../pdfjs/web/viewer.html', 'about:blank'); ``` -------------------------------- ### View Document Preview Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_index.html Links to a preview of a document associated with a meeting. This allows users to see the content of documents before downloading them. ```HTML Dokumentenvorschau ``` ```HTML Dokumentenvorschau ``` ```HTML Dokumentenvorschau ``` ```HTML Dokumentenvorschau ``` -------------------------------- ### Configure PDF Viewer Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/AntragParser_Stadtrat1.html Configures a component as a PDF viewer, specifying the viewer's HTML file and an initial blank page. This is part of the RISI.PDF library. ```JavaScript RISI.PDF.configureAsPDFViewer('id5', '../../pdfjs/web/viewer.html', 'about:blank'); ``` -------------------------------- ### Register and Configure PDF Viewer with RISI.PDF Library Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_BA_Data1.html This code snippet utilizes the RISI.PDF library to manage PDF document interactions. It registers a handler for document selection, allowing dynamic display of file names and sizes. It also configures and initializes a PDF viewer, setting its document URL based on provided data. ```JavaScript RISI.PDF.registerAsDocumentSelectionHandler("id9b", function(component, data) {component.innerHTML = 'von "' + data.pdfname + '.pdf" (' + data.pdffilesizekb + ' KB)'}) RISI.PDF.configureAsPDFViewer('id9d', '../../pdfjs/web/viewer.html', 'about:blank'); RISI.PDF.registerAsDocumentSelectionHandler("id9d", function(component, data) {RISI.PDF.setPDFViewerDocUrl(component.id,data.pdfurl,data.pdfid,data.pdftyp);}) RISI.PDF.init() ``` -------------------------------- ### File Object Extensions Source: https://github.com/codeformunich/muenchen-transparent/blob/main/docs/oparl.md Details manufacturer-specific extensions for the 'File' object, prefixed with 'muenchen-transparent'. These extensions provide raw and titled names as displayed in the RIS system. ```json { "muenchenTransparent:nameRaw": "String - Der im RIS angezeigte Dokumentenname", "muenchenTransparent:nameTitelRaw": "String - Der String im titel-Tag im RIS" } ``` -------------------------------- ### Initialize Wicket Ajax Base URL Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/StadtraetInnenParser_Test2_Mitgliedschaften.html This snippet initializes the base URL for Wicket Ajax requests, specifically for fetching details of a person's profile, including session information and tab parameters. ```JavaScript Wicket.Ajax.baseUrl="person/detail/3312434?0&tab=fraktionen"; ``` -------------------------------- ### RISI PDF Viewer Integration Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/AntragParser_BAInitiative1.html Diese JavaScript-Snippets sind Teil der RISI PDF-Bibliothek und dienen zur Registrierung von Ereignishandlern und zur Konfiguration des PDF-Viewers. Sie ermöglichen die Anzeige von PDF-Dateien und die Aktualisierung von Komponenten mit PDF-Informationen. ```javascript RISI.PDF.registerAsDocumentSelectionHandler("id2", function(component, data) {component.innerHTML = 'von "' + data.pdfname + '.pdf" (' + data.pdffilesizekb + ' KB)'}) RISI.PDF.configureAsPDFViewer('id4', '../../pdfjs/web/viewer.html', 'about:blank'); RISI.PDF.registerAsDocumentSelectionHandler("id4", function(component, data) {RISI.PDF.setPDFViewerDocUrl(component.id,data.pdfurl,data.pdfid,data.pdftyp);}) RISI.PDF.init() ``` -------------------------------- ### JavaScript PDF Viewer Configuration Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_AgendaPublic2.html This JavaScript code configures a PDF viewer using a specified URL and initializes the PDF viewer functionality. It also registers a handler to set the document URL for the PDF viewer based on selected data. ```JavaScript RISI.PDF.configureAsPDFViewer('id58', '../../../../pdfjs/web/viewer.html', 'about:blank'); ``` ```JavaScript RISI.PDF.registerAsDocumentSelectionHandler("id58", function(component, data) {RISI.PDF.setPDFViewerDocUrl(component.id,data.pdfurl,data.pdfid,data.pdftyp);}) ``` ```JavaScript RISI.PDF.init() ``` -------------------------------- ### RISI PDF-Dokumentenhandler und Viewer-Konfiguration Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/AntragParser_BAAntrag1.html Dieses JavaScript-Snippet konfiguriert und registriert Funktionen für die Anzeige und Interaktion mit PDF-Dokumenten mithilfe der RISI.PDF-Bibliothek. Es ermöglicht die Registrierung von Handlern für die Dokumentenauswahl und die Konfiguration eines PDF-Viewers. ```javascript RISI.PDF.registerAsDocumentSelectionHandler("id2", function(component, data) {component.innerHTML = 'von "' + data.pdfname + '.pdf" (' + data.pdffilesizekb + ' KB)'}); RISI.PDF.configureAsPDFViewer('id4', '../../pdfjs/web/viewer.html', 'about:blank'); RISI.PDF.registerAsDocumentSelectionHandler("id4", function(component, data) {RISI.PDF.setPDFViewerDocUrl(component.id,data.pdfurl,data.pdfid,data.pdftyp);}); RISI.PDF.init() ``` -------------------------------- ### RISI PDF Viewer Integration Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_Data1.html Diese JavaScript-Snippets konfigurieren und initialisieren den RISI PDF Viewer. Sie registrieren Handler für die Dokumentenauswahl und konfigurieren den Viewer, um PDF-Dokumente anzuzeigen, wobei die URL und ID des Dokuments dynamisch gesetzt werden. ```javascript RISI.PDF.registerAsDocumentSelectionHandler("ida3", function(component, data) { component.innerHTML = 'von "' + data.pdfname + '.pdf" (' + data.pdffilesizekb + ' KB)' }); ``` ```javascript RISI.PDF.configureAsPDFViewer('ida5', '../../pdfjs/web/viewer.html', 'about:blank'); ``` ```javascript RISI.PDF.registerAsDocumentSelectionHandler("ida5", function(component, data) { RISI.PDF.setPDFViewerDocUrl(component.id,data.pdfurl,data.pdfid,data.pdftyp); }); ``` ```javascript RISI.PDF.init() ``` -------------------------------- ### JavaScript Event Listeners for Responsive Collapse Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_AgendaDisclosure1.html This JavaScript code sets up event listeners for window resize and load events to manage the collapse and initialization of responsive elements, likely for navigation menus. It uses jQuery for DOM manipulation and animation. ```JavaScript window.addEventListener('resize', RISI.COLLAPSE.checkCollapsableSizes); window.addEventListener('load', RISI.COLLAPSE.init); ``` ```JavaScript $("#navbarMenu").on("show.bs.collapse", function() { $(document.documentElement).animate({ scrollTop: $("#navbar").offset().top }); }); $("#navbarMenu .dropdown").on("shown.bs.dropdown", function(event) { $("#navbarMenu").animate({ scrollTop: event.target.offsetTop - 50 }); }); ``` -------------------------------- ### Download TOP Document Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_BA_Agenda1.html Provides a link to download a specific TOP (Tagesordnungspunkt) document. This is typically used to retrieve official municipal agenda items for review. ```HTML TOP herunterladen ``` -------------------------------- ### JavaScript PDF Document Handling Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/StadtratsvorlageParser_Dokument1.html Diese Snippets registrieren und konfigurieren Funktionen zur Handhabung von PDF-Dokumenten, einschließlich der Anzeige von Dateinamen und Größen sowie der Konfiguration eines PDF-Viewers. Sie verwenden die RISI.PDF-Bibliothek. ```javascript RISI.PDF.registerAsDocumentSelectionHandler("idd9", function(component, data) {component.innerHTML = 'von "' + data.pdfname + '.pdf" (' + data.pdffilesizekb + ' KB)'}) ``` ```javascript RISI.PDF.configureAsPDFViewer('iddb', '../../pdfjs/web/viewer.html', 'about:blank'); ``` ```javascript RISI.PDF.registerAsDocumentSelectionHandler("iddb", function(component, data) {RISI.PDF.setPDFViewerDocUrl(component.id,data.pdfurl,data.pdfid,data.pdftyp);}) ``` ```javascript RISI.PDF.init() ``` -------------------------------- ### OParl Tester Helper Function Source: https://github.com/codeformunich/muenchen-transparent/blob/main/docs/oparl.md Provides a helper function `$I->getOParl()` within the Codeception test suite to retrieve OParl objects. It handles HTTP headers, status codes, and response validation against stored JSON files. The function also offers methods like `$I->getPrettyResponse()`, `$I->getUglyResponse()`, and `$I->getTree()` for accessing the response in different formats. ```PHP namespace { // Placeholder for the actual implementation of OparlTester.php class OparlTester { public function getOParl(string $urlAffix) { // ... implementation details ... return $this; } public function getPrettyResponse(): string { // ... implementation details ... return ""; } public function getUglyResponse(): string { // ... implementation details ... return ""; } public function getTree(): array { // ... implementation details ... return []; } } } namespace Codeception\ { // Placeholder for the actual implementation of OparlTester.php class OparlTester extends \ { // ... implementation details ... } } ``` -------------------------------- ### Download TOP Document (Item 6) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_BA_Agenda1.html Provides a download link for the TOP document associated with agenda item 6. This allows users to retrieve the relevant official document for this item. ```HTML TOP herunterladen ``` -------------------------------- ### Initialize Wicket Ajax Base URL Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/BAMitgliederParser_Test1_Fraktionen.html Sets the base URL for Wicket Ajax requests, specifying the target resource and parameters for fetching detailed person information, including the 'fraktionen' tab. ```JavaScript Wicket.Ajax.baseUrl="person/detail/954?0&tab=fraktionen"; ``` -------------------------------- ### JavaScript: Search Box Toggle Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_BA_Data1.html Dieser Code-Schnipsel ist Teil des Wicket-Frameworks und fügt einen Event-Listener hinzu, der beim Laden des Fensters ausgelöst wird. Er holt ein Link-Element anhand seiner ID 'id9e' und aktualisiert sein 'aria-expanded'-Attribut basierend auf dem Anzeigestatus eines anderen Elements, das durch das 'aria-owns'-Attribut des Links referenziert wird. ```JavaScript Wicket.Event.add(window, "load", function(event) { var link = document.getElementById('id9e'); link.setAttribute('aria-expanded', window.getComputedStyle(document.getElementById(link.getAttribute('aria-owns'))).display === 'none' ? 'false':'true' ); }); ``` -------------------------------- ### Download TOP Document Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_BA_Agenda1.html Provides a link to download a specific TOP (Tagesordnungspunkt) document. This is typically used to retrieve official documents related to municipal agenda items. ```HTML TOP herunterladen ``` -------------------------------- ### jQuery Navbar Menu Collapse Animation Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/Referate_index.html Dieses Code-Snippet verwendet jQuery, um Animationen für das Auf- und Einklappen von Menüs in der Navbar zu implementieren. Es scrollt zum Navbar-Element, wenn das Menü geöffnet wird, und scrollt innerhalb des Menüs zu einem geöffneten Dropdown-Element. ```javascript $("#navbarMenu").on("show.bs.collapse", function() { $(document.documentElement).animate({ scrollTop: $("#navbar").offset().top }); }); $("#navbarMenu .dropdown").on("shown.bs.dropdown", function(event) { $("#navbarMenu").animate({ scrollTop: event.target.offsetTop - 50 }); }); ``` -------------------------------- ### JavaScript: Window Load Event Listener Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/AntragParser_BAInitiative1.html Adds an event listener to the window that executes a function once the entire page has finished loading. This is commonly used for initialization tasks. ```JavaScript window.addEventListener('load', RISI.COLLAPSE.init); ``` -------------------------------- ### JavaScript: Initialize and Check Collapsible Sizes Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/AntragParser_Stadtrat2.html This JavaScript code adds event listeners for 'resize' and 'load' events. On 'resize', it calls RISI.COLLAPSE.checkCollapsableSizes. On 'load', it calls RISI.COLLAPSE.init, likely to initialize collapsible elements on the page. ```JavaScript window.addEventListener('resize', RISI.COLLAPSE.checkCollapsableSizes); window.addEventListener('load', RISI.COLLAPSE.init); ``` -------------------------------- ### Download TOP Document Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_AgendaPublic1.html Provides a link to download a 'TOP' (Tagesordnungspunkt) document, likely related to city council agenda items. This functionality is typically used to retrieve official reports or proposals. ```HTML TOP herunterladen ``` -------------------------------- ### Initialize Wicket Ajax Base URL Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/BAMitgliederParser_Test1_Ausschuesse.html This snippet initializes the base URL for Wicket Ajax requests, specifically for fetching person detail information. It sets the URL to 'person/detail/954' with parameters for sorting and filtering. ```JavaScript Wicket.Ajax.baseUrl="person/detail/954?0&tab=baausschuesse"; ``` -------------------------------- ### Configure PDF Viewer (JavaScript) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_BA_Agenda1.html Configures a specific element as a PDF viewer, linking it to a viewer HTML file and an initial blank document. This allows for embedding PDF viewing capabilities directly within the web page. ```JavaScript RISI.PDF.configureAsPDFViewer('id8e', '../../../../pdfjs/web/viewer.html', 'about:blank') ``` -------------------------------- ### Link to Session Template (Item 5) Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/CalendarParser_BA_Agenda1.html Links to a session template document for agenda item 5. This provides access to the official documentation related to this specific item on the agenda. ```HTML [Sitzungsvorlage 20-26 / V 05116] ``` -------------------------------- ### Toggle Search Box Functionality Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/AntragParser_BAInitiative1.html Diese JavaScript-Funktion 'toggleSearchBox' steuert die Sichtbarkeit einer Suchbox. Sie fügt oder entfernt die CSS-Klasse 'd-none' von einem Element mit der ID 'navsearchbox' und aktualisiert das 'aria-expanded'-Attribut eines Schalters, um den Zustand der Suchbox anzuzeigen. ```javascript function toggleSearchBox(){ var component = document.getElementById('navsearchbox'); var togglebutton = document.getElementById('searchboxtoggle'); if (component.classList.contains("d-none")) { component.classList.remove("d-none"); togglebutton.setAttribute("aria-expanded","true"); }else{ component.classList.add("d-none"); togglebutton.setAttribute("aria-expanded","false"); } togglebutton.blur(); } ``` -------------------------------- ### Handle DOM Ready Event for Ajax Request Source: https://github.com/codeformunich/muenchen-transparent/blob/main/tests/phpunit/data/BAMitgliederParser_Test1_BA.html Attaches an event listener to the DOM ready event to initiate an AJAX POST request. This request likely updates a specific part of the page related to the member's memberships, identified by 'id5'. ```JavaScript Wicket.Event.add(window, "domready", function(event) { Wicket.Ajax.ajax({"u":"./954;jsessionid=6294A9844EBA78BBE6F7CD2A9E0A07BD?0-1.0-typedSectionsPanel-tabcontainer-bamitgliedschaftenListSection-list-cardheader-sort\_filter&tab=mitgliedschaften","m":"POST","c":"id5","e":"change"});; Wicket.Event.publish(Wicket.Event.Topic.AJAX_HANDLERS_BOUND); ;}); ```