OSDN Git Service
(root)
/
pettanr
/
pettanr.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
fix filer caption
[pettanr/pettanr.git]
/
app
/
assets
/
javascripts
/
models
/
comic.js.coffee
1
class Pettanr.Comic extends Peta.Binder
\r
2
url: '/comics/'
\r
3
\r
4
@singular: () ->
\r
5
'Comic'
\r
6
\r
7
@plural: () ->
\r
8
'Comics'
\r
9
\r
10
defaults: {
\r
11
id: null,
\r
12
visible: 0,
\r
13
author_id: null
\r
14
}
\r
15
\r
16
author: () ->
\r
17
new Pettanr.Author({id: @get('author_id')})
\r
18
\r
19
is_visible: (operators) ->
\r
20
switch super(operators)
\r
21
when null
\r
22
return true
\r
23
when false
\r
24
return false
\r
25
else
\r
26
@get('visible') > 0
\r
27
\r
28
symbol_filename: () ->
\r
29
\r
30
initialize: () ->
\r
31
if @id
\r
32
@url = @url + @id
\r
33
\r