OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[pettanr/pettanr.git] / app / assets / javascripts / models / ground_color.js.coffee
index 74aae4e..09cfeaf 100644 (file)
@@ -1,2 +1,27 @@
 class Pettanr.GroundColor extends Peta.Element\r
-\r
+  url: '/ground_colors/'\r
+  \r
+  @singular: () ->\r
+    'GroundColor'\r
+  \r
+  @plural: () ->\r
+    'GroundColors'\r
+  \r
+  defaults: {\r
+    id: null,\r
+    code: 0,\r
+  } \r
+  \r
+  @has_picture: () ->\r
+    false\r
+  \r
+  panel: () ->\r
+    new Pettanr.Panel({id: @get('panel_id')})\r
+  \r
+  element_face: () ->\r
+    new Pettanr.Views.GroundColor.ElementFace({element: this})\r
+  \r
+  initialize: () ->\r
+    if @id\r
+      @url = @url + @id\r
+  \r