Skip to content
Snippets Groups Projects
Select Git revision
  • 12c7fb3eded4b6104bb40f3b140dd0eda4385015
  • master default protected
  • 0.5.9
  • 0.5.8
  • 0.5.7
  • 0.5.6
  • 0.5.5
  • 0.5.4
  • 0.5.3
  • 0.5.2
  • 0.5.1
  • 0.5.0
  • 0.4.17
  • 0.4.16
  • 0.4.15
  • 0.4.14
  • 0.4.13
  • 0.4.12
  • 0.4.11
  • 0.4.10
  • 0.4.9
  • 0.4.8
22 results

static_provider.go

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));
    });