class Pettanr.Sheet extends Peta.Root\r
- url: '/sheets/'\r
\r
@singular: () ->\r
'Sheet'\r
author_id: null\r
} \r
\r
- author: () ->\r
- new Pettanr.Author({id: @get('author_id')})\r
+ overwrite: (options) ->\r
+ operators = Pettanr.cache.operators\r
+ return false if not operators.author\r
+ @set('author_id', operators.author.id)\r
\r
- is_visible: (operators) ->\r
+ is_visible: (operators = Pettanr.cache.operators) ->\r
switch super(operators)\r
when null\r
return true\r
else\r
@get('visible') > 0\r
\r
- initialize: () ->\r
- if @id\r
- @url = @url + @id\r
+ label: (shorten_length) ->\r
+ @_label('title', shorten_length)\r
+ \r
+ # item is root, but binder like\r
+ play_url: () ->\r
+ Pettanr.url(@table_name(), 'play', {id: @get('id')})\r
+ \r
+ initialize: (attr = {}, options = {}) ->\r
+ super(attr, options)\r
\r
-class Pettanr.Sheet.Collection extends Backbone.Collection\r
- model: Pettanr.Sheet\r
- url: '/sheets'\r