diff --git a/addons/mail/static/src/js/document_viewer.js b/addons/mail/static/src/js/document_viewer.js index e2c03e24d6a..9affc3f41cf 100644 --- a/addons/mail/static/src/js/document_viewer.js +++ b/addons/mail/static/src/js/document_viewer.js @@ -13,7 +13,6 @@ var DocumentViewer = Widget.extend({ template: "DocumentViewer", events: { 'click .o_download_btn': '_onDownload', - 'click .o_split_btn': '_onSplitPDF', 'click .o_viewer_img': '_onImageClicked', 'click .o_viewer_video': '_onVideoClicked', 'click .move_next': '_onNext', @@ -44,7 +43,7 @@ var DocumentViewer = Widget.extend({ init: function (parent, attachments, activeAttachmentID) { this._super.apply(this, arguments); this.attachment = _.filter(attachments, function (attachment) { - var match = attachment.type == 'url' ? attachment.url.match("(youtu|.png|.jpg|.gif)") : attachment.mimetype.match("(image|video|application/pdf|text)"); + var match = attachment.type === 'url' ? attachment.url.match("(youtu|.png|.jpg|.gif)") : attachment.mimetype.match("(image|video|application/pdf|text)"); if (match) { attachment.type = match[1]; @@ -67,6 +66,7 @@ var DocumentViewer = Widget.extend({ } }); this.activeAttachment = _.findWhere(attachments, {id: activeAttachmentID}); + this.modelName = 'ir.attachment'; this._reset(); }, /** @@ -325,24 +325,6 @@ var DocumentViewer = Widget.extend({ this._zoom(scale); } }, - /** - * @private - * @param {MouseEvent} e - */ - _onSplitPDF: function (e) { - e.stopPropagation(); - var self = this; - var indices = $("input[name=Indices]").val(); - var remainder = $("input[type=checkbox][name=remainder]").is(":checked"); - this._rpc({ - model: 'ir.attachment', - method: 'split_pdf', - args: [this.activeAttachment.id, indices, remainder], - }).always(function () { - self.trigger_up('document_viewer_attachment_changed'); - self.destroy(); - }); - }, /** * @private * @param {MouseEvent} e diff --git a/addons/mail/static/src/scss/composer.scss b/addons/mail/static/src/scss/composer.scss index bd9307bdd2f..aa5131b0de5 100644 --- a/addons/mail/static/src/scss/composer.scss +++ b/addons/mail/static/src/scss/composer.scss @@ -485,27 +485,6 @@ $o-mail-attachment-margin: 5px; .o_image_caption { bottom: 20%; position: absolute; - - .o_split_pdf_area { - background-color: #3a3a3a; - margin: 5px; - padding: 6px; - margin-left: 50px; - - .o_split_btn { - vertical-align: baseline; - } - - .o_page_number_input { - width: 13%; - color: black; - display: inline; - } - - .o_remainder_input { - vertical-align: middle; - } - } } } diff --git a/addons/mail/static/src/xml/thread.xml b/addons/mail/static/src/xml/thread.xml index fcfe8ba7de2..914168306b8 100644 --- a/addons/mail/static/src/xml/thread.xml +++ b/addons/mail/static/src/xml/thread.xml @@ -35,6 +35,7 @@ -->
+
@@ -42,11 +43,6 @@ - - - - - ×
@@ -55,12 +51,12 @@
- Viewer -