Changeset 335 for Dev/branches/rest-dojo-ui/client/rft/ui/SelectorThijs.js
- Timestamp:
- 05/30/12 16:39:27 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/rest-dojo-ui/client/rft/ui/SelectorThijs.js
r333 r335 8 8 'dijit/_Container', 9 9 './LineWithActionsWidgetThijs', 10 'dojo/text!./templates/Selector .html',10 'dojo/text!./templates/SelectorThijs.html', 11 11 'dojo/dom-class' 12 12 ],function( … … 26 26 title: "The professional as a participant", 27 27 baseClass: 'rftSelector', 28 color: 'red', // This is hardcoded for now, will serve as default value later! (Selector defaults to blue!) Only affects color of lineWithActions 28 29 postCreate: function() { 29 30 var infoFunction = function() { … … 32 33 new LineWithActionsWidget({ 33 34 title: this.title, 35 color: this.color, 34 36 actions: { 35 "Accept" : function(){} 37 "Accept" : { 38 callback: function(arg){}, 39 properties: { 40 blockButton: true, 41 color: this.color 42 } 43 } 36 44 } 37 45 },this.titleNode); 38 46 var selectorLine = new LineWithActionsWidget({ 39 47 title: 'None', 48 color: this.color, 40 49 actions: { 41 "HalfArrowDown" : lang.hitch(this,function(){ 42 var node = this.optionsNode; 43 var show = fx.wipeIn({ 44 node: node 45 }); 46 var hide = fx.wipeOut({ 47 node: node 48 }); 49 hide.play(); 50 var folded = true; 51 return function(e) { 52 if ( folded ) { 53 // Bit of an ugly solution, really. Limit workload by limiting search to child elements of selecorLine.buttonsNode 54 var downArrowIcon = dojo.query(".rftInlineButton .rftIconHalfArrowDown", selectorLine.buttonsNode)[0]; // Query the down arrow rftIcon span 55 if (downArrowIcon){ 56 domClass.replace(downArrowIcon, "rftIconHalfArrowUp", "rftIconHalfArrowDown"); 50 "HalfArrowDown" : { 51 callback: lang.hitch(this,function(){ 52 var node = this.optionsNode; 53 var show = fx.wipeIn({ 54 node: node 55 }); 56 var hide = fx.wipeOut({ 57 node: node 58 }); 59 hide.play(); 60 var folded = true; 61 return function(e) { 62 if ( folded ) { 63 // Bit of an ugly solution, really. Limit workload by limiting search to child elements of selecorLine.buttonsNode 64 var downArrowIcon = dojo.query(".rftBlockButton .rftIconHalfArrowDown", selectorLine.buttonsNode)[0]; // Query the down arrow rftIcon span 65 if (downArrowIcon){ 66 domClass.replace(downArrowIcon, "rftIconHalfArrowUp", "rftIconHalfArrowDown"); 67 } 68 show.play(); 69 folded = false; 70 } else { 71 // Bit of an ugly solution, really. Limit workload by limiting search to child elements of selecorLine.buttonsNode 72 var upArrowIcon = dojo.query(".rftBlockButton .rftIconHalfArrowUp", selectorLine.buttonsNode)[0]; // Query the up arrow rftIcon span 73 if (upArrowIcon){ 74 domClass.replace(upArrowIcon, "rftIconHalfArrowDown", "rftIconHalfArrowUp"); 75 } 76 hide.play(); 77 folded = true; 78 57 79 } 58 show.play(); 59 folded = false; 60 } else { 61 // Bit of an ugly solution, really. Limit workload by limiting search to child elements of selecorLine.buttonsNode 62 var upArrowIcon = dojo.query(".rftInlineButton .rftIconHalfArrowUp", selectorLine.buttonsNode)[0]; // Query the up arrow rftIcon span 63 if (upArrowIcon){ 64 domClass.replace(upArrowIcon, "rftIconHalfArrowDown", "rftIconHalfArrowUp"); 65 } 66 hide.play(); 67 folded = true; 68 69 } 70 e.preventDefault(); 71 e.stopPropagation(); 72 }; 73 })() 80 e.preventDefault(); 81 e.stopPropagation(); 82 }; 83 })(), 84 properties: { 85 blockButton: true, 86 color: this.color, 87 showLabel: false 88 } 89 } 74 90 } 75 91 },this.selectedItemNode); … … 77 93 title: 'Are there direct colleagues among the other participants?', 78 94 actions: { 79 "Inspect" : infoFunction 95 "Inspect" : { 96 callback: infoFunction, 97 properties: { 98 blockButton: false, 99 showLabel: false 100 } 101 } 80 102 } 81 103 }).placeAt(this.optionsNode); 104 /* 82 105 new LineWithActionsWidget({ 83 106 title: 'Do you personally know ithers present at the current session?', … … 92 115 } 93 116 }).placeAt(this.optionsNode); 117 */ 94 118 } 95 119 });
Note: See TracChangeset
for help on using the changeset viewer.