Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dropdowntree): add dropdowntree wrapper
- Loading branch information
Arne Deruwe
committed
Jun 4, 2018
1 parent
511d070
commit 6e17a41
Showing
8 changed files
with
232 additions
and
125 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,119 +1,148 @@ | ||
<template> | ||
<require from="aurelia-kendoui-bridge/listbox/listbox"></require> | ||
|
||
<div id="example" role="application"> | ||
<div class="demo-section k-content wide"> | ||
<ak-list-box k-data-text-field="ContactName" | ||
k-data-value-field="CustomerID" | ||
k-data-source.bind="datasource" | ||
k-draggable.bind="draggable" | ||
k-drop-sources.bind="['selected']" | ||
k-connect-with="selected" | ||
k-toolbar.bind="toolbar"> | ||
<select id="optional" title="Optional"> | ||
</select> | ||
|
||
<!-- unfortunately Aurelia's templating syntax is not supported here --> | ||
<ak-template kendo-template.bind="true"> | ||
<span class="k-state-default" style="background-image: url('https://demos.telerik.com/kendo-ui/content/web/Customers/#:data.CustomerID#.jpg')"></span> | ||
<span class="k-state-default"> | ||
<h3>#: data.ContactName #</h3> | ||
<p>#: data.CompanyName #</p> | ||
</span> | ||
</ak-template> | ||
</ak-list-box> | ||
|
||
<ak-list-box k-data-text-field="ContactName" | ||
k-data-value-field="CustomerID" | ||
k-draggable.bind="draggable" | ||
k-drop-sources.bind="['optional']" | ||
k-connect-with="optional"> | ||
<select id="selected" title="Selected"></select> | ||
|
||
<!-- unfortunately Aurelia's templating syntax is not supported here --> | ||
<ak-template kendo-template.bind="true"> | ||
<span class="k-state-default" style="background-image: url('https://demos.telerik.com/kendo-ui/content/web/Customers/#:data.CustomerID#.jpg')"></span> | ||
<span class="k-state-default"> | ||
<h3>#: data.ContactName #</h3> | ||
<p>#: data.CompanyName #</p> | ||
</span> | ||
</ak-template> | ||
</ak-list-box> | ||
</div> | ||
</div> | ||
|
||
<style> | ||
#example .demo-section { | ||
max-width: none; | ||
width: 695px; | ||
} | ||
|
||
#example .k-listbox { | ||
width: 326px; | ||
height: 310px; | ||
} | ||
|
||
#example .k-listbox:first-child { | ||
width: 360px; | ||
margin-right: 1px; | ||
} | ||
|
||
.k-ghost { | ||
display:none!important; | ||
} | ||
|
||
.custom-placeholder { | ||
opacity: 0.4; | ||
} | ||
|
||
#example .k-item { | ||
line-height: 1em; | ||
} | ||
|
||
/* Material Theme padding adjustment*/ | ||
|
||
.k-material #example .k-item, | ||
.k-material #example .k-item.k-state-hover, | ||
.k-materialblack #example .k-item, | ||
.k-materialblack #examplel .k-item.k-state-hover { | ||
padding-left: 5px; | ||
border-left: 0; | ||
} | ||
|
||
.k-item > span { | ||
-webkit-box-sizing: border-box; | ||
-moz-box-sizing: border-box; | ||
box-sizing: border-box; | ||
display: inline-block; | ||
vertical-align: top; | ||
margin: 20px 10px 10px 5px; | ||
} | ||
|
||
#example .k-item > span:first-child, | ||
.k-item.k-drag-clue > span:first-child { | ||
-moz-box-shadow: inset 0 0 30px rgba(0,0,0,.3); | ||
-webkit-box-shadow: inset 0 0 30px rgba(0,0,0,.3); | ||
box-shadow: inset 0 0 30px rgba(0,0,0,.3); | ||
margin: 10px; | ||
width: 50px; | ||
height: 50px; | ||
border-radius: 50%; | ||
background-size: 100%; | ||
background-repeat: no-repeat; | ||
} | ||
|
||
#example h3, | ||
.k-item.k-drag-clue h3 { | ||
font-size: 1.2em; | ||
font-weight: normal; | ||
margin: 0 0 1px 0; | ||
padding: 0; | ||
} | ||
|
||
#example p { | ||
margin: 0; | ||
padding: 0; | ||
font-size: .8em; | ||
} | ||
</style> | ||
<require from="aurelia-kendoui-bridge/listbox/listbox"></require> | ||
<require from="aurelia-kendoui-bridge/dropdowntree/dropdowntree"> | ||
</require> | ||
|
||
<div id="example" | ||
role="application"> | ||
<div class="demo-section k-content wide"> | ||
<ak-list-box k-data-text-field="ContactName" | ||
k-data-value-field="CustomerID" | ||
k-data-source.bind="datasource" | ||
k-draggable.bind="draggable" | ||
k-drop-sources.bind="['selected']" | ||
k-connect-with="selected" | ||
k-toolbar.bind="toolbar"> | ||
<select id="optional" | ||
title="Optional"> | ||
</select> | ||
|
||
<!-- unfortunately Aurelia's templating syntax is not supported here --> | ||
<ak-template kendo-template.bind="true"> | ||
<span class="k-state-default" | ||
style="background-image: url('https://demos.telerik.com/kendo-ui/content/web/Customers/#:data.CustomerID#.jpg')"></span> | ||
<span class="k-state-default"> | ||
<h3>#: data.ContactName #</h3> | ||
<p>#: data.CompanyName #</p> | ||
</span> | ||
</ak-template> | ||
</ak-list-box> | ||
|
||
<ak-list-box k-data-text-field="ContactName" | ||
k-data-value-field="CustomerID" | ||
k-draggable.bind="draggable" | ||
k-drop-sources.bind="['optional']" | ||
k-connect-with="optional"> | ||
<select id="selected" | ||
title="Selected"></select> | ||
|
||
<!-- unfortunately Aurelia's templating syntax is not supported here --> | ||
<ak-template kendo-template.bind="true"> | ||
<span class="k-state-default" | ||
style="background-image: url('https://demos.telerik.com/kendo-ui/content/web/Customers/#:data.CustomerID#.jpg')"></span> | ||
<span class="k-state-default"> | ||
<h3>#: data.ContactName #</h3> | ||
<p>#: data.CompanyName #</p> | ||
</span> | ||
</ak-template> | ||
</ak-list-box> | ||
|
||
<ak-drop-down-tree k-placeholder="select..." | ||
k-checkboxes.bind="true" | ||
k-value.two-way="chacked" | ||
k-check-all.bind="true" | ||
k-data-source.bind="[ | ||
{ | ||
text: 'Furniture', expanded: false, items: [ | ||
{ text: 'Tables & Chairs' }, | ||
{ text: 'Sofas' }, | ||
{ text: 'Occasional Furniture' } | ||
] | ||
}, | ||
{ | ||
text: 'Decor', items: [ | ||
{ text: 'Bed Linen' }, | ||
{ text: 'Curtains & Blinds' }, | ||
{ text: 'Carpets' } | ||
] | ||
} | ||
]"></ak-drop-down-tree> | ||
<div>${chacked}</div> | ||
</div> | ||
</div> | ||
|
||
<style> | ||
#example .demo-section { | ||
max-width: none; | ||
width: 695px; | ||
} | ||
|
||
#example .k-listbox { | ||
width: 326px; | ||
height: 310px; | ||
} | ||
|
||
#example .k-listbox:first-child { | ||
width: 360px; | ||
margin-right: 1px; | ||
} | ||
|
||
.k-ghost { | ||
display: none !important; | ||
} | ||
|
||
.custom-placeholder { | ||
opacity: 0.4; | ||
} | ||
|
||
#example .k-item { | ||
line-height: 1em; | ||
} | ||
|
||
/* Material Theme padding adjustment*/ | ||
|
||
.k-material #example .k-item, | ||
.k-material #example .k-item.k-state-hover, | ||
.k-materialblack #example .k-item, | ||
.k-materialblack #examplel .k-item.k-state-hover { | ||
padding-left: 5px; | ||
border-left: 0; | ||
} | ||
|
||
.k-item>span { | ||
-webkit-box-sizing: border-box; | ||
-moz-box-sizing: border-box; | ||
box-sizing: border-box; | ||
display: inline-block; | ||
vertical-align: top; | ||
margin: 20px 10px 10px 5px; | ||
} | ||
|
||
#example .k-item>span:first-child, | ||
.k-item.k-drag-clue>span:first-child { | ||
-moz-box-shadow: inset 0 0 30px rgba(0, 0, 0, .3); | ||
-webkit-box-shadow: inset 0 0 30px rgba(0, 0, 0, .3); | ||
box-shadow: inset 0 0 30px rgba(0, 0, 0, .3); | ||
margin: 10px; | ||
width: 50px; | ||
height: 50px; | ||
border-radius: 50%; | ||
background-size: 100%; | ||
background-repeat: no-repeat; | ||
} | ||
|
||
#example h3, | ||
.k-item.k-drag-clue h3 { | ||
font-size: 1.2em; | ||
font-weight: normal; | ||
margin: 0 0 1px 0; | ||
padding: 0; | ||
} | ||
|
||
#example p { | ||
margin: 0; | ||
padding: 0; | ||
font-size: .8em; | ||
} | ||
</style> | ||
</template> |
Oops, something went wrong.