Mercurial > pub > Impl
view _test/Resources/TTView/My/Org/Panel.tt @ 190:cd1ff7029a63
IMLP::Web::View refactored, added new method 'require' which is available inside templates. Changed document rendering.
author | cin |
---|---|
date | Wed, 04 Apr 2012 17:51:27 +0400 |
parents | 08015e2803f1 |
children | 78a18a2b6266 |
line wrap: on
line source
[% META version = 1; BLOCK INIT; dojoDefaultClass = 'dijit.form.Input'; dojo.require.push( dojoDefaultClass ); TPreview = require('My/Org/TextPreview'); END; BLOCK CTOR; dojoClass = dojoDefaultClass; visualClass = this.visualClass || 'classic'; FOREACH text IN data; CALL this.appendChild(TPreview.new('preview', nodeValue = text )); END; END; %] [% BLOCK RENDER %] <div class="$visualClass" data-dojo-type="$dojoClass"> [% FOREACH node IN this.selectNodes('preview') %] [% node.Render() %] <hr /> [% END %] </div> [% END %]