OSDN Git Service

fix: any
[pettanr/pettanr.git] / app / assets / javascripts / views / history.js.coffee
index 384732b..7e31579 100644 (file)
@@ -116,18 +116,15 @@ class Pettanr.Views.History.Root extends Pettanr.View
   tagName: 'div'\r
   \r
   initialize: (options) ->\r
-    icon = new Pettanr.Views.Common.RootIcon()\r
-    @button = new Tag.A({\r
-      attr: {href: '/'}, \r
-      content: icon.render().el\r
+    icon = new Pettanr.View.Minicon(Pettanr.View.Image.icon_root_file())\r
+    @button = new Pettanr.View.Button('/', icon.render().el, {\r
+      context: this,\r
+      click: () =>\r
+        @trigger('click')\r
     })\r
-    @listenTo(@button, 'click', @click)\r
   \r
   render: () ->\r
     this.$el.html('')\r
     this.$el.append(@button.render().el)\r
     this\r
   \r
-  click: () ->\r
-    @trigger('click')\r
-  \r