OSDN Git Service
(root)
/
pettanr
/
pettanr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix:balloon edit
[pettanr/pettanr.git]
/
app
/
assets
/
javascripts
/
models
/
system_picture.js.coffee
diff --git
a/app/assets/javascripts/models/system_picture.js.coffee
b/app/assets/javascripts/models/system_picture.js.coffee
index
e718fda
..
36bda58
100644
(file)
--- a/
app/assets/javascripts/models/system_picture.js.coffee
+++ b/
app/assets/javascripts/models/system_picture.js.coffee
@@
-12,7
+12,7
@@
class Pettanr.SystemPicture extends Peta.SystemResource
}
\r
\r
picture: () ->
\r
}
\r
\r
picture: () ->
\r
- new Pettanr.
Picture({id: @get('picture_id')}
)
\r
+ new Pettanr.
Cache.Retriever(Pettanr.Picture, @get('picture_id')
)
\r
\r
filename: () ->
\r
@get('id') + '.' + @get('ext')
\r
\r
filename: () ->
\r
@get('id') + '.' + @get('ext')
\r
@@
-35,10
+35,15
@@
class Pettanr.SystemPicture extends Peta.SystemResource
})
\r
\r
symbol_option: () ->
\r
})
\r
\r
symbol_option: () ->
\r
- @fetch({cache: true}).done =>
\r
- @trigger('ready:symbol', @tmb_opt_img_tag())
\r
+ retriever = @retriever()
\r
+ @listenTo(retriever, 'retrieve', @retrieve_symbol)
\r
+ retriever.retrieve()
\r
\r
\r
- initialize: () ->
\r
+ retrieve_symbol: (item) ->
\r
+ @trigger('ready:symbol', item.tmb_opt_img_tag())
\r
+
\r
+ initialize: (attr = {}, options = {}) ->
\r
+ super(attr, options)
\r
if @id
\r
@url = @url + @id
\r
\r
if @id
\r
@url = @url + @id
\r
\r