summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/view_list_editable.js
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2012-11-27 10:41:09 +0100
committerXavier Morel <xmo@openerp.com>2012-11-27 10:41:09 +0100
commitef5be74caaad979360436c6674c09d3adf400898 (patch)
tree258f7f9931d1f2208de5b86d716da1a29f5db24a /addons/web/static/src/js/view_list_editable.js
parente6d033755f897b741f09bc1ab15e355d495ea73c (diff)
[FIX] disable sorting (column-click) in an editable listview being edited
To do so, extract sort handling to its own method (bound using the events hash) and override-and-disable in editable. bzr revid: xmo@openerp.com-20121127094109-mojnq50mzsrcj3q0
Diffstat (limited to 'addons/web/static/src/js/view_list_editable.js')
-rw-r--r--addons/web/static/src/js/view_list_editable.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js
index db7e22e5f32..7fe6a8ec42b 100644
--- a/addons/web/static/src/js/view_list_editable.js
+++ b/addons/web/static/src/js/view_list_editable.js
@@ -63,6 +63,12 @@ openerp.web.list_editable = function (instance) {
}
this._super();
},
+ sort_by_column: function (e) {
+ e.stopPropagation();
+ if (!this.editor.is_editing()) {
+ this._super.apply(this, arguments);
+ }
+ },
/**
* Handles the activation of a record in editable mode (making a record
* editable), called *after* the record has become editable.