OSDN Git Service

96a754ee5fe1a52f6400f843ab6cab73aef9bc11
[pettanr/pettanr.git] / app / assets / javascripts / views / ground_pictures / new_element.js.coffee
1 class Pettanr.Views.GroundPicture.NewElement extends Backbone.View\r
2   tagName: 'div'\r
3   className: 'new-element-body'\r
4   \r
5   initialize: (options) ->\r
6     @parent = options.parent\r
7     @model = options.model\r
8     params = {\r
9       controller: @model.path_name(), action: 'index',\r
10       page_size: 6, format: 'pick'\r
11     }\r
12     @dialog().get(params, null)\r
13   \r
14   render: () ->\r
15     this.$el.html(@img.clear().el)\r
16     this\r
17   \r
18   dock: () ->\r
19     @parent.dock()\r
20   \r
21   editor: () ->\r
22     @dock().editor()\r
23   \r
24   dialog: () ->\r
25     @editor().dialog\r
26   \r