web mailing list archives
web@odoo-community.org
Browse archives
Re: [OCA/web] [ADD] web_widget_switchcase (#1064)
by Simone Rubino <notifications@github.com> - 10/10/2018 15:21:31@SimoRubi commented on this pull request.
In web_widget_char_switchcase/static/src/js/web_widget_char_switchcase.js:
> + 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']; + if (!_.contains(this.transformations, this.current_transformation)) + console.error(this.current_transformation + ' case unknown'); + }, + initialize_content: function() { + var res = this._super(); + var self = this; + if(this.$input) { + this.$input.keyup(function(){ + var old_val = self.$input.val(); + var new_val = self.transform(old_val);
@simahawk could you explain what you mean? Maybe with an example? Thanks!
—
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.