[FIX] mass_mailing_custom_unsubscribe: Added the changes to avoid the linter warnings

pull/599/head
Carlos Roca 2020-08-28 10:09:05 +02:00
parent 28db3c57d0
commit 80eb0afecd
2 changed files with 134 additions and 122 deletions

View File

@ -8,7 +8,7 @@ odoo.define("mass_mailing_custom_unsubscribe.contact_tour",
// Allow to know if an element is required
$.extend($.expr[':'], {
propRequired: function(element, index, matches) {
propRequired: function (element) {
return $(element).prop("required");
},
});
@ -27,7 +27,8 @@ odoo.define("mass_mailing_custom_unsubscribe.contact_tour",
},
{
content: "Switch to not interested reason",
trigger: ".radio:contains(\"I'm not interested\") :radio:not(:checked)",
trigger:
".radio:contains(\"I'm not interested\") :radio:not(:checked)",
extra_trigger: "[name='details']:propRequired",
},
{
@ -74,20 +75,28 @@ odoo.define("mass_mailing_custom_unsubscribe.contact_tour",
},
{
content: "Successfully unsubscribed",
trigger: "#subscription_info:contains('Your changes have been saved.')",
trigger:
"#subscription_info:contains('Your changes have been saved.')",
},
{
content: "Subscribe again to list 0",
trigger: "body:not(:has(#unsubscribe_form #custom_div_feedback:visible)):has(.alert-success) li:contains('test list 0') input:not(:checked)",
// eslint-disable-next-line no-multi-str
trigger:"body:not(:has(#unsubscribe_form #custom_div_feedback\
:visible)):has(.alert-success) li:contains('test list 0') \
input:not(:checked)",
},
{
content: "Update subscriptions 3nd time",
trigger: "#unsubscribe_form:not(:has(.js_unsubscription_reason:visible)) :submit",
// eslint-disable-next-line no-multi-str
trigger:"#unsubscribe_form:not(\
:has(.js_unsubscription_reason:visible)) :submit",
},
{
content: "Successfully subscribed",
trigger: "#subscription_info:contains('Your changes have been saved.')",
trigger:
"#subscription_info:contains('Your changes have been saved.')",
},
]
);
});
}
);

View File

@ -8,7 +8,7 @@ odoo.define("mass_mailing_custom_unsubscribe.partner_tour",
// Allow to know if an element is required
$.extend($.expr[':'], {
propRequired: function(element, index, matches) {
propRequired: function (element) {
return $(element).prop("required");
},
});
@ -27,7 +27,9 @@ odoo.define("mass_mailing_custom_unsubscribe.partner_tour",
},
{
content: "Switch to not interested reason",
trigger: ".radio:contains(\"I'm not interested\") :radio:not(:checked)",
// eslint-disable-next-line no-multi-str
trigger: ".radio:contains(\"I'm not interested\") \
:radio:not(:checked)",
extra_trigger: "[name='details']:propRequired",
},
{
@ -42,4 +44,5 @@ odoo.define("mass_mailing_custom_unsubscribe.partner_tour",
},
]
);
});
}
);