Mercurial > pub > Impl
view _test/Resources/TTView/My/Org/Panel.tt @ 291:5d14baa35790
*TTView: fixed template selectors mechanism
author | cin |
---|---|
date | Thu, 21 Feb 2013 03:44:02 +0400 |
parents | 2d253e6e4a88 |
children | aeeb57a12046 |
line wrap: on
line source
[% META version = 1; BLOCK INIT; # this is a document scope dojoDefaultClass = 'dijit.form.Input'; dojo.require.push( dojoDefaultClass ); END; TPreview = require('My/Org/TextPreview'); this.dojoClass = this.dojoClass || dojoDefaultClass; this.visualClass = this.visualClass || 'classic'; this.childNodes = []; FOREACH text IN this.data; this.childNodes.push( TPreview.new('preview', nodeValue = text ) ); END; %] <div class="$this.visualClass" data-dojo-type="$this.dojoClass"> [% FOREACH node IN this.childNodes %] [% node.Render() %] <hr /> [% END %] </div>