Browse Source

[ADD]:New Module In Discuss

pull/81/head
SHEREEF PT 8 years ago
parent
commit
fb053f50d8
  1. 27
      send_message_direct_composer/README.rst
  2. 22
      send_message_direct_composer/__init__.py
  3. 39
      send_message_direct_composer/__openerp__.py
  4. BIN
      send_message_direct_composer/static/description/banner.jpg
  5. BIN
      send_message_direct_composer/static/description/cybro_logo.png
  6. BIN
      send_message_direct_composer/static/description/direct_composer_001.png
  7. BIN
      send_message_direct_composer/static/description/direct_composer_002.png
  8. BIN
      send_message_direct_composer/static/description/icon.png
  9. 53
      send_message_direct_composer/static/description/index.html
  10. 38
      send_message_direct_composer/static/src/js/direct_composer.js
  11. 10
      send_message_direct_composer/views/direct_composer.xml

27
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

22
send_message_direct_composer/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Nilmar Shereef(<http://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################

39
send_message_direct_composer/__openerp__.py

@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Nilmar Shereef(<http://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'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,
}

BIN
send_message_direct_composer/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

BIN
send_message_direct_composer/static/description/cybro_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
send_message_direct_composer/static/description/direct_composer_001.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

BIN
send_message_direct_composer/static/description/direct_composer_002.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
send_message_direct_composer/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

53
send_message_direct_composer/static/description/index.html

@ -0,0 +1,53 @@
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">Email Composer Pop-up Box</h2>
<h3 class="oe_slogan">Separate Mail Composer Window for 'Send Message' Button Click</h3>
<h4 class="oe_slogan">Cybrosys Technologies , www.cybrosys.com</h4>
</div>
<div class="oe_row oe_spaced">
<h4><p style="margin-left: 42px;">Major Features:</p></h4>
<ul>
<li style="list-style:none !important;"><span style="color:green;"> &#9733;</span>&nbsp;&nbsp; Full-Featured HTML Editor.</li>
<li style="list-style:none !important;"><span style="color:green;"> &#9733;</span>&nbsp;&nbsp; See Entire Mail in a Window.</li>
<li style="list-style:none !important;"><span style="color:green;"> &#9733;</span>&nbsp;&nbsp; Forget About In-line Plain Textbox.</li>
</ul>
</div>
</section>
<section class="oe_container oe_dark">
<h3 style="margin-top: 42px;" class="oe_slogan">Normal Case:</h3>
<div class="oe_row oe_spaced">
<div class="oe_span12">
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="direct_composer_002.png">
</div>
</div>
</div>
</section>
<section class="oe_container">
<h3 style="margin-top: 42px;" class="oe_slogan">Installed Case:</h3>
<div class="oe_row oe_spaced">
<div class="oe_span12">
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="direct_composer_001.png">
</div>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2>
<div class="oe_slogan" style="margin-top:10px !important;">
<a class="btn btn-primary btn-lg mt8"
style="color: #FFFFFF !important;" href="http://www.cybrosys.com"><i
class="fa fa-envelope"></i> Email </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;"
href="http://www.cybrosys.com/contact/"><i
class="fa fa-phone"></i> Contact Us </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;"
href="http://www.cybrosys.com/odoo-customization-and-installation/"><i
class="fa fa-check-square"></i> Request Customization </a>
</div>
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block">
</section>

38
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'));
}
});
});

10
send_message_direct_composer/views/direct_composer.xml

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="assets_backend" name="mail assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/send_message_direct_composer/static/src/js/direct_composer.js"/>
</xpath>
</template>
</data>
</openerp>
Loading…
Cancel
Save