[ADD] Kanban dummy cell click triggers 'add column' button bounce effect
authorFabien Meghazi <fme@openerp.com>
Tue, 4 Sep 2012 10:19:16 +0000 (12:19 +0200)
committerFabien Meghazi <fme@openerp.com>
Tue, 4 Sep 2012 10:19:16 +0000 (12:19 +0200)
bzr revid: fme@openerp.com-20120904101916-wzkxutkcthgyv2fe

addons/web/static/src/css/base.css
addons/web/static/src/css/base.sass
addons/web_kanban/static/src/js/kanban.js
addons/web_kanban/static/src/xml/web_kanban.xml

index dd16865..94cb4d3 100644 (file)
@@ -69,7 +69,6 @@
     display: none !important;
   }
 }
-
 .openerp.openerp_webclient_container {
   height: 100%;
   position: relative;
 .openerp .ui-widget-content a {
   color: #7c7bad;
 }
+.openerp .oe_bounce_container {
+  display: inline-block;
+}
 .openerp.ui-dialog {
   display: none;
   padding: 6px;
index 537988e..ad5794a 100644 (file)
@@ -251,6 +251,8 @@ $sheet-max-width: 860px
     // Jquery ui Overrides {{{
     .ui-widget-content a
         color: $link-color
+    .oe_bounce_container
+        display: inline-block
 
     // Modal box
     &.ui-dialog
index ffec52e..e00f6d9 100644 (file)
@@ -42,6 +42,15 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
         this.limit = options.limit || 80;
         this.add_group_mutex = new $.Mutex();
     },
+    start: function() {
+        var self = this;
+        this._super.apply(this, arguments);
+        this.$el.on('click', '.oe_kanban_dummy_cell', function() {
+            if (self.$buttons) {
+                self.$buttons.find('.oe_kanban_add_column').effect('bounce', {distance: 18, times: 5}, 150);
+            }
+        });
+    },
     destroy: function() {
         this._super.apply(this, arguments);
         $('html').off('click.kanban');
index 39bca51..20b361e 100644 (file)
@@ -20,7 +20,9 @@
             </button>
             <span class="oe_alternative" style="display: none">
                 <span class="oe_fade">or</span>
-                <a href="#" class="oe_bold oe_kanban_add_column">Add a new column</a>
+                <div class="oe_bounce_container">
+                    <a href="#" class="oe_bold oe_kanban_add_column">Add a new column</a>
+                </div>
             </span>
         </t>
     </t>