[IMP] kanban : Improve the opening on global bock. Add a class 'oe_kanban_global_click_edit' has same methods of 'oe_kanban_global_click' but open in form/edit view ; Improve display of menu dropdown

bzr revid: chm@openerp.com-20120907153330-2dmzfiy9vwtb36uv
This commit is contained in:
Christophe Matthieu 2012-09-07 17:33:30 +02:00
parent ba6ab6f651
commit 8b1a062c99
5 changed files with 13 additions and 2 deletions

View File

@ -689,6 +689,7 @@
.openerp .oe_dropdown_toggle {
color: #404040;
font-weight: normal;
display:inline-block;
}
.openerp .oe_dropdown_hover:hover .oe_dropdown_menu, .openerp .oe_dropdown_menu.oe_opened {
display: block;

View File

@ -559,6 +559,7 @@ $sheet-max-width: 860px
.oe_dropdown_toggle
color: #404040
font-weight: normal
display:inline-block
.oe_dropdown_hover:hover .oe_dropdown_menu, .oe_dropdown_menu.oe_opened
display: block
.oe_dropdown_menu

View File

@ -134,6 +134,7 @@
margin-left: 4px;
cursor: pointer;
position: relative;
display: inline-block;
top: -8px;
}
.openerp .oe_kanban_view .oe_kanban_add {

View File

@ -148,6 +148,7 @@
margin-left: 4px
cursor: pointer
position: relative
display: inline-block
top: -8px
.oe_kanban_add
float: right

View File

@ -757,7 +757,7 @@ instance.web_kanban.KanbanRecord = instance.web.Widget.extend({
}
});
if (this.$el.find('.oe_kanban_global_click').length) {
if (this.$el.find('.oe_kanban_global_click,.oe_kanban_global_click_edit').length) {
this.$el.on('click', function(ev) {
if (!ev.isTrigger && !$(ev.target).data('events')) {
var trigger = true;
@ -798,8 +798,15 @@ instance.web_kanban.KanbanRecord = instance.web.Widget.extend({
});
}
},
/* actions when user click on the block with a specific class
* open on normal view : oe_kanban_global_click
* open on form/edit view : oe_kanban_global_click_edit
*/
on_card_clicked: function(ev) {
this.view.open_record(this.id);
if(this.$el.find('.oe_kanban_global_click_edit').size()>0)
this.do_action_edit();
else
this.do_action_open();
},
setup_color_picker: function() {
var self = this;