You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.1 KiB
30 lines
1.1 KiB
YUI.add('gallery-sm-treeview-templates', function (Y, NAME) {
|
|
|
|
var Micro = Y.Template.Micro;
|
|
|
|
Y.namespace('TreeView').Templates = {
|
|
children: Micro.compile(
|
|
'<ul class="<%= data.classNames.children %>" ' +
|
|
|
|
'<% if (data.node.isRoot()) { %>' +
|
|
'role="tree" tabindex="0"' +
|
|
'<% } else { %>' +
|
|
'role="group"' +
|
|
'<% } %>' +
|
|
|
|
'></ul>'
|
|
),
|
|
|
|
node: Micro.compile(
|
|
'<li id="<%= data.node.id %>" class="<%= data.nodeClassNames.join(" ") %>" role="treeitem" aria-labelled-by="<%= data.node.id %>-label">' +
|
|
'<div class="<%= data.classNames.row %>" data-node-id="<%= data.node.id %>">' +
|
|
'<span class="<%= data.classNames.indicator %>"><s></s></span>' +
|
|
'<span class="<%= data.classNames.icon %>"></span>' +
|
|
'<span id="<%= data.node.id %>-label" class="<%= data.classNames.label %>"><%== data.node.label %></span>' +
|
|
'</div>' +
|
|
'</li>'
|
|
)
|
|
};
|
|
|
|
|
|
}, 'gallery-2013.03.27-22-06', {"requires": ["template-micro"]});
|
|
|