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 paginator
[pettanr/pettanr.git]
/
app
/
assets
/
javascripts
/
models
/
sheet.js.coffee
1
class Pettanr.Sheet extends Peta.Root
\r
2
@singular: () ->
\r
3
'Sheet'
\r
4
\r
5
@plural: () ->
\r
6
'Sheets'
\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
initialize: () ->
\r
24
if @id
\r
25
@url = @url + @id
\r
26
\r
27
class Pettanr.Sheet.Collection extends Backbone.Collection
\r
28
model: Pettanr.Sheet
\r
29
url: '/sheets'
\r