Browse Source

publish muk_web_preview - 12.0

pull/68/head
MuK IT GmbH 6 years ago
parent
commit
9a743a215a
  1. 2
      muk_web_preview/__manifest__.py
  2. 3
      muk_web_preview/static/src/js/preview/content.js
  3. 5
      muk_web_preview/static/src/js/widgets/dialog.js
  4. 5
      muk_web_preview/static/src/js/widgets/manager.js

2
muk_web_preview/__manifest__.py

@ -20,7 +20,7 @@
{
"name": "MuK Preview",
"summary": """File Preview Dialog""",
"version": "12.0.2.3.9",
"version": "12.0.2.3.10",
"category": "Extra Tools",
"license": "AGPL-3",
"website": "http://www.mukit.at",

3
muk_web_preview/static/src/js/preview/content.js

@ -51,6 +51,9 @@ var AbstractPreviewContent = Widget.extend({
renderPreviewContent: function() {
return $.when();
},
adaptResize: function() {
return;
}
printable: false,
downloadable: false,
contentActions: function() {

5
muk_web_preview/static/src/js/widgets/dialog.js

@ -49,21 +49,20 @@ var PreviewDialog = PreviewManager.extend({
this.$el.remove();
return this._super.apply(this, arguments);
},
_renderPreview: function (element) {
this._super.apply(this, arguments);
this.$('.modal-title').text(this.activeFile.filename || "Preview");
},
_onDestroy: function () {
this.destroy();
},
_onMaximizeClick: function(event) {
this.$('.mk_preview_dialog').addClass("mk_preview_maximize");
this._notifyPreviewResize();
},
_onMinimizeClick: function(event) {
this.$('.mk_preview_dialog').removeClass("mk_preview_maximize");
this._notifyPreviewResize();
},
});

5
muk_web_preview/static/src/js/widgets/manager.js

@ -200,6 +200,11 @@ var PreviewManager = Widget.extend({
}
this.activePreview = undefined;
},
_notifyPreviewResize: function () {
if (this.activePreview) {
this.activePreview.adaptResize();
}
},
_onPreviousClick: function(event) {
if (this.index > 0) {
this.index = this.index - 1;

Loading…
Cancel
Save