Changeset 417
- Timestamp:
- 12/09/12 16:49:22 (12 years ago)
- Location:
- Dev/branches/rest-dojo-ui/client
- Files:
-
- 3 added
- 8 deleted
- 14 edited
- 7 copied
- 31 moved
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/rest-dojo-ui/client/index.html
r414 r417 15 15 </div> 16 16 </div> 17 <div id="toaster" data-dojo-type="rft/ ui/Notifications"></div>17 <div id="toaster" data-dojo-type="rft/app/Notifications"></div> 18 18 </body> 19 19 </html> -
Dev/branches/rest-dojo-ui/client/rft/app/Notifications.js
r414 r417 1 define(['dojo/_base/declare','dojo /_base/lang','dojox/widget/Toaster'],2 function(declare, lang,Toaster){1 define(['dojo/_base/declare','dojox/widget/Toaster'], 2 function(declare,Toaster){ 3 3 return declare([Toaster],{ 4 4 positionDirection: "br-up", -
Dev/branches/rest-dojo-ui/client/rft/model/schema.js
r415 r417 112 112 }), 113 113 dbobject('SurveyRun',{ 114 description: string(optional()), 114 115 surveyId: nestring(), 115 116 publicationDate:datetime(optional()), 116 startDate:datetime( optional()),117 endDate:datetime( optional()),117 startDate:datetime(), 118 endDate:datetime(), 118 119 mode:{type:'string',enum:['open','closed']}, 119 120 respondents: array(nestring(),optional()), 120 metadata:{type:'object' }121 metadata:{type:'object',optional:true} 121 122 }), 122 123 dbobject('Session',{ -
Dev/branches/rest-dojo-ui/client/rft/model/widgets/AccountListView.js
r414 r417 1 1 define([ 2 2 'dojo/_base/declare', 3 3 'dojo/_base/lang', 4 4 'dojo/dom-construct', 5 '../ LineWithActionsWidget',6 '. /OrderedList'5 '../../widgets/LineWithActionsWidget', 6 '../../widgets/list/OrderedList' 7 7 ],function( 8 8 declare, -
Dev/branches/rest-dojo-ui/client/rft/model/widgets/CategoryListView.js
r414 r417 2 2 'dojo/_base/declare', 3 3 'dojo/_base/lang', 4 '../ LineWithActionsWidget',5 '. /List'4 '../../widgets/LineWithActionsWidget', 5 '../../widgets/list/List' 6 6 ],function( 7 7 declare, -
Dev/branches/rest-dojo-ui/client/rft/model/widgets/QuestionEditorPreview.js
r414 r417 6 6 'dijit/registry', 7 7 './QuestionEditorPreviewItem', 8 '. /lists/OrderedList'8 '../../widgets/list/OrderedList' 9 9 ], function(array, declare, lang, domConstruct, registry, QuestionEditorPreviewItem, OrderedList) { 10 10 return declare([OrderedList], { -
Dev/branches/rest-dojo-ui/client/rft/model/widgets/QuestionEditorPreviewItem.js
r415 r417 10 10 'dijit/_WidgetBase', 11 11 'dijit/_WidgetsInTemplateMixin', 12 './ model/QuestionWidgetFactory',12 './QuestionWidgetFactory', 13 13 'dojo/text!./templates/QuestionEditorPreviewItem.html' 14 14 ], function( -
Dev/branches/rest-dojo-ui/client/rft/model/widgets/QuestionEditorToolkit.js
r414 r417 11 11 'dijit/form/Button', 12 12 'dijit/form/ComboBox', 13 '../ store',14 './ lists/CategoryListView',13 '../../store', 14 './CategoryListView', 15 15 'dojo/text!./templates/QuestionEditorToolkit.html' 16 16 ], function(declare, lang, Source, domConstruct, Memory, _Container, _TemplatedMixin, _WidgetBase, _WidgetsInTemplateMixin, Button, ComboBox, store, CategoryListView, template) { -
Dev/branches/rest-dojo-ui/client/rft/model/widgets/QuestionListView.js
r414 r417 3 3 'dojo/_base/lang', 4 4 'dojo/dom-construct', 5 '../ LineWithActionsWidget',6 '. /OrderedList'5 '../../widgets/LineWithActionsWidget', 6 '../../widgets/list/OrderedList' 7 7 ],function( 8 8 declare, -
Dev/branches/rest-dojo-ui/client/rft/model/widgets/QuestionWidget.js
r414 r417 2 2 'dijit/_TemplatedMixin','dijit/_WidgetsInTemplateMixin', 3 3 'dojo/text!./templates/QuestionWidget.html','dijit/form/TextBox', 4 'dijit/form/Textarea','. /MultipleChoiceWidget'],4 'dijit/form/Textarea','../../widgets/MultipleChoiceWidget'], 5 5 function(declare,lang,domConstruct,_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,templateString,TextBox,Textarea,MultipleChoiceWidget){ 6 6 return declare([_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin],{ -
Dev/branches/rest-dojo-ui/client/rft/model/widgets/QuestionWidgetFactory.js
r415 r417 15 15 'dijit/form/TextBox', 16 16 'dojox/layout/TableContainer', 17 '. /../lists/_EditableListMixin',18 '. /../lists/OrderedList'17 '../../widgets/list/_EditableListMixin', 18 '../../widgets/list/OrderedList' 19 19 ],function(array, declare, lang, domConstruct, _TemplatedMixin, _WidgetBase, _Container, Button, CheckBox, Form, NumberSpinner, RadioButton, Textarea, TextBox, TableContainer, _EditableListMixin, OrderedList) { 20 20 var factory = declare(null, { -
Dev/branches/rest-dojo-ui/client/rft/model/widgets/SurveyFieldset.js
r415 r417 1 1 define([ 2 2 'dojo/_base/declare', 3 'rft/ui/generic/TemplatedForm', 4 'dojo/text!./templates/SurveyForm.html' 5 ],function(declare,TemplatedForm,template){ 6 return declare([TemplatedForm],{ 3 'dijit/_Container', 4 'dijit/_WidgetBase', 5 'dijit/_TemplatedMixin', 6 'dijit/_WidgetsInTemplateMixin', 7 'dojo/text!./templates/SurveyFieldset.html' 8 ],function(declare,_Container,_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,template){ 9 return declare([_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,_Container],{ 7 10 templateString: template, 8 baseClass: "rftSurveyF orm"11 baseClass: "rftSurveyFieldset" 9 12 }); 10 13 }); -
Dev/branches/rest-dojo-ui/client/rft/model/widgets/SurveyRunFieldset.js
r415 r417 1 1 define([ 2 2 'dojo/_base/declare', 3 'rft/ui/generic/TemplatedForm', 4 'dojo/text!./templates/SurveyRunForm.html' 5 ],function(declare,TemplatedForm,template){ 6 return declare([TemplatedForm],{ 3 'dijit/_Container', 4 'dijit/_WidgetBase', 5 'dijit/_TemplatedMixin', 6 'dijit/_WidgetsInTemplateMixin', 7 'dojo/text!./templates/SurveyRunFieldset.html' 8 ],function(declare,_Container,_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,template){ 9 return declare([_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,_Container],{ 7 10 templateString: template, 8 baseClass: "rftSurveyRunF orm"11 baseClass: "rftSurveyRunFieldset" 9 12 }); 10 13 }); -
Dev/branches/rest-dojo-ui/client/rft/model/widgets/TabbedQuestionBrowser.js
r414 r417 6 6 'dijit/layout/TabContainer', 7 7 'dojox/widget/Standby', 8 ' rft/store',9 ' rft/ui/Selector',8 '../../store', 9 '../../widgets/Selector', 10 10 'dojo/domReady!' 11 11 ],function(declare,lang,win,ContentPane,TabContainer,Standby,store,Selector){ -
Dev/branches/rest-dojo-ui/client/rft/model/widgets/templates/SurveyFieldset.html
r415 r417 1 <form class="${baseClass}"> 2 <fieldset> 3 <label for="title">Title</label> 4 <input data-dojo-type="dijit/form/TextBox" name="title"/><br/> 5 <label for="description">Description</label> 6 <input data-dojo-type="dijit/form/Textarea" name="description"/><br/> 7 </fieldset> 8 </form> 1 <fieldset class="${baseClass}"> 2 <label for="title">Title</label> 3 <input data-dojo-type="dijit/form/TextBox" name="title"/><br/> 4 <label for="description">Description</label> 5 <input data-dojo-type="dijit/form/Textarea" name="description"/><br/> 6 </fieldset> -
Dev/branches/rest-dojo-ui/client/rft/model/widgets/templates/SurveyRunFieldset.html
r415 r417 1 <form class="${baseClass}"> 2 <fieldset> 3 <label for="startDate" class="loginLabel">Start date</label> 4 <input type="text" name="startDatetime" data-dojo-type="rft/ui/generic/DateTimeTextBox" /> 5 <label for="endDate" class="loginLabel">End date</label> 6 <input type="text" name="endDatetime" data-dojo-type="rft/ui/generic/DateTimeTextBox" /> 7 <label for="mode" class="loginLabel">Mode</label> 8 <select name="mode" data-dojo-type="dijit/form/Select"> 9 <option value="open" selected="selected">Open</option> 10 <option value="closed">Closed</option> 11 </select><br/> 12 </fieldset> 13 </form> 1 <fieldset class="${baseClass}"> 2 3 <label for="mode" class="loginLabel">Description</label> 4 <textarea name="description" data-dojo-type="dijit/form/Textarea"></textarea> 5 <br> 6 7 <label for="startDate" class="loginLabel">Start date</label> 8 <input type="text" name="startDatetime" data-dojo-type="rft/widgets/DateTimeTextBox" /> 9 <br> 10 11 <label for="endDate" class="loginLabel">End date</label> 12 <input type="text" name="endDatetime" data-dojo-type="rft/widgets/DateTimeTextBox" /> 13 <br> 14 15 <label for="mode" class="loginLabel">Mode</label> 16 <select name="mode" data-dojo-type="dijit/form/Select"> 17 <option value="open" selected="selected">Open</option> 18 <option value="closed">Closed</option> 19 </select> 20 <br> 21 22 </fieldset> -
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],{ -
Dev/branches/rest-dojo-ui/client/rft/stddeps.js
r415 r417 25 25 'dojox/grid/DataGrid', 26 26 27 'rft/ui/LineWithActionsWidget', 27 'rft/app/Notifications', 28 29 'rft/model/widgets/SurveyFieldset', 30 'rft/model/widgets/SurveyRunFieldset', 31 'rft/model/widgets/QuestionWidget', 32 'rft/model/widgets/AccountListView', 33 28 34 'rft/ui/MainMenu', 29 35 'rft/ui/MenuBarLink', 30 36 'rft/ui/MenuLink', 31 'rft/ui/Notifications', 32 'rft/ui/ObjectBox', 33 'rft/ui/QuestionWidget', 34 'rft/ui/Selector', 35 'rft/ui/TitleGroup', 36 'rft/ui/generic/DateTimeTextBox', 37 'rft/ui/model/SurveyForm', 38 'rft/ui/model/SurveyRunForm', 39 'rft/ui/lists/AccountListView', 40 'rft/ui/lists/List', 41 'rft/ui/lists/OrderedList' 37 38 'rft/widgets/LineWithActionsWidget', 39 'rft/widgets/ObjectBox', 40 'rft/widgets/Selector', 41 'rft/widgets/TitleGroup', 42 'rft/widgets/DateTimeTextBox', 43 'rft/widgets/list/List', 44 'rft/widgets/list/OrderedList' 42 45 ],function(){}); -
Dev/branches/rest-dojo-ui/client/rft/store.js
r415 r417 1 1 define([ 2 2 'dojo/date/stamp', 3 'dojo/store/Cache', 4 'dojo/store/Memory', 3 5 'dojox/json/schema', 4 './ schema',6 './model/schema', 5 7 './store/CouchStore' 6 ],function(stamp, jsonSchema,schema,CouchStore){8 ],function(stamp,Cache,Memory,jsonSchema,schema,CouchStore){ 7 9 8 var store = new CouchStore({10 var couchStore = new CouchStore({ 9 11 target: 'data/couch/', 10 12 validate: function(object) { … … 18 20 } 19 21 }); 22 var memoryStore = new Memory(); 23 var cacheStore = new Cache(couchStore,memoryStore,{}); 24 25 var store = cacheStore; 20 26 store.formatDate = function(date){ 21 27 return stamp.toISOString(date,{zulu:true}); -
Dev/branches/rest-dojo-ui/client/rft/ui/templates/SessionBar.html
r407 r417 1 1 <div class="${baseClass}"> 2 2 <span class="rftIcon rftIconSession" data-dojo-attach-point="iconNode"></span> 3 <div data-dojo-type="rft/ ui/LineWithActionsWidget" data-dojo-attach-point="upperNode" data-dojo-props="actions: {'inspect':{callback: inspect, properties: {blockButton: true}}}"></div>4 <div data-dojo-type="rft/ ui/LineWithActionsWidget" data-dojo-attach-point="lowerNode"></div>3 <div data-dojo-type="rft/widgets/LineWithActionsWidget" data-dojo-attach-point="upperNode" data-dojo-props="actions: {'inspect':{callback: inspect, properties: {blockButton: true}}}"></div> 4 <div data-dojo-type="rft/widgets/LineWithActionsWidget" data-dojo-attach-point="lowerNode"></div> 5 5 </div> -
Dev/branches/rest-dojo-ui/client/rft/widgets/MultipleChoiceWidget.js
r414 r417 16 16 value: null, 17 17 18 _wid egtCache: null,18 _widgetCache: null, 19 19 constuctor: function() { 20 20 this.inherited(arguments); -
Dev/branches/rest-dojo-ui/client/rft/widgets/ObjectBox.js
r414 r417 5 5 'dijit/_TemplatedMixin', 6 6 'dijit/_WidgetsInTemplateMixin', 7 ' rft/ui/LineWithActionsWidget',7 './LineWithActionsWidget', 8 8 'dojo/text!./templates/ObjectBox.html' 9 9 ], function(declare, lang, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, LineWithActionsWidget, template){ -
Dev/branches/rest-dojo-ui/client/view.html
r410 r417 14 14 </div> 15 15 </div> 16 <div id="toaster" data-dojo-type="rft/ ui/Notifications">16 <div id="toaster" data-dojo-type="rft/app/Notifications"> 17 17 </div> 18 18 </body>
Note: See TracChangeset
for help on using the changeset viewer.