OSDN Git Service

change: cache system
[pettanr/pettanr.git] / app / assets / javascripts / locmare / filer / body / file_body / file_item / symbol / default / face / picture.js.coffee
index 8675b6f..46e65bc 100644 (file)
@@ -3,23 +3,17 @@ class Locmare.FilerModule.BodyModule.FileBodyModule.FileItemModule.SymbolItemCol
   initialize: (options) ->\r
     super(options)\r
   \r
+  # not render\r
+  # get symbol data and send message\r
   render: () ->\r
-    i = new Pettanr.AppHelperImg({src: @url(), size: @icon_size()})\r
-    this.$el.html(i.render().el)\r
+    if @item[@method_name()]\r
+      @listenTo(@item, 'ready:symbol', @ready_symbol)\r
+      @item[@method_name()]()\r
     this\r
   \r
   method_name: () ->\r
-    @my_manifest.method_name()\r
-  \r
-  url: () ->\r
-    if @item.methods(true).is_include(@method_name())\r
-      @item[@method_name()]()\r
-    else\r
-      '/images/error.png'\r
+    @my_manifest.method_name\r
   \r
-  tag_opt: () ->\r
-    if @item.methods(true).is_include(@method_name())\r
-      @item[@method_name()]()\r
-    else\r
-      {'src': '/images/error.png', 'width': Manifest.manifest().magic_numbers['thumbnail_width'], 'height': Manifest.manifest().magic_numbers['thumbnail_height']}\r
+  ready_symbol: (symbol) ->\r
+    @trigger('ready:symbol', symbol)\r
   \r