web mailing list archives

web@odoo-community.org

Avatar

Re: [OCA/web] [ADD] web_widget_switchcase (#1064)

by Simone Rubino <notifications@github.com> - 10/10/2018 12:24:35

@SimoRubi commented on this pull request.


In web_widget_switchcase/static/src/js/web_widget_switchcase.js:

> +        parse_value: function (val, def) {
+            return this._super(this.transform(val), def);
+        },
+        format_value: function (val, def) {
+            return this._super(this.transform(val), def);
+        },
+        transform: function (val) {
+            if (!val)
+                return val;
+            switch (this.current_transformation) {
+                case 'upper':
+                    return val.toUpperCase();
+                case 'lower':
+                    return val.toLowerCase();
+                default:
+                    console.log(this.current_transformation + ' case unknown');

@tarteo done in 2efa27a


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.