- Timestamp:
- 03/05/14 22:44:48 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/client/qed-client/model/widgets/QuestionEditorToolkit.js
r443 r487 1 1 define([ 2 "../../store", 2 "../classes/categories", 3 "../classes/topics", 3 4 "./CategoryListView", 4 5 "dijit/_Container", … … 15 16 "require", 16 17 "dojo/text!./templates/QuestionEditorToolkit.html" 17 ], function( store, CategoryListView, _Container, _TemplatedMixin, _WidgetBase, _WidgetsInTemplateMixin, Button, ComboBox, declare, lang, Source, domConstruct, Memory, require, template) {18 ], function(categories, topics, CategoryListView, _Container, _TemplatedMixin, _WidgetBase, _WidgetsInTemplateMixin, Button, ComboBox, declare, lang, Source, domConstruct, Memory, require, template) { 18 19 return declare([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, _Container], { 19 20 … … 107 108 this.inherited(arguments); 108 109 109 store.query("_design/questions/_view/all", {reduce:true, group:false, group_level:1}) 110 .forPairs(lang.hitch(this, function(value, key) { 111 this._categoryStore.put({ id: key[0] }); 110 categories.query().forEach(lang.hitch(this,function(cat){ 111 this._categoryStore.put({ id: cat }); 112 112 })); 113 113 114 store.query("_design/questions/_view/all_topics", {reduce:true, group:true}) 115 .forPairs(lang.hitch(this, function(value, key) { 116 this._topicStore.put({ id: key }); 114 topics.query().forEach(lang.hitch(this,function(topic){ 115 this._categoryStore.put({ id: topic }); 117 116 })); 118 117 },
Note: See TracChangeset
for help on using the changeset viewer.