view _test/Resources/TTView/My/Org/Panel.tt @ 221:e997e6fbac0b

sync: working on resources schema
author sergey
date Fri, 24 Aug 2012 16:24:14 +0400
parents 4d0e1962161c
children b8c724f6de36
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;
        this.dojoClass = this.dojoClass || dojoDefaultClass;
        this.visualClass = this.visualClass || 'classic';
        FOREACH text IN this.data;
            append(TPreview.new('preview', nodeValue = text ));
        END;
    END;
%]
<div class="$this.visualClass" data-dojo-type="$this.dojoClass">
    [% FOREACH node IN select('preview') %]
        [% node.Render() %]
        <hr />
    [% END %]
</div>