diff --git a/send_message_direct_composer/README.rst b/send_message_direct_composer/README.rst new file mode 100644 index 000000000..80955b65c --- /dev/null +++ b/send_message_direct_composer/README.rst @@ -0,0 +1,27 @@ +Send Message Direct Composer v9 +=============================== + +This module open a pop-up email composer, when pressing the 'Send a message' button. + +Installation +============ + +Just select it from available modules to install it, there is no need to extra installations. + +Configuration +============= + +Nothing to configure. + +Features +======== + +* When click the button, use a full-featured HTML editor to compose emails instead of in-line plain textbox. +* No need for excess mouse clicks + +Credits +======= +Developer: Aswani pc @ cybrosys +Guidance: Nilmar Shereef @ cybrosys, shereef@cybrosys.in + + diff --git a/send_message_direct_composer/__init__.py b/send_message_direct_composer/__init__.py new file mode 100644 index 000000000..b8b509efd --- /dev/null +++ b/send_message_direct_composer/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2009-TODAY Cybrosys Technologies(). +# Author: Nilmar Shereef() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## diff --git a/send_message_direct_composer/__openerp__.py b/send_message_direct_composer/__openerp__.py new file mode 100644 index 000000000..fc199077c --- /dev/null +++ b/send_message_direct_composer/__openerp__.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2009-TODAY Cybrosys Technologies(). +# Author: Nilmar Shereef() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +{ + 'name': "Email Composer Pop-up", + 'version': '9.0.1.0.0', + 'summary': """Open a Pop-up Email Composer for All 'Send Message' """, + 'description': """Open a Pop-up Email Composer for All 'Send Message' """, + 'category': 'Discuss', + 'author': "Cybrosys Techno Solutions", + 'company': "Cybrosys Techno Solutions", + 'website': "http://www.cybrosys.com", + 'depends': ['base', 'mail'], + 'data': ['views/direct_composer.xml'], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/send_message_direct_composer/static/description/banner.jpg b/send_message_direct_composer/static/description/banner.jpg new file mode 100644 index 000000000..4cfc798fb Binary files /dev/null and b/send_message_direct_composer/static/description/banner.jpg differ diff --git a/send_message_direct_composer/static/description/cybro_logo.png b/send_message_direct_composer/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/send_message_direct_composer/static/description/cybro_logo.png differ diff --git a/send_message_direct_composer/static/description/direct_composer_001.png b/send_message_direct_composer/static/description/direct_composer_001.png new file mode 100644 index 000000000..ca66bf0c7 Binary files /dev/null and b/send_message_direct_composer/static/description/direct_composer_001.png differ diff --git a/send_message_direct_composer/static/description/direct_composer_002.png b/send_message_direct_composer/static/description/direct_composer_002.png new file mode 100644 index 000000000..3a0c37af4 Binary files /dev/null and b/send_message_direct_composer/static/description/direct_composer_002.png differ diff --git a/send_message_direct_composer/static/description/icon.png b/send_message_direct_composer/static/description/icon.png new file mode 100644 index 000000000..f3aca2b08 Binary files /dev/null and b/send_message_direct_composer/static/description/icon.png differ diff --git a/send_message_direct_composer/static/description/index.html b/send_message_direct_composer/static/description/index.html new file mode 100644 index 000000000..ada1cda82 --- /dev/null +++ b/send_message_direct_composer/static/description/index.html @@ -0,0 +1,53 @@ +
+
+

Email Composer Pop-up Box

+

Separate Mail Composer Window for 'Send Message' Button Click

+

Cybrosys Technologies , www.cybrosys.com

+
+
+

Major Features:

+
    +
  •    Full-Featured HTML Editor.
  • +
  •    See Entire Mail in a Window.
  • +
  •    Forget About In-line Plain Textbox.
  • +
+
+
+ +
+

Normal Case:

+
+
+
+ +
+
+
+
+ +
+

Installed Case:

+
+
+
+ +
+
+
+
+ +
+

Need Any Help?

+ + +
\ No newline at end of file diff --git a/send_message_direct_composer/static/src/js/direct_composer.js b/send_message_direct_composer/static/src/js/direct_composer.js new file mode 100644 index 000000000..97768e95f --- /dev/null +++ b/send_message_direct_composer/static/src/js/direct_composer.js @@ -0,0 +1,38 @@ +odoo.define('mail.send_message_direct_composer', function (require) { +"use strict"; + var chat_manager = require('mail.chat_manager'); + var chatter = require('mail.Chatter'); + chatter.include({ + on_open_composer_new_message: function () { + var self = this; + this.on_open_composer(); + }, + on_open_composer: function() { + var self = this; + var context = {}; + + if (self.context.default_model && self.context.default_res_id) { + context.default_model = self.context.default_model; + context.default_res_id = self.context.default_res_id; + } + + self.do_action({ + type: 'ir.actions.act_window', + res_model: 'mail.compose.message', + view_mode: 'form', + view_type: 'form', + views: [[false, 'form']], + target: 'new', + context: context, + }, { + on_close: function() { + self.trigger('need_refresh'); + var parent = self.getParent(); + chat_manager.get_messages({model: parent.model, res_id: parent.res_id}); + }, + }).then(self.trigger.bind(self, 'close_composer')); + + } + + }); +}); \ No newline at end of file diff --git a/send_message_direct_composer/views/direct_composer.xml b/send_message_direct_composer/views/direct_composer.xml new file mode 100644 index 000000000..a1b353ef9 --- /dev/null +++ b/send_message_direct_composer/views/direct_composer.xml @@ -0,0 +1,10 @@ + + + +