-class License extends Item\r
- @single: () ->\r
+class Pettanr.License extends Peta.SystemResource\r
+ \r
+ @singular: () ->\r
'License'\r
\r
@plural: () ->\r
'Licenses'\r
\r
defaults: {\r
- id: 11\r
+ id: null\r
} \r
\r
- initialize: () ->\r
- confirm("Welcome to Panel")\r
+ license_group: () ->\r
+ new Pettanr.Cache.Retriever(Pettanr.LicenseGroup, @get('license_group_id'))\r
+ \r
+ system_picture: () ->\r
+ new Pettanr.Cache.Retriever(Pettanr.SystemPicture, @get('system_picture_id'))\r
+ \r
+ symbol_option: () ->\r
+ @get_parent('system_picture', this, {\r
+ success: (system_picture) => \r
+ @trigger('ready:symbol', system_picture.tmb_opt_img_tag())\r
+ })\r
+ \r
+ caption_with_group: () ->\r
+ @get_parent('license_group', this, {\r
+ success: (license_group) => \r
+ caption = license_group.escape('caption') + '/' + @escape('caption')\r
+ @trigger('ready:caption', caption)\r
+ })\r
+ \r
+ is_own: () ->\r
+ true\r
\r
- @test: () ->\r
- confirm( @single())\r
- confirm( @plural() )\r
- confirm( @class_name() )\r
- confirm( @element_name() )\r
- confirm( @table_name() )\r
- \r
+ initialize: (attr = {}, options = {}) ->\r
+ super(attr, options)\r
\r
- test: () ->\r
-\r
-@Panel = Panel\r