Changeset 428
- Timestamp:
- 04/10/13 20:08:44 (12 years ago)
- Location:
- Dev/trunk/client/qed
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/client/qed/css/layout.less
r425 r428 273 273 274 274 .rftLineListView { 275 max-width: 200px;275 max-width: 300px; 276 276 max-height: 500px; 277 277 -
Dev/trunk/client/qed/css/main.css
r425 r428 466 466 } 467 467 #rft.claro .rftLineListView { 468 max-width: 200px;468 max-width: 300px; 469 469 max-height: 500px; 470 470 } -
Dev/trunk/client/qed/model/widgets/QuestionEditorToolkit.js
r427 r428 118 118 node = w.domNode; 119 119 } 120 return {node: node, data: item, type: ["questionContent"]}; 120 return { 121 node: node, 122 data: item, 123 type: ["questionContent"] 124 }; 121 125 }, 122 126 _setupListView: function() { -
Dev/trunk/client/qed/model/widgets/TabbedQuestionBrowser.js
r417 r428 7 7 'dojox/widget/Standby', 8 8 '../../store', 9 '../../widgets/Selector', 10 'dojo/domReady!' 9 '../../widgets/Selector' 11 10 ],function(declare,lang,win,ContentPane,TabContainer,Standby,store,Selector){ 12 11 return declare([TabContainer],{ … … 75 74 __category: category, 76 75 __topic: topic, 76 dndType: "question", 77 77 title: (topic || '[No topic]')+" ("+count+")", 78 78 selectedActions: this.selectedActions, -
Dev/trunk/client/qed/widgets/Selector.js
r426 r428 1 1 define([ 2 'dojo/_base/array', 3 'dojo/_base/declare', 4 'dojo/_base/event', 5 'dojo/_base/lang', 6 'dojo/dom-class', 7 'dojo/fx', 8 'dojo/query', 9 'dijit/_Container', 10 'dijit/_TemplatedMixin', 11 'dijit/_WidgetBase', 12 'dijit/_WidgetsInTemplateMixin', 13 'dijit/registry', 14 './LineWithActionsWidget', 15 'dojo/text!./templates/Selector.html' 16 ],function( 17 baseArray, 18 declare, 19 event, 20 lang, 21 domClass, 22 fx, 23 query, 24 _Container, 25 _TemplatedMixin, 26 _WidgetBase, 27 _WidgetsInTemplateMixin, 28 registry, 29 LineWithActionsWidget, 30 templateString 31 ){ 2 "./LineWithActionsWidget", 3 "dijit/_Container", 4 "dijit/_TemplatedMixin", 5 "dijit/_WidgetBase", 6 "dijit/_WidgetsInTemplateMixin", 7 "dijit/registry", 8 "dojo/_base/array", 9 "dojo/_base/declare", 10 "dojo/_base/event", 11 "dojo/_base/lang", 12 "dojo/dnd/Source", 13 "dojo/dom-class", 14 "dojo/dom-construct", 15 "dojo/fx", 16 "dojo/query", 17 "dojo/text!./templates/Selector.html" 18 ], function(LineWithActionsWidget, _Container, _TemplatedMixin, _WidgetBase, _WidgetsInTemplateMixin, registry, baseArray, declare, event, lang, Source, domClass, domConstruct, fx, query, templateString) { 19 32 20 return declare([_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,_Container],{ 33 21 templateString: templateString, … … 41 29 // description: 42 30 // icon: 43 31 dndType: null, 32 33 _source: null, 44 34 _folded: true, 45 35 _titleLine: null, … … 54 44 this._createTitleLine(); 55 45 this._createSelectorLine(); 46 if (this.dndType) { 47 this._createSource(); 48 } 56 49 57 50 fx.wipeOut({ … … 103 96 this._selectorLine.on('click',lang.hitch(this, this.onToggle)); 104 97 }, 98 _createSource: function() { 99 this._source = new Source(this.optionsNode, { 100 singular: true, 101 delay: 5, 102 selfAccept: false, 103 copyOnly: true, 104 withHandles: this.withHandles, 105 creator: lang.hitch(this, "_createNode") 106 }); 107 }, 105 108 _onSelect: function(item, widget) { 106 109 this._selectedItem = item; … … 149 152 }, 150 153 151 addItem: function(item,displayTitle) { 154 addItem: function(item) { 155 if ( this._source ) { 156 this._source.insertNodes(false,[item]); 157 } else { 158 var node = this._createLineNode(item); 159 domConstruct.place(node, this.optionsNode, "last"); 160 } 161 }, 162 _createNode: function(item, hint) { 163 var node = hint === "avatar" ? 164 this._createAvatarNode(item) : this._createLineNode(item); 165 return node && { 166 node: node, 167 data: lang.clone(item), 168 type: [this.dndType] 169 }; 170 }, 171 _createAvatarNode: function(item) { 172 return domConstruct.create("div",{ 173 'class': 'dragAvatar', 174 innerHTML: item.title 175 }); 176 }, 177 _createLineNode: function(item) { 152 178 var actions = {}; 153 179 var action; … … 167 193 } 168 194 var w = new LineWithActionsWidget({ 169 title: displayTitle ||item.title,195 title: item.title, 170 196 actions: actions 171 }) .placeAt(this.optionsNode);197 }); 172 198 w.startup(); 173 199 w.on("click", lang.hitch(this, this._onSelect, item, w)); 200 return w.domNode; 174 201 }, 175 202 -
Dev/trunk/client/qed/widgets/list/List.js
r426 r428 49 49 node: node, 50 50 data: item, 51 type: this.type51 type: [this.type] 52 52 }; 53 53 },
Note: See TracChangeset
for help on using the changeset viewer.