diff --git a/.travis.yml b/.travis.yml index ab42685..f8916d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,3 +32,6 @@ script: after_success: coveralls + +notifications: + email: false diff --git a/mail_all/doc/changelog.rst b/mail_all/doc/changelog.rst index e2b0277..5f35720 100644 --- a/mail_all/doc/changelog.rst +++ b/mail_all/doc/changelog.rst @@ -1,5 +1,5 @@ -Changelog -========= +Updates +======= `1.0.0` ------- diff --git a/mail_all/tests/__init__.py b/mail_all/tests/__init__.py index 11b0967..cadc614 100644 --- a/mail_all/tests/__init__.py +++ b/mail_all/tests/__init__.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- -import test_js +from . import test_js diff --git a/mail_all/tests/test_js.py b/mail_all/tests/test_js.py index 993913d..6259570 100644 --- a/mail_all/tests/test_js.py +++ b/mail_all/tests/test_js.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import openerp.tests diff --git a/mail_archives/tests/__init__.py b/mail_archives/tests/__init__.py index 11b0967..cadc614 100644 --- a/mail_archives/tests/__init__.py +++ b/mail_archives/tests/__init__.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- -import test_js +from . import test_js diff --git a/mail_archives/tests/test_js.py b/mail_archives/tests/test_js.py index 46f9b3a..af6d4ce 100644 --- a/mail_archives/tests/test_js.py +++ b/mail_archives/tests/test_js.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import openerp.tests diff --git a/mail_attachment_popup/README.rst b/mail_attachment_popup/README.rst new file mode 100644 index 0000000..fd96743 --- /dev/null +++ b/mail_attachment_popup/README.rst @@ -0,0 +1,29 @@ +=================== + Popup Attachments +=================== + + The module opens attached mail images in popup. + +Credits +======= + +Contributors +------------ +* Dinar Gabbasov + +Sponsors +-------- +* `IT-Projects LLC `_ + +Further information +=================== + +Demo: http://runbot.it-projects.info/demo/mail-addons/9.0 + +HTML Description: https://apps.odoo.com/apps/modules/9.0/mail_attachment_popup/ + +Usage instructions: ``_ + +Changelog: ``_ + +Tested on Odoo 9.0 021878f9c41c6d652abf345c3c5537fe92f8bc5b diff --git a/mail_attachment_popup/__init__.py b/mail_attachment_popup/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/mail_attachment_popup/__openerp__.py b/mail_attachment_popup/__openerp__.py new file mode 100644 index 0000000..57c56d0 --- /dev/null +++ b/mail_attachment_popup/__openerp__.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +{ + "name": """Popup Attachments""", + "summary": """Open attached mail images in popup""", + "category": "Extra Tools", + "version": "1.0.0", + "images": ['images/popup_image.png'], + + "author": "IT-Projects LLC, Dinar Gabbasov", + 'website': "https://twitter.com/gabbasov_dinar", + "license": "GPL-3", + "price": "50.0", + "currency": "EUR", + + "depends": [ + "mail", + ], + "external_dependencies": {"python": [], "bin": []}, + "data": [ + "views/mail_attachment_popup_template.xml", + ], + "qweb": [ + "static/src/xml/mail_attachment_popup.xml", + ], + + "installable": True, + 'auto_install': False, +} diff --git a/mail_attachment_popup/doc/changelog.rst b/mail_attachment_popup/doc/changelog.rst new file mode 100644 index 0000000..cc3dd23 --- /dev/null +++ b/mail_attachment_popup/doc/changelog.rst @@ -0,0 +1,9 @@ +.. _changelog: + +Updates +======= + +`1.0.0` +------- + +- Init version diff --git a/mail_attachment_popup/doc/index.rst b/mail_attachment_popup/doc/index.rst new file mode 100644 index 0000000..70b614f --- /dev/null +++ b/mail_attachment_popup/doc/index.rst @@ -0,0 +1,16 @@ +=================== + Popup Attachments +=================== + +Installation +============ + +* `Install `__ this module in a usual way + +Usage +===== + +* Open 'Messaging' menu +* Find any message with image in attachments +* Click on the image +* Browser opens image in popup instead of downloading it diff --git a/mail_attachment_popup/images/popup_image.png b/mail_attachment_popup/images/popup_image.png new file mode 100644 index 0000000..97af8e9 Binary files /dev/null and b/mail_attachment_popup/images/popup_image.png differ diff --git a/mail_attachment_popup/static/description/attach_image.png b/mail_attachment_popup/static/description/attach_image.png new file mode 100644 index 0000000..c403348 Binary files /dev/null and b/mail_attachment_popup/static/description/attach_image.png differ diff --git a/mail_attachment_popup/static/description/download.png b/mail_attachment_popup/static/description/download.png new file mode 100644 index 0000000..9ad68ef Binary files /dev/null and b/mail_attachment_popup/static/description/download.png differ diff --git a/mail_attachment_popup/static/description/icon.png b/mail_attachment_popup/static/description/icon.png new file mode 100644 index 0000000..79f7d8f Binary files /dev/null and b/mail_attachment_popup/static/description/icon.png differ diff --git a/mail_attachment_popup/static/description/index.html b/mail_attachment_popup/static/description/index.html new file mode 100644 index 0000000..07a7ffa --- /dev/null +++ b/mail_attachment_popup/static/description/index.html @@ -0,0 +1,84 @@ +
+
+
+

Popup Attachments

+

Open attachments in popup

+
+
+
+ +
+
+
+

+ The module allows to open attachments (images) in popup. It is convenient if you want to display them only without downloading. +

+
+
+
+ +
+
+
+

How it works

+
+
+
+ +
+
+
+

+ Go to "Messaging" menu and open email that contains image(s) in attachment. +

+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+

+ Click on the image and see how popup is appear. +

+
+
+
+ +
+
+
+

+ Moreover, you can download it to your device by clicking on the "Download" button if needed. +

+
+
+
+ +
+
+
+
+ +
+
+
+

Need our service?

+

Contact us by email or fill out request form

+ +
+
+
diff --git a/mail_attachment_popup/static/description/popup.png b/mail_attachment_popup/static/description/popup.png new file mode 100644 index 0000000..674baf7 Binary files /dev/null and b/mail_attachment_popup/static/description/popup.png differ diff --git a/mail_attachment_popup/static/lib/js/jquery.arcticmodal.js b/mail_attachment_popup/static/lib/js/jquery.arcticmodal.js new file mode 100644 index 0000000..0b66194 --- /dev/null +++ b/mail_attachment_popup/static/lib/js/jquery.arcticmodal.js @@ -0,0 +1,429 @@ +/* + + arcticModal — jQuery plugin + Version: 0.3 + Author: Sergey Predvoditelev (sergey.predvoditelev@gmail.com) + Company: Arctic Laboratory (http://arcticlab.ru/) + + Docs & Examples: http://arcticlab.ru/arcticmodal/ + + */ +(function($) { + + + var default_options = { + + type: 'html', // ajax или html + content: '', + url: '', + ajax: {}, + ajax_request: null, + + closeOnEsc: true, + closeOnOverlayClick: true, + + clone: false, + + overlay: { + block: undefined, + tpl: '
', + css: { + backgroundColor: '#000', + opacity: .6 + } + }, + + container: { + block: undefined, + tpl: '
' + }, + + wrap: undefined, + body: undefined, + + errors: { + tpl: '
', + autoclose_delay: 2000, + ajax_unsuccessful_load: 'Error' + }, + + openEffect: { + type: 'fade', + speed: 400 + }, + closeEffect: { + type: 'fade', + speed: 400 + }, + + beforeOpen: $.noop, + afterOpen: $.noop, + beforeClose: $.noop, + afterClose: $.noop, + afterLoading: $.noop, + afterLoadingOnShow: $.noop, + errorLoading: $.noop + + }; + + + var modalID = 0; + var modals = $([]); + + + var utils = { + + + // Определяет произошло ли событие e вне блока block + isEventOut: function(blocks, e) { + var r = true; + $(blocks).each(function() { + if ($(e.target).get(0)==$(this).get(0)) r = false; + if ($(e.target).closest('HTML', $(this).get(0)).length==0) r = false; + }); + return r; + } + + + }; + + + var modal = { + + + // Возвращает элемент, которым был вызван плагин + getParentEl: function(el) { + var r = $(el); + if (r.data('arcticmodal')) return r; + r = $(el).closest('.arcticmodal-container').data('arcticmodalParentEl'); + if (r) return r; + return false; + }, + + + // Переход + transition: function(el, action, options, callback) { + callback = callback==undefined ? $.noop : callback; + switch (options.type) { + case 'fade': + action=='show' ? el.fadeIn(options.speed, callback) : el.fadeOut(options.speed, callback); + break; + case 'none': + action=='show' ? el.show() : el.hide(); + callback(); + break; + } + }, + + + // Подготвка содержимого окна + prepare_body: function(D, $this) { + + // Обработчик закрытия + $('.arcticmodal-close', D.body).unbind('click.arcticmodal').bind('click.arcticmodal', function() { + $this.arcticmodal('close'); + return false; + }); + + }, + + + // Инициализация элемента + init_el: function($this, options) { + var D = $this.data('arcticmodal'); + if (D) return; + + D = options; + modalID++; + D.modalID = modalID; + + // Overlay + D.overlay.block = $(D.overlay.tpl); + D.overlay.block.css(D.overlay.css); + + // Container + D.container.block = $(D.container.tpl); + + // BODY + D.body = $('.arcticmodal-container_i2', D.container.block); + if (options.clone) { + D.body.html($this.clone(true)); + } else { + $this.before('