mirror of https://github.com/OCA/web.git
[IMP] pre-commit run after update
Includes some manual fixes to silent ESLint warnings.pull/1933/head
parent
7a62fdfbfd
commit
6e2aeab262
|
@ -1,23 +1,23 @@
|
||||||
/* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */
|
/* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */
|
||||||
|
|
||||||
odoo.define("web_decimal_numpad_dot.FieldFloat", function (require) {
|
odoo.define("web_decimal_numpad_dot.FieldFloat", function(require) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var basic_fields = require("web.basic_fields");
|
var basic_fields = require("web.basic_fields");
|
||||||
var translation = require("web.translation");
|
var translation = require("web.translation");
|
||||||
|
|
||||||
var NumpadDotReplaceMixin = {
|
var NumpadDotReplaceMixin = {
|
||||||
l10n_decimal_point: function () {
|
l10n_decimal_point: function() {
|
||||||
return this.formatType === "float_time"
|
return this.formatType === "float_time"
|
||||||
? ":" : translation._t.database.parameters.decimal_point;
|
? ":"
|
||||||
|
: translation._t.database.parameters.decimal_point;
|
||||||
},
|
},
|
||||||
|
|
||||||
_replaceAt: function (cur_val, from, to, replacement) {
|
_replaceAt: function(cur_val, from, to, replacement) {
|
||||||
return cur_val.substring(0, from) + replacement +
|
return cur_val.substring(0, from) + replacement + cur_val.substring(to);
|
||||||
cur_val.substring(to);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_onKeydown: function (event) {
|
_onKeydown: function(event) {
|
||||||
// Only act on numpad dot key
|
// Only act on numpad dot key
|
||||||
if (event.keyCode !== 110) {
|
if (event.keyCode !== 110) {
|
||||||
return this._super.apply(this, arguments);
|
return this._super.apply(this, arguments);
|
||||||
|
|
|
@ -1,10 +1,16 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<template id="assets_backend"
|
<template
|
||||||
name="numpad_dot assets" inherit_id="web.assets_backend">
|
id="assets_backend"
|
||||||
|
name="numpad_dot assets"
|
||||||
|
inherit_id="web.assets_backend"
|
||||||
|
>
|
||||||
<xpath expr="." position="inside">
|
<xpath expr="." position="inside">
|
||||||
<script type="text/javascript" src="/web_decimal_numpad_dot/static/src/js/numpad_dot.js"></script>
|
<script
|
||||||
|
type="text/javascript"
|
||||||
|
src="/web_decimal_numpad_dot/static/src/js/numpad_dot.js"
|
||||||
|
/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue