diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 000a0a0135c..f46a0de5836 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -1556,226 +1556,6 @@ -webkit-border-radius: 2px; border-radius: 2px; } -.openerp .oe_searchview.oe_searchview_open_drawer .oe_searchview_drawer { - display: block; -} -.openerp .oe_searchview .oe_searchview_drawer { - cursor: default; - position: absolute; - z-index: 2; - margin-top: 4px; - top: 100%; - right: -1px; - background-color: white; - min-width: 100%; - display: none; - border: 1px solid #afafb6; - text-align: left; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); - -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); - box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); -} -.openerp .oe_searchview .oe_searchview_drawer > div { - border-top: 1px solid #cccccc; - margin: 0; - padding: 8px; -} -.openerp .oe_searchview .oe_searchview_drawer > div:first-child { - border-top: none; - margin: 0; -} -.openerp .oe_searchview .oe_searchview_drawer h3 { - margin: 8px 4px 4px 0px; - color: #7c7bad; - font-size: 13px; -} -.openerp .oe_searchview .oe_searchview_drawer h4, .openerp .oe_searchview .oe_searchview_drawer h4 * { - margin: 0 0 0 2px; - cursor: pointer; - font-weight: normal; - display: inline-block; -} -.openerp .oe_searchview .oe_searchview_drawer h4:hover, .openerp .oe_searchview .oe_searchview_drawer h4 *:hover { - background-color: #f0f0fa; -} -.openerp .oe_searchview .oe_searchview_drawer h4:before { - content: "▸ "; - color: #a3a3a3; -} -.openerp .oe_searchview .oe_searchview_drawer button { - margin: 4px 0; -} -.openerp .oe_searchview .oe_searchview_drawer .button { - border: none; - background: transparent; - padding: 0 2px; - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; - -moz-border-radius: 0; - -webkit-border-radius: 0; - border-radius: 0; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_section { - display: table; - width: 100%; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_section > div { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; - display: table-cell; - width: 50%; - padding-left: 2px; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_section ul { - margin: 0 8px 8px; - padding: 0; - list-style: none; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_section li { - list-style: none; - padding: 2px 4px 2px 20px; - line-height: 14px; - color: inherit; - cursor: pointer; - position: relative; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_section li.oe_selected:before { - content: "W"; - font-family: "entypoRegular" !important; - font-size: 24px; - font-weight: 300 !important; - color: #a3a3a3; - position: absolute; - left: 4px; - top: -2px; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_section li:hover { - background-color: #f0f0fa; -} -.openerp .oe_searchview .oe_searchview_drawer form { - margin-left: 12px; -} -.openerp .oe_searchview .oe_searchview_drawer form p { - margin: 4px 0; - line-height: 18px; -} -.openerp .oe_searchview .oe_searchview_drawer form button { - margin: 0 0 8px -3px; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom { - padding: 0 8px 8px 8px; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom div { - padding: 0; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom div h4 { - margin: 0; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom form { - display: none; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom li { - cursor: pointer; - position: relative; - line-height: 14px; - padding: 2px 4px 2px 20px; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom li:hover { - background-color: #f0f0fa; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom li button { - position: absolute; - top: 0; - right: 5px; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom label { - font-weight: normal; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_dashboard form { - display: none; - margin-top: 2px; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_advanced form { - display: none; - margin-top: 8px; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_advanced button.oe_add_condition:before { - content: "Z"; - font-family: "entypoRegular" !important; - font-size: 24px; - font-weight: 300 !important; - margin-right: 4px; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_advanced ul { - list-style: none; - padding: 0; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_advanced li { - position: relative; - list-style: none; - margin: 0; - white-space: nowrap; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_advanced li:first-child .searchview_extended_prop_or { - visibility: hidden; - margin-left: -14px; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_advanced .searchview_extended_prop_or { - opacity: 0.5; - margin-left: -14px; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_opened h4:before { - content: "▾ "; - position: relative; - top: -1px; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_opened form { - display: block; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom_delete, .openerp .oe_searchview .oe_searchview_drawer .searchview_extended_delete_prop { - display: inline-block; - width: 12px; - height: 12px; - line-height: 12px; - padding: 1px; - color: #8786b7; - line-height: 8px; - text-align: center; - font-weight: bold; - text-shadow: 0 1px 1px white; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom_delete:hover, .openerp .oe_searchview .oe_searchview_drawer .searchview_extended_delete_prop:hover { - text-decoration: none; - color: white; - background: #8786b7; - text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4); - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - border-radius: 2px; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom_delete { - display: none; - position: absolute; - bottom: 1px; - right: 4px; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom_private:hover .oe_searchview_custom_delete, .openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom_public:hover .oe_searchview_custom_delete { - display: inline-block; -} -.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom_public:after { - content: ","; - font-family: "entypoRegular" !important; - font-size: 22px; - font-weight: 300 !important; - margin: 0 0 0 4px; - padding: 0; -} .openerp .oe_searchview_drawer_container { overflow: auto; } @@ -1804,7 +1584,7 @@ padding-left: 0; } .openerp .oe_searchview_drawer dl { - margin-bottom: 10px; + margin-bottom: 0; } .openerp .oe_searchview_drawer dt { color: #7c7bad; @@ -1866,12 +1646,6 @@ .openerp .oe_searchview_drawer form button { margin: 0 0 8px -3px; } -.openerp .oe_searchview_drawer .oe_searchview_custom dt { - width: 140px; -} -.openerp .oe_searchview_drawer .oe_searchview_custom dd { - margin-left: 145px; -} .openerp .oe_searchview_drawer .oe_searchview_custom form { display: none; } diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 9380af85057..18da5a7098c 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1277,186 +1277,6 @@ $sheet-padding: 16px background: #8786b7 text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4) @include radius(2px) - &.oe_searchview_open_drawer - .oe_searchview_drawer - display: block - - .oe_searchview_drawer - cursor: default - position: absolute - z-index: 2 - // detach drawer from field slightly - margin-top: 4px - top: 100% - right: -1px - background-color: white - min-width: 100% - display: none - border: 1px solid $tag-border - text-align: left - @include radius(4px) - @include box-shadow(0 1px 4px rgba(0,0,0,0.3)) - > div - border-top: 1px solid #ccc - margin: 0 - padding: 8px - > div:first-child - border-top: none - margin: 0 - h3 - margin: 8px 4px 4px 0px - color: $section-title-color - font-size: 13px - h4, h4 * - margin: 0 0 0 2px - cursor: pointer - font-weight: normal - display: inline-block - &:hover - background-color: $hover-background - h4:before - content: "▸ " - color: #a3a3a3 - button - margin: 4px 0 - .button - border: none - background: transparent - padding: 0 2px - @include box-shadow(none) - @include radius(0) - .oe_searchview_section - display: table - width: 100% - > div - @include box-sizing(border) - display: table-cell - width: 50% - padding-left: 2px // Managed padding-left according bootstrap3 - ul - margin: 0 8px 8px - padding: 0 - list-style: none - li - list-style: none - padding: 2px 4px 2px 20px - line-height: 14px - color: inherit - cursor: pointer - position: relative - &.oe_selected:before - content: "W" - font-family: "entypoRegular" !important - font-size: 24px - font-weight: 300 !important - color: #a3a3a3 - position: absolute - left: 4px - top: -2px - // after oe_selected so background color is not overridden - &:hover - background-color: $hover-background - form - margin-left: 12px - p - margin: 4px 0 - line-height: 18px - button - margin: 0 0 8px -3px // Managed margin-left according bootstrap3 - .oe_searchview_custom - padding: 0 8px 8px 8px - div - padding: 0 - h4 - margin: 0 - form - display: none - li - cursor: pointer - position: relative - line-height: 14px - padding: 2px 4px 2px 20px - &:hover - background-color: $hover-background - button - position: absolute - top: 0 - right: 5px - //Customize for searchview label - label - font-weight: normal - //End of Customize - .oe_searchview_dashboard - form - display: none - margin-top: 2px - - .oe_searchview_advanced - form - display: none - margin-top: 8px - button.oe_add_condition:before - content: "Z" - font-family: "entypoRegular" !important - font-size: 24px - font-weight: 300 !important - margin-right: 4px - ul - list-style: none - padding: 0 - li - position: relative - list-style: none - margin: 0 - white-space: nowrap - &:first-child .searchview_extended_prop_or - visibility: hidden - margin-left: -14px - .searchview_extended_prop_or - opacity: 0.5 - margin-left: -14px //Customize 'or' in searchview - .oe_opened - h4:before - content: "▾ " - position: relative - top: -1px - form - display: block - - // delete buttons - .oe_searchview_custom_delete, .searchview_extended_delete_prop - display: inline-block - width: 12px - height: 12px - line-height: 12px - padding: 1px - color: #8786b7 - line-height: 8px - text-align: center - font-weight: bold - text-shadow: 0 1px 1px white - &:hover - text-decoration: none - color: white - background: #8786b7 - text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4) - @include radius(2px) - .oe_searchview_custom_delete - display: none - position: absolute - bottom: 1px - right: 4px - .oe_searchview_custom_private, .oe_searchview_custom_public - &:hover - .oe_searchview_custom_delete - display: inline-block - .oe_searchview_custom_public:after - content: "," - font-family: "entypoRegular" !important - font-size: 22px - font-weight: 300 !important - margin: 0 0 0 4px - padding: 0 .oe_searchview_drawer_container overflow: auto @@ -1480,7 +1300,7 @@ $sheet-padding: 16px .col-md-5 padding-left: 0 dl - margin-bottom: 10px + margin-bottom: 0 dt color: $section-title-color font-size: 13px @@ -1527,10 +1347,6 @@ $sheet-padding: 16px button margin: 0 0 8px -3px // Managed margin-left according bootstrap3 .oe_searchview_custom - dt - width: 140px - dd - margin-left: 145px form display: none li diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index 2c7ef9948b6..b64b7f21080 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -843,19 +843,16 @@ instance.web.SearchViewDrawer = instance.web.Widget.extend({ // build drawer var in_drawer = this.select_for_drawer(); - var self = this; - var second_col = $('