Created
August 19, 2016 10:47
-
-
Save jawa-the-hutt/91bc5bcaf22cb0fe9dae9e7b11bc7e87 to your computer and use it in GitHub Desktop.
Aurelia KendoUI component - problem report
This file contains 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
<!-- put your view here --> | |
<template> | |
<div class="form-group"> | |
<label class="control-label"> | |
Gender | |
<span class="required"> * </span> | |
</label> | |
<div> | |
<ul class="fieldlist"> | |
<li> | |
<input type="radio" name="gender" id="male" value="M" class="k-radio" checked.bind="gender"> | |
<label class="k-radio-label" for="male">Male</label> | |
</li> | |
<li> | |
<input type="radio" name="gender" id="female" value="F" class="k-radio" checked.bind="gender"> | |
<label class="k-radio-label" for="female">Female</label> | |
</li> | |
</ul> | |
</div> | |
</div> | |
${gender} | |
<div class="form-group"> | |
<label class="control-label"> | |
Food | |
<span class="required"> * </span> | |
</label> | |
<div> | |
<ul class="fieldlist"> | |
<li repeat.for="option of foodOptions"> | |
<input type.bind="option.type" name.bind="option.name" id.bind="option.id" | |
class.bind="option.inputClass" model.bind="option" checked.two-way="$parent[option.name]"> | |
<label class.bind="option.labelClass" for.bind="option.id">${option.text}</label> | |
</li> | |
</ul> | |
</div> | |
</div> | |
${food.id} | |
</template> |
This file contains 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
/* put your view model code here */ | |
export class App { | |
//food | |
food = ''; | |
foodOptions = [ | |
{ | |
type: "radio", | |
name: "food", | |
inputClass: "k-radio", | |
labelClass: "k-radio-label", | |
id: "ribs", | |
value: "ribs", | |
text: "Ribs" | |
}, | |
{ | |
type: "radio", | |
name: "food", | |
inputClass: "k-radio", | |
labelClass: "k-radio-label", | |
id: "bbq", | |
value: "bbq", | |
text: "BBQ" | |
} | |
] | |
} |
This file contains 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> | |
<style> | |
#fieldlist { | |
margin: 0; | |
padding: 0; | |
} | |
#fieldlist li { | |
list-style: none; | |
padding-bottom: .7em; | |
text-align: left; | |
} | |
#fieldlist label { | |
display: block; | |
padding-bottom: .3em; | |
font-weight: bold; | |
text-transform: uppercase; | |
font-size: 12px; | |
color: #444; | |
} | |
#fieldlist li.status { | |
text-align: center; | |
} | |
#fieldlist li .k-widget:not(.k-tooltip), | |
#fieldlist li .k-textbox { | |
margin: 0 5px 5px 0; | |
} | |
.confirm { | |
padding-top: 1em; | |
} | |
.valid { | |
color: green; | |
} | |
.invalid { | |
color: red; | |
} | |
#fieldlist li input[type="checkbox"] { | |
margin: 0 5px 0 0; | |
} | |
span.k-widget.k-tooltip-validation { | |
display; inline-block; | |
width: 160px; | |
text-align: left; | |
border: 0; | |
padding: 0; | |
margin: 0; | |
background: none; | |
box-shadow: none; | |
color: red; | |
} | |
.k-tooltip-validation .k-warning { | |
display: none; | |
} | |
</style> | |
</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.0.0-beta.1.0.6/config2.js"></script> | |
<script> | |
System.import('aurelia-bootstrapper'); | |
</script> | |
</body> | |
</html> |
This file contains 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() | |
.developmentLogging() | |
.plugin('aurelia-kendoui-bridge', kendo => kendo.pro()); | |
aurelia.start().then(a => a.setRoot()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment