Changeset 457 for Dev/trunk/src/client/qed-client/pages
- Timestamp:
- 06/09/13 17:27:20 (12 years ago)
- Location:
- Dev/trunk/src/client/qed-client/pages
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/client/qed-client/pages/surveyRun.js
r443 r457 21 21 if ( this._started ) { return; } 22 22 this.inherited(arguments); 23 this. propertiesForm.on("blur",lang.hitch(this,'_onPropChange'));23 this.surveyRunWidget.on("blur",lang.hitch(this,'_onPropChange')); 24 24 if ( this.surveyRunId ) { 25 25 this._loadSurveyRun(); … … 38 38 refreshSurveyRun: function() { 39 39 this.titleNode.innerHTML = SurveyRun.DisplayTitle.get(this.surveyRun); 40 this.survey Node.set('value',SurveyRun.Survey.get(this.surveyRun));41 this. propertiesForm.set('value',this.surveyRun);40 this.surveySummaryWidget.set('value',SurveyRun.Survey.get(this.surveyRun)); 41 this.surveyRunWidget.set('value',this.surveyRun); 42 42 this._onPropChange(); 43 43 }, … … 70 70 }, 71 71 _onPropChange: function(e) { 72 var surveyRun = this. propertiesForm.get('value');72 var surveyRun = this.surveyRunWidget.get('value'); 73 73 if ( surveyRun.mode === "open" ) { 74 74 this.runURLNode.innerHTML = this._link(this._getGeneralURL(store.getIdentity(this.surveyRun))); … … 87 87 }, 88 88 _onSave: function(evt) { 89 lang.mixin(this.surveyRun,this.propertiesForm.get('value')); 90 var not = function(p){ return !p; }; 91 func.modPropIf(this.surveyRun,"startDate",not.compose(lang.isString),store.formatDate); 92 func.modPropIf(this.surveyRun,"endDate",not.compose(lang.isString),store.formatDate); 93 store.put(this.surveyRun) 94 .then(function() { 95 Router.go('/surveys'); 96 },function(err){ 97 Content.notify(err); 98 }); 89 if ( this.surveyRunWidget.validate() ) { 90 lang.mixin(this.surveyRun,this.surveyRunWidget.get('value')); 91 92 var SD = SurveyRun.StartDate; 93 var ED = SurveyRun.EndDate; 94 SD.set(this.surveyRun, SD.get(this.surveyRun)); 95 ED.set(this.surveyRun, ED.get(this.surveyRun)); 96 97 store.put(this.surveyRun) 98 .then(function() { 99 Router.go('/surveys'); 100 },function(err){ 101 Content.notify(err); 102 }); 103 } 99 104 event.stop(evt); 100 105 return false; -
Dev/trunk/src/client/qed-client/pages/templates/previewSurvey.html
r443 r457 10 10 <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'" data-dojo-attach-point="questionsPane"> 11 11 <form data-dojo-type="dijit/form/Form" data-dojo-attach-point="questionsForm" style="overflow: auto"> 12 <div data-dojo-type="../model/widgets/Survey Widget" data-dojo-attach-point="surveyWidget"></div>12 <div data-dojo-type="../model/widgets/SurveyRenderWidget" data-dojo-attach-point="surveyWidget"></div> 13 13 </form> 14 14 </div> -
Dev/trunk/src/client/qed-client/pages/templates/response.html
r443 r457 11 11 <form data-dojo-type="dijit/form/Form" data-dojo-attach-point="responseForm" 12 12 data-dojo-attach-event="onSubmit:_ignoreEvent" style="overflow: auto"> 13 <div data-dojo-type="../model/widgets/Survey Widget" data-dojo-attach-point="surveyWidget"></div>13 <div data-dojo-type="../model/widgets/SurveyRenderWidget" data-dojo-attach-point="surveyWidget"></div> 14 14 </form> 15 15 </div> -
Dev/trunk/src/client/qed-client/pages/templates/survey.html
r443 r457 40 40 data-dojo-attach-point="propertiesDialog" 41 41 data-dojo-attach-event="onSubmit:_onPropertiesOk"> 42 <fieldset data-dojo-type="../model/widgets/SurveyFieldset"></fieldset> 42 <fieldset class="qedFieldset"> 43 <div data-dojo-type="../model/widgets/SurveyWidget"></div> 44 </fieldset> 43 45 <button data-dojo-type="dijit/form/Button" 44 46 type="submit" -
Dev/trunk/src/client/qed-client/pages/templates/surveyRun.html
r443 r457 9 9 10 10 <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'"> 11 <div data-dojo-type="../model/widgets/SurveySummary" data-dojo-attach-point="surveyNode"></div>12 <div data-dojo-type="dijit/form/Form"13 data-dojo-attach-point="propertiesForm">14 <fieldset data-dojo-type="../model/widgets/SurveyRunFieldset"></fieldset>15 </div>16 11 <fieldset class="qedFieldset"> 12 <legend>Survey</legend> 13 <div data-dojo-type="../model/widgets/SurveySummary" data-dojo-attach-point="surveySummaryWidget"></div> 14 </fieldset> 15 <fieldset class="qedFieldset"> 16 <legend>Run Details</legend> 17 <div data-dojo-type="../model/widgets/SurveyRunWidget" data-dojo-attach-point="surveyRunWidget"></div> 18 </fieldset> 19 <fieldset class="qedFieldset"> 20 <legend>Response Details</legend> 17 21 <div><div class="qedLabel">General URL</div><div class="qedField" data-dojo-attach-point="runURLNode" style="overflow: ellipsis"></div></div> 18 22 <div><div class="qedLabel">Responses <span data-dojo-attach-point="responsesCountNode"></span></div><div class="qedField qedFill" data-dojo-attach-point="responsesNode"></div></div>
Note: See TracChangeset
for help on using the changeset viewer.