Changeset 406 for Dev/branches/rest-dojo-ui/client/rft/pages
- Timestamp:
- 09/03/12 18:14:37 (13 years ago)
- Location:
- Dev/branches/rest-dojo-ui/client/rft/pages
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/rest-dojo-ui/client/rft/pages/viewSurvey.html
r399 r406 10 10 11 11 <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'" data-rft-attach-point="questionsPane"> 12 <form data-dojo-type="dijit.form.Form" data-rft-attach-point="questionsForm" 13 data-rft-attach-event="onSubmit:_onSubmit" 14 style="overflow: auto"> 15 <div data-rft-attach-point="questionsAnchor"></div> 16 </form> 12 17 </div> 13 18 -
Dev/branches/rest-dojo-ui/client/rft/pages/viewSurvey.js
r399 r406 23 23 store.query(null,{keys:this.survey.questions,include_docs:true}) 24 24 .forEach(function(question){ 25 array.forEach(question.content,function(item){ 26 var w = f.createViewWidget(item); 25 array.forEach(question.content || [],function(item){ 26 var w = f.createViewWidget(item,{ 27 name: question.code+'.'+item.code 28 }); 27 29 if ( w !== null ) { 28 w.placeAt(this.questionsPane.containerNode,'last'); 29 w.startup(); 30 w.placeAt(this.questionsAnchor,'before'); 30 31 } 31 32 },this); … … 37 38 }, 38 39 _onSubmit: function(evt) { 40 var value = this.questionsForm.get('value'); 41 this.questionsPane.set('content','<pre>'+JSON.stringify(value)+'</pre>'); 39 42 event.stop(evt); 40 43 return false;
Note: See TracChangeset
for help on using the changeset viewer.