[FIX] fix bouncing problem on create/import buttons
authorGéry Debongnie <ged@odoo.com>
Mon, 27 Oct 2014 13:50:38 +0000 (14:50 +0100)
committerGéry Debongnie <ged@odoo.com>
Wed, 29 Oct 2014 07:38:19 +0000 (08:38 +0100)
the bouncing is supposed to occur when clicking on the area in view list
with no content.  Problem was that the Create button was separated from
the import button while bouncing.  This commit fixes the issue in a not
really subtle way: it instead bounces the whole row.  I tried to find a
better fix, but I don't like jqueryui and i don't want to spend too much
time on this.

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

index 3a3e1fe..dd212d7 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;
+        var create_nocontent = this.$buttons.closest('.col-md-6');
         this.$el.find('.oe_view_nocontent').click(function() {
-            create_nocontent.openerpBounce();
+            create_nocontent.effect('bounce', {distance: 18, times: 5}, 250);
         });
     }
 });