From c8ef9104c9662fb430df079f683e12f0876cbb6b Mon Sep 17 00:00:00 2001
From: Pierre Pizzetta
Date: Fri, 16 Oct 2020 14:48:01 +0800
Subject: [PATCH] [MIG] web_dialog_size: Migration to 14.0
---
web_dialog_size/README.rst | 11 ++++++-----
web_dialog_size/readme/CONTRIBUTORS.rst | 1 +
web_dialog_size/static/description/index.html | 7 ++++---
web_dialog_size/static/src/js/web_dialog_size.js | 6 +++---
4 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/web_dialog_size/README.rst b/web_dialog_size/README.rst
index 08b26c7c4..396db182a 100644
--- a/web_dialog_size/README.rst
+++ b/web_dialog_size/README.rst
@@ -14,13 +14,13 @@ Web Dialog Size
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
- :target: https://github.com/OCA/web/tree/13.0/web_dialog_size
+ :target: https://github.com/OCA/web/tree/14.0/web_dialog_size
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/web-13-0/web-13-0-web_dialog_size
+ :target: https://translation.odoo-community.org/projects/web-14-0/web-14-0-web_dialog_size
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/162/13.0
+ :target: https://runbot.odoo-community.org/runbot/162/14.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -49,7 +49,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -82,6 +82,7 @@ Contributors
* Ernesto Tejeda
* Sudhir Arya
+* Pierre Pizzetta
Maintainers
~~~~~~~~~~~
@@ -96,6 +97,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-This module is part of the `OCA/web `_ project on GitHub.
+This module is part of the `OCA/web `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/web_dialog_size/readme/CONTRIBUTORS.rst b/web_dialog_size/readme/CONTRIBUTORS.rst
index 680c63cd4..9da11ab82 100644
--- a/web_dialog_size/readme/CONTRIBUTORS.rst
+++ b/web_dialog_size/readme/CONTRIBUTORS.rst
@@ -12,3 +12,4 @@
* Ernesto Tejeda
* Sudhir Arya
+* Pierre Pizzetta
diff --git a/web_dialog_size/static/description/index.html b/web_dialog_size/static/description/index.html
index 86fed7d88..2b0c147fe 100644
--- a/web_dialog_size/static/description/index.html
+++ b/web_dialog_size/static/description/index.html
@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-

+

A module that lets the user expand/restore the dialog box size through a button
in the upper right corner (imitating most windows managers).
It also adds draggable support to the dialogs.
@@ -401,7 +401,7 @@ It also adds draggable support to the dialogs.
Bugs are tracked on GitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-feedback.
+feedback.
Do not contact contributors directly about support or help with technical issues.
@@ -442,7 +443,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-
This module is part of the OCA/web project on GitHub.
+
This module is part of the OCA/web project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/web_dialog_size/static/src/js/web_dialog_size.js b/web_dialog_size/static/src/js/web_dialog_size.js
index 408ea610a..02f1a6f17 100644
--- a/web_dialog_size/static/src/js/web_dialog_size.js
+++ b/web_dialog_size/static/src/js/web_dialog_size.js
@@ -33,7 +33,7 @@ odoo.define("web_dialog_size.web_dialog_size", function (require) {
return this._super.apply(this, arguments).then(
function () {
if (this.$modal) {
- this.$modal.draggable({
+ this.$modal.find(">:first-child").draggable({
handle: ".modal-header",
helper: false,
});
@@ -44,9 +44,9 @@ odoo.define("web_dialog_size.web_dialog_size", function (require) {
close: function () {
if (this.$modal) {
- var draggable = this.$modal.draggable("instance");
+ var draggable = this.$modal.find(">:first-child").draggable("instance");
if (draggable) {
- this.$modal.draggable("destroy");
+ this.$modal.find(">:first-child").draggable("destroy");
}
}
return this._super.apply(this, arguments);