summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorFabien Meghazi <fme@openerp.com>2012-06-07 16:07:25 +0200
committerFabien Meghazi <fme@openerp.com>2012-06-07 16:07:25 +0200
commit45fc9bba23f03479e8ada9276c830d4a8fa9a308 (patch)
tree8ec7c1062c31d2b1abd44e321f277fd987d58e80 /addons/web/static/src
parent53d4fcad83ffed5cc79a89a88f8e5e721fca0a9d (diff)
[ADD] Add classname for Form's invisible widgets
bzr revid: fme@openerp.com-20120607140725-qrvmvd7bvgdwnxos
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/css/base.css12
-rw-r--r--addons/web/static/src/css/base.sass16
-rw-r--r--addons/web/static/src/js/view_form.js6
3 files changed, 15 insertions, 19 deletions
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css
index 2988c0aa634..5ef56c69797 100644
--- a/addons/web/static/src/css/base.css
+++ b/addons/web/static/src/css/base.css
@@ -1629,7 +1629,7 @@
font-weight: bold;
color: #b33630;
}
-.openerp .oe_form_readonly header.oe_form_topbar_hifirst button:first-child, .openerp .oe_form_readonly button.oe_form_button_hi {
+.openerp .oe_form_readonly button.oe_form_button_hi {
color: white;
background: #dc5f59;
background: -moz-linear-gradient(#dc5f59, #b33630);
@@ -1639,7 +1639,7 @@
-webkit-box-shadow: none;
-box-shadow: none;
}
-.openerp .oe_form_readonly header.oe_form_topbar_hifirst button:first-child:hover, .openerp .oe_form_readonly button.oe_form_button_hi:hover {
+.openerp .oe_form_readonly button.oe_form_button_hi:hover {
background: #df6b66;
background: -moz-linear-gradient(#df6b66, #bf3a33);
background: -webkit-gradient(linear, left top, left bottom, from(#df6b66), to(#bf3a33));
@@ -1667,13 +1667,13 @@
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
-.openerp .oe_form_editable .oe_form_editable_hidden {
+.openerp .oe_form_invisible {
display: none;
}
-.openerp .oe_form_readonly .oe_form_readonly_hidden {
+.openerp .oe_form_editable .oe_form_editable_hidden {
display: none;
}
-.openerp .oe_form_readonly .oe_form_field:empty {
+.openerp .oe_form_readonly .oe_form_readonly_hidden, .openerp .oe_form_readonly .oe_form_field:empty {
display: none;
}
.openerp .oe_form .oe_form_field_text {
@@ -1723,7 +1723,7 @@
}
.openerp .oe_form .oe_form_field {
width: 100%;
- display: inline-block !important;
+ display: inline-block;
padding: 2px 2px 2px 0px;
line-height: 18px;
}
diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass
index df40fc8d151..c4d9d565b8b 100644
--- a/addons/web/static/src/css/base.sass
+++ b/addons/web/static/src/css/base.sass
@@ -1287,7 +1287,7 @@ $colour4: #8a89ba
font-weight: bold
color: #b33630
.oe_form_readonly
- header.oe_form_topbar_hifirst button:first-child, button.oe_form_button_hi
+ button.oe_form_button_hi
color: white
background: #DC5F59
background: -moz-linear-gradient(#DC5F59, #B33630)
@@ -1296,7 +1296,7 @@ $colour4: #8a89ba
-moz-box-shadow: none
-webkit-box-shadow: none
-box-shadow: none
- header.oe_form_topbar_hifirst button:first-child:hover, button.oe_form_button_hi:hover
+ button.oe_form_button_hi:hover
background: #DF6B66
background: -moz-linear-gradient( #DF6B66, #BF3A33)
background: -webkit-gradient(linear, left top, left bottom, from( #DF6B66), to( #BF3A33))
@@ -1321,12 +1321,13 @@ $colour4: #8a89ba
@include box-shadow(0 0 10px rgba(0,0,0,0.3))
// }}}
// FormView.layout {{{
- .oe_form_editable .oe_form_editable_hidden
- display: none
- .oe_form_readonly .oe_form_readonly_hidden
+ .oe_form_invisible
display: none
- .oe_form_readonly .oe_form_field:empty
+ .oe_form_editable .oe_form_editable_hidden
display: none
+ .oe_form_readonly
+ .oe_form_readonly_hidden, .oe_form_field:empty
+ display: none
.oe_form
.oe_form_field_text
width: 100%
@@ -1376,8 +1377,7 @@ $colour4: #8a89ba
resize: vertical
.oe_form_field
width: 100%
- // Using !important because jQuery's $.fn.show() will set display to 'inline' for spans
- display: inline-block !important
+ display: inline-block
padding: 2px 2px 2px 0px
line-height: 18px
input
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index a2d065e40b4..b8ea69d1c35 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -1410,11 +1410,7 @@ instance.web.form.InvisibilityChangerMixin = {
this._check_visibility();
},
_check_visibility: function() {
- if (this.get("effective_invisible")) {
- this.$element.hide();
- } else {
- this.$element.show();
- }
+ this.$element.toggleClass('oe_form_invisible', this.get("effective_invisible"));
},
};