summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2015-01-06 11:57:54 +0100
committerGéry Debongnie <ged@odoo.com>2015-01-09 13:10:14 +0100
commit278ff38dbe5a0d7cee09b9e5fd900113d8f49402 (patch)
tree3617eebf603d7f43ed22ad22a2adb052c62f83eb /addons/web/static/src
parent66644e856c5075925fe253699afba89869f12a26 (diff)
[FIX] web: usability issue: display form view icon
form view icon should always be displayed in the view manager. This is useful in some situations: * switch to form view from editable list view * refresh a form view
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/views.js6
-rw-r--r--addons/web/static/src/xml/base.xml2
2 files changed, 3 insertions, 5 deletions
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js
index f605579a767..9c5279620af 100644
--- a/addons/web/static/src/js/views.js
+++ b/addons/web/static/src/js/views.js
@@ -590,7 +590,7 @@ instance.web.ViewManager = instance.web.Widget.extend({
self.view_order.push(view_descr);
self.views[view_type] = view_descr;
});
- this.multiple_views = (self.view_order.length - ('form' in this.views ? 1 : 0)) > 1;
+ this.multiple_views = (self.view_order.length > 1);
},
/**
* @returns {jQuery.Deferred} initial view loading promise
@@ -625,9 +625,7 @@ instance.web.ViewManager = instance.web.Widget.extend({
action : self.action,
action_views_ids : views_ids,
}, self.flags, self.flags[view.type], view.options);
- if (view.type !== 'form') {
- self.$('.oe-vm-switch-' + view.type).tooltip();
- }
+ self.$('.oe-vm-switch-' + view.type).tooltip();
});
this.$('.oe_debug_view').click(this.on_debug_changed);
this.$el.addClass("oe_view_manager_" + ((this.action && this.action.target) || 'current'));
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index 8fdf16b7119..3fc96aa610d 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -495,7 +495,7 @@
<t t-if="widget.multiple_views">
<div class="oe-view-manager-switch btn-group btn-group-sm">
<t t-foreach="widget.view_order" t-as="view">
- <button type="button" t-attf-class="btn btn-default fa oe-vm-switch-#{view.type}" t-att-data-view-type="view.type" t-att-title="view.label" t-if="view.type!=='form'">
+ <button type="button" t-attf-class="btn btn-default fa oe-vm-switch-#{view.type}" t-att-data-view-type="view.type" t-att-title="view.label">
</button>
</t>
</div>