mirror of https://github.com/artf/grapesjs.git
4 changed files with 23 additions and 16 deletions
@ -1,6 +1,6 @@ |
|||
import Backbone from 'backbone'; |
|||
import { Collection } from 'common'; |
|||
import Block from './Block'; |
|||
|
|||
export default Backbone.Collection.extend({ |
|||
model: Block |
|||
}); |
|||
export default class Blocks extends Collection {} |
|||
|
|||
Blocks.prototype.model = Block; |
|||
|
|||
@ -1,6 +1,6 @@ |
|||
import Backbone from 'backbone'; |
|||
import { Collection } from 'common'; |
|||
import Category from './Category'; |
|||
|
|||
export default Backbone.Collection.extend({ |
|||
model: Category |
|||
}); |
|||
export default class Categories extends Collection {} |
|||
|
|||
Categories.prototype.model = Category; |
|||
|
|||
@ -1,10 +1,12 @@ |
|||
import Backbone from 'backbone'; |
|||
import { Model } from 'common'; |
|||
|
|||
export default Backbone.Model.extend({ |
|||
defaults: { |
|||
id: '', |
|||
label: '', |
|||
open: true, |
|||
attributes: {} |
|||
export default class Category extends Model { |
|||
defaults() { |
|||
return { |
|||
id: '', |
|||
label: '', |
|||
open: true, |
|||
attributes: {} |
|||
}; |
|||
} |
|||
}); |
|||
} |
|||
|
|||
Loading…
Reference in new issue