From 7d78741af4797a092caa874c687de0e221a3b743 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 21 Jun 2012 18:38:31 +0200 Subject: [PATCH] [FIX] Override oe_higlight in oe_form_editable mode bzr revid: fme@openerp.com-20120621163831-75qqmcsit353i9o2 --- addons/web/static/src/css/base.css | 61 +++++++++++++++++++++++++++++------ addons/web/static/src/css/base.sass | 28 ++++++++++------ 2 files changed, 71 insertions(+), 18 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 91600f0..0d4912c 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -103,7 +103,7 @@ .openerp h4 { margin: 4px 0; } -.openerp a.button:link, .openerp a.button:visited, .openerp button, .openerp input[type='submit'], .openerp .oe_form_editable button.oe_highlight { +.openerp a.button:link, .openerp a.button:visited, .openerp button, .openerp input[type='submit'] { display: inline-block; border: 1px solid #ababab; color: #404040; @@ -128,7 +128,7 @@ -webkit-font-smoothing: antialiased; outline: none; } -.openerp a.button:hover, .openerp button:hover, .openerp input[type='submit']:hover, .openerp .oe_form_editable button.oe_highlight:hover { +.openerp a.button:hover, .openerp button:hover, .openerp input[type='submit']:hover { background-color: #f6f6f6; background-image: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3)); background-image: -webkit-linear-gradient(top, #f6f6f6, #e3e3e3); @@ -138,7 +138,7 @@ background-image: linear-gradient(to bottom, #f6f6f6, #e3e3e3); cursor: pointer; } -.openerp a.button:focus, .openerp button:focus, .openerp input[type='submit']:focus, .openerp .oe_form_editable button.oe_highlight:focus { +.openerp a.button:focus, .openerp button:focus, .openerp input[type='submit']:focus { border: 1px solid #80bfff; background-color: #f6f6f6; background-image: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3)); @@ -151,16 +151,19 @@ -webkit-box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset; box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset; } -.openerp a.button:active, .openerp a.button.active, .openerp button:active, .openerp button.active, .openerp input[type='submit']:active, .openerp input[type='submit'].active, .openerp .oe_form_editable button.oe_highlight:active { - background: #e3e3e3; - background: -moz-linear-gradient(top, #e3e3e3, #f6f6f6) #1b468f; - background: -webkit-gradient(linear, left top, left bottom, from(#e3e3e3), to(#f6f6f6)) #1b468f; - background: linear-gradient(top, #e3e3e3, #f6f6f6) #1b468f; +.openerp a.button:active, .openerp a.button.active, .openerp button:active, .openerp button.active, .openerp input[type='submit']:active, .openerp input[type='submit'].active { + background-color: #e3e3e3; + background-image: -webkit-gradient(linear, left top, left bottom, from(#e3e3e3), to(#f6f6f6)); + background-image: -webkit-linear-gradient(top, #e3e3e3, #f6f6f6); + background-image: -moz-linear-gradient(top, #e3e3e3, #f6f6f6); + background-image: -ms-linear-gradient(top, #e3e3e3, #f6f6f6); + background-image: -o-linear-gradient(top, #e3e3e3, #f6f6f6); + background-image: linear-gradient(to bottom, #e3e3e3, #f6f6f6); -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } -.openerp a.button.disabled, .openerp button:disabled, .openerp input[type='submit']:disabled, .openerp .oe_form_editable button.oe_highlight:disabled { +.openerp a.button.disabled, .openerp button:disabled, .openerp input[type='submit']:disabled { background: #efefef !important; border: 1px solid #d1d1d1 !important; -moz-box-shadow: none !important; @@ -1523,6 +1526,46 @@ .openerp .oe_form_button_save_dirty:hover { background: #ed6f6a; } +.openerp .oe_form_editable .oe_highlight { + color: #404040; + background: none; +} +.openerp .oe_form_editable button.oe_highlight { + background-color: #efefef; + background-image: -webkit-gradient(linear, left top, left bottom, from(#efefef), to(#d8d8d8)); + background-image: -webkit-linear-gradient(top, #efefef, #d8d8d8); + background-image: -moz-linear-gradient(top, #efefef, #d8d8d8); + background-image: -ms-linear-gradient(top, #efefef, #d8d8d8); + background-image: -o-linear-gradient(top, #efefef, #d8d8d8); + background-image: linear-gradient(to bottom, #efefef, #d8d8d8); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; +} +.openerp .oe_form_editable button.oe_highlight:active { + background-color: #e3e3e3; + background-image: -webkit-gradient(linear, left top, left bottom, from(#e3e3e3), to(#f6f6f6)); + background-image: -webkit-linear-gradient(top, #e3e3e3, #f6f6f6); + background-image: -moz-linear-gradient(top, #e3e3e3, #f6f6f6); + background-image: -ms-linear-gradient(top, #e3e3e3, #f6f6f6); + background-image: -o-linear-gradient(top, #e3e3e3, #f6f6f6); + background-image: linear-gradient(to bottom, #e3e3e3, #f6f6f6); + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} +.openerp .oe_form_editable button.oe_highlight:hover { + background-color: #f6f6f6; + background-image: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3)); + background-image: -webkit-linear-gradient(top, #f6f6f6, #e3e3e3); + background-image: -moz-linear-gradient(top, #f6f6f6, #e3e3e3); + background-image: -ms-linear-gradient(top, #f6f6f6, #e3e3e3); + background-image: -o-linear-gradient(top, #f6f6f6, #e3e3e3); + background-image: linear-gradient(to bottom, #f6f6f6, #e3e3e3); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; +} .openerp .oe_form_invisible { display: none !important; } diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index f4e4f57..35e1d08 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -144,7 +144,7 @@ $colour4: #8a89ba margin: 4px 0 // }}} // Button style {{{ - a.button:link, a.button:visited, button, input[type='submit'], .oe_form_editable button.oe_highlight + a.button:link, a.button:visited, button, input[type='submit'] display: inline-block border: 1px solid #ababab color: #404040 @@ -159,23 +159,20 @@ $colour4: #8a89ba -webkit-font-smoothing: antialiased outline: none - a.button:hover, button:hover, input[type='submit']:hover, .oe_form_editable button.oe_highlight:hover + a.button:hover, button:hover, input[type='submit']:hover @include vertical-gradient(#f6f6f6, #e3e3e3) cursor: pointer - a.button:focus, button:focus, input[type='submit']:focus, .oe_form_editable button.oe_highlight:focus + a.button:focus, button:focus, input[type='submit']:focus border: 1px solid #80bfff @include vertical-gradient(#f6f6f6, #e3e3e3) @include box-shadow((0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, .8) inset)) - a.button:active, a.button.active, button:active, button.active, input[type='submit']:active, input[type='submit'].active, .oe_form_editable button.oe_highlight:active - background: #e3e3e3 - background: -moz-linear-gradient(top, #e3e3e3, #f6f6f6) #1b468f - background: -webkit-gradient(linear, left top, left bottom, from(#e3e3e3), to(#f6f6f6)) #1b468f - background: linear-gradient(top, #e3e3e3, #f6f6f6) #1b468f + a.button:active, a.button.active, button:active, button.active, input[type='submit']:active, input[type='submit'].active + @include vertical-gradient(#e3e3e3, #f6f6f6) @include box-shadow(none) - a.button.disabled, button:disabled, input[type='submit']:disabled, .oe_form_editable button.oe_highlight:disabled + a.button.disabled, button:disabled, input[type='submit']:disabled background: #efefef !important border: 1px solid #d1d1d1 !important @include box-shadow(none !important) @@ -1216,6 +1213,19 @@ $colour4: #8a89ba font-weight: bold &:hover background: #ED6F6A + .oe_form_editable + .oe_highlight + color: #404040 + background: none + button.oe_highlight + @include vertical-gradient(#efefef, #d8d8d8) + @include box-shadow((0 1px 2px rgba(0, 0, 0, .1), 0 1px 1px rgba(255, 255, 255, .8) inset)) + button.oe_highlight:active + @include vertical-gradient(#e3e3e3, #f6f6f6) + @include box-shadow(none) + button.oe_highlight:hover + @include vertical-gradient(#f6f6f6, #e3e3e3) + @include box-shadow((0 1px 2px rgba(0, 0, 0, .1), 0 1px 1px rgba(255, 255, 255, .8) inset)) .oe_form_invisible display: none !important .oe_form_readonly -- 1.7.10.4