| 50 | } |
| 51 | |
| 52 | buildTreema () { |
| 53 | if ((this.treema != null) || (!this.resource.loaded)) { return } |
| 54 | const data = $.extend(true, {}, this.resource.attributes) |
| 55 | const options = Object.assign((this.treemaOptions || {}), { |
| 56 | data, |
| 57 | filePath: `${this.filePath}/${this.resource.get('_id')}`, |
| 58 | schema: this.schema, |
| 59 | readOnly: me.get('anonymous'), |
| 60 | supermodel: this.supermodel |
| 61 | } |
| 62 | ) |
| 63 | this.treema = this.$el.find('#resource-treema').treema(options) |
| 64 | this.treema.build() |
| 65 | return (this.treema.childrenTreemas.rewards != null ? this.treema.childrenTreemas.rewards.open(3) : undefined) |
| 66 | } |
| 67 | |
| 68 | afterRender () { |
| 69 | super.afterRender() |