X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=app%2Fassets%2Fjavascripts%2Fmodels%2Fwriting_format.js.coffee;h=b6e60f04c31f5688a1a8ea5d4757fbceefc058a9;hb=2ad2de8db58dac6a0e81f1db91a1a8415b2b9de7;hp=ca7cd7b47916cdc16a6ac587f5b17246e4b23349;hpb=9529441f04dd2c502077a051b866eac838e5849e;p=pettanr%2Fpettanr.git diff --git a/app/assets/javascripts/models/writing_format.js.coffee b/app/assets/javascripts/models/writing_format.js.coffee index ca7cd7b4..b6e60f04 100644 --- a/app/assets/javascripts/models/writing_format.js.coffee +++ b/app/assets/javascripts/models/writing_format.js.coffee @@ -1,4 +1,5 @@ class Pettanr.WritingFormat extends Peta.Template + @singular: () -> 'WritingFormat' @@ -9,19 +10,11 @@ class Pettanr.WritingFormat extends Peta.Template id: null } - system_picture: () -> - new Pettanr.SystemPicture({id: @get('system_picture_id')}) - - symbol_option: (cb) -> - i = @system_picture() - i.fetch().done -> - cb(i.tmb_opt_img_tag()) + @trace_routes: () -> + { + symbol: ['system_picture'] + } - initialize: () -> - if @id - @url = @url + @id + initialize: (attr = {}, options = {}) -> + super(attr, options) -class Pettanr.WritingFormat.Collection extends Backbone.Collection - model: Pettanr.WritingFormat - url: '/writing_formats' -