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
[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
is_visible: (operators) ->
\r
17
switch super(operators)
\r
18
when null
\r
19
return true
\r
20
when false
\r
21
return false
\r
22
else
\r
23
@get('visible') > 0
\r
24
\r
25
symbol_filename: () ->
\r
26
\r
27
initialize: () ->
\r
28
if @id
\r
29
@url = @url + @id
\r
30
\r
31
class Pettanr.Comic.Collection extends Backbone.Collection
\r
32
model: Pettanr.Comic
\r
33
url: '/comics'
\r