OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[pettanr/pettanr.git] / app / assets / javascripts / models / writing_format.js.coffee
1 class Pettanr.WritingFormat extends Peta.Template\r
2   url: '/writing_formats/'\r
3   \r
4   @singular: () ->\r
5     'WritingFormat'\r
6   \r
7   @plural: () ->\r
8     'WritingFormats'\r
9   \r
10   defaults: {\r
11     id: null\r
12   } \r
13   \r
14   system_picture: () ->\r
15     new Pettanr.SystemPicture({id: @get('system_picture_id')})\r
16   \r
17   symbol_option: () ->\r
18     i = @system_picture()\r
19     i.fetch({cache: true}).done =>\r
20       @trigger('ready:symbol', i.tmb_opt_img_tag())\r
21   \r
22   initialize: () ->\r
23     if @id\r
24       @url = @url + @id\r
25   \r