Commit 0c2dd107 authored by Julien Muchembled's avatar Julien Muchembled

erp5_xhtml_style: add support for portal_status_level

See also commit 8c222bd5
("Switch to class-based completely instead of id-based styling").
parent b1a29b57
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
function successHandler(data) { function successHandler(data) {
generateHistorySelectElement(); generateHistorySelectElement();
transition_message = $('#transition_message'); transition_message = $('.transition_message');
transition_message.css('opacity', 0.0); transition_message.css('opacity', 0.0);
transition_message.html(data); transition_message.html(data);
transition_message.animate({opacity: 1.0}, transition_message.animate({opacity: 1.0},
......
...@@ -134,7 +134,7 @@ body, input, textarea, select, table { ...@@ -134,7 +134,7 @@ body, input, textarea, select, table {
.code, code {font-family: monospace} .code, code {font-family: monospace}
#transition_message, .warning, .error, .important { .transition_message, .warning, .error, .important {
color: #f00; color: #f00;
font-weight: bold; font-weight: bold;
} }
......
...@@ -524,7 +524,7 @@ fieldset.bottom .field .input { ...@@ -524,7 +524,7 @@ fieldset.bottom .field .input {
/* font-size: 90%; */ /* font-size: 90%; */
} }
#transition_message { .transition_message {
margin-left: 1em; margin-left: 1em;
color: #f00; color: #f00;
background-color: inherit; background-color: inherit;
......
...@@ -814,7 +814,6 @@ body[dir="rtl"] .logged_in_as { ...@@ -814,7 +814,6 @@ body[dir="rtl"] .logged_in_as {
/* font-size: 90%; */ /* font-size: 90%; */
} }
#transition_message, /* BBB */
.transition_message { .transition_message {
margin-left: 1em; margin-left: 1em;
color: #f40; color: #f40;
...@@ -823,6 +822,18 @@ body[dir="rtl"] .logged_in_as { ...@@ -823,6 +822,18 @@ body[dir="rtl"] .logged_in_as {
white-space: pre-wrap; white-space: pre-wrap;
} }
.transition_message.transition_message_debug,
.transition_message.transition_message_info {
color: inherit;
}
.transition_message.transition_message_success {
color: green;
}
.transition_message.transition_message_error,
.transition_message.transition_message_fatal {
color: red;
}
#information_area, /* BBB */ #information_area, /* BBB */
.information_area { .information_area {
margin-top: 1em; margin-top: 1em;
......
...@@ -15,6 +15,7 @@ DEPRECATION: ...@@ -15,6 +15,7 @@ DEPRECATION:
dummy python: here.Base_checkUserCanViewERP5XHTMLStyleOrRaise(); dummy python: here.Base_checkUserCanViewERP5XHTMLStyleOrRaise();
global_definitions_macros here/global_definitions/macros; global_definitions_macros here/global_definitions/macros;
subject_list subject_list | python:here.getProperty('subject_list', []) or []; subject_list subject_list | python:here.getProperty('subject_list', []) or [];
portal_status_level request/portal_status_level | nothing;
"> ">
<tal:block metal:use-macro="global_definitions_macros/header_definitions" /> <tal:block metal:use-macro="global_definitions_macros/header_definitions" />
<!DOCTYPE html> <!DOCTYPE html>
...@@ -65,8 +66,8 @@ DEPRECATION: ...@@ -65,8 +66,8 @@ DEPRECATION:
<div tal:content="structure here/acknowledgeable_message_render"/> <div tal:content="structure here/acknowledgeable_message_render"/>
</div> </div>
</tal:block> </tal:block>
<div tal:content="request/portal_status_message | nothing" id="transition_message" <div tal:content="request/portal_status_message | nothing"
class="transition_message"/> tal:attributes="class python:'transition_message' + (' transition_message_' + portal_status_level if portal_status_level else '')" />
<tal:block tal:condition="request/field_errors | nothing"> <tal:block tal:condition="request/field_errors | nothing">
<div id="information_area" class="information_area" i18n:translate="" i18n:domain="ui"> <div id="information_area" class="information_area" i18n:translate="" i18n:domain="ui">
Input data has errors. Please look at the error messages below. Input data has errors. Please look at the error messages below.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment