Skip to content
Snippets Groups Projects
Select Git revision
  • d6e1c73304b626642dc6e794fba8a230e65dabd7
  • master default protected
  • 1.31
  • 4.25.3
  • 4.25.2
  • 4.25.1
  • 4.25.0
  • 4.24.3
  • 4.24.2
  • 4.24.1
  • 4.24.0
  • 4.23.6
  • 4.23.5
  • 4.23.4
  • 4.23.3
  • 4.23.2
  • 4.23.1
  • 4.23.0
  • 4.22.3
  • 4.22.2
  • 4.22.1
  • 4.22.0
  • 4.21.0
23 results

Monster.DOM.Resource.html

Blame
  • 272.mjs 1.79 KiB
    /**
    * @file development/issues/open/272.mjs
    * @url https://gitlab.schukai.com/oss/libraries/javascript/monster/-/issues/272
    * @description check and update data save button
    * @issue 272
    */
    
    import "../../../source/components/style/property.pcss";
    import "../../../source/components/style/link.pcss";
    import "../../../source/components/style/color.pcss";
    import "../../../source/components/style/theme.pcss";
    import "../../../source/components/style/normalize.pcss";
    import "../../../source/components/style/typography.pcss";
    import "../../../source/components/datatable/datasource/rest.mjs";
    import "../../../source/components/datatable/datasource/dom.mjs";
    import "../../../source/components/datatable/dataset.mjs";
    import "../../../source/components/datatable/pagination.mjs";
    import "../../../source/components/form/button.mjs";
    import "../../../source/components/form/button-bar.mjs";
    
    // DOM-Elemente für die Seiten-Datensätze
    const pageData1 = document.getElementById("ds272-d");
    const pageData2 = document.getElementById("ds272-r");
    
    // Allgemeine Funktion zur Einstellung der Seitennummer
    function setPage(dataElement, pageNum) {
        dataElement.setParameters({page: pageNum});
    }
    
    // Initialisierung der Buttons und Event-Handler für die erste Datenquelle
    const buttonBar1 = document.getElementById("bb-d");
    ['first', 'second', 'third', 'fourth'].forEach((label, index) => {
        const button = buttonBar1.children[index];
        button.setOption("actions.click", () => setPage(pageData1, index + 1));
    });
    
    // Initialisierung der Buttons und Event-Handler für die zweite Datenquelle
    const buttonBar2 = document.getElementById("bb-r");
    ['first', 'second', 'third', 'fourth'].forEach((label, index) => {
        const button = buttonBar2.children[index];
        button.setOption("actions.click", () => setPage(pageData2, index + 1));
    });