[FIX] fix bouncing buttons (when no content)
authorGéry Debongnie <ged@odoo.com>
Thu, 30 Oct 2014 09:36:43 +0000 (10:36 +0100)
committerGéry Debongnie <ged@odoo.com>
Fri, 31 Oct 2014 10:29:07 +0000 (11:29 +0100)
i am aware that this is an interesting hack, and that i do not resize
correctly the $buttons after the bouncing effect, but at least, it
solves the problem.

addons/web/static/src/js/view_list.js

index dd212d7..1e1c967 100644 (file)
@@ -897,9 +897,9 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
         this.$el.prepend(
             $('<div class="oe_view_nocontent">').html(this.options.action.help)
         );
-        var create_nocontent = this.$buttons.closest('.col-md-6');
+        var $buttons = this.$buttons;
         this.$el.find('.oe_view_nocontent').click(function() {
-            create_nocontent.effect('bounce', {distance: 18, times: 5}, 250);
+            $buttons.width($buttons.width() + 1).openerpBounce();
         });
     }
 });