All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.cards_treeview.CardsTreeview.soy Maven / Gradle / Ivy

There is a newer version: 7.4.3.112-ga112
Show newest version
{namespace liferay.frontend.CardsTreeview}

/**
 * This renders the main element.
 */
{template .render}
	{@param nodes: list}
	{@param pathThemeImages: string}
	{@param? viewType: string}

	
{call .nodes} {param nodes: $nodes /} {param pathThemeImages: $pathThemeImages /} {param viewType: $viewType /} {/call}
{/template} /** * Renders the list of tree nodes. Uses the same markup as the parent Treeview component */ {template .nodes} {@param nodes: list} {@param? parentPath: string} {@param pathThemeImages: string} {@param? viewType: string} {if $nodes}
    {foreach $node in $nodes} {let $index: index($node) /} {call .node} {param node: $node /} {param path: isNonnull($parentPath) ? ($parentPath + '-' + $index) : '' + $index /} {param pathThemeImages: $pathThemeImages /} {param viewType: $viewType /} {/call} {/foreach}
{/if} {/template} /** * Overrides the parent Treeview node template to show a Lexicon card instead of the simple label */ {template .node} {@param node: [ children: list, disabled: bool, expanded: bool, icon: string, id: string, name: string, selected: bool, value: string ]} {@param path: string} {@param pathThemeImages: string} {@param? viewType: string}
  • {if $node}
    {let $nodeAttributes kind="attributes"} class="clearfix treeview-node-main {$node.children ? ' hasChildren' : ''} {$node.disabled ? ' disabled' : ''} {$node.selected ? ' selected' : ''} " data-treeitemid="{$node.id}" data-treeitemname="{$node.name}" {if $node.value} data-treeitemvalue="{$node.value}" {/if} aria-expanded="{$node.expanded ? 'true' : 'false'}" role="treeitem" {/let}
    {if $viewType == 'tree' and $node.children}
    {/if} {call .card} {param disabled: $node.disabled /} {param icon: $node.icon /} {param path: $path /} {param pathThemeImages: $pathThemeImages /} {param title: $node.name /} {/call}
    {if $viewType == 'tree' and $node.expanded} {call .nodes} {param nodes: $node.children /} {param parentPath: $path /} {param pathThemeImages: $pathThemeImages /} {param viewType: $viewType /} {/call} {/if}
    {/if}
  • {/template} /** * Renders a Lexicon Horizontal Card */ {template .card} {@param? disabled: bool} {@param icon: string} {@param path: string} {@param pathThemeImages: string} {@param title: string} {let $nodeAttributes kind="attributes"} class="card card-horizontal" {if not $disabled} data-onclick="handleNodeClicked_" {/if} data-onkeyup="handleNodeKeyUp_" tabindex="{$path == 0 ? '0' : '-1'}" {/let}
    {if $icon}
    {/if}
    {$title}
    {/template}




    © 2015 - 2024 Weber Informatics LLC | Privacy Policy