|
@ -7,7 +7,6 @@ odoo.define('web.web_ir_actions_act_window_message', function(require) |
|
|
|
|
|
|
|
|
var ActionManager = require('web.ActionManager'), |
|
|
var ActionManager = require('web.ActionManager'), |
|
|
core = require('web.core'), |
|
|
core = require('web.core'), |
|
|
_ = require('_'), |
|
|
|
|
|
Model = require('web.Model'), |
|
|
Model = require('web.Model'), |
|
|
Dialog = require('web.Dialog'); |
|
|
Dialog = require('web.Dialog'); |
|
|
|
|
|
|
|
@ -33,20 +32,29 @@ odoo.define('web.web_ir_actions_act_window_message', function(require) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var is_html = action.is_html_message === true; |
|
|
|
|
|
var content_properties = {}; |
|
|
|
|
|
|
|
|
|
|
|
if (is_html) { |
|
|
|
|
|
content_properties = { |
|
|
|
|
|
html: action.message, |
|
|
|
|
|
}; |
|
|
|
|
|
} else { |
|
|
|
|
|
content_properties = { |
|
|
|
|
|
text: action.message, |
|
|
|
|
|
css: { |
|
|
|
|
|
'white-space': 'pre-line', |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var dialog = new Dialog( |
|
|
var dialog = new Dialog( |
|
|
this, |
|
|
this, |
|
|
_.extend( |
|
|
_.extend( |
|
|
{ |
|
|
{ |
|
|
size: 'medium', |
|
|
size: 'medium', |
|
|
title: action.title, |
|
|
title: action.title, |
|
|
$content: $('<div>', |
|
|
|
|
|
{ |
|
|
|
|
|
text: action.message, |
|
|
|
|
|
css: { |
|
|
|
|
|
'white-space': 'pre-line', |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
$content: $('<div>', content_properties), |
|
|
buttons: buttons.concat( |
|
|
buttons: buttons.concat( |
|
|
this.ir_actions_act_window_message_get_buttons( |
|
|
this.ir_actions_act_window_message_get_buttons( |
|
|
action, function() { dialog.close() }) |
|
|
action, function() { dialog.close() }) |
|
|