You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
852 B

  1. /* © 2014-2015 Grupo ESOC <http://www.grupoesoc.es>
  2. * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  3. */
  4. odoo.define('mail_full_expand.expand', function (require) {
  5. "use strict";
  6. var Thread = require('mail.ChatThread');
  7. Thread.include({
  8. events: _.defaults({
  9. "click .o_full_expand": "on_message_full_expand",
  10. }, Thread.prototype.events),
  11. on_message_full_expand: function(event) {
  12. // Get the action data and execute it to open the full view
  13. var do_action = this.do_action,
  14. msg_id = $(event.currentTarget).data('message-id');
  15. this.rpc("/web/action/load", {
  16. "action_id": "mail_full_expand.mail_message_action",
  17. })
  18. .done(function(action) {
  19. action.res_id = msg_id;
  20. do_action(action);
  21. });
  22. }
  23. });
  24. });