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