diff --git a/web_dialog_size/README.rst b/web_dialog_size/README.rst index 5cc38fec4..48acea71b 100644 --- a/web_dialog_size/README.rst +++ b/web_dialog_size/README.rst @@ -7,7 +7,7 @@ Web Dialog Size !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:12e664b8d9a56a20606514048d61cfecbade928aa7878d88fb6530eec6c732f1 + !! source digest: sha256:79e0e0e4e8e452e0ff8721c42fc5cda3c078b0461dfb7bdb454fb4d768c4b6af !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/web_dialog_size/__manifest__.py b/web_dialog_size/__manifest__.py index 20ccc23eb..e45b9918b 100644 --- a/web_dialog_size/__manifest__.py +++ b/web_dialog_size/__manifest__.py @@ -15,7 +15,7 @@ "Odoo Community Association (OCA)", "website": "https://github.com/OCA/web", "category": "web", - "version": "16.0.1.0.0", + "version": "16.0.1.0.1", "license": "AGPL-3", "depends": ["web"], "installable": True, diff --git a/web_dialog_size/static/description/index.html b/web_dialog_size/static/description/index.html index 471c205ce..917d8c029 100644 --- a/web_dialog_size/static/description/index.html +++ b/web_dialog_size/static/description/index.html @@ -1,4 +1,3 @@ -
@@ -367,7 +366,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:12e664b8d9a56a20606514048d61cfecbade928aa7878d88fb6530eec6c732f1 +!! source digest: sha256:79e0e0e4e8e452e0ff8721c42fc5cda3c078b0461dfb7bdb454fb4d768c4b6af !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->A module that lets the user expand/restore the dialog box size through a button
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 02f1a6f17..0afabcc2e 100644
--- a/web_dialog_size/static/src/js/web_dialog_size.js
+++ b/web_dialog_size/static/src/js/web_dialog_size.js
@@ -19,6 +19,10 @@ odoo.define("web_dialog_size.web_dialog_size", function (require) {
self.$modal
.find(".dialog_button_restore")
.on("click", self.proxy("_restore"));
+ self.$modal.find(">:first-child").draggable({
+ handle: ".modal-header",
+ helper: false,
+ });
return config.then(function (r) {
if (r.default_maximize) {
self._extending();
@@ -29,39 +33,16 @@ odoo.define("web_dialog_size.web_dialog_size", function (require) {
});
},
- opened: function () {
- return this._super.apply(this, arguments).then(
- function () {
- if (this.$modal) {
- this.$modal.find(">:first-child").draggable({
- handle: ".modal-header",
- helper: false,
- });
- }
- }.bind(this)
- );
- },
-
- close: function () {
- if (this.$modal) {
- var draggable = this.$modal.find(">:first-child").draggable("instance");
- if (draggable) {
- this.$modal.find(">:first-child").draggable("destroy");
- }
- }
- return this._super.apply(this, arguments);
- },
-
_extending: function () {
var dialog = this.$modal.find(".modal-dialog");
- dialog.addClass("dialog_full_screen");
+ dialog.addClass("modal-dialog_full_screen");
dialog.find(".dialog_button_extend").hide();
dialog.find(".dialog_button_restore").show();
},
_restore: function () {
var dialog = this.$modal.find(".modal-dialog");
- dialog.removeClass("dialog_full_screen");
+ dialog.removeClass("modal-dialog_full_screen");
dialog.find(".dialog_button_restore").hide();
dialog.find(".dialog_button_extend").show();
},
diff --git a/web_dialog_size/static/src/xml/web_dialog_size.xml b/web_dialog_size/static/src/xml/web_dialog_size.xml
index ce1e281b8..e160bedb1 100644
--- a/web_dialog_size/static/src/xml/web_dialog_size.xml
+++ b/web_dialog_size/static/src/xml/web_dialog_size.xml
@@ -3,9 +3,6 @@