()
| 41 | } |
| 42 | |
| 43 | afterRender () { |
| 44 | if (!this.supermodel.finished()) { return } |
| 45 | this.modelTreemas = {} |
| 46 | return (() => { |
| 47 | const result = [] |
| 48 | for (const model of Array.from(this.models != null ? this.models : [])) { |
| 49 | const data = $.extend(true, {}, model.attributes) |
| 50 | const schema = $.extend(true, {}, model.schema()) |
| 51 | const treemaOptions = { |
| 52 | schema, |
| 53 | data, |
| 54 | readOnly: false |
| 55 | } |
| 56 | const modelTreema = this.$el.find(`.model-treema[data-model-id='${model.id}']`).treema(treemaOptions) |
| 57 | if (modelTreema != null) { |
| 58 | modelTreema.build() |
| 59 | } |
| 60 | if (modelTreema != null) { |
| 61 | modelTreema.open() |
| 62 | } |
| 63 | this.openTastyTreemas(modelTreema, model) |
| 64 | result.push(this.modelTreemas[model.id] = modelTreema) |
| 65 | } |
| 66 | return result |
| 67 | })() |
| 68 | } |
| 69 | |
| 70 | openTastyTreemas (modelTreema, model) { |
| 71 | // To save on quick inspection, let's auto-open the properties we're most likely to want to see. |
nothing calls this directly
no test coverage detected