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.

32 lines
933 B

  1. /* Copyright 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 ThreadWidget = require('mail.widget.Thread');
  7. ThreadWidget.include({
  8. events: _.defaults({
  9. "click .o_full_expand": "_onClickMessageFullExpand",
  10. }, ThreadWidget.prototype.events),
  11. _onClickMessageFullExpand: 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({
  16. route: "/web/action/load",
  17. params: {
  18. action_id: "mail_full_expand.mail_message_action",
  19. },
  20. })
  21. .done(function(action) {
  22. action.res_id = msg_id;
  23. do_action(action);
  24. });
  25. }
  26. });
  27. });