OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[pettanr/pettanr.git] / app / assets / javascripts / pettanr / picture.js.coffee
index 7fb42b0..9a519d0 100644 (file)
@@ -25,7 +25,7 @@ class Pettanr.Image.Icon extends Tag.Img
     @attr['width'] = @width\r
     @attr['height'] = @height\r
     @attr['alt'] = @name\r
-    @attr['title'] = @title\r
+    @attr['title'] = options.title || @title\r
     opt = {\r
       attr: @attr,\r
       class_name: @class_name\r
@@ -81,3 +81,11 @@ class Pettanr.Image.SymbolImg extends Tag.Img
     }\r
     super(opt)\r
   \r
+class Pettanr.Image.SymbolImg.Error extends Pettanr.Image.SymbolImg\r
+  \r
+  initialize: (options) ->\r
+    super(options)\r
+    options ||= {}\r
+    options.attr ||= {}\r
+    options.attr.src ||= '/images/error.png'\r
+    \r