diff --git a/muk_web_utils/__manifest__.py b/muk_web_utils/__manifest__.py
index 6b536a5..f0fa8ca 100644
--- a/muk_web_utils/__manifest__.py
+++ b/muk_web_utils/__manifest__.py
@@ -20,7 +20,7 @@
{
"name": "MuK Web Utils",
"summary": """Utility Features""",
- "version": "12.0.2.4.8",
+ "version": "12.0.2.4.10",
"category": "Extra Tools",
"license": "AGPL-3",
"author": "MuK IT",
diff --git a/muk_web_utils/static/src/js/core/dialog.js b/muk_web_utils/static/src/js/core/dialog.js
new file mode 100644
index 0000000..e18344c
--- /dev/null
+++ b/muk_web_utils/static/src/js/core/dialog.js
@@ -0,0 +1,65 @@
+/**********************************************************************************
+*
+* Copyright (C) 2017 MuK IT GmbH
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Affero General Public License as
+* published by the Free Software Foundation, either version 3 of the
+* License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Affero General Public License for more details.
+*
+* You should have received a copy of the GNU Affero General Public License
+* along with this program. If not, see .
+*
+**********************************************************************************/
+
+odoo.define('muk_web_utils.Dialog', function (require) {
+"use strict";
+
+var core = require('web.core');
+
+var Dialog = require('web.Dialog');
+
+var QWeb = core.qweb;
+var _t = core._t;
+
+Dialog.input = function (owner, title, options) {
+ var $content = $('');
+ var $input = $('', {
+ type: 'text',
+ class: options && options.input && options.input.class,
+ value: options && options.input && options.input.value,
+ });
+ $content.append($input);
+ var confirm = function(event) {
+ if(options && options.confirm_callback) {
+ options.confirm_callback.call(self, event, $input.val());
+ }
+ }
+ var buttons = [
+ {
+ text: _t("Save"),
+ classes: 'btn-primary',
+ close: true,
+ click: confirm,
+ },
+ {
+ text: _t("Cancel"),
+ close: true,
+ click: options && options.cancel_callback
+ }
+ ];
+ return new Dialog(owner, _.extend({
+ size: 'medium',
+ buttons: buttons,
+ $content: $content,
+ title: title,
+ }, options)).open({shouldFocusButtons:true});
+};
+
+
+});
diff --git a/muk_web_utils/static/src/js/fields/image.js b/muk_web_utils/static/src/js/fields/image.js
index 288ee32..9b1843f 100644
--- a/muk_web_utils/static/src/js/fields/image.js
+++ b/muk_web_utils/static/src/js/fields/image.js
@@ -55,12 +55,8 @@ fields.FieldBinaryImage.include({
this.nodeOptions.size[0] : this.attrs.width;
var height = this.nodeOptions.size ?
this.nodeOptions.size[1] : this.attrs.height;
- if(width) {
- $wrapper.css('min-width', width + 'px');
- }
- if(height) {
- $wrapper.css('min-height', height + 'px');
- }
+ $wrapper.css('min-width', (width || 50) + 'px');
+ $wrapper.css('min-height', (height || 50) + 'px');
},
});
diff --git a/muk_web_utils/static/src/scss/dropzone.scss b/muk_web_utils/static/src/scss/dropzone.scss
index 2c38aed..83dc51b 100644
--- a/muk_web_utils/static/src/scss/dropzone.scss
+++ b/muk_web_utils/static/src/scss/dropzone.scss
@@ -18,6 +18,7 @@
**********************************************************************************/
.mk_dropzone {
+ position: relative;
&:before {
display:flex;
z-index: 1052;
diff --git a/muk_web_utils/template/assets.xml b/muk_web_utils/template/assets.xml
index dcf7cb1..57e0325 100644
--- a/muk_web_utils/template/assets.xml
+++ b/muk_web_utils/template/assets.xml
@@ -45,6 +45,7 @@
+