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 18:07:10

@SimoRubi commented on this pull request.


In web_widget_char_switchcase/static/src/js/web_widget_char_switchcase.js:

> @@ -0,0 +1,95 @@
+odoo.define('web_widget_char_switchcase', function (require) {
+    "use strict";
+
+    var core = require('web.core');
+    var formats = require('web.formats');
+    var form_widgets = require('web.form_widgets');
+
+    form_widgets.FieldChar.include({
+        transformations: ['upper', 'lower', 'title', 'sentence', 'camel', 'pascal', 'snake'],
+        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'];

@simahawk done in f5cfb58


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.