comparison _test/Resources/TTView/My/Org/Panel.tt @ 287:2d253e6e4a88

*TTView refactoring
author cin
date Tue, 19 Feb 2013 03:05:10 +0400
parents 0f59b2de72af
children aeeb57a12046
comparison
equal deleted inserted replaced
286:d357b5d85d25 287:2d253e6e4a88
3 BLOCK INIT; 3 BLOCK INIT;
4 # this is a document scope 4 # this is a document scope
5 dojoDefaultClass = 'dijit.form.Input'; 5 dojoDefaultClass = 'dijit.form.Input';
6 dojo.require.push( dojoDefaultClass ); 6 dojo.require.push( dojoDefaultClass );
7 END; 7 END;
8 BLOCK CTOR; 8
9 TPreview = require('My/Org/TextPreview'); 9 TPreview = require('My/Org/TextPreview');
10 this.dojoClass = this.dojoClass || dojoDefaultClass; 10 this.dojoClass = this.dojoClass || dojoDefaultClass;
11 this.visualClass = this.visualClass || 'classic'; 11 this.visualClass = this.visualClass || 'classic';
12 this.childNodes = []; 12 this.childNodes = [];
13 FOREACH text IN this.data; 13 FOREACH text IN this.data;
14 this.childNodes.push( TPreview.new('preview', nodeValue = text ) ); 14 this.childNodes.push( TPreview.new('preview', nodeValue = text ) );
15 END;
16 END; 15 END;
16
17 %] 17 %]
18 <div class="$this.visualClass" data-dojo-type="$this.dojoClass"> 18 <div class="$this.visualClass" data-dojo-type="$this.dojoClass">
19 [% FOREACH node IN this.childNodes %] 19 [% FOREACH node IN this.childNodes %]
20 [% node.Render() %] 20 [% node.Render() %]
21 <hr /> 21 <hr />