Skip to content

Commit eaf5990

Browse files
[FIX] attachment_preview: pre-commit fixes
- Fix author string concatenation in manifest - Remove unnecessary eslint-disable-next-line no-undef comments - Fix trailing whitespace Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1bc3a01 commit eaf5990

File tree

1,920 files changed

+372855
-11
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,920 files changed

+372855
-11
lines changed

attachment_preview/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"name": "Preview attachments",
66
"version": "19.0.1.0.0",
7-
"author": "Therp BV," "Onestein," "Odoo Community Association (OCA)",
7+
"author": "Therp BV,Onestein,Odoo Community Association (OCA)",
88
"website": "https://github.com/OCA/knowledge",
99
"license": "AGPL-3",
1010
"summary": "Preview attachments supported by Viewer.js",

attachment_preview/static/src/js/attachmentPreviewWidget.esm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class AttachmentPreviewWidget extends Component {
3535

3636
_onPopoutClick() {
3737
if (!this.attachments[this.state.activeIndex]) return;
38-
// eslint-disable-next-line no-undef
38+
3939
window.open(this.attachments[this.state.activeIndex].previewUrl);
4040
}
4141

attachment_preview/static/src/js/mail_core/attachment_list.esm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {patch} from "@web/core/utils/patch";
44

55
patch(AttachmentList.prototype, {
66
_onPreviewAttachment(attachment) {
7-
// eslint-disable-next-line no-undef
7+
88
var $target = $(event.currentTarget);
99
var split_screen = $target.attr("data-target") !== "new";
1010
showPreview(

attachment_preview/static/src/js/utils.esm.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ export function getUrl(
2525
var url = "";
2626
if (attachment_url) {
2727
if (attachment_url.slice(0, 21) === "/web/static/lib/pdfjs") {
28-
// eslint-disable-next-line no-undef
28+
2929
url = (window.location.origin || "") + attachment_url;
3030
} else {
3131
url =
32-
// eslint-disable-next-line no-undef
32+
3333
(window.location.origin || "") +
3434
"/attachment_preview/static/lib/ViewerJS/index.html" +
3535
"?type=" +
@@ -38,13 +38,13 @@ export function getUrl(
3838
encodeURIComponent(attachment_title) +
3939
"&zoom=automatic" +
4040
"#" +
41-
// eslint-disable-next-line no-undef
41+
4242
attachment_url.replace(window.location.origin, "");
4343
}
4444
return url;
4545
}
4646
url =
47-
// eslint-disable-next-line no-undef
47+
4848
(window.location.origin || "") +
4949
"/attachment_preview/static/lib/ViewerJS/index.html" +
5050
"?type=" +
@@ -74,7 +74,7 @@ export function showPreview(
7474
attachment_info_list,
7575
});
7676
} else {
77-
// eslint-disable-next-line no-undef
77+
7878
window.open(
7979
getUrl(
8080
attachment_id,

attachment_preview/static/src/js/viewerjs_tweaks.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
// OpenERP's context
66
(function (original_Viewer) {
77
"use strict";
8-
// eslint-disable-next-line no-undef
8+
99
window.Viewer = function (plugin, parameters) {
1010
if (!plugin) {
11-
// eslint-disable-next-line no-undef, no-alert
11+
// eslint-disable-next-line no-alert
1212
alert("Unsupported file type");
1313
}
1414
return original_Viewer(plugin, parameters);
1515
};
16-
// eslint-disable-next-line no-undef
16+
1717
})(window.Viewer);

node_modules/.bin/acorn

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/eslint

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/js-yaml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/node-which

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/prettier

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)