Fix ViewPort:clear firing
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 22 Apr 2010 18:43:18 +0000 (12:43 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 22 Apr 2010 20:36:16 +0000 (14:36 -0600)
imp/js/ViewPort.js

index 1800755..79fac7e 100644 (file)
@@ -327,7 +327,7 @@ var ViewPort = Class.create({
         }
 
         if (!init) {
-            this.visibleRows().each(this.opts.content.fire.curry('ViewPort:clear'));
+            this.visibleRows().each(this.opts.content.fire.bind(this.opts.content, 'ViewPort:clear'));
             this.opts.content.update();
             this.scroller.clear();
         }
@@ -941,7 +941,7 @@ var ViewPort = Class.create({
                 }
             }, this);
 
-            vr.pluck('id').diff(rows.get('domid')).each($).compact().each(this.opts.content.fire.curry('ViewPort:clear'));
+            vr.pluck('id').diff(rows.get('domid')).each($).compact().each(this.opts.content.fire.bind(this.opts.content, 'ViewPort:clear'));
 
             c.childElements().invoke('remove');
 
@@ -952,7 +952,7 @@ var ViewPort = Class.create({
                 }
             }, this);
         } else {
-            vr.each(this.opts.content.fire.curry('ViewPort:clear'));
+            vr.each(this.opts.content.fire.bind(this.opts.content, 'ViewPort:clear'));
             vr.invoke('remove');
             c.update(this.empty_msg);
         }