source: Dev/trunk/src/qed-client/model/widgets/SurveySummary.js @ 443

Last change on this file since 443 was 443, checked in by hendrikvanantwerpen, 12 years ago

Reorganized for Node --- the SVN gods hate us all!

Lost all historical info on moved files, because SVN is a f *.

Also we have Node now, serving both the static content and forwarding
database requests.

File size: 734 bytes
Line 
1define([
2    'dojo/_base/declare',
3    'dijit/_WidgetBase',
4    'dijit/_TemplatedMixin',
5    'dojo/text!./templates/SurveySummary.html'
6],function(declare,_WidgetBase,_TemplatedMixin,template){
7    return declare([_WidgetBase,_TemplatedMixin],{
8        templateString: template,
9        survey: null,
10        startup: function() {
11            this.inherited(arguments);
12            if ( this.survey ) {
13                this._setValueAttr(this.survey);
14            }
15        },
16        _setValueAttr: function(survey) {
17            this.titleNode.innerHTML = survey.title;
18            this.descriptionNode.innerHTML = survey.description;
19            this.questionsNode.innerHTML = (survey.questions || []).length;
20        }
21    });
22});
Note: See TracBrowser for help on using the repository browser.