diff options
| author | qsm-odoo <qsm@odoo.com> | 2017-06-01 17:36:13 +0200 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2018-02-13 14:19:07 +0100 |
| commit | 5e6c5d24be38e53d010a8489d2444a3fdaadaa5f (patch) | |
| tree | 3262da47a1db5a165c62b515bd9e4240d43e35c9 /addons/mass_mailing/static/src/js/mass_mailing_editor.js | |
| parent | d7fdb636b81a99519d1e186edaf42d36ecee3b5f (diff) | |
[FIX] mass_mailing, *: duplicating two-columns snippets
* web_editor, website
This commit fixes a bug with table duplication in mailing template:
- Click on a snippet with two columns
- Duplicate it
-> the snippet is duplicated but the two columns are transformed in two
rows.
This was because there is an implemented behavior for column
duplication: if we duplicate a column which was alone on its row, we
duplicate the row instead. This code should however be triggered when
duplicating the column alone to be working, not the snippet that
contains it.
Note: this required a backport of a33ec972abf1cadbae2a6a04f759617c82f2a95e
which was fixing a non-critical "bug" for 11.0. This non-critical "bug" is
therefor fixed here too.
opw-807105
Diffstat (limited to 'addons/mass_mailing/static/src/js/mass_mailing_editor.js')
| -rw-r--r-- | addons/mass_mailing/static/src/js/mass_mailing_editor.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/mass_mailing/static/src/js/mass_mailing_editor.js b/addons/mass_mailing/static/src/js/mass_mailing_editor.js index 9e62986b383..c84981e6a06 100644 --- a/addons/mass_mailing/static/src/js/mass_mailing_editor.js +++ b/addons/mass_mailing/static/src/js/mass_mailing_editor.js @@ -87,11 +87,11 @@ options.registry["width-x"] = options.Class.extend({ }); options.registry.table_item = options.Class.extend({ - on_clone: function ($clone) { + on_clone: function ($clone, options) { this._super.apply(this, arguments); // If we cloned a td or th element... - if (this.$target.is("td, th")) { + if (options.isCurrent && this.$target.is("td, th")) { // ... and that the td or th element was alone on its row ... if (this.$target.siblings().length === 1) { var $tr = $clone.parent(); |
