Add missing Binary widget in tree view
review21571002
This commit is contained in:
1 parent
719519e22a
commit
f85fbf4db6
1 file changed
+9
-1
+9
-1
@@ -7,7 +7,6 @@
|
||||
switch (type) {
|
||||
case 'char':
|
||||
case 'text':
|
||||
case 'binary':
|
||||
return Sao.View.Tree.CharColumn;
|
||||
case 'many2one':
|
||||
return Sao.View.Tree.Many2OneColumn;
|
||||
@@ -35,6 +34,8 @@
|
||||
return Sao.View.Tree.IntegerColumn;
|
||||
case 'boolean':
|
||||
return Sao.View.Tree.BooleanColumn;
|
||||
case 'binary':
|
||||
return Sao.View.Tree.BinaryColumn;
|
||||
case 'image':
|
||||
return Sao.View.Tree.ImageColumn;
|
||||
case 'url':
|
||||
@@ -1407,6 +1408,13 @@
|
||||
class_: 'column-many2many'
|
||||
});
|
||||
|
||||
Sao.View.Tree.BinaryColumn = Sao.class_(Sao.View.Tree.CharColumn, {
|
||||
class_: 'column-binary',
|
||||
update_text: function(cell, record) {
|
||||
cell.text(Sao.common.humanize(this.field.get_size(record)));
|
||||
}
|
||||
});
|
||||
|
||||
Sao.View.Tree.ImageColumn = Sao.class_(Sao.View.Tree.CharColumn, {
|
||||
class_: 'column-image',
|
||||
get_cell: function() {
|
||||
|
||||
Reference in new issue
Block a user