| <title>Panel and ButtonGroup demo</title> |
| <script src="../js/lib/require.js" async="async"></script> |
| <link type="text/css" rel="stylesheet" href="../css/kalamar.css" /> |
| <nav id="mainButton" style="position: absolute; width: 100%; top: 150px"></nav> |
| require(['buttongroup', 'panel', 'view/koralquery'], function (btnClass, panelClass, kqClass) { |
| '@type' : "https://beispiel", |
| var panel = panelClass.create(); |
| var actions = panel.actions; |
| actions.add('Meta',['meta'], function () { |
| console.log(this.button.classList.contains('meta')); |
| var list = actions.addList('More', ['list']); |
| ['cool', 'cool', function (e, action) { console.log('really' + this.action()) }], |
| ['very cool', 'veryCool', function (e, action) { console.log('very cool') }] |
| document.getElementById('mainButton').appendChild(panel.element()); |