[ADD] Kanban dummy cell click triggers 'add column' button bounce effect

bzr revid: fme@openerp.com-20120904101916-wzkxutkcthgyv2fe
This commit is contained in:
Fabien Meghazi 2012-09-04 12:19:16 +02:00
parent 42ae38116a
commit 9612626dac
4 changed files with 17 additions and 2 deletions

View File

@ -69,7 +69,6 @@
display: none !important;
}
}
.openerp.openerp_webclient_container {
height: 100%;
position: relative;
@ -238,6 +237,9 @@
.openerp .ui-widget-content a {
color: #7c7bad;
}
.openerp .oe_bounce_container {
display: inline-block;
}
.openerp.ui-dialog {
display: none;
padding: 6px;

View 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

View 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');

View 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>