Changeset 391
- Timestamp:
- 08/08/12 13:16:32 (13 years ago)
- Location:
- Dev/branches/rest-dojo-ui/client/rft/ui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorToolkit.js
r390 r391 109 109 _setValueAttr: function(question) { 110 110 this.propertiesForm.set('value', question); 111 this._categories = question.categories ;111 this._categories = question.categories || []; 112 112 this._setupListView(); 113 113 this._setupCategories(); … … 145 145 removeCallback: lang.hitch(this, this._removeCategory) 146 146 }).placeAt(this.listNode); 147 this._list.startup(); 147 148 for (var category in this._categories) { 148 149 this._list.appendItem(this._categories[category]); 149 150 } 150 this._list.startup();151 151 }, 152 152 _setupCategories: function() { -
Dev/branches/rest-dojo-ui/client/rft/ui/content/ContentWidgetFactory.js
r389 r391 16 16 // other type specific fields 17 17 var fun = this['create'+options.type+'ViewWidget']; 18 return fun !== undefined ? fun(options) : null; 18 var view = fun !== undefined ? fun(options) : null; 19 return view; 19 20 }, 20 21 createEditWidget: function(/*Object*/options) { 21 22 var fun = this['create'+options.type+'EditWidget']; 22 return fun !== undefined ? fun(options) : null; 23 var view = fun !== undefined ? fun() : null; 24 if(view) 25 view.set('value', options); 26 return view; 23 27 }, 24 28 … … 28 32 }); 29 33 }, 30 createHeaderEditWidget: function( options) {31 return n ull;34 createHeaderEditWidget: function() { 35 return new HeaderEditItem(); 32 36 }/*, 33 37 … … 79 83 /* Contents */ 80 84 var HeaderViewItem = declare(TextBox, { 85 postCreate: function() { 86 this.set('value', this.options.contents); 87 this.set('readOnly', true); 88 }, 89 _getValueAttr: function() { 90 return { type: 'Header', 91 contents: this.get('displayedValue'), 92 } 93 } 94 }); 95 96 var HeaderEditItem = declare(TextBox, { 81 97 _setValueAttr: function(value) { 98 this.inherited(arguments, [value.contents || ""]); 82 99 }, 83 100 _getValueAttr: function() { 84 return {}; 101 return { type: 'Header', 102 contents: this.get('displayedValue'), 103 } 85 104 } 86 105 });
Note: See TracChangeset
for help on using the changeset viewer.