diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 8a2f1169e0a..b5276c982d6 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -215,8 +215,8 @@ .openerp .oe_bold { font-weight: bold; } -.openerp .oe_inline  { - width: auto; +.openerp .oe_inline { + width: auto !important; } .openerp .oe_highlight { color: white; @@ -258,12 +258,21 @@ -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, 0.2); box-shadow: 0 0 1px rgba(0, 0, 0, 0.2); } +.openerp .oe_title { + width: 55%; +} +.openerp .oe_title:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} .openerp .oe_button_box { width: 200px; text-align: center; } .openerp .oe_avatar { - float: left; margin: 0 16px 0 0; } .openerp .oe_avatar img { @@ -355,34 +364,23 @@ .openerp .ui-tabs-hide { display: none; } -.openerp .oe_dropdown_toggle:after { - width: 0; - height: 0; - display: inline-block; - content: "&darr"; - text-indent: -99999px; - vertical-align: top; - border-left: 4px solid transparent; - border-right: 4px solid transparent; - border-top: 4px solid white; - filter: alpha(opacity=50); - opacity: 0.5; - margin-top: 7px; - margin-left: 6px; - border-top-color: #404040; +.openerp .oe_dropdown, .openerp .oe_dropdown_hover, .openerp .oe_dropdown_toggle { + position: relative; + cursor: pointer; +} +.openerp .oe_dropdown_hover:hover .oe_dropdown_menu, .openerp .oe_dropdown_menu.oe_opened { + display: block; } .openerp .oe_dropdown_menu { display: none; position: absolute; top: 28px; - left: 0px; - padding: 8px; + z-index: 1; border: 1px solid #afafb6; - min-width: 120px; - overflow-x: hidden; - z-index: 900; - text-align: left; background: white; + padding: 8px; + min-width: 120px; + text-align: left; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; @@ -390,14 +388,13 @@ -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_dropdown_menu li { - position: relative; +.openerp .oe_dropdown_menu > li { list-style-type: none; float: none; display: block; - background-color: none; + position: relative; } -.openerp .oe_dropdown_menu li:hover { +.openerp .oe_dropdown_menu > li:hover { background-color: #f0f0fa; background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0fa), to(#eeeef6)); background-image: -webkit-linear-gradient(top, #f0f0fa, #eeeef6); @@ -409,27 +406,65 @@ -webkit-box-shadow: none; box-shadow: none; } -.openerp .oe_dropdown_menu li a { +.openerp .oe_dropdown_menu > li > a { + white-space: nowrap; display: block; padding: 3px 6px; - clear: both; - font-weight: normal; - line-height: 14px; color: #4c4c4c; text-decoration: none; - cursor: pointer; } -.openerp .oe_dropdown_menu li a:hover { +.openerp .oe_dropdown_menu > li > a:hover { text-decoration: none; } -.openerp .oe_dropdown_menu li .oe_sidebar_delete_item { +.openerp .oe_dropdown_arrow:after { + width: 0; + height: 0; + display: inline-block; + content: "&darr"; + text-indent: -99999px; + vertical-align: top; + margin-top: 8px; + margin-left: 4px; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid #404040; + filter: alpha(opacity=50); + opacity: 0.5; +} +.openerp .oe_sidebar { + white-space: nowrap; +} +.openerp .oe_sidebar .oe_dropdown_menu .oe_sidebar_add_attachment { + height: 20px; + cursor: pointer; + padding-left: 6px; + margin-top: 6px; +} +.openerp .oe_sidebar .oe_dropdown_menu .oe_sidebar_add_attachment span { + font-weight: bold; +} +.openerp .oe_sidebar .oe_dropdown_menu .oe_sidebar_add_attachment .oe_hidden_input_file { + width: 200px; +} +.openerp .oe_sidebar .oe_dropdown_menu .oe_sidebar_add_attachment:hover { + background-color: #f0f0fa; + background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0fa), to(#eeeef6)); + background-image: -webkit-linear-gradient(top, #f0f0fa, #eeeef6); + background-image: -moz-linear-gradient(top, #f0f0fa, #eeeef6); + background-image: -ms-linear-gradient(top, #f0f0fa, #eeeef6); + background-image: -o-linear-gradient(top, #f0f0fa, #eeeef6); + background-image: linear-gradient(to bottom, #f0f0fa, #eeeef6); + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} +.openerp .oe_sidebar .oe_dropdown_menu li .oe_sidebar_delete_item { position: absolute; - bottom: 1px; + top: 4px; right: 4px; display: none; width: 12px; height: 12px; - line-height: 12px; padding: 1px; color: #8786b7; line-height: 8px; @@ -437,7 +472,7 @@ font-weight: bold; text-shadow: 0 1px 1px white; } -.openerp .oe_dropdown_menu li .oe_sidebar_delete_item:hover { +.openerp .oe_sidebar .oe_dropdown_menu li .oe_sidebar_delete_item:hover { text-decoration: none; color: white; background: #8786b7; @@ -446,38 +481,9 @@ -webkit-border-radius: 2px; border-radius: 2px; } -.openerp .oe_dropdown_menu li:hover .oe_sidebar_delete_item { +.openerp .oe_sidebar .oe_dropdown_menu li:hover .oe_sidebar_delete_item { display: inline-block; } -.openerp .oe_sidebar { - white-space: nowrap; -} -.openerp .oe_sidebar .oe_dropdown_menu li { - padding-right: 16px; -} -.openerp .oe_sidebar .oe_sidebar_add_attachment { - cursor: pointer; - padding-left: 6px; - margin-top: 6px; -} -.openerp .oe_sidebar .oe_sidebar_add_attachment span { - font-weight: bold; -} -.openerp .oe_sidebar .oe_sidebar_add_attachment .oe_hidden_input_file { - width: 200px; -} -.openerp .oe_sidebar .oe_sidebar_add_attachment:hover { - background-color: #f0f0fa; - background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0fa), to(#eeeef6)); - background-image: -webkit-linear-gradient(top, #f0f0fa, #eeeef6); - background-image: -moz-linear-gradient(top, #f0f0fa, #eeeef6); - background-image: -ms-linear-gradient(top, #f0f0fa, #eeeef6); - background-image: -o-linear-gradient(top, #f0f0fa, #eeeef6); - background-image: linear-gradient(to bottom, #f0f0fa, #eeeef6); - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; -} .openerp .oe_loading { display: none; z-index: 100; @@ -678,10 +684,7 @@ background-image: -o-linear-gradient(top, #646060, #262626); background-image: linear-gradient(to bottom, #646060, #262626); } -.openerp .oe_topbar .oe_topbar_item li { - float: left; -} -.openerp .oe_topbar .oe_topbar_item li a { +.openerp .oe_topbar .oe_topbar_item { display: block; padding: 5px 10px 7px; line-height: 20px; @@ -690,7 +693,7 @@ vertical-align: top; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); } -.openerp .oe_topbar .oe_topbar_item li a:hover { +.openerp .oe_topbar .oe_topbar_item:hover { background: #303030; color: white; -moz-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; @@ -716,20 +719,40 @@ .openerp .oe_topbar .oe_topbar_avatar { vertical-align: top; } -.openerp .oe_topbar .oe_dropdown_toggle:after { - width: 0; - height: 0; - display: inline-block; - content: "&darr"; - text-indent: -99999px; - vertical-align: top; - margin-top: 8px; - margin-left: 4px; - border-left: 4px solid transparent; - border-right: 4px solid transparent; +.openerp .oe_topbar .oe_dropdown_arrow:after { border-top: 4px solid white; - filter: alpha(opacity=50); - opacity: 0.5; +} +.openerp .oe_topbar .oe_dropdown_menu { + background: #333333; + background: rgba(37, 37, 37, 0.9); + border-color: #999999; + border-color: rgba(0, 0, 0, 0.2); + border-style: solid; + border-width: 0 1px 1px; + -moz-border-radius: 0 0 6px 6px; + -webkit-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; + -webkit-background-clip: padding-box; + -moz-background-clip: padding-box; + background-clip: padding-box; +} +.openerp .oe_topbar .oe_dropdown_menu li { + float: none; +} +.openerp .oe_topbar .oe_dropdown_menu li a { + color: #eeeeee; +} +.openerp .oe_topbar .oe_dropdown_menu li a:hover { + background-color: #292929; + background-image: -webkit-gradient(linear, left top, left bottom, from(#292929), to(#191919)); + background-image: -webkit-linear-gradient(top, #292929, #191919); + background-image: -moz-linear-gradient(top, #292929, #191919); + background-image: -ms-linear-gradient(top, #292929, #191919); + background-image: -o-linear-gradient(top, #292929, #191919); + background-image: linear-gradient(to bottom, #292929, #191919); + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; } .openerp .oe_leftbar { display: none; @@ -778,66 +801,8 @@ list-style-type: none; float: left; } -.openerp .oe_user_menu .oe_dropdown { - position: relative; -} -.openerp .oe_user_menu .oe_dropdown_options { - float: left; - background: #333333; - background: rgba(37, 37, 37, 0.9); - display: none; - position: absolute; - top: 32px; +.openerp .oe_user_menu .oe_dropdown_menu { right: -1px; - border: 0; - z-index: 900; - margin-left: 0; - margin-right: 0; - padding: 6px 0; - zoom: 1; - border-color: #999999; - border-color: rgba(0, 0, 0, 0.2); - border-style: solid; - border-width: 0 1px 1px; - -moz-border-radius: 0 0 6px 6px; - -webkit-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; - -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); - -webkit-background-clip: padding-box; - -moz-background-clip: padding-box; - background-clip: padding-box; -} -.openerp .oe_user_menu .oe_dropdown_options li { - float: none; - display: block; - background-color: none; -} -.openerp .oe_user_menu .oe_dropdown_options li a { - white-space: nowrap; - display: block; - padding: 4px 15px; - clear: both; - font-weight: normal; - line-height: 18px; - color: #eeeeee; -} -.openerp .oe_user_menu .oe_dropdown_options li a:hover { - background-color: #292929; - background-image: -webkit-gradient(linear, left top, left bottom, from(#292929), to(#191919)); - background-image: -webkit-linear-gradient(top, #292929, #191919); - background-image: -moz-linear-gradient(top, #292929, #191919); - background-image: -ms-linear-gradient(top, #292929, #191919); - background-image: -o-linear-gradient(top, #292929, #191919); - background-image: linear-gradient(to bottom, #292929, #191919); - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; -} -.openerp .oe_user_menu .oe_dropdown_options li hr { - border-top: 1px solid #999999; - border-bottom: 0; } .openerp .oe_systray > div { float: left; @@ -846,61 +811,6 @@ .openerp .oe_systray { float: right; } -.openerp .oe_systray .oe_systray_dropdown { - position: relative; -} -.openerp .oe_systray .oe_systray_dropdown:hover .oe_systray_dropdown_options { - display: block; -} -.openerp .oe_systray .oe_systray_dropdown_options { - background: #333333; - background: rgba(37, 37, 37, 0.9); - display: none; - position: absolute; - z-index: 900; - border: 0; - margin-left: 0; - margin-right: 0; - padding: 6px 0; - border-color: #999999; - border-color: rgba(0, 0, 0, 0.2); - border-style: solid; - border-width: 0 1px 1px; - -moz-border-radius: 0 0 6px 6px; - -webkit-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; - -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); - -webkit-background-clip: padding-box; - -moz-background-clip: padding-box; - background-clip: padding-box; -} -.openerp .oe_systray .oe_systray_dropdown_options li { - float: none; - display: block; - background-color: none; -} -.openerp .oe_systray .oe_systray_dropdown_options li a { - display: block; - padding: 4px 15px; - clear: both; - font-weight: normal; - line-height: 18px; - color: #eeeeee; -} -.openerp .oe_systray .oe_systray_dropdown_options li a:hover { - background-color: #292929; - background-image: -webkit-gradient(linear, left top, left bottom, from(#292929), to(#191919)); - background-image: -webkit-linear-gradient(top, #292929, #191919); - background-image: -moz-linear-gradient(top, #292929, #191919); - background-image: -ms-linear-gradient(top, #292929, #191919); - background-image: -o-linear-gradient(top, #292929, #191919); - background-image: linear-gradient(to bottom, #292929, #191919); - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; -} .openerp .oe_menu { float: left; padding: 0; @@ -933,24 +843,6 @@ -webkit-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; } -.openerp .oe_menu_more_container { - position: relative; -} -.openerp .oe_menu_more_container .oe_menu_more { - position: absolute; - padding: 0; - background-color: #646060; - z-index: 1; - border: 1px solid black; - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; -} -.openerp .oe_menu_more_container .oe_menu_more li { - float: none; -} -.openerp .oe_menu_more_container .oe_menu_more li a { - white-space: nowrap; -} .openerp .oe_secondary_menu_section { font-weight: bold; margin-left: 8px; @@ -1185,6 +1077,9 @@ padding: 2px; content: "i"; } +.openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_form:after { + content: "m"; +} .openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_graph:after { font-family: "mnmliconsRegular" !important; font-size: 21px; @@ -1631,9 +1526,6 @@ .openerp .oe_form_invisible { display: none !important; } -.openerp .oe_form_editable .oe_edit_only { - display: none !important; -} .openerp .oe_form_readonly .oe_edit_only, .openerp .oe_form_readonly .oe_form_field:empty { display: none !important; } @@ -1663,16 +1555,6 @@ max-width: 960px; margin: 0 auto; } -.openerp .oe_form_title { - width: 55%; -} -.openerp .oe_form_title:after { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; -} .openerp ul.oe_form_steps { height: 30px; padding: 0; @@ -1838,7 +1720,7 @@ .openerp .oe_form .oe_form_field_selection select { width: inherit; } -.openerp .oe_form .oe_form_sheet textarea { +.openerp .oe_form .oe_form_field_text.oe_inline, .openerp .oe_form .oe_form_field_text.oe_inline > textarea { width: 500px; } .openerp .oe_form .oe_form_field_float input { @@ -1924,6 +1806,7 @@ } .openerp .oe_form .oe_form_field_boolean { padding-top: 4px; + width: auto; } .openerp .oe_form .oe_form_field_many2manytags .text-wrap { width: 100% !important; @@ -2072,9 +1955,6 @@ .openerp .oe-listview-content { width: 100%; } -.openerp .oe-listview-content td:first-child, .openerp .oe-listview-content th:first-child { - width: 17px; -} .openerp .oe-listview-content td:first-child:after, .openerp .oe-listview-content th:first-child:after { border-width: 0; } diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 5eb61ac5f9e..4db214a7a48 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -220,8 +220,8 @@ $colour4: #8a89ba color: #888 .oe_bold font-weight: bold - .oe_inline  - width: auto + .oe_inline + width: auto !important .oe_highlight color: white background: #DC5F59 @@ -235,11 +235,18 @@ $colour4: #8a89ba @include vertical-gradient(#DF6B66, #BF3A33) //@include vertical-gradient(lighten(#dc5f59, 3%), lighten(#b33630, 3%)) @include box-shadow(0 0 1px rgba(0, 0, 0, 0.2)) + .oe_title + width: 55% + .oe_title:after + content: "." + display: block + height: 0 + clear: both + visibility: hidden .oe_button_box width: 200px text-align: center .oe_avatar - float: left margin: 0 16px 0 0 img height: 50px @@ -311,92 +318,91 @@ $colour4: #8a89ba display: none // }}} // Dropdown {{{ - .oe_dropdown_toggle:after + .oe_dropdown, .oe_dropdown_hover, .oe_dropdown_toggle + position: relative + cursor: pointer + .oe_dropdown_hover:hover .oe_dropdown_menu, .oe_dropdown_menu.oe_opened + display: block + .oe_dropdown_menu + display: none + position: absolute + top: 28px + z-index: 1 + border: 1px solid #afafb6 + background: white + padding: 8px + min-width: 120px + text-align: left + @include radius(3px) + @include box-shadow(0 1px 4px rgba(0,0,0,0.3)) + > li + &:hover + @include vertical-gradient(#f0f0fa, #eeeef6) + @include box-shadow(none) + list-style-type: none + float: none + display: block + position: relative + > a + white-space: nowrap + display: block + padding: 3px 6px + color: #4c4c4c + text-decoration: none + &:hover + text-decoration: none + .oe_dropdown_arrow:after width: 0 height: 0 display: inline-block content: "&darr" text-indent: -99999px vertical-align: top + margin-top: 8px + margin-left: 4px border-left: 4px solid transparent border-right: 4px solid transparent - border-top: 4px solid white + border-top: 4px solid#404040 @include opacity(0.5) - margin-top: 7px - margin-left: 6px - border-top-color: #404040 - .oe_dropdown_menu - display: none - position: absolute - top: 28px - left: 0px - padding: 8px - border: 1px solid #afafb6 - min-width: 120px - overflow-x: hidden - z-index: 900 - text-align: left - background: white - @include radius(3px) - @include box-shadow(0 1px 4px rgba(0,0,0,0.3)) - li - &:hover - @include vertical-gradient(#f0f0fa, #eeeef6) - @include box-shadow(none) - position: relative - list-style-type: none - float: none - display: block - background-color: none - a - display: block - padding: 3px 6px - clear: both - font-weight: normal - line-height: 14px - color: #4c4c4c - text-decoration: none - cursor: pointer - &:hover - text-decoration: none - .oe_sidebar_delete_item - position: absolute - bottom: 1px - right: 4px - display: none - 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) - &:hover - .oe_sidebar_delete_item - display: inline-block + .oe_sidebar white-space: nowrap - .oe_dropdown_menu li - padding-right: 16px - .oe_sidebar_add_attachment - cursor: pointer - padding-left: 6px - margin-top: 6px - span - font-weight: bold - .oe_hidden_input_file - width: 200px - &:hover - @include vertical-gradient(#f0f0fa, #eeeef6) - @include box-shadow(none) + .oe_dropdown_menu + .oe_sidebar_add_attachment + height: 20px + cursor: pointer + padding-left: 6px + margin-top: 6px + span + font-weight: bold + .oe_hidden_input_file + width: 200px + &:hover + @include vertical-gradient(#f0f0fa, #eeeef6) + @include box-shadow(none) + li + .oe_sidebar_delete_item + position: absolute + top: 4px + right: 4px + display: none + width: 12px + 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) + &:hover + .oe_sidebar_delete_item + display: inline-block // }}} // Loading {{{ .oe_loading @@ -552,20 +558,17 @@ $colour4: #8a89ba border-top: solid 1px #d3d3d3 @include vertical-gradient(#646060, #262626) .oe_topbar_item - li - float: left - a - display: block - padding: 5px 10px 7px - line-height: 20px - height: 20px - color: #eee - vertical-align: top - text-shadow: 0 1px 1px rgba(0,0,0,0.2) - &:hover - background: #303030 - color: white - @include box-shadow(0 1px 2px rgba(255,255,255,0.3) inset) + display: block + padding: 5px 10px 7px + line-height: 20px + height: 20px + color: #eee + vertical-align: top + text-shadow: 0 1px 1px rgba(0,0,0,0.2) + &:hover + background: #303030 + color: white + @include box-shadow(0 1px 2px rgba(255,255,255,0.3) inset) .oe_active background: #303030 font-weight: bold @@ -579,19 +582,24 @@ $colour4: #8a89ba @include radius(3px) .oe_topbar_avatar vertical-align: top - .oe_dropdown_toggle:after - width: 0 - height: 0 - display: inline-block - content: "&darr" - text-indent: -99999px - vertical-align: top - margin-top: 8px - margin-left: 4px - border-left: 4px solid transparent - border-right: 4px solid transparent + .oe_dropdown_arrow:after border-top: 4px solid white - @include opacity(0.5) + .oe_dropdown_menu + background: #333 + background: rgba(37,37,37,0.9) + border-color: #999 + border-color: rgba(0, 0, 0, 0.2) + border-style: solid + border-width: 0 1px 1px + @include radius(0 0 6px 6px) + @include background-clip() + li + float: none + a + color: #eee + &:hover + @include vertical-gradient(#292929, #191919) + @include box-shadow(none) // }}} // Webclient.leftbar {{{ .oe_leftbar @@ -635,48 +643,8 @@ $colour4: #8a89ba li list-style-type: none float: left - .oe_dropdown - position: relative - - .oe_dropdown_options - float: left - background: #333 - background: rgba(37,37,37,0.9) - display: none - position: absolute - top: 32px + .oe_dropdown_menu right: -1px - border: 0 - z-index: 900 - margin-left: 0 - margin-right: 0 - padding: 6px 0 - zoom: 1 - border-color: #999 - border-color: rgba(0, 0, 0, 0.2) - border-style: solid - border-width: 0 1px 1px - @include radius(0 0 6px 6px) - @include box-shadow(0 1px 4px rgba(0,0,0,0.3)) - @include background-clip() - li - float: none - display: block - background-color: none - a - white-space: nowrap - display: block - padding: 4px 15px - clear: both - font-weight: normal - line-height: 18px - color: #eee - &:hover - @include vertical-gradient(#292929, #191919) - @include box-shadow(none) - hr - border-top: 1px solid #999 - border-bottom: 0 // }}} // Systray {{{ .oe_systray > div @@ -684,42 +652,6 @@ $colour4: #8a89ba padding: 0 4px 0 4px .oe_systray float: right - - .oe_systray_dropdown - position: relative - .oe_systray_dropdown:hover .oe_systray_dropdown_options - display: block - .oe_systray_dropdown_options - background: #333 - background: rgba(37,37,37,0.9) - display: none - position: absolute - z-index: 900 - border: 0 - margin-left: 0 - margin-right: 0 - padding: 6px 0 - border-color: #999 - border-color: rgba(0, 0, 0, 0.2) - border-style: solid - border-width: 0 1px 1px - @include radius(0 0 6px 6px) - @include box-shadow(0 1px 4px rgba(0,0,0,0.3)) - @include background-clip() - li - float: none - display: block - background-color: none - a - display: block - padding: 4px 15px - clear: both - font-weight: normal - line-height: 18px - color: #eee - &:hover - @include vertical-gradient(#292929, #191919) - @include box-shadow(none) // }}} // Menu {{{ .oe_menu @@ -745,20 +677,6 @@ $colour4: #8a89ba font-weight: bold color: white @include box-shadow(0 1px 2px rgba(255,255,255,0.3) inset) - .oe_menu_more_container - position: relative - .oe_menu_more - position: absolute - padding: 0 - background-color: #646060 - z-index: 1 - border: 1px solid black - border-bottom-left-radius: 5px - border-bottom-right-radius: 5px - li - float: none - a - white-space: nowrap .oe_secondary_menu_section font-weight: bold margin-left: 8px @@ -943,6 +861,8 @@ $colour4: #8a89ba .oe_vm_switch_list:after, .oe_vm_switch_tree:after padding: 2px content: "i" + .oe_vm_switch_form:after + content: "m" .oe_vm_switch_graph:after font-family: "mnmliconsRegular" !important font-size: 21px @@ -1298,8 +1218,6 @@ $colour4: #8a89ba background: #ED6F6A .oe_form_invisible display: none !important - .oe_form_editable .oe_edit_only - display: none !important .oe_form_readonly .oe_edit_only, .oe_form_field:empty display: none !important @@ -1322,14 +1240,6 @@ $colour4: #8a89ba min-width: 650px max-width: 960px margin: 0 auto - .oe_form_title - width: 55% - .oe_form_title:after - content: "." - display: block - height: 0 - clear: both - visibility: hidden ul.oe_form_steps height: 30px padding: 0 @@ -1468,7 +1378,7 @@ $colour4: #8a89ba .oe_form_field_text textarea, .oe_form_field_selection select width: inherit - .oe_form_sheet textarea + .oe_form_field_text.oe_inline, .oe_form_field_text.oe_inline > textarea width: 500px .oe_form_field_float input width: 100px @@ -1528,6 +1438,7 @@ $colour4: #8a89ba white-space: nowrap .oe_form_field_boolean padding-top: 4px + width: auto .oe_form_field_many2manytags .text-wrap width: 100% !important @@ -1664,7 +1575,6 @@ $colour4: #8a89ba .oe-listview-content width: 100% td:first-child, th:first-child - width: 17px &:after border-width: 0 > thead diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index baa4c412fe7..140b9082c35 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -582,10 +582,6 @@ instance.web.Menu = instance.web.Widget.extend({ this.renderElement(); this.limit_entries(); this.$secondary_menus.html(QWeb.render("Menu.secondary", { widget : this })); - this.$element.on('click', 'a.oe_menu_more_link', function() { - self.$element.find('.oe_menu_more').toggle(); - return false; - }); this.$element.on('click', 'a[data-menu]', this.on_menu_click); this.$secondary_menus.on('click', 'a[data-menu]', this.on_menu_click); // Hide second level submenus @@ -606,16 +602,12 @@ instance.web.Menu = instance.web.Widget.extend({ $index.after($more); $more.find('.oe_menu_more').append($index.next().nextAll()); } - this.do_hide_more(); }, auto_limit_entries: function() { // TODO: auto detect overflow and bind window on resize var width = $(window).width(); return Math.floor(width / 125); }, - do_hide_more: function() { - this.$element.find('.oe_menu_more').hide(); - }, /** * Opens a given menu by id, as if a user had browsed to that menu by hand * except does not trigger any event on the way @@ -677,7 +669,6 @@ instance.web.Menu = instance.web.Widget.extend({ menu_click: function(id, needaction) { if (!id) { return; } - this.do_hide_more(); // find back the menuitem in dom to get the action var $item = this.$element.find('a[data-menu=' + id + ']'); if (!$item.length) { @@ -713,9 +704,8 @@ instance.web.Menu = instance.web.Widget.extend({ */ on_menu_click: function(ev) { var needaction = !!$(ev.target).filter('div.oe_menu_counter').length; + ev.preventDefault(); this.menu_click($(ev.currentTarget).data('menu'), needaction); - ev.stopPropagation(); - return false; }, }); @@ -728,20 +718,12 @@ instance.web.UserMenu = instance.web.Widget.extend({ start: function() { var self = this; this._super.apply(this, arguments); - $('html').bind('click', function() { - self.$element.find('.oe_dropdown_options').hide(); - }); - this.$element.find('.oe_dropdown_toggle').click(function() { - self.$element.find('.oe_dropdown_options').toggle(); - return false; - }); - this.$element.on('click', '.oe_dropdown_options li a[data-menu]', function() { + this.$element.on('click', '.oe_dropdown_menu li a[data-menu]', function(ev) { + ev.preventDefault(); var f = self['on_menu_' + $(this).data('menu')]; if (f) { f($(this)); } - self.$element.find('.oe_dropdown_options').hide(); - return false; }); }, change_password :function() { @@ -885,6 +867,27 @@ instance.web.WebClient = instance.web.Widget.extend({ this.$element.on('mouseenter', '.oe_systray > div:not([data-tipsy=true])', function() { $(this).attr('data-tipsy', 'true').tipsy().trigger('mouseenter'); }); + this.$element.on('click', '.oe_dropdown_toggle', function(ev) { + var $menu = $(this).find('.oe_dropdown_menu'); + var state = $menu.is('.oe_opened'); + setTimeout(function() { + // Do not alter propagation + $menu.toggleClass('oe_opened', !state); + if (!state) { + // Move $menu if outside window's edge + var doc_width = $(document).width(); + var offset = $menu.offset(); + var menu_width = $menu.width(); + var x = doc_width - offset.left - menu_width - 15; + if (x < 0) { + $menu.offset({ left: offset.left + x }).width(menu_width); + } + } + }, 0); + }); + instance.web.bus.on('click', this, function() { + self.$element.find('.oe_dropdown_menu.oe_opened').removeClass('oe_opened'); + }); }, show_common: function() { var self = this; diff --git a/addons/web/static/src/js/formats.js b/addons/web/static/src/js/formats.js index 0f1c71643be..e0ee3359091 100644 --- a/addons/web/static/src/js/formats.js +++ b/addons/web/static/src/js/formats.js @@ -118,7 +118,9 @@ instance.web.format_value = function (value, descriptor, value_if_empty) { return instance.web.insert_thousand_seps( _.str.sprintf('%d', value)); case 'float': - var precision = descriptor.digits ? descriptor.digits[1] : 2; + var digits = descriptor.digits ? descriptor.digits : [69,2]; + digits = typeof digits === "string" ? py.eval(digits) : digits; + var precision = digits[1]; var formatted = _.str.sprintf('%.' + precision + 'f', value).split('.'); formatted[0] = instance.web.insert_thousand_seps(formatted[0]); return formatted.join(l10n.decimal_point); diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 806649165ae..77925859b1d 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -1995,7 +1995,7 @@ instance.web.form.FieldFloat = instance.web.form.FieldChar.extend({ this._super(field_manager, node); this.set({'value': 0}); if (this.node.attrs.digits) { - this.digits = py.eval(node.attrs.digits); + this.digits = this.node.attrs.digits; } else { this.digits = this.field.digits; } @@ -2438,7 +2438,7 @@ instance.web.form.CompletionFieldMixin = { } // create... values.push({label: _t("   Create and Edit..."), action: function() { - self._search_create_popup("form", undefined, {"default_name": search_val}); + self._search_create_popup("form", undefined, {}); }}); return values; diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 7fc27625bcd..95b87e3cd86 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -739,18 +739,9 @@ instance.web.Sidebar = instance.web.Widget.extend({ var self = this; this._super(this); this.redraw(); - this.$element.on('click','.oe_dropdown_toggle',function(event) { - self.$('ul').hide(); - $(this).parent().find('ul').toggle(); - return false; - }); - instance.web.bus.on('click', self, function(ev) { - self.$('ul').hide(); - }); this.$element.on('click','.oe_dropdown_menu li a', function(event) { var section = $(this).data('section'); var index = $(this).data('index'); - $(this).closest('ul').hide(); var item = self.items[section][index]; if (item.callback) { item.callback.apply(self, [item]); @@ -759,13 +750,12 @@ instance.web.Sidebar = instance.web.Widget.extend({ } else if (item.url) { return true; } - return false; + event.preventDefault(); }); }, redraw: function() { var self = this; self.$element.html(QWeb.render('Sidebar', {widget: self})); - this.$element.find('ul').hide(); // Hides Sidebar sections when item list is empty this.$('.oe_form_dropdown_section').each(function() { diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index c8af7c3b799..e293ffc7adb 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -273,8 +273,10 @@
  • - More -