forked from Techsystech/web
[FIX] web_widget_x2many_2d_matrix: Forced render mode to list on small screens
parent
38c180c58c
commit
49e39b3767
|
@ -215,6 +215,7 @@ Contributors
|
|||
* Jairo Llopis <jairo.llopis@tecnativa.com>
|
||||
* Dennis Sluijk <d.sluijk@onestein.nl>
|
||||
* Alexey Pelykh <alexey.pelykh@brainbeanapps.com>
|
||||
* Alexandre Díaz <alexandre.diaz@tecnativa.com>
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
{
|
||||
'name': '2D matrix for x2many fields',
|
||||
'version': '12.0.1.1.0',
|
||||
'version': '12.0.2.0.0',
|
||||
'author': (
|
||||
'Therp BV, '
|
||||
'Tecnativa, '
|
||||
|
|
|
@ -6,3 +6,4 @@
|
|||
* Jairo Llopis <jairo.llopis@tecnativa.com>
|
||||
* Dennis Sluijk <d.sluijk@onestein.nl>
|
||||
* Alexey Pelykh <alexey.pelykh@brainbeanapps.com>
|
||||
* Alexandre Díaz <alexandre.diaz@tecnativa.com>
|
||||
|
|
|
@ -575,6 +575,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|||
<li>Jairo Llopis <<a class="reference external" href="mailto:jairo.llopis@tecnativa.com">jairo.llopis@tecnativa.com</a>></li>
|
||||
<li>Dennis Sluijk <<a class="reference external" href="mailto:d.sluijk@onestein.nl">d.sluijk@onestein.nl</a>></li>
|
||||
<li>Alexey Pelykh <<a class="reference external" href="mailto:alexey.pelykh@brainbeanapps.com">alexey.pelykh@brainbeanapps.com</a>></li>
|
||||
<li>Alexandre Díaz <<a class="reference external" href="mailto:alexandre.diaz@tecnativa.com">alexandre.diaz@tecnativa.com</a>></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
/* Copyright 2019 Alexandre Díaz
|
||||
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */
|
||||
|
||||
odoo.define('web_widget_x2many_2d_matrix.X2Many2dMatrixView', function (require) {
|
||||
"use strict";
|
||||
|
||||
var BasicView = require('web.BasicView');
|
||||
|
||||
BasicView.include({
|
||||
init: function (viewInfo) {
|
||||
// Force mode='list'
|
||||
var $arch = $(viewInfo.arch);
|
||||
var selector = "field[widget='x2many_2d_matrix']";
|
||||
$arch.find(selector).each(function (i, e) {
|
||||
$(e).attr('mode', 'list');
|
||||
});
|
||||
viewInfo.arch = $arch.prop('outerHTML');
|
||||
|
||||
this._super.apply(this, arguments);
|
||||
},
|
||||
});
|
||||
|
||||
});
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
<template id="assets_backend" name="web_widget_x2many_2d_matrix assets" inherit_id="web.assets_backend">
|
||||
<xpath expr="." position="inside">
|
||||
<script type="text/javascript" src="/web_widget_x2many_2d_matrix/static/src/js/2d_matrix_view.js" />
|
||||
<script type="text/javascript" src="/web_widget_x2many_2d_matrix/static/src/js/2d_matrix_renderer.js" />
|
||||
<script type="text/javascript" src="/web_widget_x2many_2d_matrix/static/src/js/widget_x2many_2d_matrix.js" />
|
||||
<script type="text/javascript" src="/web_widget_x2many_2d_matrix/static/src/js/abstract_view_matrix_limit_extend.js" />
|
||||
|
|
Loading…
Reference in New Issue