()
| 64 | } |
| 65 | |
| 66 | buildTreema () { |
| 67 | if ((this.treema != null) || (!this.course.loaded)) { return } |
| 68 | const data = $.extend(true, {}, this.course.attributes) |
| 69 | const options = { |
| 70 | data, |
| 71 | filePath: `db/course/${this.course.get('_id')}`, |
| 72 | schema: Course.schema, |
| 73 | readOnly: me.get('anonymous'), |
| 74 | supermodel: this.supermodel, |
| 75 | nodeClasses: { |
| 76 | 'concepts-list': nodes.conceptNodes(this.concepts.models).ConceptsListNode, |
| 77 | concept: nodes.conceptNodes(this.concepts.models).ConceptNode |
| 78 | } |
| 79 | } |
| 80 | this.treema = this.$el.find('#course-treema').treema(options) |
| 81 | this.treema.build() |
| 82 | return (this.treema.childrenTreemas.rewards != null ? this.treema.childrenTreemas.rewards.open(3) : undefined) |
| 83 | } |
| 84 | |
| 85 | afterRender () { |
| 86 | super.afterRender() |
no test coverage detected