- Timestamp:
- 03/23/14 22:58:54 (11 years ago)
- Location:
- Dev/trunk/src
- Files:
-
- 8 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/client/qed-client/css/icons.less
r443 r529 1 1 #rft { 2 &.claro { 3 .rftIcon { 4 .noOffset; 5 float: left; 6 display: inline-block; 7 border: none; 8 background-color: transparent; 9 background-repeat: no-repeat; 10 } 11 } 2 &.claro { 3 4 .rftIcon { 5 .noOffset; 6 float: left; 7 display: inline-block; 8 border: none; 9 background-color: transparent; 10 background-repeat: no-repeat; 11 } 12 } 12 13 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 14 .rftIconApplication { 15 background-position: 0px 0px; 16 } 17 .rftIconDashboard { 18 background-position: -32px 0px; 19 } 20 .rftIconSession { 21 background-position: -64px 0px; 22 } 23 .rftIconSessionActive { 24 background-position: -96px 0px; 25 } 26 .rftIconSessionTemplate { 27 background-position: -128px 0px; 28 } 29 .rftIconSurvey { 30 background-position: -160px 0px; 31 } 32 .rftIconQuestion { 33 background-position: -192px 0px; 34 } 35 .rftIconQuestionFill { 36 background-position: -224px 0px; 37 } 38 .rftIconRespondent { 39 background-position: -256px 0px; 40 } 41 .rftIconAnswer { 42 background-position: -288px 0px; 43 } 44 .rftIconAnswerSet { 45 background-position: -320px 0px; 46 } 47 .rftIconGameData { 48 background-position: -352px 0px; 49 } 50 .rftIconUser { 51 background-position: -384px 0px; 52 } 53 //Actions 54 .rftIconAccept { 55 background-position: -416px 0px; 56 } 57 .rftIconCancel { 58 background-position: -448px 0px; 59 } 60 .rftIconPlus { 61 background-position: -480px 0px; 62 } 63 .rftIconMinus { 64 background-position: -512px 0px; 65 } 66 .rftIconIncrease { 67 background-position: -544px 0px; 68 } 69 .rftIconDecrease { 70 background-position: -576px 0px; 71 } 72 .rftIconDelete { 73 background-position: -608px 0px; 74 } 75 .rftIconHome { 76 background-position: -640px 0px; 77 } 78 .rftIconPreview { 79 background-position: -672px 0px; 80 } 81 .rftIconSave { 82 background-position: -704px 0px; 83 } 84 .rftIconDiscard { 85 background-position: -736px 0px; 86 } 87 .rftIconProperties { 88 background-position: -768px 0px; 89 } 90 .rftIconUndo { 91 background-position: -800px 0px; 92 } 93 .rftIconRedo { 94 background-position: -832px 0px; 95 } 96 .rftIconBack { 97 background-position: -864px 0px; 98 } 99 .rftIconForward { 100 background-position: -896px 0px; 101 } 102 .rftIconRefresh { 103 background-position: -928px 0px; 104 } 105 .rftIconHelp { 106 background-position: -960px 0px; 107 } 108 .rftIconInspect { 109 background-position: -992px 0px; 110 } 111 .rftIconTag { 112 background-position: -1024px 0px; 113 } 114 .rftIconImage { 115 background-position: -1056px 0px; 116 } 117 .rftIconEdit { 118 background-position: -1088px 0px; 119 } 120 .rftIconLock { 121 background-position: -1120px 0px; 122 } 123 .rftIconUnlock { 124 background-position: -1152px 0px; 125 } 126 .rftIconPreset { 127 background-position: -1184px 0px; 128 } 129 .rftIconTextBlock { 130 background-position: -1216px 0px; 131 } 132 .rftIconPageBreak { 133 background-position: -1248px 0px; 134 } 135 .rftIconExternal { 136 background-position: -1280px 0px; 137 } 138 .rftIconInput { 139 background-position: -1312px 0px; 140 } 141 .rftIconPublish { 142 background-position: -1344px 0px; 143 } 144 //Arrows 145 .rftIconFullArrowUp { 146 background-position: -1696px 0px; 147 } 148 .rftIconFullArrowDown { 149 background-position: -1728px 0px; 150 } 151 .rftIconFullArrowLeft { 152 background-position: -1760px 0px; 153 } 154 .rftIconFullArrowRight { 155 background-position: -1792px 0px; 156 } 157 .rftIconHalfArrowUp { 158 background-position: -1824px 0px; 159 } 160 .rftIconHalfArrowDown { 161 background-position: -1856px 0px; 162 } 163 .rftIconHalfArrowLeft { 164 background-position: -1888px 0px; 165 } 166 .rftIconHalfArrowRight { 167 background-position: -1920px 0px; 168 } 168 169 } -
Dev/trunk/src/client/qed-client/css/mixins.less
r443 r529 67 67 .setIconSize(@size, ""); 68 68 } 69 .setIcon (@size, grey) { 70 .setIconSize(@size, "g"); 71 } 69 72 .setIcon (@size) { 70 73 .setIconSize(@size, ""); -
Dev/trunk/src/client/qed-client/css/qed.less
r513 r529 15 15 @import "fonts.less"; 16 16 @import "icons.less"; 17 @import "loading.less"; 17 18 @import "layout.less"; 18 19 @import "forms.less"; -
Dev/trunk/src/client/qed-client/css/variables.less
r492 r529 6 6 @headers: #999999; 7 7 @text: #ffffff; 8 @inactivetext: #aaaaaa; 8 9 @disabledtext: #777777; 9 10 -
Dev/trunk/src/client/qed-client/css/widgets/BlockButton.less
r492 r529 5 5 height: @button_block_height; 6 6 vertical-align: top; 7 color: @ text;7 color: @inactivetext; 8 8 9 9 &.dijitDisabled { 10 10 color: @disabledtext; 11 } 12 13 &.dijitHover { 14 color: @text; 11 15 } 12 16 … … 30 34 31 35 .rftIcon { 32 .setIcon(16px );36 .setIcon(16px, grey); 33 37 } 34 38 } … … 39 43 .rftIcon { 40 44 vertical-align: top; 41 .setIcon(16px, black);45 .setIcon(16px, white); 42 46 } 43 47 } -
Dev/trunk/src/client/qed-client/css/widgets/LargeButton.less
r492 r529 7 7 height: @button_large_height; 8 8 padding: 3px; 9 color: @ text;9 color: @inactivetext; 10 10 11 11 &*, * { … … 20 20 } 21 21 22 &.dijitHover { 23 color: @text; 24 } 25 22 26 .dijitButtonNode { 23 27 … … 30 34 31 35 .rftIcon { 32 .setIcon(24px );36 .setIcon(24px, grey); 33 37 } 34 38 … … 45 49 } 46 50 47 &.rftLargeButtonHover .dijitButtonNode,48 &.rftLargeButtonActive .dijitButtonNode{51 &.rftLargeButtonHover, 52 &.rftLargeButtonActive { 49 53 .transition (0.1s); 54 .rftIcon { 55 vertical-align: top; 56 .setIcon(24px, white); 57 } 50 58 } 51 59 } -
Dev/trunk/src/client/qed-client/model/widgets/QuestionEditorToolkit.js
r510 r529 111 111 }, 112 112 _onCategoryAdd: function() { 113 // it seems, the button is not disabled properly and still 114 // generates click events, that's why we chack here. 115 if ( this.disabled || this.readOnly ) { return; } 113 116 this._categoryList.appendItem(this._categorySelect.get('displayedValue')); 114 117 this._categorySelect.reset(); -
Dev/trunk/src/client/qed-client/model/widgets/templates/QuestionEditorToolkit.html
r513 r529 1 1 <form> 2 2 <div data-dojo-type="../../widgets/TitleGroup"> 3 <div data-dojo-type="dijit/TitlePane" class="orange" data-dojo-props="open:true" title="Properties" data-dojo-props="iconClass:'rftIcon rftIconProperties'"> 3 <div data-dojo-type="dijit/TitlePane" 4 class="orange" 5 data-dojo-props="open:true" 6 title="Properties" 7 data-dojo-props="iconClass:'rftIcon rftIconProperties'"> 4 8 <fieldset class="align"> 5 <label>Title:</label><input data-dojo-type="dijit/form/ValidationTextBox" required="required" name="title"/> 6 <label>Code:</label><input data-dojo-type="dijit/form/ValidationTextBox" required="required" name="code"/> 9 <label>Title:</label><input data-dojo-type="dijit/form/ValidationTextBox" 10 required="required" name="title"/> 11 <label>Code:</label><input data-dojo-type="dijit/form/ValidationTextBox" 12 required="required" name="code"/> 7 13 <label>Categories:</label> 8 <div data-dojo-attach-point="categoryListNode" class="rftLineListView"></div> 14 <div data-dojo-attach-point="categoryListNode" 15 class="rftLineListView"></div> 9 16 <div data-dojo-attach-point="categoryBoxNode"></div> 10 <button class="inheritBgColor" data-dojo-type="dijit/form/Button" data-dojo-attach-event="onClick:_onCategoryAdd" data-dojo-props="baseClass:'rftBlockButton', iconClass: 'rftIcon rftIconPlus'">Add</button><br/> 17 <button class="inheritBgColor" 18 data-dojo-type="dijit/form/Button" 19 data-dojo-attach-event="onClick:_onCategoryAdd" 20 data-dojo-props="baseClass:'rftBlockButton', iconClass: 'rftIcon rftIconPlus'"> 21 Add</button><br/> 11 22 <label>Topic:</label> 12 23 <div data-dojo-attach-point="topicBoxNode"></div> 13 <label>Description:</label><textarea data-dojo-type="dijit/form/Textarea" name="description"></textarea> 24 <label>Description:</label> 25 <textarea data-dojo-type="dijit/form/Textarea" 26 name="description"></textarea> 14 27 </fieldset> 15 28 </div> 16 29 17 <div data-dojo-type="dijit/TitlePane" title="Content" data-dojo-props="iconClass:'rftIcon rftIconPlus', open:false"> 30 <div data-dojo-type="dijit/TitlePane" 31 title="Content" 32 data-dojo-props="iconClass:'rftIcon rftIconPlus', open:false"> 18 33 <div data-dojo-attach-point="ToolkitContentSourceNode"></div> 19 34 </div> 20 35 21 <div data-dojo-type="dijit/TitlePane" title="Inputs" data-dojo-props="iconClass:'rftIcon rftIconInput', open:false"> 36 <div data-dojo-type="dijit/TitlePane" 37 title="Inputs" 38 data-dojo-props="iconClass:'rftIcon rftIconInput', open:false"> 22 39 <div data-dojo-attach-point="ToolkitInputsSourceNode"></div> 23 40 </div> -
Dev/trunk/src/client/qed-client/pages/questions.js
r495 r529 50 50 }, 51 51 onDeleteQuestion: function(question) { 52 if ( !confirm("Are you sure you want to delete this question?") ) { 53 return; 54 } 52 55 questions.remove(question) 53 56 .then(lang.hitch(this,function(){ … … 62 65 }, 63 66 onPublishQuestion: function(question) { 67 if ( !confirm("After publication the question cannot be modified anymore, are you sure?") ) { 68 return; 69 } 64 70 question.publicationDate = new Date(); 65 71 questions.save(question) -
Dev/trunk/src/client/qed-client/pages/surveyRun.js
r519 r529 47 47 .then(lang.hitch(this,function(allResponses){ 48 48 array.forEach(allResponses, function(response){ 49 var actions = {} ;49 var actions = {}, w; 50 50 if ( !response.publicationDate ) { 51 51 actions.Delete = { 52 callback: function(){ 53 responses.remove(response) 54 .then(function(){ 55 w.destroy(); 56 }); 57 }, 52 callback: lang.hitch(this,function(){ 53 // We cannot bind _onDeleteResponse 54 // directly, because of the 55 // initialization problem with w. We 56 // need it in the handler, but we need 57 // to pass the handler as an argument 58 // on the creation of w. 59 this._onDeleteResponse(response,w); 60 }), 58 61 properties: { 59 62 icon: 'Delete', … … 62 65 }; 63 66 } 64 varw = new LineWithActionsWidget({67 w = new LineWithActionsWidget({ 65 68 actions: actions 66 69 }); … … 70 73 }, this); 71 74 })); 75 }, 76 _onDeleteResponse: function(response,w) { 77 if ( !confirm("Are you sure you want to delete this survey response?") ) { 78 return; 79 } 80 responses.remove(response) 81 .then(function(){ 82 w.destroy(); 83 }); 72 84 }, 73 85 _handlePropChange: function(e) { -
Dev/trunk/src/client/qed-client/pages/surveys.js
r508 r529 16 16 if ( this._started ) { return; } 17 17 this.inherited(arguments); 18 this.draftsTab.set('title','Drafts (<span class="qedLoading"></span>)'); 19 this.publishedTab.set('title','Published (<span class="qedLoading"></span>)'); 20 this.runsTab.set('title','Runs (<span class="qedLoading"></span>)'); 18 21 this.refresh(); 19 22 }, … … 22 25 }, 23 26 _onPublishSurvey:function(survey){ 24 var self = this; 27 if ( !confirm("After publication the survey cannot be modified anymore, are you sure?") ) { 28 return; 29 } 25 30 survey.publicationDate = new Date(); 26 31 surveys.save(survey) 27 .then( function(){28 self.refreshDrafts();29 self.refreshPublished();30 } ,lang.hitch(this,function(err){32 .then(lang.hitch(this,function(){ 33 this.refreshDrafts(); 34 this.refreshPublished(); 35 }),lang.hitch(this,function(err){ 31 36 this.notify(err.error,'error'); 32 37 })); 33 38 }, 34 39 _onDeleteSurvey:function(survey){ 35 var self = this; 40 if ( !confirm("Are you sure you want to delete this draft survey?") ) { 41 return; 42 } 36 43 surveys.remove(survey) 37 .then( function(){38 self.refreshDrafts();39 } ,lang.hitch(this,function(err){44 .then(lang.hitch(this,function(){ 45 this.refreshDrafts(); 46 }),lang.hitch(this,function(err){ 40 47 this.notify(err.error,'error'); 41 48 })); … … 62 69 }, 63 70 _onRunDelete: function(surveyRun) { 71 if ( !confirm("Are you sure you want to delete this survey run?") ) { 72 return; 73 } 64 74 surveyRuns.remove(surveyRun) 65 75 .then(lang.hitch(this,function(){ … … 135 145 label: 'Run', 136 146 tooltip: 'Run survey', 137 icon: ' Run'147 icon: 'Forward' 138 148 } 139 149 }] -
Dev/trunk/src/client/qed-client/pages/templates/surveys.html
r443 r529 8 8 </div> 9 9 10 <div data-dojo-attach-point="tabContainer" data-dojo-type="dijit/layout/TabContainer" class="blue" data-dojo-props="tabPosition:'left-h',region:'center'"> 10 <div data-dojo-attach-point="tabContainer" 11 data-dojo-type="dijit/layout/TabContainer" 12 class="blue" data-dojo-props="tabPosition:'left-h',region:'center'"> 11 13 12 <div data-dojo-type="dijit/layout/BorderContainer" title="Drafts" data-dojo-attach-point="draftsTab"> 14 <div data-dojo-type="dijit/layout/BorderContainer" 15 title="Drafts" 16 data-dojo-attach-point="draftsTab"> 13 17 <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'center'" data-dojo-attach-point="draftsContainer"> 14 18 </div> … … 17 21 </div> 18 22 19 <div data-dojo-type="dijit/layout/BorderContainer" title="Published" data-dojo-attach-point="publishedTab"> 20 <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'center'" data-dojo-attach-point="publishedContainer"> 23 <div data-dojo-type="dijit/layout/BorderContainer" 24 title="Published" 25 data-dojo-attach-point="publishedTab"> 26 <div data-dojo-type="dijit/layout/ContentPane" 27 data-dojo-props="region: 'center'" 28 data-dojo-attach-point="publishedContainer"> 21 29 </div> 22 <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'bottom'" style="height: 40px;"> 30 <div data-dojo-type="dijit/layout/ContentPane" 31 data-dojo-props="region: 'bottom'" 32 style="height: 40px;"> 23 33 </div> 24 34 </div> 25 35 26 <div data-dojo-type="dijit/layout/BorderContainer" title="Runs" data-dojo-attach-point="runsTab"> 27 <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'center'" data-dojo-attach-point="runsContainer"> 36 <div data-dojo-type="dijit/layout/BorderContainer" 37 title="Runs" 38 data-dojo-attach-point="runsTab"> 39 <div data-dojo-type="dijit/layout/ContentPane" 40 data-dojo-props="region: 'center'" 41 data-dojo-attach-point="runsContainer"> 28 42 </div> 29 <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'bottom'" style="height: 40px;"> 43 <div data-dojo-type="dijit/layout/ContentPane" 44 data-dojo-props="region: 'bottom'" 45 style="height: 40px;"> 30 46 </div> 31 47 </div> 32 48 </div> 33 49 34 <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'bottom'" style="height: 40px;"> 35 <button data-dojo-type="dijit/form/Button" class="blue" data-dojo-props="baseClass: 'rftBlockButton', iconClass: 'rftIcon rftIconNew'" data-dojo-attach-event="onClick:_onNewSurvey">New survey</button> 50 <div data-dojo-type="dijit/layout/ContentPane" 51 data-dojo-props="region: 'bottom'" 52 style="height: 40px;"> 53 <button data-dojo-type="dijit/form/Button" 54 class="blue" 55 data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconNew'" 56 data-dojo-attach-event="onClick:_onNewSurvey">New survey</button> 36 57 </div> 37 58 -
Dev/trunk/src/server/util/request.js
r527 r529 3 3 , HTTPS = require('https') 4 4 , URL = require('url') 5 , QS = require('querystring') 5 6 , _ = require('underscore') 6 7 ; … … 24 25 'Accepts': 'application/json' 25 26 }); 27 } 28 if ( reqOpts.qs ) { 29 reqOpts.path = (reqOpts.path||'')+'?'+QS.stringify(reqOpts.qs); 30 delete reqOpts.qs; 26 31 } 27 32
Note: See TracChangeset
for help on using the changeset viewer.