From 977db823c7c84e9edc7c8cf8384eb9cf47275b3a Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Fri, 8 Apr 2016 14:53:34 +0200 Subject: [REF] web: stop duplicating web Avoid duplicating web addon in enterprise by extracting a common basis. Enterprise features stay in enterprise, but use that common basis. Mainly: - JS refactoring and linting - Conversion of .sass into .less split into multiple files - Templates cleaning and DOM simplification - Re-generation of web.pot, and update of .po files --- addons/web/static/src/less/webclient.less | 89 +++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 addons/web/static/src/less/webclient.less (limited to 'addons/web/static/src/less/webclient.less') diff --git a/addons/web/static/src/less/webclient.less b/addons/web/static/src/less/webclient.less new file mode 100644 index 00000000000..2f9878fbdc3 --- /dev/null +++ b/addons/web/static/src/less/webclient.less @@ -0,0 +1,89 @@ +// ------------------------------------------------------------------ +// Typography +// ------------------------------------------------------------------ +a { + color: @odoo-brand-optional; + &:hover { + color: darken(@odoo-brand-optional, 10%); + } +} + +// ------------------------------------------------------------------ +// General +// ------------------------------------------------------------------ +.o_web_client { + background-color: @odoo-webclient-background-color; +} +.o_text_overflow { + .o-text-overflow(); +} +.o_hidden { + display: none!important; +} + +// ------------------------------------------------------------------ +// Misc. widgets +// ------------------------------------------------------------------ +@notification-error-bg-color: #F16567; +@notification-info-bg-color: #FCFBEA; +.o_notification_manager { + width: 300px; + max-width: 100%; + + .o-position-absolute(@navbar-height, 0px); + z-index: 1100; // Bootstrap modal z-index is 1050 + + .o_notification { + padding: 0; + margin: 5px 0 0 0; + + opacity: 0; + + background-color: @notification-info-bg-color; + box-shadow: 0px 0px 5px 1px @odoo-main-text-color; + + position: relative; + .o_close { + .o-position-absolute(5px, 5px); + color: rgba(0, 0, 0, 0.3); + text-decoration: none; + } + + .o_notification_title { + .o-flex-display(); + .o-align-items(center); + + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + padding: 10px 10px 10px 20px; + + font-weight: bold; + + .o_icon { + display: inline-block; + margin-right: 20px; + color: rgba(0, 0, 0, 0.3); + } + } + + .o_notification_content { + padding: 10px; + } + + &.o_error { + color: white; + background-color: @notification-error-bg-color; + } + } +} + +// Buttons +.o_icon_button { + background-color: transparent; + border: 0; + padding: 0; + outline: none; +} + +.oe_highlight { + .btn-primary; +} -- cgit v1.2.3