OSDN Git Service

v07
[pettanr/pettanr.git] / app / assets / javascripts / models / license.js.coffee
1 class Pettanr.License extends Peta.SystemResource\r
2   \r
3   @singular: () ->\r
4     'License'\r
5   \r
6   @plural: () ->\r
7     'Licenses'\r
8   \r
9   defaults: {\r
10     id: null\r
11   } \r
12   \r
13   @trace_routes: () ->\r
14     {\r
15       symbol: ['system_picture']\r
16     }\r
17   \r
18   caption_with_group: (context, options) ->\r
19     @get_parent('license_group', this, {\r
20       success: (license_group) => \r
21         caption = license_group.escape('caption') + '/' + @escape('caption')\r
22         options.success.call(context, caption)\r
23       fail: (response, opt) =>\r
24         options.fail.call(context, response, opt)\r
25     })\r
26   \r
27   is_own: () ->\r
28     true\r
29   \r
30   initialize: (attr = {}, options = {}) ->\r
31     super(attr, options)\r
32   \r