X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=app%2Fassets%2Fjavascripts%2Fmodels%2Fsheet_panel.js.coffee;h=bba64e30cf23d364bb86c48a5c6fab8b95b64614;hb=28197aecf803b9332afeebb4db14fb7042606f5e;hp=4a8b709e418e61a9a33c60a5870ba128fea8b811;hpb=2e1fe642e8bf2e237f6bcfb605d4d26da96fe2e9;p=pettanr%2Fpettanr.git diff --git a/app/assets/javascripts/models/sheet_panel.js.coffee b/app/assets/javascripts/models/sheet_panel.js.coffee index 4a8b709e..bba64e30 100644 --- a/app/assets/javascripts/models/sheet_panel.js.coffee +++ b/app/assets/javascripts/models/sheet_panel.js.coffee @@ -1,4 +1,6 @@ class Pettanr.SheetPanel extends Peta.Leaf + url: '/sheet_panels/' + @singular: () -> 'SheetPanel' @@ -15,10 +17,13 @@ class Pettanr.SheetPanel extends Peta.Leaf t: null } + sheet: () -> + new Pettanr.Cache.Retriever(Pettanr.Sheet, @get('sheet_id')) + + panel: () -> + new Pettanr.Cache.Retriever(Pettanr.Panel, @get('panel_id')) + initialize: () -> if @id @url = @url + @id -class Pettanr.SheetPanel.Collection extends Backbone.Collection - model: Pettanr.SheetPanel - url: '/sheet_panels'