comparison _test/Resources/TTView/My/Org/Panel.tt @ 238:b8c724f6de36

DOM model refactoring TT view refactoring, controls are no longer derived from DOM nodes bugfixes
author sergey
date Tue, 16 Oct 2012 01:33:06 +0400
parents 4d0e1962161c
children 0f59b2de72af
comparison
equal deleted inserted replaced
237:61db68166c37 238:b8c724f6de36
6 TPreview = require('My/Org/TextPreview'); 6 TPreview = require('My/Org/TextPreview');
7 END; 7 END;
8 BLOCK CTOR; 8 BLOCK CTOR;
9 this.dojoClass = this.dojoClass || dojoDefaultClass; 9 this.dojoClass = this.dojoClass || dojoDefaultClass;
10 this.visualClass = this.visualClass || 'classic'; 10 this.visualClass = this.visualClass || 'classic';
11 this.childNodes = [];
11 FOREACH text IN this.data; 12 FOREACH text IN this.data;
12 append(TPreview.new('preview', nodeValue = text )); 13 this.childNodes.push( TPreview.new('preview', nodeValue = text ) );
13 END; 14 END;
14 END; 15 END;
15 %] 16 %]
16 <div class="$this.visualClass" data-dojo-type="$this.dojoClass"> 17 <div class="$this.visualClass" data-dojo-type="$this.dojoClass">
17 [% FOREACH node IN select('preview') %] 18 [% FOREACH node IN this.childNodes %]
18 [% node.Render() %] 19 [% node.Render() %]
19 <hr /> 20 <hr />
20 [% END %] 21 [% END %]
21 </div> 22 </div>