[IMP] kanban :- improve sort_group method.

bzr revid: ysa@tinyerp.com-20110919055402-cgbbbdqx7y71dqrx
This commit is contained in:
Yogesh (OpenERP) 2011-09-19 11:24:02 +05:30
parent 0987c805df
commit 7decdaa74d
1 changed files with 8 additions and 4 deletions

View File

@ -120,10 +120,14 @@ openerp.web_kanban.KanbanView = openerp.web.View.extend({
} }
}, },
sort_group: function (first, second) { sort_group: function (first, second) {
first = first.header.toLowerCase(); if (first.header && second.header)
second = second.header.toLowerCase(); {
if (first > second) return 1; first = first.header.toLowerCase();
else if (first < second) return -1; second = second.header.toLowerCase();
if (first > second) return 1;
else if (first < second) return -1;
else return 0;
}
else return 0; else return 0;
}, },
on_show_data: function() { on_show_data: function() {