Browse Source

publish muk_web_preview - 12.0

pull/115/head
MuK IT GmbH 5 years ago
parent
commit
8a7d7c6acf
  1. 2
      muk_web_preview/__manifest__.py
  2. 8
      muk_web_preview/static/src/js/fields/image.js
  3. 2
      muk_web_preview/static/src/scss/image.scss

2
muk_web_preview/__manifest__.py

@ -23,7 +23,7 @@
{
"name": "MuK Preview",
"summary": """File Preview Dialog""",
"version": "12.0.3.0.1",
"version": "12.0.3.0.2",
"category": "Extra Tools",
"license": "LGPL-3",
"website": "http://www.mukit.at",

8
muk_web_preview/static/src/js/fields/image.js

@ -39,8 +39,14 @@ fields.FieldBinaryImage.include({
events: _.extend({}, fields.FieldBinaryImage.prototype.events, {
'click img': 'onImagePreview',
}),
_render: function () {
this._super.apply(this, arguments);
if (this.nodeOptions.no_preview) {
this.$('.mk_field_image_wrapper').addClass('mk_no_preview');
}
},
onImagePreview: function () {
if (this.mode === "readonly") {
if (this.mode === "readonly" && !this.nodeOptions.no_preview) {
var last_update = this.recordData.__last_update;
var unique = last_update && field_utils.format.datetime(last_update);
var binary_url = session.url('/web/content', {

2
muk_web_preview/static/src/scss/image.scss

@ -20,7 +20,7 @@
*
**********************************************************************************/
.o_field_widget.o_field_image {
.o_field_widget.o_field_image .mk_field_image_wrapper:not(.mk_no_preview) {
&:hover {
cursor: zoom-in;
}

Loading…
Cancel
Save