diff options
| author | Xavier Morel <xmo@openerp.com> | 2013-05-16 13:03:35 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2013-05-16 13:03:35 +0200 |
| commit | 4bb3995680cf8f43e2496c9526f5b6e909ffe97b (patch) | |
| tree | d2aaec4878e41d131cd9ea92a8cdfde85f98e74c /addons/web/static/src/js/coresetup.js | |
| parent | 5cf564e4e63e374498a173126e307741a9b0ee32 (diff) | |
[IMP] replace literal values by symbolic ones for node types dispatching
bzr revid: xmo@openerp.com-20130516110335-dk803tjn1qpqd0ro
Diffstat (limited to 'addons/web/static/src/js/coresetup.js')
| -rw-r--r-- | addons/web/static/src/js/coresetup.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js index fd1ace312a9..6fc837333b6 100644 --- a/addons/web/static/src/js/coresetup.js +++ b/addons/web/static/src/js/coresetup.js @@ -555,8 +555,8 @@ instance.web.qweb.default_dict = { instance.web.qweb.preprocess_node = function() { // Note that 'this' is the Qweb Node switch (this.node.nodeType) { - case 3: - case 4: + case Node.TEXT_NODE: + case Node.CDATA_SECTION_NODE: // Text and CDATAs var translation = this.node.parentNode.attributes['t-translation']; if (translation && translation.value === 'off') { @@ -567,7 +567,7 @@ instance.web.qweb.preprocess_node = function() { this.node.data = match[1] + instance.web._t(match[2]) + match[3]; } break; - case 1: + case Node.ELEMENT_NODE: // Element var attr, attrs = ['label', 'title', 'alt', 'placeholder']; while (attr = attrs.pop()) { |
