view.StatusMessage slideUp/Down callback using correct contexts
authorDarren <darren@Darrens-MacBook-Pro.local>
Sun, 19 May 2013 18:08:44 +0000 (19:08 +0100)
committerDarren <darren@Darrens-MacBook-Pro.local>
Sun, 19 May 2013 18:08:44 +0000 (19:08 +0100)
client/assets/dev/view.js

index 03a6b3b2dfa4aece03b380de974ade7483cae610..2fde7e68272e844c41976f923b578c40e9f1322d 100644 (file)
@@ -1222,8 +1222,8 @@ _kiwi.view.StatusMessage = Backbone.View.extend({
         opt.type = opt.type || '';\r
         opt.timeout = opt.timeout || 5000;\r
 \r
-        this.$el.text(text).attr('class', opt.type);\r
-        this.$el.slideDown($.proxy(_kiwi.app.view.doLayout, this));\r
+        this.$el.text(text).addClass(opt.type);\r
+        this.$el.slideDown($.proxy(_kiwi.app.view.doLayout, _kiwi.app.view));\r
 \r
         if (opt.timeout) this.doTimeout(opt.timeout);\r
     },\r
@@ -1234,14 +1234,14 @@ _kiwi.view.StatusMessage = Backbone.View.extend({
         opt.type = opt.type || '';\r
         opt.timeout = opt.timeout || 5000;\r
 \r
-        this.$el.html(text).attr('class', opt.type);\r
-        this.$el.slideDown(_kiwi.app.view.doLayout);\r
+        this.$el.html(text).addClass(opt.type);\r
+        this.$el.slideDown($.proxy(_kiwi.app.view.doLayout, _kiwi.app.view));\r
 \r
         if (opt.timeout) this.doTimeout(opt.timeout);\r
     },\r
 \r
     hide: function () {\r
-        this.$el.slideUp($.proxy(_kiwi.app.view.doLayout, this));\r
+        this.$el.slideUp($.proxy(_kiwi.app.view.doLayout, _kiwi.app.view));\r
     },\r
 \r
     doTimeout: function (length) {\r