1 | define([ |
---|
2 | 'dojo/_base/declare', |
---|
3 | 'dojo/_base/lang', |
---|
4 | 'dojo/fx', |
---|
5 | 'dijit/_WidgetBase', |
---|
6 | 'dijit/_TemplatedMixin', |
---|
7 | 'dijit/_WidgetsInTemplateMixin', |
---|
8 | 'dijit/_Container', |
---|
9 | './LineWithActionsWidget', |
---|
10 | 'dojo/text!./templates/Selector.html' |
---|
11 | ],function( |
---|
12 | declare, |
---|
13 | lang, |
---|
14 | fx, |
---|
15 | _WidgetBase, |
---|
16 | _TemplatedMixin, |
---|
17 | _WidgetsInTemplateMixin, |
---|
18 | _Container, |
---|
19 | LineWithActionsWidget, |
---|
20 | templateString |
---|
21 | ){ |
---|
22 | return declare('rft.ui.Selector',[_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,_Container],{ |
---|
23 | templateString: templateString, |
---|
24 | title: "The professional as a participant", |
---|
25 | baseClass: 'rftSelector', |
---|
26 | postCreate: function() { |
---|
27 | var infoFunction = function() { |
---|
28 | alert("Show info here"); |
---|
29 | } |
---|
30 | new LineWithActionsWidget({ |
---|
31 | title: this.title, |
---|
32 | actions: { |
---|
33 | "Select" : function(){} |
---|
34 | } |
---|
35 | },this.titleNode); |
---|
36 | new LineWithActionsWidget({ |
---|
37 | title: 'None', |
---|
38 | actions: { |
---|
39 | "V" : lang.hitch(this,function(){ |
---|
40 | var node = this.optionsNode; |
---|
41 | var show = fx.wipeIn({ |
---|
42 | node: node |
---|
43 | }); |
---|
44 | var hide = fx.wipeOut({ |
---|
45 | node: node |
---|
46 | }); |
---|
47 | hide.play(); |
---|
48 | var folded = true; |
---|
49 | return function(e) { |
---|
50 | if ( folded ) { |
---|
51 | show.play(); |
---|
52 | folded = false; |
---|
53 | } else { |
---|
54 | hide.play(); |
---|
55 | folded = true; |
---|
56 | |
---|
57 | } |
---|
58 | e.preventDefault(); |
---|
59 | e.stopPropagation(); |
---|
60 | }; |
---|
61 | })() |
---|
62 | } |
---|
63 | },this.selectedItemNode); |
---|
64 | new LineWithActionsWidget({ |
---|
65 | title: 'Are there direct colleagues among the other participants?', |
---|
66 | actions: { |
---|
67 | "i" : infoFunction |
---|
68 | } |
---|
69 | }).placeAt(this.optionsNode); |
---|
70 | new LineWithActionsWidget({ |
---|
71 | title: 'Do you personally know ithers present at the current session?', |
---|
72 | actions: { |
---|
73 | "i" : infoFunction |
---|
74 | } |
---|
75 | }).placeAt(this.optionsNode); |
---|
76 | new LineWithActionsWidget({ |
---|
77 | title: 'Have you worked with other participants before?', |
---|
78 | actions: { |
---|
79 | "i" : infoFunction |
---|
80 | } |
---|
81 | }).placeAt(this.optionsNode); |
---|
82 | } |
---|
83 | }); |
---|
84 | }); |
---|