Changeset 366
- Timestamp:
- 07/18/12 18:49:11 (13 years ago)
- Location:
- Dev/branches/rest-dojo-ui/client/rft
- Files:
-
- 6 added
- 6 deleted
- 6 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/rest-dojo-ui/client/rft/css/layout.css
r364 r366 272 272 } 273 273 fieldset.align label { 274 color: #ffffff; 274 275 display: inline-block; 275 276 width: 100px !important; 277 } 278 279 .claro .newline { 280 float: left; 281 clear: both; 276 282 } 277 283 … … 340 346 /* Experimental background colour inheritance */ 341 347 .claro div.blue.inheritBgColor, 342 .claro .blue .inheritBgColor, 343 .claro.blue .inheritBgColor { 348 .claro .blue .inheritBgColor { 344 349 background-color: #0072bc; 345 350 color: #ffffff; 346 351 } 347 352 .claro div.green.inheritBgColor, 348 .claro .green .inheritBgColor, 349 .claro.green .inheritBgColor { 353 .claro .green .inheritBgColor { 350 354 background-color: #3aa605; 351 355 color: #ffffff; 352 356 } 353 357 .claro div.orange.inheritBgColor, 354 .claro .orange .inheritBgColor, 355 .claro.orange .inheritBgColor { 358 .claro .orange .inheritBgColor { 356 359 background-color: #ff5b12; 357 360 color: #ffffff; 358 361 } 359 362 .claro div.purple.inheritBgColor, 360 .claro .purple .inheritBgColor, 361 .claro.purple .inheritBgColor { 363 .claro .purple .inheritBgColor { 362 364 background-color: #6529b7; 363 365 color: #ffffff; 364 366 } 365 367 .claro div.red.inheritBgColor, 366 .claro .red .inheritBgColor, 367 .claro.red .inheritBgColor { 368 .claro .red .inheritBgColor { 368 369 background-color: #8c0310; 369 370 color: #ffffff; 370 371 } 371 372 .claro div.trans.inheritBgColor, 372 .claro .trans .inheritBgColor, 373 .claro.trans .inheritBgColor { 373 .claro .trans .inheritBgColor { 374 374 background-color: transparent; 375 375 color: #ffffff; 376 376 } 377 377 .claro div.blue.inheritBgColor.light, 378 .claro .blue .inheritBgColor.light, 379 .claro.blue .inheritBgColor.light { 378 .claro .blue .inheritBgColor.light { 380 379 background-color: #0794d1; 381 380 color: #ffffff; 382 381 } 383 382 .claro div.green.inheritBgColor.light, 384 .claro .green .inheritBgColor.light, 385 .claro.green .inheritBgColor.light { 383 .claro .green .inheritBgColor.light { 386 384 background-color: #79ca0a; 387 385 color: #ffffff; 388 386 } 389 387 .claro div.orange.inheritBgColor.light, 390 .claro .orange .inheritBgColor.light, 391 .claro.orange .inheritBgColor.light { 388 .claro .orange .inheritBgColor.light { 392 389 background-color: #ff9140; 393 390 color: #ffffff; 394 391 } 395 392 .claro div.purple.inheritBgColor.light, 396 .claro .purple .inheritBgColor.light, 397 .claro.purple .inheritBgColor.light { 393 .claro .purple .inheritBgColor.light { 398 394 background-color: #993dec; 399 395 color: #ffffff; 400 396 } 401 397 .claro div.red.inheritBgColor.light, 402 .claro .red .inheritBgColor.light, 403 .claro.red .inheritBgColor.light { 398 .claro .red .inheritBgColor.light { 404 399 background-color: #bd0013; 405 400 color: #ffffff; -
Dev/branches/rest-dojo-ui/client/rft/css/rftButtons.css
r349 r366 1 1 /* And now for the RFT specific stuff! */ 2 2 /*LargeButton*/ 3 .claro .rftLargeButton, 4 .claro .rftLargeButton * { 5 user-select: none; 6 -webkit-user-select: none; 7 } 3 8 .claro .rftLargeButton { 4 9 margin-right: 16px; 10 height: 30px; 5 11 } 6 12 .claro .rftLargeButton .dijitButtonNode { -
Dev/branches/rest-dojo-ui/client/rft/pages/question.html
r363 r366 1 <div data-dojo-type="rft.pages. surveyAdvanced">1 <div data-dojo-type="rft.pages.question" class="orange"> 2 2 <div data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="region:'center'" style="height: 500px;"> 3 3 <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'top'"> 4 4 <h2> 5 5 <span class="rftIcon rftIconSurvey"></span> 6 <span class="headerText"> Survey A [Design]</span>6 <span class="headerText">Question 123 [Editing]</span> 7 7 </h2> 8 8 </div> … … 10 10 11 11 <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'"> 12 <div data-dojo-type="dijit.layout.AccordionContainer" class="blue"> 13 <div data-dojo-type="dijit.layout.ContentPane" title="Content" data-dojo-props="iconClass:'rftIcon rftIconPlus'"> 14 <div id="SurveyEditorToolkit" data-dojo-props="skipForm: true, accept:[], selfAccept: false, copyOnly: true, horizontal: false, singular: true"> 15 16 </div> 17 </div> 18 </div> 12 <div id="QuestionEditorToolkit"></div> 19 13 </div> 20 14 <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'bottom'"> 21 <button id="btnSave" data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconAccept'">Save</button>22 15 <button id="btnDiscard" data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconCancel'">Discard</button> 23 <button id="btn Back" data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconUndo'">Exit Design</button>16 <button id="btnSave" data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconAccept'">Save and exit</button> 24 17 </div> 25 18 </div> 26 19 <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'"> 27 <div id=" SurveyEditorPreview">20 <div id="QuestionEditorPreview"> 28 21 29 22 </div> 30 31 <button data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftLargeButton', iconClass: 'rftIcon rftIconPlus'">Add new</button>32 23 </div> 33 24 </div> -
Dev/branches/rest-dojo-ui/client/rft/pages/question.js
r363 r366 8 8 'rft/content', 9 9 'dijit/registry', 10 'dojo/on'], 11 function(declare, lang, Deferred, LineWithActionsWidget, store, _Page, api, content, registry, on){ 12 return declare('rft.pages.surveyAdvanced', [_Page], { 10 'dojo/on', 11 'dojo/behavior', 12 'dojo/query', 13 'rft/ui/QuestionEditorPreview', 14 'rft/ui/QuestionEditorToolkit', 15 'dijit/form/FilteringSelect'], 16 function(declare, lang, Deferred, LineWithActionsWidget, store, _Page, api, content, registry, on, behavior, query){ 17 return declare('rft.pages.question', [_Page], { 13 18 object: null, 19 preview: null, 20 14 21 onVisit: function() { 15 22 if (this.pageArgs.uid) { … … 23 30 24 31 this._setupButtons(); 32 this._setupEditor(); 25 33 }, 26 34 onLeave: function() { 27 35 this.inherited(arguments); 28 36 }, 29 _confirmSave: function() { 30 return confirm("Do you want to save?"); 37 _setupButtons: function() { 38 var behaviorMap = { 39 "#btnSave": { 40 onclick: lang.hitch(this, function(){ 41 this._saveSurvey(); 42 }) 43 }, 44 "#btnDiscard": { 45 onclick: lang.hitch(this, function(){ 46 this._restartEditor(); 47 }) 48 } 49 } 50 behavior.add(behaviorMap); 51 behavior.apply(); 31 52 }, 32 _saveSurvey: function() { 33 }, 34 _restartEditor: function() { 35 }, 36 _backToEditor: function() { 37 if (this._confirmSave()) { 38 this._saveSurvey() 39 content.goTo('survey', {uid: this.object._id}); 40 } else { 41 content.goTo('survey', {uid: this.object._id}); 42 } 43 }, 44 _setupButtons: function() { 45 registry.byId("btnSave").on("click", lang.hitch(this, function() { 46 this._saveSurvey(); 47 })); 48 registry.byId("btnDiscard").on("click", lang.hitch(this, function() { 49 this._restartEditor(); 50 })); 51 registry.byId("btnBack").on("click", lang.hitch(this, function() { 52 this._backToEditor(); 53 })); 53 _setupEditor: function() { 54 this.toolkit = new rft.ui.QuestionEditorToolkit(); 55 this.toolkit.placeAt("QuestionEditorToolkit"); 56 57 this.preview = new rft.ui.QuestionEditorPreview(); 58 this.preview.placeAt("QuestionEditorPreview"); 54 59 } 55 60 }); -
Dev/branches/rest-dojo-ui/client/rft/pages/questions.js
r343 r366 1 1 define(['dojo/_base/declare','dojo/_base/lang','dojo/_base/event', 2 'dojo/_base/Deferred','rft/store','rft/ui/_Page','rft/ui/AccordionList' ],3 function(declare,lang,event,Deferred,store,_Page,AccordionList ) {2 'dojo/_base/Deferred','rft/store','rft/ui/_Page','rft/ui/AccordionList', 'rft/content'], 3 function(declare,lang,event,Deferred,store,_Page,AccordionList,content) { 4 4 return declare('rft.pages.questions',[_Page],{ 5 5 constructor: function() { … … 8 8 }, 9 9 onVisit: function() { 10 debugger; 10 11 this._list = new AccordionList({ 11 12 actions: { 12 'Edit': lang.hitch(this,'_editQuestion') 13 'Edit': { 14 callback: lang.hitch(this,'_editQuestion'), 15 properties: { 16 blockButton: true, 17 icon: "Edit", 18 label: "Edit" 19 } 20 } 21 22 13 23 }, 14 24 idProperty: store.idProperty, … … 32 42 }, 33 43 _editQuestion: function(question) { 34 this.questionForm.reset(); 35 this.questionWidget.set('value',question); 36 this.questionDialog.show(); 44 content.goTo("question", {uid: question._id}); 45 // this.questionForm.reset(); 46 // this.questionWidget.set('value',question); 47 // this.questionDialog.show(); 37 48 }, 38 49 onSaveQuestion: function(evt) { … … 52 63 } 53 64 }); 54 65 }); -
Dev/branches/rest-dojo-ui/client/rft/run.js
r365 r366 45 45 'rft/pages/index', 46 46 'rft/pages/questions', 47 'rft/pages/question', 47 48 'rft/pages/session', 48 49 'rft/pages/sessions', 49 50 'rft/pages/surveys', 50 'rft/pages/survey', 51 'rft/pages/surveyAdvanced' 51 'rft/pages/survey' 52 52 ], 53 53 function(win,parser,LoginDialog,dom,connect,auth,content) { -
Dev/branches/rest-dojo-ui/client/rft/ui/MenuLink.js
r274 r366 6 6 }, 7 7 onClick: function(){ 8 debugger; 8 9 content.goTo(this.pageId); 9 10 } -
Dev/branches/rest-dojo-ui/client/rft/ui/_Page.js
r354 r366 36 36 /** Event fired before leaving the page. Return false to prevent */ 37 37 onLeave: function(){ 38 debugger; 38 39 dijit.findWidgets(this.domNode).forEach(function(w){ 39 40 w.destroyRecursive(false); 40 41 }); 42 return true; 41 43 } 42 44 }); 43 45 });
Note: See TracChangeset
for help on using the changeset viewer.