forked from Techsystech/web
[FIX] black, isort, prettier
parent
dd8d753845
commit
572e7fdf16
|
@ -1,7 +1,7 @@
|
|||
.support-branding-submit-form {
|
||||
display: inline;
|
||||
margin: 0;
|
||||
width: 100%
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.support-statement {
|
||||
|
|
|
@ -10,7 +10,7 @@ odoo.define("support_branding.CrashManager", function (require) {
|
|||
var CrashManager = require("web.CrashManager").CrashManager;
|
||||
var session = require("web.session");
|
||||
var core = require("web.core");
|
||||
var Wysiwyg = require('web_editor.wysiwyg.root');
|
||||
var Wysiwyg = require("web_editor.wysiwyg.root");
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
|
@ -86,12 +86,12 @@ odoo.define("support_branding.CrashManager", function (require) {
|
|||
var $statement = $(".support-statement");
|
||||
var $description = $(".support-desc");
|
||||
var $button = $(".support-btn");
|
||||
var $use_html_ck = $('#use_html_checker');
|
||||
var $use_html_ck = $("#use_html_checker");
|
||||
var $close_btn = $(".close");
|
||||
var $body = $(".sp-body");
|
||||
var $header = $form.parents(".modal-dialog").find(".modal-header");
|
||||
var $footer = $form.parents(".modal-dialog").find(".modal-footer");
|
||||
// self.wysiwyg.attachTo($description);
|
||||
// Self.wysiwyg.attachTo($description);
|
||||
|
||||
$statement.prepend(inputs);
|
||||
if (self.support_cp_email) {
|
||||
|
@ -108,20 +108,17 @@ odoo.define("support_branding.CrashManager", function (require) {
|
|||
.parents(".modal")
|
||||
.find(".modal-body")
|
||||
.css("max-height", "70vh");
|
||||
$use_html_ck.on('change', function (){
|
||||
$use_html_ck.on("change", function () {
|
||||
if (this.checked) {
|
||||
if (!self.wysiwyg.isDestroyed())
|
||||
self.wysiwyg.attachTo($description);
|
||||
else {
|
||||
if (self.wysiwyg.isDestroyed()) {
|
||||
self.wysiwyg = new Wysiwyg(self, {});
|
||||
self.wysiwyg.attachTo($description);
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else self.wysiwyg.attachTo($description);
|
||||
} else {
|
||||
self.wysiwyg.destroy();
|
||||
$('.support-statement').append($description);
|
||||
if ($description.is(':hidden'))
|
||||
$description.css({'display': 'block'});
|
||||
$(".support-statement").append($description);
|
||||
if ($description.is(":hidden"))
|
||||
$description.css({display: "block"});
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -133,10 +130,11 @@ odoo.define("support_branding.CrashManager", function (require) {
|
|||
return;
|
||||
}
|
||||
ev.preventDefault();
|
||||
var error_code = '';
|
||||
var desc = self.wysiwyg.$editor &&
|
||||
self.wysiwyg.$editor.length ?
|
||||
self.wysiwyg.getValue() : $description.val();
|
||||
var error_code = "";
|
||||
var desc =
|
||||
self.wysiwyg.$editor && self.wysiwyg.$editor.length
|
||||
? self.wysiwyg.getValue()
|
||||
: $description.val();
|
||||
desc = jQuery("<div/>").text(desc);
|
||||
error_code = jQuery("<pre/>").text(body);
|
||||
var params = {
|
||||
|
@ -144,8 +142,9 @@ odoo.define("support_branding.CrashManager", function (require) {
|
|||
auto_delete: true,
|
||||
email_to: self.support_cp_email,
|
||||
subject: subject,
|
||||
body_html: jQuery("<div/>").append(
|
||||
desc, error_code.html()).text(),
|
||||
body_html: jQuery("<div/>")
|
||||
.append(desc, error_code.html())
|
||||
.text(),
|
||||
};
|
||||
self._rpc({
|
||||
model: "mail.mail",
|
||||
|
|
|
@ -9,14 +9,17 @@
|
|||
method="get"
|
||||
>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox"
|
||||
name="use_html_checker" id="use_html_checker"/>
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="checkbox"
|
||||
name="use_html_checker"
|
||||
id="use_html_checker"
|
||||
/>
|
||||
<label class="form-check-label" for="use_html_checker">
|
||||
Use HTML Editor
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
class="support-statement oe_form_field_text oe_form_required">
|
||||
<div class="support-statement oe_form_field_text oe_form_required">
|
||||
<textarea
|
||||
name="description"
|
||||
autocomplete="off"
|
||||
|
@ -41,7 +44,7 @@
|
|||
<div class="user-heading">
|
||||
<h3>
|
||||
Technical Support By
|
||||
<t t-esc="widget.support_cp_name"/>
|
||||
<t t-esc="widget.support_cp_name" />
|
||||
</h3>
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
|
@ -64,7 +67,7 @@
|
|||
t-attr-href="mailto:{{widget.support_cp_email}}"
|
||||
style="text-decoration: underline;"
|
||||
>
|
||||
<t t-esc="widget.support_cp_email"/>
|
||||
<t t-esc="widget.support_cp_email" />
|
||||
</a>
|
||||
</small>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue