Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
DnomaidGit committed Mar 31, 2024
1 parent c174a59 commit 1e62e76
Show file tree
Hide file tree
Showing 110 changed files with 86,388 additions and 72 deletions.
Binary file not shown.
21 changes: 21 additions & 0 deletions Sources/CustomControls/Table/control/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015-2020 Oli Folkerd

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
64 changes: 64 additions & 0 deletions Sources/CustomControls/Table/control/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
![Tabulator Table](http://olifolkerd.github.io/tabulator/images/tabulator.png)

An easy to use interactive table generation JavaScript library

Full documentation & demos can be found at: [http://tabulator.info](http://tabulator.info)
***
![Tabulator Table](http://tabulator.info/images/tabulator_table.jpg)
***

Features
================================
Tabulator allows you to create interactive tables in seconds from any HTML Table, Javascript Array or JSON formatted data.

Simply include the library and the css in your project and you're away!

Tabulator is packed with useful features including:

![Tabulator Features](http://olifolkerd.github.io/tabulator/images/featurelist_share.png)


Frontend Framework Support
================================
Tabulator is built to work with all the major front end JavaScript frameworks including React, Angular and Vue.


Setup
================================
Setting up tabulator could not be simpler.

Include the library and the css
```html
<link href="dist/css/tabulator.min.css" rel="stylesheet">
<script type="text/javascript" src="dist/js/tabulator.min.js"></script>
```

Create an element to hold the table
```html
<div id="example-table"></div>
```

Turn the element into a tabulator with some simple javascript
```js
var table = new Tabulator("#example-table", {});
```


### Bower Installation
To get Tabulator via the Bower package manager, open a terminal in your project directory and run the following commmand:
```
bower install tabulator --save
```

### NPM Installation
To get Tabulator via the NPM package manager, open a terminal in your project directory and run the following commmand:
```
npm install tabulator-tables --save
```

### CDN - UNPKG
To access Tabulator directly from the UNPKG CDN servers, include the following two lines at the start of your project, instead of the localy hosted versions:
```html
<link href="https://unpkg.com/tabulator-tables/dist/css/tabulator.min.css" rel="stylesheet">
<script type="text/javascript" src="https://unpkg.com/tabulator-tables/dist/js/tabulator.min.js"></script>
```
54 changes: 54 additions & 0 deletions Sources/CustomControls/Table/control/codeDnomaid.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
let ArrayData = [];
let ArrayColumn = [];
let table;
let selectedRow = null;
// Initialize the custom control (without a successful initialization, the CWC will remain empty. Make sure to include the webcc.min.js script!)
// "result" is a boolean defining if the connection was successfull or not.
function init(result) {
if (result) {
webccInterfaceInit();
} else {
console.log('Connection NOK');
}
}
WebCC.start(init, webccInterface.contract, EXTENSIONS, TIMEOUT);
function showDemoData() {
// Get the table container element
var tableContainer = document.getElementById("example-table");
}
function drawTable(columnStyleString, tableDataString) {
try {
var tabledata = (tableDataString && JSON.parse(tableDataString)) || [];
var columnStyle = (columnStyleString && JSON.parse(columnStyleString)) || [];
} catch(e) {
console.error('Error parsing JSON:', e);
return;
}
//choose how the table should look like or behave. More information on http://tabulator.info/
table = new Tabulator("#example-table", {
height: 'calc(100% - 2px)', // set height of table to 100% minus 2 px, because the border of the table is 1px top and border
data: tabledata, //load initial data into table
layout: "fitColumns", //fit columns to width of table (optional)
columns: columnStyle,
selectable: true, // Enable selection
rowClick: function (e, row) { // Table configuration options
// Deselect all rows
if (selectedRow) {
table.deselectRow();
}
// Select the clicked row
row.select();
selectedRow = row;
}
});
}
function showRuntimeData() {
// Get the table container element
var tableContainer = document.getElementById("example-table");
// Attach a click event listener to the table container
tableContainer.addEventListener("click", function () {
// Get the selected row(s)
var selectedRows = table.getSelectedRows();
WebCC.Events.fire("SelectedRow",selectedRows[0]._row.data);
});
}
Loading

0 comments on commit 1e62e76

Please sign in to comment.