Last active
February 22, 2017 14:51
-
-
Save Reverbe/1cc6446bbee31e54c227852610469192 to your computer and use it in GitHub Desktop.
Grid: basic usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
margin: 0; | |
} | |
.btn{ | |
font-size: 30px; | |
padding: 20px; | |
margin-top: 20px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<require from="./app.css!css"></require> | |
<require from="aurelia-kendoui-bridge/window/window"></require> | |
<require from="aurelia-kendoui-bridge/splitter/splitter"></require> | |
<require from="aurelia-kendoui-bridge/tabstrip/tabstrip"></require> | |
<require from="aurelia-kendoui-bridge/treeview/treeview"></require> | |
<require from="aurelia-kendoui-bridge/common/template"></require> | |
<div ak-splitter="k-orientation: horizontal; k-panes.bind: panes"> | |
<div> | |
<div id="tabstrip" ak-tabstrip="k-animation.bind: { open: { effects: 'fadeIn' } }" | |
k-on-ready.delegate="onTabReady($event.detail)" | |
k-on-select.delegate="onTabstripSelect($event.detail)"> | |
<ul> | |
<li class="k-state-active"> | |
Paris | |
</li> | |
<li> | |
New York | |
</li> | |
</ul> | |
<div> | |
<ak-treeview k-data-source.bind="treedataSource" id="treeview" | |
k-on-select.delegate="onTreeNodeSelect($event.detail)"> | |
<ak-template> | |
<span class="title">${text}</span> | |
</ak-template> | |
</ak-treeview> | |
</div> | |
<div> | |
<span class="sunny"> </span> | |
<div class="weather"> | |
<h2>29<span>ºC</span></h2> | |
<p>Sunny weather in New York.</p> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div>2</div> | |
<div>3</div> | |
</div> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class BasicUse { | |
panes = [ | |
{collapsible: false, resizable: true, size: '400px'}, | |
{collapsible: false, resizable: true}, | |
{collapsible: false, resizable: true, size: '83px'} | |
]; | |
constructor() { | |
} | |
attached() { | |
} | |
openWindow() { | |
this.wind.open(); | |
setTimeout(() => { | |
this.split.resize(); | |
}, 200); | |
} | |
treedataSource = [ | |
{ text: "foo", inStock: 7, items: [ | |
{ text: "bar", inStock: 2 }, | |
{ text: "baz", inStock: 5 } | |
] } | |
]; | |
nodeClicked(e) { | |
console.log($(e.target).siblings(".title").text()); | |
} | |
onTabReady(e) { | |
//console.log(e.element); | |
} | |
onTreeNodeSelect(e) { | |
console.log('tree node select'); | |
} | |
onTabstripSelect(e) { | |
console.log('tabstrip select'); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Aurelia KendoUI bridge</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.2.714/styles/kendo.common.min.css"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.2.714/styles/kendo.rtl.min.css"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.2.714/styles/kendo.default.min.css"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.2.714/styles/kendo.mobile.all.min.css"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.4.0/bluebird.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/chroma-js/1.2.1/chroma.min.js"></script> | |
<script src="https://kendo.cdn.telerik.com/2016.2.714/js/jquery.min.js"></script> | |
<script src="https://kendo.cdn.telerik.com/2016.2.714/js/jszip.min.js"></script> | |
<script src="https://kendo.cdn.telerik.com/2016.2.714/js/kendo.all.min.js"></script> | |
</head> | |
<body aurelia-app="main"> | |
<h1>Loading...</h1> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.6/system.js"></script> | |
<script src="https://rawgit.com/aurelia-ui-toolkits/aurelia-kendoui-bundles/1.2.0/config2.js"></script> | |
<script> | |
System.import('aurelia-bootstrapper'); | |
</script> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function configure(aurelia) { | |
aurelia.use | |
.standardConfiguration() | |
.plugin('aurelia-kendoui-bridge'); | |
aurelia.start().then(a => a.setRoot()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment