Changeset 417 for Dev/branches/rest-dojo-ui/client/rft/pages
- Timestamp:
- 12/09/12 16:49:22 (12 years ago)
- Location:
- Dev/branches/rest-dojo-ui/client/rft/pages
- Files:
-
- 1 added
- 8 edited
- 8 moved
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/rest-dojo-ui/client/rft/pages/index.js
r410 r417 3 3 '../app/Router', 4 4 '../app/Page', 5 'dojo/text!./ index.html'5 'dojo/text!./templates/index.html' 6 6 ],function(declare,Router,Page,template){ 7 7 return declare([Page],{ -
Dev/branches/rest-dojo-ui/client/rft/pages/question.js
r415 r417 8 8 '../app/Router', 9 9 '../app/Page', 10 '../ ui/QuestionEditorPreview',11 '../ ui/QuestionEditorToolkit',12 'dojo/text!./ question.html'10 '../model/widgets/QuestionEditorPreview', 11 '../model/widgets/QuestionEditorToolkit', 12 'dojo/text!./templates/question.html' 13 13 ],function(declare, Deferred, event, lang, store, Content, Router, Page, QuestionEditorPreview, QuestionEditorToolkit, template){ 14 14 return declare([Page], { -
Dev/branches/rest-dojo-ui/client/rft/pages/questions.js
r415 r417 8 8 '../app/Router', 9 9 '../app/Page', 10 '../ ui/TabbedQuestionBrowser',11 'dojo/text!./ questions.html'10 '../model/widgets/TabbedQuestionBrowser', 11 'dojo/text!./templates/questions.html' 12 12 ],function(declare,Deferred,event,lang,store,Content,Router,Page,TabbedQuestionBrowser,template) { 13 13 return declare([Page],{ -
Dev/branches/rest-dojo-ui/client/rft/pages/session.js
r416 r417 9 9 '../app/Page', 10 10 '../app/Router', 11 '../ ui/ThresholdFilteringSelect',12 '../ ui/lists/AccountListView',13 'dojo/text!./ session.html'11 '../widgets/ThresholdFilteringSelect', 12 '../model/widgets/AccountListView', 13 'dojo/text!./templates/session.html' 14 14 ],function(array,declare,Deferred,event,lang,search,store,Page,Router,ThresholdFilteringSelect,AccountListView,template){ 15 15 return declare([Page],{ -
Dev/branches/rest-dojo-ui/client/rft/pages/sessions.js
r416 r417 6 6 '../app/Router', 7 7 '../app/Page', 8 '../ ui/ObjectBox',9 'dojo/text!./ sessions.html'8 '../widgets/ObjectBox', 9 'dojo/text!./templates/sessions.html' 10 10 ],function(declare,lang,dateStamp,store,Router,Page,ObjectBox,template){ 11 11 return declare([Page],{ -
Dev/branches/rest-dojo-ui/client/rft/pages/survey.js
r416 r417 8 8 '../store', 9 9 '../app/Page', 10 '../ ui/lists/QuestionListView',11 '../ ui/TabbedQuestionBrowser',12 'dojo/text!./ survey.html'10 '../model/widgets/QuestionListView', 11 '../model/widgets/TabbedQuestionBrowser', 12 'dojo/text!./templates/survey.html' 13 13 ],function(array,declare,Deferred,event,lang,Router,store,Page, 14 14 QuestionListView,TabbedQuestionBrowser,template){ … … 81 81 refresh: function() { 82 82 this.titleNode.innerHTML = this.survey.title || "(set title in properties)"; 83 this.properties Form.set('value',this.survey);83 this.propertiesDialog.set('value',this.survey); 84 84 }, 85 85 _onShowProperties: function(evt) { … … 88 88 _onPropertiesOk: function(evt) { 89 89 this.propertiesDialog.hide(); 90 lang.mixin(this.survey, this.properties Form.get('value'));90 lang.mixin(this.survey, this.propertiesDialog.get('value')); 91 91 this.refresh(); 92 92 event.stop(evt); … … 95 95 _onPropertiesCancel: function(evt) { 96 96 this.propertiesDialog.hide(); 97 this.properties Form.set('value',this.survey);97 this.propertiesDialog.reset('value',this.survey); 98 98 event.stop(evt); 99 99 return false; -
Dev/branches/rest-dojo-ui/client/rft/pages/surveys.js
r416 r417 4 4 'dojo/_base/lang', 5 5 'dojo/when', 6 'rx/rx.dojo', 6 7 '../store', 7 8 '../app/Content', 8 9 '../app/Page', 9 10 '../app/Router', 10 '../ ui/LineWithActionsWidget',11 'dojo/text!./ surveys.html'12 ],function(array,declare,lang,when, store,Content,Page,Router,LineWithActionsWidget,template){11 '../widgets/LineWithActionsWidget', 12 'dojo/text!./templates/surveys.html' 13 ],function(array,declare,lang,when,Rx,store,Content,Page,Router,LineWithActionsWidget,template){ 13 14 return declare([Page],{ 14 15 templateString: template, … … 47 48 }, 48 49 _onRunSurvey:function(survey){ 50 this.surveyRun = { 51 type: 'SurveyRun', 52 surveyId: store.getIdentity(survey), 53 publicationDate: store.timestamp() 54 }; 55 this.surveyRunDialog.set('value',this.surveyRun); 49 56 this.surveyRunDialog.show(); 57 }, 58 _onSurveyRunOk: function() { 59 var surveyRun = lang.mixin(lang.clone(this.surveyRun),this.surveyRunDialog.get('value')); 60 store.put(surveyRun) 61 .then(lang.hitch(this,function(){ 62 this.surveyRunDialog.hide(); 63 this.refreshRuns(); 64 }),function(err){ 65 Content.notify(err); 66 }); 67 }, 68 _onSurveyRunCancel: function() { 69 this.surveyRunDialog.hide(); 50 70 }, 51 71 refresh: function() { … … 131 151 array.forEach(surveyRuns,function(surveyRun){ 132 152 var w = new LineWithActionsWidget({ 133 title: survey .title,153 title: surveyRun.title+" (from "+surveyRun.startDate+" to "+surveyRun.endDate+")", 134 154 actions:[{ 135 155 callback: lang.hitch(this,'_onCloseRun',surveyRun), -
Dev/branches/rest-dojo-ui/client/rft/pages/templates/survey.html
r415 r417 39 39 data-dojo-attach-point="propertiesDialog" 40 40 data-dojo-attach-event="onSubmit:_onPropertiesOk"> 41 42 <div data-dojo-type="rft/ui/model/SurveyForm" 43 data-dojo-attach-point="propertiesForm"></div> 44 45 <div> 46 <button data-dojo-type="dijit/form/Button" 47 type="submit" 48 data-dojo-attach-event="onClick:_onPropertiesOk"> 49 OK</button> 50 <button data-dojo-type="dijit/form/Button" 51 type="button" 52 data-dojo-attach-event="onClick:_onPropertiesCancel"> 53 Cancel</button> 54 </div> 55 41 <fieldset data-dojo-type="rft/model/widgets/SurveyFieldset"></fieldset> 42 <button data-dojo-type="dijit/form/Button" 43 type="submit" 44 data-dojo-attach-event="onClick:_onPropertiesOk"> 45 OK</button> 46 <button data-dojo-type="dijit/form/Button" 47 type="button" 48 data-dojo-attach-event="onClick:_onPropertiesCancel"> 49 Cancel</button> 56 50 </div> 57 51 -
Dev/branches/rest-dojo-ui/client/rft/pages/templates/surveys.html
r415 r417 39 39 title="SurveyRun properties" 40 40 data-dojo-attach-point="surveyRunDialog"> 41 <form data-dojo-type="rft/ui/model/SurveyRunForm" data-dojo-attach-point="surveyRunForm"> 42 <button data-dojo-type="dijit/form/Button">OK</button> 43 <button data-dojo-type="dijit/form/Button">Cancel</button> 44 </form> 41 <fieldset data-dojo-type="rft/model/widgets/SurveyRunFieldset"></fieldset> 42 <button data-dojo-type="dijit/form/Button" data-dojo-attach-event="onClick:_onSurveyRunOk">OK</button> 43 <button data-dojo-type="dijit/form/Button" data-dojo-attach-event="onClick:_onSurveyRunCancel">Cancel</button> 45 44 </div> 46 45 -
Dev/branches/rest-dojo-ui/client/rft/pages/viewSurvey.js
r415 r417 7 7 '../store', 8 8 '../app/Page', 9 '../ ui/model/QuestionWidgetFactory',10 'dojo/text!./ viewSurvey.html'9 '../model/widgets/QuestionWidgetFactory', 10 'dojo/text!./templates/viewSurvey.html' 11 11 ],function(array,declare,Deferred,event,lang,store,Page,QuestionWidgetFactory,template){ 12 12 return declare([Page],{
Note: See TracChangeset
for help on using the changeset viewer.