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:44

@SimoRubi commented on this pull request.


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

> +
+    var core = require('web.core');
+    var formats = require('web.formats');
+    var form_widgets = require('web.form_widgets');
+
+    var CharSwitchCase = form_widgets.FieldChar.extend({
+        transformations: ['upper', 'lower'],
+        init: function (field_manager, node) {
+            this._super(field_manager, node);
+            this.options = _.defaults(this.options, {
+                transform: this.transformations[0]
+            });
+            this.current_transformation = this.options['transform'];
+        },
+        initialize_content: function() {
+            this._super();

@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.