<script type="text/x-jsrender" id="customColumnTemplate"> <div style='height:20px;' unselectable='on'>{{if hasChildRecords}}<div class='intend' style='height:1px; float:left; width:{{:level*20}}px; display:inline-block;'></div> {{else !hasChildRecords}} <div class='intend' style='height:1px; float:left; width:{{:(level)*20}}px; display:inline-block;'></div> {{/if}} <div class='{{if expanded}}e-treegridexpand {{else hasChildRecords}}e-treegridcollapse {{/if}} {{if level===4}}e-doc{{/if}}' style='height:20px;width:30px;margin:auto;float:left;margin-left:10px; style='float: left;display:inline-block; unselectable='on'></div> <div class='e-cell' style='display:inline-block;width:100%' unselectable='on'>{{:#data['Name']}}</div> </div> </script>
<script type="text/x-jsrender" id="customColumnTemplate">
{{if hasChildRecords}}
<div class='e-dragintend' style='height: 1px; float: left; width: {{:level*20}}px; display: inline-block;'>
{{if !~getstate() || !hasChildRecords }}
<div class="{{:~_stageName()}}">
<span class='e-aboveIcon e-iconMargin e-icon' style='position: relative; float: right; display: none;'></span>
<span class='e-belowIcon e-iconMargin e-icon' style='position: relative; float: right; display: none;'></span>
<span class='e-childIcon e-iconMargin e-icon' style='position: relative; float: right; display: none;'></span>
<span class='e-cancelIcon e-iconMargin e-icon' style='position: relative; float: right; display: none;'></span>
</div>
{{/if}}
</div>
{{else !hasChildRecords}}
<div class='e-dragintend' style='height: 1px; float: left; width: {{:(level+1)*20}}px; display: inline-block;'>
{{if !~getstate() || !hasChildRecords}}
<div class="{{:~_stageName()}}">
<span class='e-aboveIcon e-iconMargin e-icon' style='position: relative; float: right; display: none;'></span>
<span class='e-belowIcon e-iconMargin e-icon' style='position: relative; float: right; display: none;'></span>
<span class='e-childIcon e-iconMargin e-icon' style='position: relative; float: right; display: none;'></span>
<span class='e-cancelIcon e-iconMargin e-icon' style='position: relative; float: right; display: none;'></span>
</div>
{{/if}}
</div>
{{/if}}
{{if ~getstate() && hasChildRecords}}
<div class='e-intendparent'>
<div class="{{:~_stageName()}}">
<span class='e-aboveIcon e-iconMargin e-icon' style='position: relative; float: left; display: none;'></span>
<span class='e-belowIcon e-iconMargin e-icon' style='float: left; display: none;'></span>
<span class='e-childIcon e-iconMargin e-icon' style='float: left; display: none;'></span>
<span class='e-cancelIcon e-iconMargin e-icon' style='float: left; display: none;'></span>
</div>
</div>
{{/if}}
<div class='{{if expanded}} e-treegridexpand e-icon {{else hasChildRecords}}e-treegridcollapse e-icon{{/if}} {{if !hasChildRecords}}e-doc{{/if}}' style='height: 20px; float: left; width: 20px; margin-left: 0px;' unselectable='on'>
</div>
<div class='e-cell' style='display: inline-block; width: 100%' unselectable='on'>{{:#data['Name']}}</div>
</script>
<script type="text/javascript">
$.views.helpers({ _stageName: getStageName });
$.views.helpers({ getstate: _getState });
function _getState() {
if (this.data.parentItem)
return false;
else
return true;
}
function getStageName() {
var rowClass = "gridrowIndex",
proxy = this;
rowClass += proxy.data.index.toString() + "level" + proxy.data.level.toString();
return rowClass;
}
//...
</script> |