OSDN Git Service

clean
[pettanr/pettanr.git] / app / assets / javascripts / views / scrolls / play.js.coffee
index 914e3b7..43f13a4 100644 (file)
@@ -53,13 +53,12 @@ class Pettanr.Views.Scroll.PlayModule.Credits extends Backbone.View
     this\r
   \r
   push: (append_pictures) ->\r
-    _this = this\r
-    _.each append_pictures, (picture, pid) ->\r
-      return if _this.licensed_pictures[pid]\r
-      _this.licensed_pictures[pid] = picture\r
-      picture.fetch({cache: true}).done ->\r
+    _.each append_pictures, (picture, pid) =>\r
+      return if @licensed_pictures[pid]\r
+      @licensed_pictures[pid] = picture\r
+      picture.fetch({cache: true}).done =>\r
         credit = picture.credit_view()\r
-        _this.$el.append(credit.render().el)\r
+        this.$el.append(credit.render().el)\r
   \r
 class Pettanr.Views.Scroll.PlayModule.Panels extends Backbone.View\r
   tagName: 'div'\r
@@ -72,24 +71,23 @@ class Pettanr.Views.Scroll.PlayModule.Panels extends Backbone.View
   \r
   render: () ->\r
     this.$el.html('')\r
-    _this = this\r
-    _.each @items, (scroll_panel) ->\r
+    _.each @items, (scroll_panel) =>\r
       return if not scroll_panel.has_panel()\r
       panel = scroll_panel.panel()\r
-      panel.fetch({cache: true}).done ->\r
+      panel.fetch({cache: true}).done =>\r
         body = new Pettanr.Views.Panel.Body({\r
           panel: panel,\r
-          operators: _this.operators,\r
+          operators: @operators,\r
           spot: null\r
         })\r
-        _this.$el.append(body.render().el)\r
+        this.$el.append(body.render().el)\r
         footer = new Pettanr.Views.Panel.Footer({\r
           scroll_panel: scroll_panel,\r
           panel: panel,\r
-          operators: _this.operators\r
+          operators: @operators\r
         })\r
-        _this.$el.append(footer.render().el)\r
-        _this.credits.push(panel.licensed_pictures())\r
+        this.$el.append(footer.render().el)\r
+        this.credits.push(panel.licensed_pictures())\r
     this\r
   \r
 class Pettanr.Views.Scroll.PlayModule.Body extends Backbone.View\r