diff options
| author | Vidhin Mehta (OpenERP) <vme@tinyerp.com> | 2012-06-22 14:36:14 +0530 |
|---|---|---|
| committer | Vidhin Mehta (OpenERP) <vme@tinyerp.com> | 2012-06-22 14:36:14 +0530 |
| commit | 790e3d6d9ecb604c5ea7560bbd2869b4b2843a9c (patch) | |
| tree | 5b6304cdad43ff73ff5326b4331b5b984bdc60bc /addons/web/static/src | |
| parent | 5053c1a66e78ba3e4ce51e9cd41c2d4c39d5136e (diff) | |
| parent | 5006656a2832816b38790ab87b99969fedaed3c0 (diff) | |
[MERGE]merge with trunk and in testing OK.
bzr revid: vme@tinyerp.com-20120622090614-t0q7djkz62dn1yiq
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/css/base.css | 1358 | ||||
| -rw-r--r-- | addons/web/static/src/css/base.sass | 1266 | ||||
| -rw-r--r-- | addons/web/static/src/js/chrome.js | 54 | ||||
| -rw-r--r-- | addons/web/static/src/js/coresetup.js | 177 | ||||
| -rw-r--r-- | addons/web/static/src/js/formats.js | 4 | ||||
| -rw-r--r-- | addons/web/static/src/js/view_form.js | 133 | ||||
| -rw-r--r-- | addons/web/static/src/js/views.js | 23 | ||||
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 104 |
8 files changed, 1414 insertions, 1705 deletions
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 32f520d1a30..0d4912c2840 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -25,20 +25,6 @@ position: relative; } -.ui-widget { - font-family: "Lucida Grande", Helvetica, Verdana, Arial, sans-serif; - font-size: 13px; -} - -.ui-menu .ui-menu-item { - margin: 0 8px 0 0; - padding: 0 0 0 12px; - width: auto; -} -.ui-menu .ui-menu-item a.ui-state-active { - background: #f0f0fa; -} - .openerp { padding: 0; margin: 0; @@ -55,7 +41,6 @@ } .openerp table { padding: 0; - font-size: 13px; border-collapse: collapse; } .openerp thead { @@ -98,13 +83,6 @@ background-image: -o-linear-gradient(top, #eeeeee, #dedede); background-image: linear-gradient(to bottom, #eeeeee, #dedede); } -.openerp .numeric { - text-align: right; - width: 82px; -} -.openerp .numeric input { - text-align: right; -} .openerp ul, .openerp li, .openerp ol { margin: 0; padding: 0; @@ -112,7 +90,8 @@ .openerp li { list-style-type: none; } -.openerp input, .openerp textarea { +.openerp input, .openerp textarea, .openerp select { + padding: 4px; border: 1px solid #cccccc; -moz-border-radius: 3px; -webkit-border-radius: 3px; @@ -124,39 +103,6 @@ .openerp h4 { margin: 4px 0; } -.openerp .oe_i { - font-family: "mnmliconsRegular" !important; - font-size: 21px; - font-weight: 300 !important; -} -.openerp .oe_e { - font-family: "entypoRegular" !important; - font-size: 34px; - font-weight: 300 !important; -} -.openerp .oe_left { - float: left; - margin-right: 8px; -} -.openerp .oe_right { - float: right; - margin-left: 8px; -} -.openerp .oe_text_right { - text-align: right; -} -.openerp .oe_clear { - clear: both; -} -.openerp .oe_wait { - cursor: wait; -} -.openerp .oe_fade { - color: #888888; -} -.openerp .oe_bold { - font-weight: bold; -} .openerp a.button:link, .openerp a.button:visited, .openerp button, .openerp input[type='submit'] { display: inline-block; border: 1px solid #ababab; @@ -206,10 +152,13 @@ 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 { - 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; + 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; @@ -224,8 +173,59 @@ cursor: default; text-shadow: 0 1px 1px white !important; } -.openerp button.primary { +.openerp .ui-widget { + font-family: "Lucida Grande", Helvetica, Verdana, Arial, sans-serif; + font-size: 13px; +} +.openerp .ui-menu .ui-menu-item { + margin: 0 8px 0 0; + padding: 0 0 0 12px; + width: auto; +} +.openerp .ui-menu .ui-menu-item a.ui-state-active { + background: #f0f0fa; +} +.openerp .oe_i { + font-family: "mnmliconsRegular" !important; + font-size: 21px; + font-weight: 300 !important; +} +.openerp .oe_e { + font-family: "entypoRegular" !important; + font-size: 34px; + font-weight: 300 !important; +} +.openerp .oe_left { + float: left; + margin-right: 8px; +} +.openerp .oe_right { + float: right; + margin-left: 8px; +} +.openerp .oe_text_right { + text-align: right; +} +.openerp .oe_clear { + clear: both; +} +.openerp .oe_wait { + cursor: wait; +} +.openerp .oe_fade { + color: #888888; +} +.openerp .oe_bold { + font-weight: bold; +} +.openerp .oe_inline { + width: auto !important; +} +.openerp .oe_highlight { color: white; + background: #dc5f59; +} +.openerp button.oe_highlight { background-color: #dc5f59; background-image: -webkit-gradient(linear, left top, left bottom, from(#dc5f59), to(#b33630)); background-image: -webkit-linear-gradient(top, #dc5f59, #b33630); @@ -237,7 +237,19 @@ -webkit-box-shadow: none; box-shadow: none; } -.openerp button.primary:hover { +.openerp button.oe_highlight:active { + background-color: #b33630; + background-image: -webkit-gradient(linear, left top, left bottom, from(#b33630), to(#dc5f59)); + background-image: -webkit-linear-gradient(top, #b33630, #dc5f59); + background-image: -moz-linear-gradient(top, #b33630, #dc5f59); + background-image: -ms-linear-gradient(top, #b33630, #dc5f59); + background-image: -o-linear-gradient(top, #b33630, #dc5f59); + background-image: linear-gradient(to bottom, #b33630, #dc5f59); + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} +.openerp button.oe_highlight:hover { background-color: #df6b66; background-image: -webkit-gradient(linear, left top, left bottom, from(#df6b66), to(#bf3a33)); background-image: -webkit-linear-gradient(top, #df6b66, #bf3a33); @@ -249,40 +261,231 @@ -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, 0.2); box-shadow: 0 0 1px rgba(0, 0, 0, 0.2); } -.openerp button.primary:active { - background-color: #b33630; - background-image: -webkit-gradient(linear, left top, left bottom, from(#b33630), to(#dc5f59)); - background-image: -webkit-linear-gradient(top, #b33630, #dc5f59); - background-image: -moz-linear-gradient(top, #b33630, #dc5f59); - background-image: -ms-linear-gradient(top, #b33630, #dc5f59); - background-image: -o-linear-gradient(top, #b33630, #dc5f59); - background-image: linear-gradient(to bottom, #b33630, #dc5f59); +.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 { + margin: 0 16px 0 0; +} +.openerp .oe_avatar img { + height: 50px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); + border: none; +} +.openerp.oe_tooltip { + font-size: 12px; +} +.openerp.oe_tooltip .oe_tooltip_string { + color: #ffdd55; + font-weight: bold; + font-size: 13px; +} +.openerp.oe_tooltip .oe_tooltip_help { + white-space: pre-wrap; +} +.openerp.oe_tooltip .oe_tooltip_technical { + padding: 0 0 4px 0; + margin: 5px 0 0 15px; +} +.openerp.oe_tooltip .oe_tooltip_technical li { + list-style: circle; +} +.openerp.oe_tooltip .oe_tooltip_technical_title { + font-weight: bold; +} +.openerp .oe_notebook { + margin: 8px 0; + padding: 0 16px; + list-style: none; + zoom: 1; +} +.openerp .oe_notebook:before, .openerp .oe_notebook:after { + display: table; + content: ""; + zoom: 1; +} +.openerp .oe_notebook:after { + clear: both; +} +.openerp .oe_notebook > li { + float: left; +} +.openerp .oe_notebook > li > a { + display: block; + color: #4c4c4c; +} +.openerp .oe_notebook { + border-color: #dddddd; + border-style: solid; + border-width: 0 0 1px; +} +.openerp .oe_notebook > li { + position: relative; +} +.openerp .oe_notebook > li > a { + padding: 0 12px; + margin-right: 2px; + line-height: 30px; + border: 1px solid transparent; + -moz-border-radius: 4px 4px 0 0; + -webkit-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} +.openerp .oe_notebook > li > a:hover { + text-decoration: none; + background-color: #eeeeee; + border-color: #eeeeee #eeeeee #dddddd; +} +.openerp .oe_notebook > li.ui-state-active > a, .openerp .oe_notebook > li.ui-state-active > a:hover { + background-color: white; + border: 1px solid #dddddd; + border-bottom-color: transparent; + cursor: default; +} +.openerp .oe_notebook_page { + padding: 0; +} +.openerp div.ui-tabs { + padding: 3px 0px 3px 0px; +} +.openerp .ui-tabs-hide { + display: none; +} +.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; + z-index: 1; + border: 1px solid #afafb6; + background: white; + padding: 8px; + min-width: 120px; + text-align: left; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + -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_dropdown_menu > li { + list-style-type: none; + float: none; + display: block; + position: relative; +} +.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); + 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 button.following { - color: white; - width: 120px; - background-color: #8a89ba; - background-image: -webkit-gradient(linear, left top, left bottom, from(#8a89ba), to(#807fb4)); - background-image: -webkit-linear-gradient(top, #8a89ba, #807fb4); - background-image: -moz-linear-gradient(top, #8a89ba, #807fb4); - background-image: -ms-linear-gradient(top, #8a89ba, #807fb4); - background-image: -o-linear-gradient(top, #8a89ba, #807fb4); - background-image: linear-gradient(to bottom, #8a89ba, #807fb4); -} -.openerp button.unfollow { +.openerp .oe_dropdown_menu > li > a { + white-space: nowrap; + display: block; + padding: 3px 6px; + color: #4c4c4c; + text-decoration: none; +} +.openerp .oe_dropdown_menu > li > a:hover { + text-decoration: none; +} +.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; + 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; +} +.openerp .oe_sidebar .oe_dropdown_menu li .oe_sidebar_delete_item:hover { + text-decoration: none; color: white; - width: 120px; - background-color: #dc5f59; - background-image: -webkit-gradient(linear, left top, left bottom, from(#dc5f59), to(#b33630)); - background-image: -webkit-linear-gradient(top, #dc5f59, #b33630); - background-image: -moz-linear-gradient(top, #dc5f59, #b33630); - background-image: -ms-linear-gradient(top, #dc5f59, #b33630); - background-image: -o-linear-gradient(top, #dc5f59, #b33630); - background-image: linear-gradient(to bottom, #dc5f59, #b33630); + 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_sidebar .oe_dropdown_menu li:hover .oe_sidebar_delete_item { + display: inline-block; } .openerp .oe_loading { display: none; @@ -484,10 +687,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; @@ -496,7 +696,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; @@ -522,20 +722,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; @@ -544,7 +764,6 @@ border-right: 1px solid #afafb6; text-shadow: 0 1px 1px white; padding-bottom: 16px; - line-height: 18px; } .openerp a.oe_logo { width: 220px; @@ -585,66 +804,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; @@ -653,61 +814,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; @@ -740,24 +846,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; @@ -800,9 +888,9 @@ float: right; background: #8a89ba; color: #eeeeee; - font-size: 12px; + font-size: 10px; border: 1px solid lightgray; - padding: 0px 4px 0px 4px; + padding: 2px 4px; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); margin: 0px; -moz-border-radius: 4px; @@ -866,91 +954,82 @@ .openerp .oe_application a:hover { text-decoration: underline; } -.openerp .oe_view_manager_header { +.openerp .oe_application > div { + height: 100%; +} +.openerp .oe_view_manager .oe_view_manager_body { + height: inherit; +} +.openerp .oe_view_manager .oe_view_manager_view_kanban { + height: inherit; +} +.openerp .oe_view_manager .oe_view_manager_header { width: 100%; - border-top: 1px solid #cacaca; - border-bottom: 1px solid #cacaca; - background-color: #fcfcfc; - background-image: -webkit-gradient(linear, left top, left bottom, from(#fcfcfc), to(#dedede)); - background-image: -webkit-linear-gradient(top, #fcfcfc, #dedede); - background-image: -moz-linear-gradient(top, #fcfcfc, #dedede); - background-image: -ms-linear-gradient(top, #fcfcfc, #dedede); - background-image: -o-linear-gradient(top, #fcfcfc, #dedede); - background-image: linear-gradient(to bottom, #fcfcfc, #dedede); - -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 9px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 9px rgba(0, 0, 0, 0.1); - box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 9px rgba(0, 0, 0, 0.1); } -.openerp .oe_view_manager_header .oe_header_row { +.openerp .oe_view_manager .oe_view_manager_header .oe_header_row { clear: both; text-shadow: 0 1px 1px white; } -.openerp .oe_view_manager_header .oe_header_row td { - padding: 8px; -} -.openerp .oe_view_manager_header .oe_header_row:last-child td { +.openerp .oe_view_manager .oe_view_manager_header .oe_header_row:last-child td { padding-top: 0; } -.openerp .oe_view_manager_header .oe_header_row:first-child td { - padding-top: 8px; -} -.openerp .oe_view_manager_header .oe_view_manager_sidebar { +.openerp .oe_view_manager .oe_view_manager_header .oe_view_manager_sidebar { margin: 0px auto; width: 400px; text-align: center; } -.openerp .oe_view_manager_header td { +.openerp .oe_view_manager .oe_view_manager_header td { line-height: 26px; } -.openerp .oe_view_manager_header h2 { +.openerp .oe_view_manager .oe_view_manager_header h2 { font-size: 18px; margin: 0; float: left; } -.openerp .oe_view_manager_header h2 a { +.openerp .oe_view_manager .oe_view_manager_header h2 a { color: #8a89ba; } -.openerp .oe_view_manager_header .oe_button_group { +.openerp .oe_view_manager .oe_view_manager_header .oe_button_group { display: inline-block; border: 1px solid #ababab; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; } -.openerp .oe_view_manager_header .oe_button_group li { +.openerp .oe_view_manager .oe_view_manager_header .oe_button_group li { float: left; border-right: 1px solid #ababab; } -.openerp .oe_view_manager_header .oe_button_group li:last-child { +.openerp .oe_view_manager .oe_view_manager_header .oe_button_group li:last-child { border: none; } -.openerp .oe_view_manager_header .oe_button_group a { +.openerp .oe_view_manager .oe_view_manager_header .oe_button_group a { color: #4c4c4c; } -.openerp .oe_view_manager_header .oe_button_group a:hover { +.openerp .oe_view_manager .oe_view_manager_header .oe_button_group a:hover { text-decoration: none; } -.openerp .oe_view_manager_header .oe_button_group .active { +.openerp .oe_view_manager .oe_view_manager_header .oe_button_group .active { background: #999999; -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset; -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset; } -.openerp .oe_view_manager_header .oe_button_group .active a { +.openerp .oe_view_manager .oe_view_manager_header .oe_button_group .active a { color: white; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); } -.openerp .oe_view_manager_header .oe_view_manager_buttons { +.openerp .oe_view_manager .oe_view_manager_header .oe_view_manager_buttons { white-space: nowrap; } -.openerp .oe_view_manager_pager { +.openerp .oe_view_manager .oe_view_manager_pager { line-height: 26px; } -.openerp .oe_pager_value { +.openerp .oe_view_manager .oe_pager_value { float: left; margin-right: 8px; } -.openerp .oe_pager_group { +.openerp .oe_view_manager .oe_pager_group { float: left; height: 24px; line-height: 24px; @@ -961,47 +1040,50 @@ -webkit-border-radius: 5px; border-radius: 5px; } -.openerp .oe_pager_group li { +.openerp .oe_view_manager .oe_pager_group li { height: 24px; line-height: 24px; padding: 0; float: left; border-right: 1px solid #ababab; } -.openerp .oe_pager_group li:last-child { +.openerp .oe_view_manager .oe_pager_group li:last-child { border: none; } -.openerp .oe_pager_group a { +.openerp .oe_view_manager .oe_pager_group a { color: #4c4c4c; padding: 0 8px; } -.openerp .oe_pager_group a:hover { +.openerp .oe_view_manager .oe_pager_group a:hover { text-decoration: none; } -.openerp .oe_pager_group .active { +.openerp .oe_view_manager .oe_pager_group .active { background: #999999; -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset; -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset; } -.openerp .oe_pager_group .active a { +.openerp .oe_view_manager .oe_pager_group .active a { color: white; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); } -.openerp .oe_view_manager_switch li { +.openerp .oe_view_manager .oe_view_manager_switch li { text-align: center; width: 24px; height: 24px; line-height: 16px; } -.openerp .oe_view_manager_switch li a { +.openerp .oe_view_manager .oe_view_manager_switch li a { position: relative; } -.openerp .oe_view_manager_switch .oe_vm_switch_list:after, .openerp .oe_view_manager_switch .oe_vm_switch_tree:after { +.openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_list:after, .openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_tree:after { padding: 2px; content: "i"; } -.openerp .oe_view_manager_switch .oe_vm_switch_graph:after { +.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; font-weight: 300 !important; @@ -1009,7 +1091,7 @@ top: -2px; position: relative; } -.openerp .oe_view_manager_switch .oe_vm_switch_gantt:after { +.openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_gantt:after { font-family: "mnmliconsRegular" !important; font-size: 21px; font-weight: 300 !important; @@ -1017,141 +1099,40 @@ top: -2px; position: relative; } -.openerp .oe_view_manager_switch .oe_vm_switch_calendar:after { +.openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_calendar:after { content: "P"; } -.openerp .oe_view_manager_switch .oe_vm_switch_kanban:after { +.openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_kanban:after { content: "k"; } -.openerp .oe_view_manager_switch .oe_vm_switch_diagram:after { +.openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_diagram:after { content: "f"; } -.openerp .oe_form_dropdown_section { - position: relative; - display: inline-block; +.openerp .oe_view_manager_global { + height: 100%; } -.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_view_manager_global > .oe_view_manager_header { + border-top: 1px solid #cacaca; + border-bottom: 1px solid #cacaca; + background-color: #fcfcfc; + background-image: -webkit-gradient(linear, left top, left bottom, from(#fcfcfc), to(#dedede)); + background-image: -webkit-linear-gradient(top, #fcfcfc, #dedede); + background-image: -moz-linear-gradient(top, #fcfcfc, #dedede); + background-image: -ms-linear-gradient(top, #fcfcfc, #dedede); + background-image: -o-linear-gradient(top, #fcfcfc, #dedede); + background-image: linear-gradient(to bottom, #fcfcfc, #dedede); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 9px rgba(0, 0, 0, 0.1); + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 9px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 9px rgba(0, 0, 0, 0.1); } -.openerp .oe_dropdown_menu { - display: none; - position: absolute; - top: 28px; - left: 0px; +.openerp .oe_view_manager_global > .oe_view_manager_header .oe_header_row td { padding: 8px; - border: 1px solid #afafb6; - min-width: 120px; - overflow-x: hidden; - z-index: 900; - text-align: left; - background: white; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - -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_dropdown_menu li { - position: relative; - list-style-type: none; - float: none; - display: block; - background-color: none; -} -.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); - 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_dropdown_menu li a { - 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 { - text-decoration: none; } -.openerp .oe_dropdown_menu li .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; -} -.openerp .oe_dropdown_menu li .oe_sidebar_delete_item: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_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_view_manager_global > .oe_view_manager_header .oe_header_row:first-child td { + padding-top: 8px; } -.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-select-create-popup-view-form > .oe_formview > .oe_form_pager { + display: none !important; } .openerp .oe_searchview { cursor: text; @@ -1174,10 +1155,6 @@ height: 14px; font-size: 11px; line-height: 18px; - border: 1px solid #cccccc; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; } .openerp .oe_searchview.oe_focused { border-color: #a6a6fe; @@ -1318,7 +1295,7 @@ } .openerp .oe_searchview .oe_searchview_drawer { position: absolute; - z-index: 1; + z-index: 100; margin-top: 4px; top: 100%; right: -1px; @@ -1520,23 +1497,12 @@ max-width: 700px; font-size: 125%; } -.openerp .oe_view_topbar { - border-bottom: 1px solid #cacaca; - background-color: #fcfcfc; - background-image: -webkit-gradient(linear, left top, left bottom, from(#fcfcfc), to(#dedede)); - background-image: -webkit-linear-gradient(top, #fcfcfc, #dedede); - background-image: -moz-linear-gradient(top, #fcfcfc, #dedede); - background-image: -ms-linear-gradient(top, #fcfcfc, #dedede); - background-image: -o-linear-gradient(top, #fcfcfc, #dedede); - background-image: linear-gradient(to bottom, #fcfcfc, #dedede); - padding: 0 8px; - line-height: 30px; -} .openerp .oe_formview { background: white; } -.openerp .oe_form_header { - padding: 8px; +.openerp .oe_form_dropdown_section { + position: relative; + display: inline-block; } .openerp .oe_form_invalid input, .openerp .oe_form_invalid select, .openerp .oe_form_invalid textarea { background-color: #ff6666 !important; @@ -1560,6 +1526,56 @@ .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; +} +.openerp .oe_form_readonly .oe_edit_only, .openerp .oe_form_readonly .oe_form_field:empty { + display: none !important; +} +.openerp .oe_form_nosheet > *:not(header) { + margin-left: 10px !important; + margin-right: 10px !important; +} .openerp .oe_form header { position: relative; border-bottom: 1px solid #cacaca; @@ -1573,132 +1589,182 @@ padding: 0 8px; line-height: 30px; } -.openerp .oe_form header button { - font-size: 12px; - float: left; - height: 24px !important; - line-height: 24px; - vertical-align: top; - padding: 0 10px; - margin: 3px 4px 3px 0; +.openerp .oe_form header ul { + display: inline-block; + float: right; } -.openerp .oe_form header button span.i { - line-height: 20px; - height: 24px; +.openerp .oe_form footer { + min-width: 650px; + max-width: 960px; + margin: 0 auto; } -.openerp .oe_form header ul { +.openerp ul.oe_form_steps { height: 30px; padding: 0; margin: 0; text-shadow: 0 1px 1px white; - border-left: 1px solid #cacaca; - border-right: 1px solid #cacaca; } -.openerp .oe_form header ul li { +.openerp ul.oe_form_steps img { + vertical-align: top; + margin-left: 8px; +} +.openerp ul.oe_form_steps li { + border-right: none; padding: 0; margin: 0; float: left; vertical-align: top; - border-right: 1px solid #cacaca; height: 30px; - padding: 0 12px; + padding: 0 0 0 12px; } -.openerp .oe_form header ul li:first-child { +.openerp ul.oe_form_steps li:first-child { border-left: 1px solid #cacaca; } -.openerp .oe_form header ul li a { +.openerp ul.oe_form_steps li:last-child { + margin-right: 12px; + padding-right: 12px; + border-right: 1px solid #cacaca; +} +.openerp ul.oe_form_steps li a { color: #4c4c4c; } -.openerp .oe_form header ul li a:hover { +.openerp ul.oe_form_steps li a:hover { color: black; } -.openerp .oe_form header .oe_form_steps { - display: inline-block; - float: right; +.openerp ul.oe_form_steps .oe_form_steps_active { + font-weight: bold; + color: #b33630; } -.openerp .oe_form header .oe_form_steps img { - margin: 0 8px; - vertical-align: top; +.openerp .oe_form .oe_subtotal_footer { + width: 1% !important; } -.openerp .oe_form header .oe_form_steps li { - border-right: none; - padding: 0; +.openerp .oe_form .oe_subtotal_footer td.oe_form_group_cell { + text-align: right; + padding: 0 !important; } -.openerp .oe_form header .oe_form_steps li:first-child { - margin-left: 12px; - border-left: none; +.openerp .oe_form .oe_subtotal_footer td.oe_form_group_cell_label { + border-right: none; } -.openerp .oe_form header .oe_form_steps li:last-child { - margin-right: 12px; +.openerp .oe_form .oe_subtotal_footer .oe_form_field { + width: auto !important; } -.openerp .oe_form header .oe_form_steps_active { +.openerp .oe_form .oe_subtotal_footer .oe_subtotal_footer_separator { + border-top: 1px solid #cacaca; + font-sie: 120%; font-weight: bold; - color: #b33630; } -.openerp .oe_form_readonly button.oe_form_button_hi { - color: white; - background: #dc5f59; - background-color: #dc5f59; - background-image: -webkit-gradient(linear, left top, left bottom, from(#dc5f59), to(#b33630)); - background-image: -webkit-linear-gradient(top, #dc5f59, #b33630); - background-image: -moz-linear-gradient(top, #dc5f59, #b33630); - background-image: -ms-linear-gradient(top, #dc5f59, #b33630); - background-image: -o-linear-gradient(top, #dc5f59, #b33630); - background-image: linear-gradient(to bottom, #dc5f59, #b33630); - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; -} -.openerp .oe_form_readonly button.oe_form_button_hi:hover { - background: #df6b66; - background-color: #df6b66; - background-image: -webkit-gradient(linear, left top, left bottom, from(#df6b66), to(#bf3a33)); - background-image: -webkit-linear-gradient(top, #df6b66, #bf3a33); - background-image: -moz-linear-gradient(top, #df6b66, #bf3a33); - background-image: -ms-linear-gradient(top, #df6b66, #bf3a33); - background-image: -o-linear-gradient(top, #df6b66, #bf3a33); - background-image: linear-gradient(to bottom, #df6b66, #bf3a33); - -moz-box-shadow: 0 0 1px rgba(0, 0, 0, 0.2); - -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_form .oe_subtotal_footer label.oe_subtotal_footer_separator { + font-weight: bold !important; + padding: 2px 8px 2px 0px !important; } .openerp .oe_application .oe_form_sheetbg { background: url(/web/static/src/img/form_sheetbg.png); padding: 8px 0; border-bottom: 1px solid #dddddd; } -.openerp .oe_application .oe_form_sheet_width, .openerp .oe_application footer { +.openerp .oe_application .oe_form_sheet_width { min-width: 650px; max-width: 960px; margin: 0 auto; } .openerp .oe_application .oe_form_sheet { - padding: 18px; background: white; min-height: 330px; + padding: 16px; border: 1px solid #afafb6; -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); -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_invisible { - display: none !important; +.openerp .oe_application .oe_form_sheet .ui-tabs { + margin: 0 -16px; } -.openerp .oe_form_editable .oe_form_editable_hidden { - display: none !important; +.openerp .oe_application .oe_form_sheet .oe_notebook_page { + padding: 0 16px; } -.openerp .oe_form_readonly .oe_form_readonly_hidden, .openerp .oe_form_readonly .oe_form_field:empty { - display: none !important; +.openerp .oe_form td.oe_form_group_cell_label { + border-right: 1px solid #dddddd; + padding: 2px 0px 2px 0px; +} +.openerp .oe_form td.oe_form_group_cell_label label { + line-height: 18px; + display: block; + min-width: 120px; +} +.openerp .oe_form td.oe_form_group_cell + .oe_form_group_cell { + padding-left: 8px; +} +.openerp .oe_form .oe_form_group { + width: 100%; + margin: 4px 0 4px 0; +} +.openerp .oe_form .oe_form_label_help[for], .openerp .oe_form .oe_form_label[for] { + font-weight: bold; + white-space: nowrap; + padding-right: 8px; +} +.openerp .oe_form .oe_form_label_help[for] span, .openerp .oe_form .oe_form_label[for] span { + font-size: 80%; + color: darkGreen; + vertical-align: top; + position: relative; + top: -4px; + padding: 0 2px; +} +.openerp .oe_horizontal_border { + border-bottom: 1px solid black; +} +.openerp .oe_horizontal_separator { + font-weight: bold; + font-size: 20px; + margin: 8px 0px 8px 0px; + color: #aaaabb; +} +.openerp .oe_horizontal_separator:empty { + height: 5px; +} +.openerp .oe_vertical_separator { + border-left: 1px solid #666666; + padding: 0 4px 0 4px; +} +.openerp .oe_form_field_progressbar { + display: inline-block; + min-width: 70px; +} +.openerp .oe_form_field_progressbar.ui-progressbar { + height: 22px; + font-size: 10px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + border: 1px solid #999999; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + background: white; + min-width: 50px; +} +.openerp .oe_form_field_progressbar.ui-progressbar span { + position: absolute; + margin-left: 10px; + font-weight: bold; +} +.openerp .oe_form_field_progressbar.ui-progressbar .ui-widget-header { + background: #cccccc url(/web/static/lib/jquery.ui/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; } .openerp .oe_form .oe_form_field_text { width: 100%; } .openerp .oe_form .oe_form_field_char input, -.openerp .oe_form .oe_form_field_text textarea, .openerp .oe_form .oe_form_field_url input, +.openerp .oe_form .oe_form_field_text textarea, .openerp .oe_form .oe_form_field_selection select { width: inherit; } +.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 { width: 100px; } @@ -1715,26 +1781,6 @@ height: inherit !important; font-size: inherit; } -.openerp .oe_form_nosheet > *:not(.oe_form_topbar) { - margin-left: 10px !important; - margin-right: 10px !important; -} -.openerp .oe_form .oe_form_label_help[for], .openerp .oe_form .oe_form_label[for] { - font-weight: bold; - white-space: nowrap; - padding-right: 8px; -} -.openerp .oe_form .oe_form_label_help[for] span, .openerp .oe_form .oe_form_label[for] span { - font-size: 80%; - color: darkGreen; - vertical-align: top; - position: relative; - top: -4px; - padding: 0 2px; -} -.openerp .oe_form .oe_form_field_text textarea { - resize: vertical; -} .openerp .oe_form .oe_form_field { width: 100%; display: inline-block; @@ -1756,39 +1802,20 @@ .openerp .oe_form .oe_form_field_datetime { width: 11em; } -.openerp .oe_form .oe_form_inline { - width: auto; -} -.openerp .oe_form input[type="text"], -.openerp .oe_form input[type="password"], -.openerp .oe_form input[type="file"], -.openerp .oe_form select { +.openerp .oe_form input[type="text"], .openerp .oe_form input[type="password"], .openerp .oe_form input[type="file"], .openerp .oe_form select { height: 22px; padding-top: 2px; } -.openerp .oe_form input[type="text"], -.openerp .oe_form input[type="password"], -.openerp .oe_form input[type="file"], -.openerp .oe_form select, -.openerp .oe_form textarea { +.openerp .oe_form input[type="text"], .openerp .oe_form input[type="password"], .openerp .oe_form input[type="file"], .openerp .oe_form select, .openerp .oe_form textarea { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; - padding: 0 2px; - border: 1px solid #999999; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; background: white; min-width: 70px; color: #1f1f1f; } -.openerp .oe_form input[readonly], -.openerp .oe_form select[readonly], -.openerp .oe_form textarea[readonly], -.openerp .oe_form input[disabled], -.openerp .oe_form select[disabled] { +.openerp .oe_form input[readonly], .openerp .oe_form select[readonly], .openerp .oe_form textarea[readonly], .openerp .oe_form input[disabled], .openerp .oe_form select[disabled] { background: #e5e5e5 !important; color: #666666; } @@ -1803,11 +1830,7 @@ -webkit-border-radius: 0px; border-radius: 0px; } -.openerp .oe_form .oe_form_field_many2one input, -.openerp .oe_form .oe_form_field_binary input, -.openerp .oe_form .oe_form_field_binary input, -.openerp .oe_form .oe_form_field_email input, -.openerp .oe_form .oe_form_field_url input { +.openerp .oe_form .oe_form_field_many2one input, .openerp .oe_form .oe_form_field_binary input, .openerp .oe_form .oe_form_field_binary input, .openerp .oe_form .oe_form_field_url input { border-right: none; -webkit-border-top-right-radius: 0px; -webkit-border-bottom-right-radius: 0px; @@ -1816,7 +1839,6 @@ border-top-right-radius: 0px; border-bottom-right-radius: 0px; } -.openerp .oe_form .oe_form_field_email button img, .openerp .oe_form .oe_form_field_url button img { vertical-align: top; } @@ -1826,6 +1848,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; @@ -1879,19 +1902,14 @@ right: 5px; top: 3px; } -.openerp .oe_form .oe_form_group_cell .oe_kanban_view { - position: static; -} .openerp .oe_form .oe_form_field_with_button input { width: 100%; } .openerp .oe_form .oe_form_field_with_button > .oe_button { float: right; - -webkit-border-top-left-radius: 0px; - -webkit-border-bottom-left-radius: 0px; - -moz-border-radius-topleft: 0px; - -moz-border-radius-bottomleft: 0px; - border-top-left-radius: 0px; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; border-bottom-left-radius: 0px; height: 22px; } @@ -1899,38 +1917,6 @@ position: relative; overflow: hidden; } -.openerp .oe_form .oe_form_title { - width: 55%; -} -.openerp .oe_form .oe_form_title:after { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; -} -.openerp .oe_form .oe_form_button_box { - width: 200px; - text-align: center; -} -.openerp .oe_form .oe_form_group { - margin: 5px 0px 5px 0px; -} -.openerp .oe_form .oe_form_group_cell .oe_kanban_view { - position: static; -} -.openerp .oe_form .oe_form_button.oe_button { - height: 22px; - white-space: nowrap; -} -.openerp .oe_form .oe_form_button.oe_button span { - position: relative; - vertical-align: top; -} -.openerp .oe_form .oe_form_button > img { - vertical-align: -3px; - padding: 0 2px; -} .openerp .oe_hidden_input_file { overflow: hidden; position: relative; @@ -1958,9 +1944,6 @@ width: auto; vertical-align: top; } -.openerp .oe_form .oe_form_field_image > img { - min-width: 100px; -} .openerp .oe_form .oe_form_field_image .oe_form_field_image_controls { position: absolute; top: 1px; @@ -1979,172 +1962,41 @@ .openerp .oe_form .oe_form_field_image:hover .oe_form_field_image_controls { display: block; } -.openerp .oe_horizontal_border { - border-bottom: 1px solid black; -} -.openerp .oe_horizontal_separator { - font-weight: bold; - font-size: 20px; - margin: 20px 0px 10px 0px; - color: #aaaabb; -} -.openerp .oe_horizontal_separator:empty { - height: 5px; -} -.openerp .oe_vertical_separator { - border-left: 1px solid #666666; - padding: 0 4px 0 4px; -} -.openerp .oe_form_notebook { - margin: 8px 0; - padding: 0 8px; - list-style: none; - zoom: 1; -} -.openerp .oe_form_notebook:before, .openerp .oe_form_notebook:after { - display: table; - content: ""; - zoom: 1; -} -.openerp .oe_form_notebook:after { - clear: both; -} -.openerp .oe_form_notebook > li { - float: left; -} -.openerp .oe_form_notebook > li > a { - display: block; - color: #4c4c4c; -} -.openerp .oe_form_notebook { - border-color: #dddddd; - border-style: solid; - border-width: 0 0 1px; -} -.openerp .oe_form_notebook > li { +.openerp .oe_form_field_many2one td:first-child { position: relative; - margin-bottom: -1px; -} -.openerp .oe_form_notebook > li > a { - padding: 0 12px; - margin-right: 2px; - line-height: 30px; - border: 1px solid transparent; - -moz-border-radius: 4px 4px 0 0; - -webkit-border-radius: 4px 4px 0 0; - border-radius: 4px 4px 0 0; } -.openerp .oe_form_notebook > li > a:hover { - text-decoration: none; - background-color: #eeeeee; - border-color: #eeeeee #eeeeee #dddddd; -} -.openerp .oe_form_notebook > li.ui-state-active > a, .openerp .oe_form_notebook > li.ui-state-active > a:hover { - background-color: white; - border: 1px solid #dddddd; - border-bottom-color: transparent; - cursor: default; -} -.openerp .oe_form_notebook_page { - padding: 0; -} -.openerp div.ui-tabs { - padding: 3px 0px 3px 0px; +.openerp .oe_form_field_many2one span.oe-m2o-drop-down-button { + position: absolute; + top: 3px; + right: 2px; } -.openerp .ui-tabs-hide { +.openerp .oe_form .oe_form_field_one2many > .oe_view_manager .oe_list_pager_single_page { display: none; } -.openerp .oe_form .oe_form_field_progressbar { - display: inline-block; - min-width: 70px; -} -.openerp .oe_form .oe_form_field_progressbar.ui-progressbar { - height: 22px; - font-size: 10px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; - border: 1px solid #999999; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - background: white; - min-width: 50px; -} -.openerp .oe_form .oe_form_field_progressbar.ui-progressbar span { - position: absolute; - margin-left: 10px; - font-weight: bold; -} -.openerp .oe_form .oe_form_field_progressbar.ui-progressbar .ui-widget-header { - background: #cccccc url(/web/static/lib/jquery.ui/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; +.openerp .oe_form_field_one2many > .oe_view_manager .oe_header_row_top { + display: none; } -.openerp .oe_form .oe_view_manager_header2 td { +.openerp .oe_form_field_one2many > .oe_view_manager .oe_view_manager_header2 td { padding: 0px 8px; line-height: 16px; } -.openerp .oe_form .oe_view_manager_header2 td .oe_i { +.openerp .oe_form_field_one2many > .oe_view_manager .oe_view_manager_header2 td .oe_i { font-size: 13px; } -.openerp .oe_form .oe_view_manager_header2 td .oe_pager_group { +.openerp .oe_form_field_one2many > .oe_view_manager .oe_view_manager_header2 td .oe_pager_group { height: auto; line-height: 16px; } -.openerp .oe_form .oe_view_manager_header2 td .oe_pager_group li { +.openerp .oe_form_field_one2many > .oe_view_manager .oe_view_manager_header2 td .oe_pager_group li { height: auto; line-height: 16px; } -.openerp .oe-select-create-popup-view-form > .oe_formview > .oe_form_pager { - display: none !important; -} -.openerp .oe_form .oe_form_field_one2many > .oe_view_manager .oe_list_pager_single_page { - display: none; -} .openerp .oe_form .oe_form_field_many2many > .oe-listview .oe_list_pager_single_page { display: none; } -.openerp .oe_form td.oe_form_group_cell_label { - border-right: 1px solid #dddddd; - padding: 2px 0px 2px 0px; -} -.openerp .oe_form td.oe_form_group_cell_label label { - line-height: 18px; - display: block; - min-width: 120px; -} -.openerp .oe_form td.oe_form_group_cell + .oe_form_group_cell { - padding-left: 8px; -} -.openerp .oe_form .oe_form_subtotal_footer { - width: auto; - float: right; -} -.openerp .oe_form .oe_form_subtotal_footer td.oe_form_group_cell { - text-align: right; - padding: 0; -} -.openerp .oe_form .oe_form_subtotal_footer td.oe_form_group_cell_label { - border: none; -} -.openerp .oe_form .oe_form_subtotal_footer .oe_form_field { - width: auto !important; -} -.openerp .oe_form .oe_form_subtotal_footer .oe_form_subtotal_footer_separator { - border-top: 1px solid #cacaca; - font-size: 120%; - font-weight: bold; -} -.openerp .oe_form .oe_form_subtotal_footer label.oe_form_subtotal_footer_separator { - font-weight: bold !important; - padding: 2px 8px 2px 0px !important; -} .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; } @@ -2252,27 +2104,6 @@ .openerp .oe_trad_field.touched { border: 1px solid green !important; } -.openerp.oe_tooltip { - font-size: 12px; -} -.openerp.oe_tooltip .oe_tooltip_string { - color: #ffdd55; - font-weight: bold; - font-size: 13px; -} -.openerp.oe_tooltip .oe_tooltip_help { - white-space: pre-wrap; -} -.openerp.oe_tooltip .oe_tooltip_technical { - padding: 0 0 4px 0; - margin: 5px 0 0 15px; -} -.openerp.oe_tooltip .oe_tooltip_technical li { - list-style: circle; -} -.openerp.oe_tooltip .oe_tooltip_technical_title { - font-weight: bold; -} .openerp .oe_view_editor { width: 100%; border-collapse: collapse; @@ -2343,12 +2174,3 @@ .kitten-mode-activated > * { opacity: 0.7; } - -.openerp .oe_form_field_many2one td:first-child { - position: relative; -} -.openerp .oe_form_field_many2one span.oe-m2o-drop-down-button { - position: absolute; - top: 3px; - right: 2px; -} diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index d933550db23..35e1d08e17f 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -36,7 +36,6 @@ $colour4: #8a89ba background-image: -o-linear-gradient(top, $startColor, $endColor) /* Opera 11.10+ */ background-image: linear-gradient(to bottom, $startColor, $endColor) - @mixin radial-gradient($gradient) background-position: center center background-image: -webkit-radial-gradient(circle, $gradient) @@ -91,24 +90,10 @@ $colour4: #8a89ba // }}} - .openerp.openerp-web-client-container height: 100% position: relative -// Jquery ui Overrides {{{ -.ui-widget - font-family: "Lucida Grande", Helvetica, Verdana, Arial, sans-serif - font-size: 13px -.ui-menu - .ui-menu-item - margin: 0 8px 0 0 - padding: 0 0 0 12px - width: auto - a.ui-state-active - background: #f0f0fa -// }}} - .openerp // Global style {{{ padding: 0 @@ -123,7 +108,6 @@ $colour4: #8a89ba text-decoration: none table padding: 0 - font-size: 13px border-collapse: collapse thead font-weight: bold @@ -145,51 +129,19 @@ $colour4: #8a89ba @include vertical-gradient(#f0f0fa, #eeeef6) .zebra tbody tr:hover td @include vertical-gradient(#eee, #dedede) - .numeric - text-align: right - width: 82px - input - text-align: right ul, li, ol margin: 0 padding: 0 li list-style-type: none - input, textarea + input, textarea, select + padding: 4px border: 1px solid #ccc @include radius(3px) img vertical-align: middle h4 margin: 4px 0 - - // }}} - // Generic classes {{{ - .oe_i - font-family: "mnmliconsRegular" !important - font-size: 21px - font-weight: 300 !important - .oe_e - font-family: "entypoRegular" !important - font-size: 34px - font-weight: 300 !important - .oe_left - float: left - margin-right: 8px - .oe_right - float: right - margin-left: 8px - .oe_text_right - text-align: right - .oe_clear - clear: both - .oe_wait - cursor: wait - .oe_fade - color: #888 - //font-size: 12px - .oe_bold - font-weight: bold // }}} // Button style {{{ a.button:link, a.button:visited, button, input[type='submit'] @@ -217,10 +169,7 @@ $colour4: #8a89ba @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 - 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 + @include vertical-gradient(#e3e3e3, #f6f6f6) @include box-shadow(none) a.button.disabled, button:disabled, input[type='submit']:disabled @@ -230,31 +179,227 @@ $colour4: #8a89ba color: #aaa !important cursor: default text-shadow: 0 1px 1px #fff !important - - button.primary + // }}} + // Jquery ui Overrides {{{ + .ui-widget + font-family: "Lucida Grande", Helvetica, Verdana, Arial, sans-serif + font-size: 13px + .ui-menu + .ui-menu-item + margin: 0 8px 0 0 + padding: 0 0 0 12px + width: auto + a.ui-state-active + background: #f0f0fa + // }}} + // Generic classes {{{ + .oe_i + font-family: "mnmliconsRegular" !important + font-size: 21px + font-weight: 300 !important + .oe_e + font-family: "entypoRegular" !important + font-size: 34px + font-weight: 300 !important + .oe_left + float: left + margin-right: 8px + .oe_right + float: right + margin-left: 8px + .oe_text_right + text-align: right + .oe_clear + clear: both + .oe_wait + cursor: wait + .oe_fade + color: #888 + .oe_bold + font-weight: bold + .oe_inline + width: auto !important + .oe_highlight color: white + background: #DC5F59 + button.oe_highlight @include vertical-gradient(#dc5f59, #b33630) @include box-shadow(none) - - button.primary:hover - @include vertical-gradient(lighten(#dc5f59, 3%), lighten(#b33630, 3%)) - @include box-shadow(0 0 1px rgba(0,0,0,0.2)) - - button.primary:active + button.oe_highlight:active @include vertical-gradient(#b33630, #dc5f59) @include box-shadow(none) - - button.following - color: white - width: 120px - @include vertical-gradient($colour4, darken($colour4, 3%)) - - button.unfollow + button.oe_highlight:hover + @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 + margin: 0 16px 0 0 + img + height: 50px + @include radius(3px) + @include box-shadow(0 1px 3px rgba(0, 0, 0, 0.3)) + border: none + //.oe_edit_only + // }}} + // Tooltips {{{ + &.oe_tooltip + font-size: 12px + .oe_tooltip_string + color: #FD5 + font-weight: bold + font-size: 13px + .oe_tooltip_help + white-space: pre-wrap + .oe_tooltip_technical + padding: 0 0 4px 0 + margin: 5px 0 0 15px + li + list-style: circle + .oe_tooltip_technical_title + font-weight: bold + // }}} + // Notebook {{{ + .oe_notebook + margin: 8px 0 + padding: 0 16px + list-style: none + zoom: 1 + .oe_notebook:before, .oe_notebook:after + display: table + content: "" + zoom: 1 + .oe_notebook:after + clear: both + .oe_notebook > li + float: left + .oe_notebook > li > a + display: block + color: #4c4c4c + .oe_notebook + border-color: #ddd + border-style: solid + border-width: 0 0 1px + .oe_notebook > li + position: relative + .oe_notebook > li > a + padding: 0 12px + margin-right: 2px + line-height: 30px + border: 1px solid transparent + @include radius(4px 4px 0 0) + .oe_notebook > li > a:hover + text-decoration: none + background-color: #eee + border-color: #eee #eee #ddd + .oe_notebook > li.ui-state-active > a, .oe_notebook > li.ui-state-active > a:hover + background-color: #ffffff + border: 1px solid #ddd + border-bottom-color: transparent + cursor: default + .oe_notebook_page + padding: 0 + div.ui-tabs + padding: 3px 0px 3px 0px + .ui-tabs-hide display: none - color: white - width: 120px - @include vertical-gradient(#dc5f59, #b33630) + // }}} + // Dropdown {{{ + .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#404040 + @include opacity(0.5) + .oe_sidebar + white-space: nowrap + .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 @@ -409,22 +554,18 @@ $colour4: #8a89ba height: 31px 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 @@ -438,19 +579,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 @@ -460,7 +606,6 @@ $colour4: #8a89ba border-right: 1px solid #afafb6 text-shadow: 0 1px 1px white padding-bottom: 16px - line-height: 18px a.oe_logo width: 220px display: block @@ -495,48 +640,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 @@ -544,42 +649,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 @@ -605,20 +674,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 @@ -652,9 +707,9 @@ $colour4: #8a89ba float: right background: #8a89ba color: #eee - font-size: 12px + font-size: 10px border: 1px solid lightgray - padding: 0px 4px 0px 4px + padding: 2px 4px text-shadow: 0 1px 1px rgba(0,0,0,0.2) margin: 0px @include radius(4px) @@ -703,50 +758,85 @@ $colour4: #8a89ba color: $colour4 &:hover text-decoration: underline + > div + height: 100% // }}} - // ViewManager.header {{{ - .oe_view_manager_header - width: 100% - border-top: 1px solid #cacaca - border-bottom: 1px solid #cacaca - @include vertical-gradient(#fcfcfc, #dedede) - @include box-shadow((0 1px 0 rgba(255,255,255,0.4), 0 0 9px rgba(0,0,0,0.1))) - .oe_header_row - //min-height: 26px - //line-height: 26px - clear: both - text-shadow: 0 1px 1px white - td - padding: 8px - .oe_header_row:last-child - td - padding-top: 0 - .oe_header_row:first-child + // ViewManager common {{{ + .oe_view_manager + .oe_view_manager_body + height: inherit + .oe_view_manager_view_kanban + height: inherit + + .oe_view_manager_header + width: 100% + .oe_header_row + //min-height: 26px + //line-height: 26px + clear: both + text-shadow: 0 1px 1px white + .oe_header_row:last-child + td + padding-top: 0 + .oe_view_manager_sidebar + margin: 0px auto + width: 400px + text-align: center td - padding-top: 8px - .oe_view_manager_sidebar - margin: 0px auto - width: 400px - text-align: center - td + line-height: 26px + h2 + font-size: 18px + margin: 0 + float: left + a + color: $colour4 + .oe_button_group + display: inline-block + border: 1px solid #ababab + @include radius(5px) + li + float: left + border-right: 1px solid #ababab + &:last-child + border: none + a + color: #4c4c4c + &:hover + text-decoration: none + .active + background: #999 + @include box-shadow(0 1px 4px rgba(0,0,0,0.3) inset) + a + color: #fff + text-shadow: 0 1px 2px rgba(0,0,0,0.4) + .oe_view_manager_buttons + white-space: nowrap + // }}} + // ViewManager.pager {{{ + .oe_view_manager_pager line-height: 26px - h2 - font-size: 18px - margin: 0 + .oe_pager_value float: left - a - color: $colour4 - .oe_button_group + margin-right: 8px + .oe_pager_group + float: left + height: 24px + line-height: 24px display: inline-block border: 1px solid #ababab + cursor: pointer @include radius(5px) li + height: 24px + line-height: 24px + padding: 0 float: left border-right: 1px solid #ababab &:last-child border: none a color: #4c4c4c + padding: 0 8px &:hover text-decoration: none .active @@ -755,166 +845,60 @@ $colour4: #8a89ba a color: #fff text-shadow: 0 1px 2px rgba(0,0,0,0.4) - .oe_view_manager_buttons - white-space: nowrap - // }}} - // ViewManager.pager {{{ - .oe_view_manager_pager - line-height: 26px - .oe_pager_value - float: left - margin-right: 8px - .oe_pager_group - float: left - height: 24px - line-height: 24px - display: inline-block - border: 1px solid #ababab - cursor: pointer - @include radius(5px) - li - height: 24px - line-height: 24px - padding: 0 - float: left - border-right: 1px solid #ababab - &:last-child - border: none - a - color: #4c4c4c - padding: 0 8px - &:hover - text-decoration: none - .active - background: #999 - @include box-shadow(0 1px 4px rgba(0,0,0,0.3) inset) - a - color: #fff - text-shadow: 0 1px 2px rgba(0,0,0,0.4) - // }}} - // ViewManager.switches {{{ - .oe_view_manager_switch - li - text-align: center - width: 24px - height: 24px - line-height: 16px - a + // }}} + // ViewManager.switches {{{ + .oe_view_manager_switch + li + text-align: center + width: 24px + height: 24px + line-height: 16px + a + position: relative + .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 + font-weight: 300 !important + content: "}" + top: -2px position: relative - .oe_vm_switch_list:after, .oe_vm_switch_tree:after - padding: 2px - content: "i" - .oe_vm_switch_graph:after - font-family: "mnmliconsRegular" !important - font-size: 21px - font-weight: 300 !important - content: "}" - top: -2px - position: relative - .oe_vm_switch_gantt:after - font-family: "mnmliconsRegular" !important - font-size: 21px - font-weight: 300 !important - content: "y" - top: -2px - position: relative - .oe_vm_switch_calendar:after - content: "P" - .oe_vm_switch_kanban:after - content: "k" - .oe_vm_switch_diagram:after - content: "f" + .oe_vm_switch_gantt:after + font-family: "mnmliconsRegular" !important + font-size: 21px + font-weight: 300 !important + content: "y" + top: -2px + position: relative + .oe_vm_switch_calendar:after + content: "P" + .oe_vm_switch_kanban:after + content: "k" + .oe_vm_switch_diagram:after + content: "f" + // }}} + // ViewManager application {{{ + .oe_view_manager_global + height: 100% + > .oe_view_manager_header + border-top: 1px solid #cacaca + border-bottom: 1px solid #cacaca + @include vertical-gradient(#fcfcfc, #dedede) + @include box-shadow((0 1px 0 rgba(255,255,255,0.4), 0 0 9px rgba(0,0,0,0.1))) + .oe_header_row + td + padding: 8px + .oe_header_row:first-child + td + padding-top: 8px // }}} - // ViewManager.sidebar {{{ - .oe_form_dropdown_section - position: relative - display: inline-block - .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 - @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) + // Viewmanager popup {{{ + .oe-select-create-popup-view-form > .oe_formview > .oe_form_pager + display: none !important // }}} // SearchView {{{ .oe_searchview @@ -933,8 +917,6 @@ $colour4: #8a89ba height: 14px font-size: 11px line-height: 18px - border: 1px solid #ccc - @include radius(3px) &.oe_focused border-color: $facets-border-selected @include box-shadow(0 1px 2px $facets-border-selected inset) @@ -1045,7 +1027,7 @@ $colour4: #8a89ba .oe_searchview_drawer position: absolute - z-index: 1 + z-index: 100 // detach drawer from field slightly margin-top: 4px top: 100% @@ -1212,17 +1194,13 @@ $colour4: #8a89ba padding: 35px 0px 0px 0px max-width: 700px font-size: 125% - .oe_view_topbar - border-bottom: 1px solid #cacaca - @include vertical-gradient(#fcfcfc, #dedede) - padding: 0 8px - line-height: 30px // }}} - // FormView.body {{{ + // FormView.base and dynamic tags {{{ .oe_formview background: white - .oe_form_header - padding: 8px + .oe_form_dropdown_section + position: relative + display: inline-block .oe_form_invalid input, select, textarea background-color: #F66 !important @@ -1235,125 +1213,123 @@ $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 + .oe_edit_only, .oe_form_field:empty + display: none !important + .oe_form_nosheet > *:not(header) + margin-left: 10px !important + margin-right: 10px !important // }}} - // FormView.customdivs {{{ - .oe_form header - position: relative - border-bottom: 1px solid #cacaca - @include vertical-gradient(#fcfcfc, #dedede) - padding: 0 8px - line-height: 30px - button - font-size: 12px - float: left - height: 24px !important - line-height: 24px + // FormView.custom tags and classes {{{ + .oe_form + header + position: relative + border-bottom: 1px solid #cacaca + @include vertical-gradient(#fcfcfc, #dedede) + padding: 0 8px + line-height: 30px + ul + display: inline-block + float: right + footer + min-width: 650px + max-width: 960px + margin: 0 auto + ul.oe_form_steps + height: 30px + padding: 0 + margin: 0 + text-shadow: 0 1px 1px white + img vertical-align: top - padding: 0 10px - margin: 3px 4px 3px 0 - span.i - line-height: 20px - height: 24px - ul - height: 30px + margin-left: 8px + li + border-right: none padding: 0 margin: 0 - text-shadow: 0 1px 1px white - border-left: 1px solid #cacaca - border-right: 1px solid #cacaca - li - padding: 0 - margin: 0 - float: left - vertical-align: top + float: left + vertical-align: top + height: 30px + padding: 0 0 0 12px + &:first-child + border-left: 1px solid #cacaca + &:last-child + margin-right: 12px + padding-right: 12px border-right: 1px solid #cacaca - height: 30px - padding: 0 12px - &:first-child - border-left: 1px solid #cacaca - a - color: #4c4c4c - &:hover - color: black - .oe_form_steps - display: inline-block - float: right - img - margin: 0 8px - vertical-align: top - li - border-right: none - padding: 0 - &:first-child - margin-left: 12px - border-left: none - &:last-child - margin-right: 12px + a + color: #4c4c4c + &:hover + color: black .oe_form_steps_active - font-weight: bold + font-weight: bold color: #b33630 - .oe_form_readonly - button.oe_form_button_hi - color: white - background: #DC5F59 - @include vertical-gradient(#dc5f59, #b33630) - @include box-shadow(none) - button.oe_form_button_hi:hover - background: #DF6B66 - @include vertical-gradient(#DF6B66, #BF3A33) - @include box-shadow(0 0 1px rgba(0, 0, 0, 0.2)) + .oe_form .oe_subtotal_footer + width: 1% !important + td.oe_form_group_cell + text-align: right + padding: 0 !important + td.oe_form_group_cell_label + border-right: none + .oe_form_field + width: auto !important + .oe_subtotal_footer_separator + border-top: 1px solid #cacaca + font-sie: 120% + font-weight: bold + label.oe_subtotal_footer_separator + font-weight: bold !important + padding: 2px 8px 2px 0px !important + // no sheet in popups .oe_application .oe_form_sheetbg background: url(/web/static/src/img/form_sheetbg.png) padding: 8px 0 border-bottom: 1px solid #ddd - .oe_form_sheet_width, footer + .oe_form_sheet_width min-width: 650px max-width: 960px margin: 0 auto .oe_form_sheet - padding: 18px background: white min-height: 330px + padding: 16px border: 1px solid #afafb6 @include box-shadow(0 0 10px rgba(0,0,0,0.3)) + .ui-tabs + margin: 0 -16px + .oe_notebook_page + padding: 0 16px // }}} - // FormView.layout {{{ - .oe_form_invisible - display: none !important - .oe_form_editable .oe_form_editable_hidden - display: none !important - .oe_form_readonly - .oe_form_readonly_hidden, .oe_form_field:empty - display: none !important + // FormView.group {{{ .oe_form - .oe_form_field_text + td.oe_form_group_cell_label + border-right: 1px solid #ddd + padding: 2px 0px 2px 0px + label + line-height: 18px + display: block + min-width: 120px + td.oe_form_group_cell + .oe_form_group_cell + padding-left: 8px + .oe_form_group width: 100% - - .oe_form_field_char input, - .oe_form_field_text textarea, - .oe_form_field_url input, - .oe_form_field_selection select - width: inherit - - .oe_form_field_float input - width: 100px - - h1 .oe_form_field_float input - width: 140px - - h2 .oe_form_field_float input - width: 120px - - h1, h2, h3, h4, h5, h6 - margin: 0 0 4px 0 - input - height: inherit !important - font-size: inherit - .oe_form_nosheet > *:not(.oe_form_topbar) - margin-left: 10px !important - margin-right: 10px !important - + margin: 4px 0 4px 0 // }}} // FormView.label {{{ .oe_form @@ -1369,10 +1345,61 @@ $colour4: #8a89ba top: -4px padding: 0 2px // }}} + // FormView.separator {{{ + .oe_horizontal_border + border-bottom: 1px solid black + .oe_horizontal_separator + font-weight: bold + font-size: 20px + margin: 8px 0px 8px 0px + color: #aab + .oe_horizontal_separator:empty + height: 5px + .oe_vertical_separator + border-left: 1px solid #666 + padding: 0 4px 0 4px + // }}} + // FormView.progressbar {{{ + .oe_form_field_progressbar + display: inline-block + min-width: 70px + .oe_form_field_progressbar.ui-progressbar + height: 22px + font-size: 10px + @include box-sizing(border) + border: 1px solid #999 + @include radius(3px) + background: white + min-width: 50px + span + position: absolute + margin-left: 10px + font-weight: bold + .ui-widget-header + background: #cccccc url(/web/static/lib/jquery.ui/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x + // }}} // FormView.fields {{{ .oe_form - .oe_form_field_text textarea - resize: vertical + .oe_form_field_text + width: 100% + .oe_form_field_char input, + .oe_form_field_url input, + .oe_form_field_text textarea, + .oe_form_field_selection select + width: inherit + .oe_form_field_text.oe_inline, .oe_form_field_text.oe_inline > textarea + width: 500px + .oe_form_field_float input + width: 100px + h1 .oe_form_field_float input + width: 140px + h2 .oe_form_field_float input + width: 120px + h1, h2, h3, h4, h5, h6 + margin: 0 0 4px 0 + input + height: inherit !important + font-size: inherit .oe_form_field width: 100% display: inline-block @@ -1380,7 +1407,6 @@ $colour4: #8a89ba line-height: 18px input margin: 0px - .oe_form_field_integer width: 180px .oe_form_field_float @@ -1389,32 +1415,15 @@ $colour4: #8a89ba width: 7em .oe_form_field_datetime width: 11em - .oe_form_inline - width: auto - - input[type="text"], - input[type="password"], - input[type="file"], - select + input[type="text"], input[type="password"], input[type="file"], select height: 22px padding-top: 2px - input[type="text"], - input[type="password"], - input[type="file"], - select, - textarea + input[type="text"], input[type="password"], input[type="file"], select, textarea @include box-sizing(border) - padding: 0 2px - border: 1px solid #999 - @include radius(3px) background: white min-width: 70px color: #1f1f1f - input[readonly], - select[readonly], - textarea[readonly], - input[disabled], - select[disabled] + input[readonly], select[readonly], textarea[readonly], input[disabled], select[disabled] background: #E5E5E5 !important color: #666 textarea[disabled] @@ -1423,11 +1432,7 @@ $colour4: #8a89ba padding-left: 8px @include box-shadow(none) @include radius(0px) - .oe_form_field_many2one input, - .oe_form_field_binary input, - .oe_form_field_binary input, - .oe_form_field_email input, - .oe_form_field_url input + .oe_form_field_many2one input, .oe_form_field_binary input, .oe_form_field_binary input, .oe_form_field_url input border-right: none -webkit-border-top-right-radius: 0px -webkit-border-bottom-right-radius: 0px @@ -1435,7 +1440,6 @@ $colour4: #8a89ba -moz-border-radius-bottomright: 0px border-top-right-radius: 0px border-bottom-right-radius: 0px - .oe_form_field_email button img, .oe_form_field_url button img vertical-align: top .oe_form_field_date, @@ -1443,6 +1447,7 @@ $colour4: #8a89ba white-space: nowrap .oe_form_field_boolean padding-top: 4px + width: auto .oe_form_field_many2manytags .text-wrap width: 100% !important @@ -1485,64 +1490,19 @@ $colour4: #8a89ba filter: alpha(opacity=50) right: 5px top: 3px - .oe_form_group_cell .oe_kanban_view - // Hack due to absolute positioning of kanban view messing with o2m - position: static .oe_form_field_with_button input width: 100% > .oe_button float: right - -webkit-border-top-left-radius: 0px - -webkit-border-bottom-left-radius: 0px - -moz-border-radius-topleft: 0px - -moz-border-radius-bottomleft: 0px - border-top-left-radius: 0px + @include radius(0) border-bottom-left-radius: 0px height: 22px > div position: relative overflow: hidden - - .oe_form_title - width: 55% - .oe_form_title:after - content: "." - display: block - height: 0 - clear: both - visibility: hidden - .oe_form_button_box - width: 200px - text-align: center - - .oe_form_group - margin: 5px 0px 5px 0px - - .oe_form_group_cell .oe_kanban_view - // Hack due to absolute positioning of kanban view messing with o2m - position: static - // }}} - // FormView.buttons {{{ - .oe_form - .oe_form_button.oe_button - height: 22px - white-space: nowrap - span - position: relative - vertical-align: top - .oe_form_button > img - vertical-align: -3px - padding: 0 2px - // From FP: .oe_form_group_cell > .oe_form_button.oe_button - // From FP: display: block - // From FP: white-space: nowrap - // From FP: min-width: 100% - // From FP: width: 100% - - // }}} - // FormView.binaryfile {{{ + // FormView.fields_binary {{{ /* http://www.quirksmode.org/dom/inputfile.html * http://stackoverflow.com/questions/2855589/replace-input-type-file-by-an-image */ @@ -1567,8 +1527,6 @@ $colour4: #8a89ba padding: 0 .oe_form .oe_form_field_image - > img - min-width: 100px padding: 0 position: relative display: inline-block @@ -1588,91 +1546,22 @@ $colour4: #8a89ba &:hover .oe_form_field_image_controls display: block // }}} - // FormView.separator {{{ - .oe_horizontal_border - border-bottom: 1px solid black - .oe_horizontal_separator - font-weight: bold - font-size: 20px - margin: 20px 0px 10px 0px - color: #aab - .oe_horizontal_separator:empty - height: 5px - .oe_vertical_separator - border-left: 1px solid #666 - padding: 0 4px 0 4px - // }}} - // FormView.notebook {{{ - .oe_form_notebook - margin: 8px 0 - padding: 0 8px - list-style: none - zoom: 1 - .oe_form_notebook:before, .oe_form_notebook:after - display: table - content: "" - zoom: 1 - .oe_form_notebook:after - clear: both - .oe_form_notebook > li - float: left - .oe_form_notebook > li > a - display: block - color: #4c4c4c - .oe_form_notebook - border-color: #ddd - border-style: solid - border-width: 0 0 1px - .oe_form_notebook > li - position: relative - margin-bottom: -1px - .oe_form_notebook > li > a - padding: 0 12px - margin-right: 2px - line-height: 30px - border: 1px solid transparent - @include radius(4px 4px 0 0) - .oe_form_notebook > li > a:hover - text-decoration: none - background-color: #eee - border-color: #eee #eee #ddd - .oe_form_notebook > li.ui-state-active > a, .oe_form_notebook > li.ui-state-active > a:hover - background-color: #ffffff - border: 1px solid #ddd - border-bottom-color: transparent - cursor: default - .oe_form_notebook_page - padding: 0 - div.ui-tabs - padding: 3px 0px 3px 0px - .ui-tabs-hide - display: none - - // }}} - // FormView.progressbar {{{ - .oe_form - .oe_form_field_progressbar - display: inline-block - min-width: 70px - .oe_form_field_progressbar.ui-progressbar - height: 22px - font-size: 10px - @include box-sizing(border) - border: 1px solid #999 - @include radius(3px) - background: white - min-width: 50px - - span - position: absolute - margin-left: 10px - font-weight: bold - - .ui-widget-header - background: #cccccc url(/web/static/lib/jquery.ui/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x + // FormView.many2one {{{ + .oe_form_field_many2one + td:first-child + position: relative + span.oe-m2o-drop-down-button + position: absolute + top: 3px + right: 2px // }}} - // FormView.viewmanager {{{ - .oe_form + // FormView.one2many {{{ + .oe_form .oe_form_field_one2many > .oe_view_manager + .oe_list_pager_single_page + display: none + .oe_form_field_one2many > .oe_view_manager + .oe_header_row_top + display: none .oe_view_manager_header2 td padding: 0px 8px @@ -1685,54 +1574,16 @@ $colour4: #8a89ba li height: auto line-height: 16px - .oe-select-create-popup-view-form > .oe_formview > .oe_form_pager - display: none !important - - // }}} - // FormView.one2many {{{ - .oe_form .oe_form_field_one2many > .oe_view_manager - .oe_list_pager_single_page - display: none // }}} // FormView.many2many {{{ .oe_form .oe_form_field_many2many > .oe-listview .oe_list_pager_single_page display: none // }}} - // FormView.classes for openerp views {{{ - .oe_form - td.oe_form_group_cell_label - border-right: 1px solid #ddd - padding: 2px 0px 2px 0px - label - line-height: 18px - display: block - min-width: 120px - td.oe_form_group_cell + .oe_form_group_cell - padding-left: 8px - .oe_form_subtotal_footer - width: auto - float: right - td.oe_form_group_cell - text-align: right - padding: 0 - td.oe_form_group_cell_label - border: none - .oe_form_field - width: auto !important - .oe_form_subtotal_footer_separator - border-top: 1px solid #cacaca - font-size: 120% - font-weight: bold - label.oe_form_subtotal_footer_separator - font-weight: bold !important - padding: 2px 8px 2px 0px !important - // }}} // ListView {{{ .oe-listview-content width: 100% td:first-child, th:first-child - width: 17px &:after border-width: 0 > thead @@ -1764,15 +1615,6 @@ $colour4: #8a89ba visibility: visible @include box-shadow(none) @include opacity(0.6) - // TODO mit - //th:hover:after - // border-bottom: none - // border-left: 4px solid transparent - // border-right: 4px solid transparent - // border-top: 4px solid #000 - // visibility: visible - // @include box-shadow(none) - // @include opacity(0.6) > tbody cursor: pointer background: white @@ -1815,23 +1657,6 @@ $colour4: #8a89ba .oe_trad_field.touched border: 1px solid green !important // }}} - // Tooltips {{{ - &.oe_tooltip - font-size: 12px - .oe_tooltip_string - color: #FD5 - font-weight: bold - font-size: 13px - .oe_tooltip_help - white-space: pre-wrap - .oe_tooltip_technical - padding: 0 0 4px 0 - margin: 5px 0 0 15px - li - list-style: circle - .oe_tooltip_technical_title - font-weight: bold - // }}} // View Editor {{{ .oe_view_editor width: 100% @@ -1868,7 +1693,6 @@ $colour4: #8a89ba float: right .oe_form_group_row_incomplete.oe_form_group_row_newline > td:last-child:after content: "[newline]" - .oe_debug_view float: left .oe_debug_view_log @@ -1886,7 +1710,6 @@ $colour4: #8a89ba float: right color: #333 // }}} - // Kitten Mode {{{ .kitten-mode-activated background-image: url(http://placekitten.com/g/1365/769) @@ -1896,16 +1719,5 @@ $colour4: #8a89ba opacity: 0.70 // }}} -// Transitional overrides for old styles {{{ -.openerp - .oe_form_field_many2one - td:first-child - position: relative - span.oe-m2o-drop-down-button - position: absolute - top: 3px - right: 2px -// }}} - // au BufWritePost,FileWritePost *.sass :!sass --style expanded --line-numbers <afile> > "%:p:r.css" // vim:tabstop=4:shiftwidth=4:softtabstop=4:fdm=marker: diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 833111c79db..6d3f506b6ab 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -206,7 +206,14 @@ instance.web.CrashManager = instance.web.CallbackEnabled.extend({ buttons: buttons }).open(); dialog.$element.html(QWeb.render('CrashManager.error', {session: instance.connection, error: error})); - } + }, + on_javascript_exception: function(exception) { + this.on_traceback({ + type: _t("Client Error"), + message: exception, + data: {debug: ""} + }); + }, }); instance.web.Loading = instance.web.Widget.extend({ @@ -575,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 @@ -599,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 @@ -669,7 +668,6 @@ instance.web.Menu = instance.web.Widget.extend({ */ menu_click: function(id) { if (id) { - 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) { @@ -701,9 +699,8 @@ instance.web.Menu = instance.web.Widget.extend({ * @param {Event} ev the jquery event */ on_menu_click: function(ev) { + ev.preventDefault(); this.menu_click($(ev.currentTarget).data('menu')); - ev.stopPropagation(); - return false; }, }); @@ -716,20 +713,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() { @@ -873,6 +862,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/coresetup.js b/addons/web/static/src/js/coresetup.js index 77355dd163a..955a46e6923 100644 --- a/addons/web/static/src/js/coresetup.js +++ b/addons/web/static/src/js/coresetup.js @@ -224,6 +224,7 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess } return loaded.then(function() { self.on_modules_loaded(); + self.trigger('module_loaded'); if (!no_session_valid_signal) { self.on_session_valid(); } @@ -400,6 +401,29 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess } }); +/** + * Event Bus used to bind events scoped in the current instance + */ +instance.web.bus = new (instance.web.Class.extend(instance.web.EventDispatcherMixin, { + init: function() { + instance.web.EventDispatcherMixin.init.call(this, parent); + var self = this; + // TODO fme: allow user to bind keys for some global actions. + // check gtk bindings + // http://unixpapa.com/js/key.html + _.each('click,dblclick,keydown,keypress,keyup'.split(','), function(evtype) { + $('html').on(evtype, self, function(ev) { + self.trigger(evtype, ev); + }); + }); + _.each('resize,scroll'.split(','), function(evtype) { + $(window).on(evtype, self, function(ev) { + self.trigger(evtype, ev); + }); + }); + } +}))(); + /** OpenERP Translations */ instance.web.TranslationDataBase = instance.web.Class.extend(/** @lends instance.web.TranslationDataBase# */{ /** @@ -454,64 +478,6 @@ instance.web.TranslationDataBase = instance.web.Class.extend(/** @lends instance } }); -/** Configure default qweb */ -instance.web._t = new instance.web.TranslationDataBase().build_translation_function(); -/** - * Lazy translation function, only performs the translation when actually - * printed (e.g. inserted into a template) - * - * Useful when defining translatable strings in code evaluated before the - * translation database is loaded, as class attributes or at the top-level of - * an OpenERP Web module - * - * @param {String} s string to translate - * @returns {Object} lazy translation object - */ -instance.web._lt = function (s) { - return {toString: function () { return instance.web._t(s); }} -}; -instance.web.qweb = new QWeb2.Engine(); -instance.web.qweb.debug = ($.deparam($.param.querystring()).debug != undefined); -instance.web.qweb.default_dict = { - '_' : _, - '_t' : instance.web._t -}; -instance.web.qweb.preprocess_node = function() { - // Note that 'this' is the Qweb Node - switch (this.node.nodeType) { - case 3: - case 4: - // Text and CDATAs - var translation = this.node.parentNode.attributes['t-translation']; - if (translation && translation.value === 'off') { - return; - } - var ts = _.str.trim(this.node.data); - if (ts.length === 0) { - return; - } - var tr = instance.web._t(ts); - if (tr !== ts) { - this.node.data = tr; - } - break; - case 1: - // Element - var attr, attrs = ['label', 'title', 'alt', 'placeholder']; - while (attr = attrs.pop()) { - if (this.attributes[attr]) { - this.attributes[attr] = instance.web._t(this.attributes[attr]); - } - } - } -}; - -/** Configure blockui */ -if ($.blockUI) { - $.blockUI.defaults.baseZ = 1100; - $.blockUI.defaults.message = '<img src="/web/static/src/img/throbber2.gif">'; -} - /** Custom jQuery plugins */ $.fn.getAttributes = function() { var o = {}; @@ -541,10 +507,6 @@ $.Mutex = (function() { return Mutex; })(); -/** Setup default session */ -instance.connection = new instance.web.Session(); -instance.web.qweb.default_dict['__debug__'] = instance.connection.debug; - $.async_when = function() { var async = false; var def = $.Deferred(); @@ -580,6 +542,79 @@ $.async_when = function() { return old_async_when.apply(this, arguments); }; +/** Setup blockui */ +if ($.blockUI) { + $.blockUI.defaults.baseZ = 1100; + $.blockUI.defaults.message = '<img src="/web/static/src/img/throbber2.gif">'; +} + +/** Setup default session */ +instance.connection = new instance.web.Session(); + +/** Configure default qweb */ +instance.web._t = new instance.web.TranslationDataBase().build_translation_function(); +/** + * Lazy translation function, only performs the translation when actually + * printed (e.g. inserted into a template) + * + * Useful when defining translatable strings in code evaluated before the + * translation database is loaded, as class attributes or at the top-level of + * an OpenERP Web module + * + * @param {String} s string to translate + * @returns {Object} lazy translation object + */ +instance.web._lt = function (s) { + return {toString: function () { return instance.web._t(s); }} +}; +instance.web.qweb = new QWeb2.Engine(); +instance.web.qweb.default_dict['__debug__'] = instance.connection.debug; // Which one ? +instance.web.qweb.debug = instance.connection.debug; +instance.web.qweb.default_dict = { + '_' : _, + '_t' : instance.web._t +}; +instance.web.qweb.preprocess_node = function() { + // Note that 'this' is the Qweb Node + switch (this.node.nodeType) { + case 3: + case 4: + // Text and CDATAs + var translation = this.node.parentNode.attributes['t-translation']; + if (translation && translation.value === 'off') { + return; + } + var ts = _.str.trim(this.node.data); + if (ts.length === 0) { + return; + } + var tr = instance.web._t(ts); + if (tr !== ts) { + this.node.data = tr; + } + break; + case 1: + // Element + var attr, attrs = ['label', 'title', 'alt', 'placeholder']; + while (attr = attrs.pop()) { + if (this.attributes[attr]) { + this.attributes[attr] = instance.web._t(this.attributes[attr]); + } + } + } +}; + +/** Setup jQuery timeago */ +var timeago_setup = function () { + var s = $.timeago.settings.strings; + _.each(s, function(v,k) { + if(_.isString(v)) { + s[k] = instance.web._t(v); + } + }); +} +instance.connection.on('module_loaded', this, timeago_setup); + /** * Registry for all the client actions key: tag value: widget */ @@ -589,23 +624,27 @@ instance.web.client_actions = new instance.web.Registry(); * Client action to reload the whole interface. * If params has an entry 'menu_id', it opens the given menu entry. */ -instance.web.client_actions.add("reload", "instance.web.Reload"); - instance.web.Reload = instance.web.Widget.extend({ init: function(parent, params) { this._super(parent); this.menu_id = (params && params.menu_id) || false; }, start: function() { + var l = window.location; + var timestamp = new Date().getTime(); + var search = "?ts=" + timestamp; + if (l.search) { + search = l.search + "&ts=" + timestamp; + } + var hash = l.hash; if (this.menu_id) { - // open the given menu id - var url_without_fragment = window.location.toString().split("#", 1)[0]; - window.location = url_without_fragment + "#menu_id=" + this.menu_id; - } else { - window.location.reload(); + hash = "#menu_id=" + this.menu_id; } + var url = l.protocol + "//" + l.host + l.pathname + search + hash; + window.location = url; } }); +instance.web.client_actions.add("reload", "instance.web.Reload"); }; 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 46c66537690..16141ce7be5 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -33,7 +33,7 @@ instance.web.form.FieldManagerMixin = { }; instance.web.views.add('form', 'instance.web.FormView'); -instance.web.FormView = instance.web.View.extend(_.extend({}, instance.web.form.FieldManagerMixin, { +instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerMixin, { /** * Indicates that this view is not searchable, and thus that no search * view should be displayed (if there is one active). @@ -472,7 +472,7 @@ instance.web.FormView = instance.web.View.extend(_.extend({}, instance.web.form. return self.on_processed_onchange(response, processed); } catch(e) { - console.error(e); + instance.webclient.crashmanager.on_javascript_exception(e); return $.Deferred().reject(); } }); @@ -891,7 +891,7 @@ instance.web.FormView = instance.web.View.extend(_.extend({}, instance.web.form. is_create_mode: function() { return !this.datarecord.id; }, -})); +}); /** * Interface to be implemented by rendering engines for the form view. @@ -1438,7 +1438,7 @@ instance.web.form.InvisibilityChangerMixin = { }, }; -instance.web.form.InvisibilityChanger = instance.web.Class.extend(_.extend({}, instance.web.PropertiesMixin, instance.web.form.InvisibilityChangerMixin, { +instance.web.form.InvisibilityChanger = instance.web.Class.extend(instance.web.PropertiesMixin, instance.web.form.InvisibilityChangerMixin, { init: function(parent, field_manager, invisible_domain, $element) { this.setParent(parent); instance.web.PropertiesMixin.init.call(this); @@ -1446,9 +1446,9 @@ instance.web.form.InvisibilityChanger = instance.web.Class.extend(_.extend({}, i this.$element = $element; this.start(); }, -})); +}); -instance.web.form.FormWidget = instance.web.Widget.extend(_.extend({}, instance.web.form.InvisibilityChangerMixin, { +instance.web.form.FormWidget = instance.web.Widget.extend(instance.web.form.InvisibilityChangerMixin, { /** * @constructs instance.web.form.FormWidget * @extends instance.web.Widget @@ -1554,7 +1554,7 @@ instance.web.form.FormWidget = instance.web.Widget.extend(_.extend({}, instance. } return final_domain; } -})); +}); instance.web.form.WidgetButton = instance.web.form.FormWidget.extend({ template: 'WidgetButton', @@ -1652,7 +1652,7 @@ instance.web.form.WidgetButton = instance.web.form.FormWidget.extend({ * - changed_value: triggered to inform the view to check on_changes * */ -instance.web.form.FieldMixin = { +instance.web.form.FieldInterface = { /** * Constructor takes 2 arguments: * - field_manager: Implements FieldManagerMixin @@ -1716,7 +1716,7 @@ instance.web.form.FieldMixin = { }; /** - * Abstract class for classes implementing FieldMixin. + * Abstract class for classes implementing FieldInterface. * * Properties: * - effective_readonly: when it is true, the widget is displayed as readonly. Vary depending @@ -1726,7 +1726,7 @@ instance.web.form.FieldMixin = { * a 'changed_value' event that inform the view to trigger on_changes. * */ -instance.web.form.AbstractField = instance.web.form.FormWidget.extend(_.extend({}, instance.web.form.FieldMixin, { +instance.web.form.AbstractField = instance.web.form.FormWidget.extend(instance.web.form.FieldInterface, { /** * @constructs instance.web.form.AbstractField * @extends instance.web.form.FormWidget @@ -1844,7 +1844,7 @@ instance.web.form.AbstractField = instance.web.form.FormWidget.extend(_.extend({ set_input_id: function(id) { this.id_for_label = id; }, -})); +}); /** * A mixin to apply on any field that has to completely re-render when its readonly state @@ -1883,7 +1883,7 @@ instance.web.form.ReinitializeFieldMixin = { render_value: function() {}, }; -instance.web.form.FieldChar = instance.web.form.AbstractField.extend(_.extend({}, instance.web.form.ReinitializeFieldMixin, { +instance.web.form.FieldChar = instance.web.form.AbstractField.extend(instance.web.form.ReinitializeFieldMixin, { template: 'FieldChar', widget_class: 'oe_form_field_char', init: function (field_manager, node) { @@ -1928,7 +1928,7 @@ instance.web.form.FieldChar = instance.web.form.AbstractField.extend(_.extend({} focus: function() { this.delay_focus(this.$element.find('input:first')); } -})); +}); instance.web.form.FieldID = instance.web.form.FieldChar.extend({ @@ -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; } @@ -2094,7 +2094,7 @@ instance.web.DateWidget = instance.web.DateTimeWidget.extend({ type_of_date: "date" }); -instance.web.form.FieldDatetime = instance.web.form.AbstractField.extend(_.extend({}, instance.web.form.ReinitializeFieldMixin, { +instance.web.form.FieldDatetime = instance.web.form.AbstractField.extend(instance.web.form.ReinitializeFieldMixin, { template: "FieldDatetime", build_widget: function() { return new instance.web.DateTimeWidget(this); @@ -2138,7 +2138,7 @@ instance.web.form.FieldDatetime = instance.web.form.AbstractField.extend(_.exten if (this.datewidget && this.datewidget.$input) this.delay_focus(this.datewidget.$input); } -})); +}); instance.web.form.FieldDate = instance.web.form.FieldDatetime.extend({ template: "FieldDate", @@ -2147,7 +2147,7 @@ instance.web.form.FieldDate = instance.web.form.FieldDatetime.extend({ } }); -instance.web.form.FieldText = instance.web.form.AbstractField.extend(_.extend({}, instance.web.form.ReinitializeFieldMixin, { +instance.web.form.FieldText = instance.web.form.AbstractField.extend(instance.web.form.ReinitializeFieldMixin, { template: 'FieldText', initialize_content: function() { this.$textarea = this.$element.find('textarea'); @@ -2207,7 +2207,7 @@ instance.web.form.FieldText = instance.web.form.AbstractField.extend(_.extend({} $div.remove(); $input.height(new_height); }, -})); +}); instance.web.form.FieldBoolean = instance.web.form.AbstractField.extend({ template: 'FieldBoolean', @@ -2256,7 +2256,7 @@ instance.web.form.FieldTextXml = instance.web.form.AbstractField.extend({ // to replace view editor }); -instance.web.form.FieldSelection = instance.web.form.AbstractField.extend(_.extend({}, instance.web.form.ReinitializeFieldMixin, { +instance.web.form.FieldSelection = instance.web.form.AbstractField.extend(instance.web.form.ReinitializeFieldMixin, { template: 'FieldSelection', init: function(field_manager, node) { var self = this; @@ -2324,7 +2324,7 @@ instance.web.form.FieldSelection = instance.web.form.AbstractField.extend(_.exte focus: function() { this.delay_focus(this.$element.find('select:first')); } -})); +}); // jquery autocomplete tweak to allow html (function() { @@ -2409,7 +2409,7 @@ instance.web.form.CompletionFieldMixin = { } // create... values.push({label: _t("<em> Create and Edit...</em>"), action: function() { - self._search_create_popup("form", undefined, {"default_name": search_val}); + self._search_create_popup("form", undefined, {}); }}); return values; @@ -2459,8 +2459,7 @@ instance.web.form.CompletionFieldMixin = { add_id: function(id) {}, }; -instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(_.extend({}, instance.web.form.ReinitializeFieldMixin, - instance.web.form.CompletionFieldMixin, { +instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instance.web.form.CompletionFieldMixin, instance.web.form.ReinitializeFieldMixin, { template: "FieldMany2One", init: function(field_manager, node) { this._super(field_manager, node); @@ -2543,6 +2542,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(_.exten var tip_delay = 200; var tip_duration = 3000; var anyoneLoosesFocus = function() { + var used = false; if (self.floating) { if (self.last_search.length > 0) { if (self.last_search[0][0] != self.get("value")) { @@ -2550,13 +2550,17 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(_.exten self.display_value["" + self.last_search[0][0]] = self.last_search[0][1]; self.set({value: self.last_search[0][0]}); } else { + used = true; self.render_value(); } } else { + used = true; self.set({value: false}); + self.render_value(); } + self.floating = false; } - if (! self.get("value")) { + if (used) { tip_def.reject(); untip_def.reject(); tip_def = $.Deferred(); @@ -2603,7 +2607,8 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(_.exten e.preventDefault(); }, html: true, - close: anyoneLoosesFocus, + // disabled to solve a bug, but may cause others + //close: anyoneLoosesFocus, minLength: 0, delay: 0 }); @@ -2680,7 +2685,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(_.exten focus: function () { this.delay_focus(this.$input); } -})); +}); /* # Values: (0, 0, { fields }) create @@ -2781,9 +2786,11 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({ var views = []; _.each(modes, function(mode) { if (! _.include(["list", "tree", "graph", "kanban"], mode)) { - instance.webclient.notification.warn( - _.str.sprintf("View type '%s' is not supported in One2Many.", mode)); - return; + try { + throw new Error(_.str.sprintf("View type '%s' is not supported in One2Many.", mode)); + } catch(e) { + instance.webclient.crashmanager.on_javascript_exception(e) + } } var view = { view_id: false, @@ -2795,9 +2802,11 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({ } if(view.view_type === "list") { view.options.selectable = self.multi_selection; + view.options.sortable = false; if (self.get("effective_readonly")) { view.options.addable = null; view.options.deletable = null; + view.options.reorderable = false; } } else if (view.view_type === "form") { if (self.get("effective_readonly")) { @@ -2806,7 +2815,6 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({ view.options.not_interactible_on_create = true; } else if (view.view_type === "kanban") { view.options.confirm_on_delete = false; - view.options.sortable = false; if (self.get("effective_readonly")) { view.options.action_buttons = false; view.options.quick_creatable = false; @@ -2819,6 +2827,7 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({ this.views = views; this.viewmanager = new instance.web.form.One2ManyViewManager(this, this.dataset, views, {}); + this.viewmanager.$element.addClass("oe_view_manager_one2many"); this.viewmanager.o2m = self; var once = $.Deferred().then(function() { self.init_form_last_update.resolve(); @@ -3142,8 +3151,7 @@ instance.web.form.One2ManyKanbanView = instance.web_kanban.KanbanView.extend({ }); } -instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(_.extend({}, instance.web.form.CompletionFieldMixin, - instance.web.form.ReinitializeFieldMixin, { +instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(instance.web.form.CompletionFieldMixin, instance.web.form.ReinitializeFieldMixin, { template: "FieldMany2ManyTags", init: function() { this._super.apply(this, arguments); @@ -3267,7 +3275,7 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(_. add_id: function(id) { this.set({'value': _.uniq(this.get('value').concat([id]))}); }, -})); +}); /* * TODO niv: clean those deferred stuff, it could be better @@ -3328,6 +3336,7 @@ instance.web.form.FieldMany2Many = instance.web.form.AbstractField.extend({ 'deletable': self.get("effective_readonly") ? false : true, 'selectable': self.multi_selection, 'sortable': false, + 'reorderable': false, }); var embedded = (this.field.views || {}).tree; if (embedded) { @@ -3401,7 +3410,7 @@ instance.web.form.Many2ManyListView = instance.web.ListView.extend(/** @lends in } }); -instance.web.form.FieldMany2ManyKanban = instance.web.form.AbstractField.extend(_.extend({}, instance.web.form.CompletionFieldMixin, { +instance.web.form.FieldMany2ManyKanban = instance.web.form.AbstractField.extend(instance.web.form.CompletionFieldMixin, { disable_utility_classes: true, init: function(field_manager, node) { this._super(field_manager, node); @@ -3524,7 +3533,7 @@ instance.web.form.FieldMany2ManyKanban = instance.web.form.AbstractField.extend( add_id: function(id) { this.quick_create.add_id(id); }, -})); +}); function m2m_kanban_lazy_init() { if (instance.web.form.Many2ManyKanbanView) @@ -3877,7 +3886,7 @@ instance.web.form.SelectCreateListView = instance.web.ListView.extend({ } }); -instance.web.form.FieldReference = instance.web.form.AbstractField.extend(_.extend({}, instance.web.form.ReinitializeFieldMixin, { +instance.web.form.FieldReference = instance.web.form.AbstractField.extend(instance.web.form.ReinitializeFieldMixin, { template: 'FieldReference', init: function(field_manager, node) { this._super(field_manager, node); @@ -3969,9 +3978,9 @@ instance.web.form.FieldReference = instance.web.form.AbstractField.extend(_.exte } throw Exception("Should not happen"); }, -})); +}); -instance.web.form.FieldBinary = instance.web.form.AbstractField.extend(_.extend({}, instance.web.form.ReinitializeFieldMixin, { +instance.web.form.FieldBinary = instance.web.form.AbstractField.extend(instance.web.form.ReinitializeFieldMixin, { init: function(field_manager, node) { var self = this; this._super(field_manager, node); @@ -3988,7 +3997,7 @@ instance.web.form.FieldBinary = instance.web.form.AbstractField.extend(_.extend( }, initialize_content: function() { this.$element.find('input.oe-binary-file').change(this.on_file_change); - this.$element.find('button.oe-binary-file-save').click(this.on_save_as); + this.$element.find('button.oe_binary_file_save').click(this.on_save_as); this.$element.find('.oe-binary-file-clear').click(this.on_clear); }, human_filesize : function(size) { @@ -4018,6 +4027,7 @@ instance.web.form.FieldBinary = instance.web.form.AbstractField.extend(_.extend( // TODO: use openerp web crashmanager console.warn("Error while uploading file : ", name); } else { + this.filename = name; this.on_file_uploaded_and_valid.apply(this, arguments); } this.$element.find('.oe-binary-progress').hide(); @@ -4025,20 +4035,33 @@ instance.web.form.FieldBinary = instance.web.form.AbstractField.extend(_.extend( }, on_file_uploaded_and_valid: function(size, name, content_type, file_base64) { }, - on_save_as: function() { - $.blockUI(); - this.session.get_file({ - url: '/web/binary/saveas_ajax', - data: {data: JSON.stringify({ - model: this.view.dataset.model, - id: (this.view.datarecord.id || ''), - field: this.name, - filename_field: (this.node.attrs.filename || ''), - context: this.view.dataset.get_context() - })}, - complete: $.unblockUI, - error: instance.webclient.crashmanager.on_rpc_error - }); + on_save_as: function(ev) { + var value = this.get('value'); + if (!value) { + this.do_warn(_t("Save As..."), _t("The field is empty, there's nothing to save !")); + ev.stopPropagation(); + } else if (this._dirty_flag) { + var link = this.$('.oe_binary_file_save_data')[0]; + link.download = this.filename || "download.bin"; // Works on only on Google Chrome + //link.target = '_blank'; + link.href = "data:application/octet-stream;base64," + value; + } else { + $.blockUI(); + this.session.get_file({ + url: '/web/binary/saveas_ajax', + data: {data: JSON.stringify({ + model: this.view.dataset.model, + id: (this.view.datarecord.id || ''), + field: this.name, + filename_field: (this.node.attrs.filename || ''), + context: this.view.dataset.get_context() + })}, + complete: $.unblockUI, + error: instance.webclient.crashmanager.on_rpc_error + }); + ev.stopPropagation(); + return false; + } }, on_clear: function() { if (this.get('value') !== false) { @@ -4047,7 +4070,7 @@ instance.web.form.FieldBinary = instance.web.form.AbstractField.extend(_.extend( } return false; } -})); +}); instance.web.form.FieldBinaryFile = instance.web.form.FieldBinary.extend({ template: 'FieldBinaryFile', @@ -4260,7 +4283,7 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({ /** * Registry of form fields, called by :js:`instance.web.FormView`. * - * All referenced classes must implement FieldMixin. Those represent the classes whose instances + * All referenced classes must implement FieldInterface. Those represent the classes whose instances * will substitute to the <field> tags as defined in OpenERP's views. */ instance.web.form.widgets = new instance.web.Registry({ diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 4d677364e41..95b87e3cd86 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -77,7 +77,14 @@ instance.web.ActionManager = instance.web.Widget.extend({ }); } else if (state.client_action) { this.null_action(); - this.ir_actions_client(state.client_action); + var action = state.client_action; + if(_.isString(action)) { + action = { + tag: action, + params: state, + }; + } + this.ir_actions_client(action); } $.when(action_loaded || null).then(function() { @@ -150,6 +157,7 @@ instance.web.ActionManager = instance.web.Widget.extend({ this.inner_action = action; this.inner_viewmanager = new instance.web.ViewManagerAction(this, action); this.inner_viewmanager.appendTo(this.$element); + this.inner_viewmanager.$element.addClass("oe_view_manager_global"); } }, ir_actions_act_window_close: function (action, on_closed) { @@ -320,7 +328,7 @@ instance.web.ViewManager = instance.web.Widget.extend({ } this.$element - .find('.oe_view_manager_switch a').parent().removeClass('active') + .find('.oe_view_manager_switch a').parent().removeClass('active'); this.$element .find('.oe_view_manager_switch a').filter('[data-view-type="' + view_type + '"]') .parent().addClass('active'); @@ -329,9 +337,12 @@ instance.web.ViewManager = instance.web.Widget.extend({ _.each(_.keys(self.views), function(view_name) { var controller = self.views[view_name].controller; if (controller) { + var container = self.$element.find(".oe_view_manager_view_" + view_name + ":first"); if (view_name === view_type) { + container.show(); controller.do_show(view_options || {}); } else { + container.hide(); controller.do_hide(); } } @@ -728,14 +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) { - $(this).parent().find('ul').toggle(); - return false; - }); 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]); @@ -744,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 b90addb0a2c..e293ffc7adb 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -117,7 +117,7 @@ <t t-name="DatabaseManager"> <div class="oe_database_manager"> <div class="oe_database_manager_menu"> - <ul class="oe_form_notebook"> + <ul class="oe_notebook"> <li><a href="#db_create">Create</a></li> <li><a href="#db_drop">Drop</a></li> <li><a href="#db_backup">Backup</a></li> @@ -273,8 +273,10 @@ </t> <t t-name="Menu.more"> <li class="oe_menu_more_container"> - <a href="#" class="oe_menu_more_link oe_dropdown_toggle">More</a> - <ul class="oe_menu_more" style="display: none;"/> + <span class="oe_topbar_item oe_menu_more_link oe_dropdown_toggle oe_dropdown_arrow"> + More + <ul class="oe_menu_more oe_dropdown_menu"/> + </span> </li> </t> <t t-name="Menu.secondary"> @@ -316,19 +318,15 @@ </t> <t t-name="UserMenu"> - <ul class="oe_user_menu oe_topbar_item"> - <li class="oe_dropdown"> - <a href="#" class="oe_dropdown_toggle"> - <img class="oe_topbar_avatar" t-att-data-default-src="_s + '/web/static/src/img/user_menu_avatar.png'"/> - <span class="oe_topbar_name"/> - </a> - <ul class="oe_dropdown_options"> - <li><a href="#" data-menu="about">About OpenERP</a></li> - <li><a href="#" data-menu="settings">Preferences</a></li> - <li><a href="#" data-menu="logout">Log out</a></li> - </ul> - </li> - </ul> + <span class="oe_user_menu oe_topbar_item oe_dropdown_toggle oe_dropdown_arrow"> + <img class="oe_topbar_avatar" t-att-data-default-src="_s + '/web/static/src/img/user_menu_avatar.png'"/> + <span class="oe_topbar_name"/> + <ul class="oe_dropdown_menu"> + <li><a href="#" data-menu="about">About OpenERP</a></li> + <li><a href="#" data-menu="settings">Preferences</a></li> + <li><a href="#" data-menu="logout">Log out</a></li> + </ul> + </span> </t> <t t-name="UserMenu.about"> <div> @@ -423,8 +421,8 @@ </td> <td> <ul class="oe_view_manager_switch oe_button_group oe_right"> - <t t-if="widget.views_src.length > 2" t-foreach="widget.views_src" t-as="view"> - <li t-if="view.view_type != 'form'" class="oe_e"><a t-attf-class="oe_vm_switch_#{view.view_type}" t-att-data-view-type="view.view_type" t-att-title="_t('Switch to ') + (view.label || view.view_type)"> + <t t-if="widget.views_src.length > 1" t-foreach="widget.views_src" t-as="view"> + <li class="oe_e"><a t-attf-class="oe_vm_switch_#{view.view_type}" t-att-data-view-type="view.view_type" t-att-title="_t('Switch to ') + (view.label || view.view_type)"> </a></li> </t> </ul> @@ -433,7 +431,6 @@ </tr> </table> - <div class="oe_view_manager_body"> <t t-foreach="widget.views_src" t-as="view"> <div t-attf-class="oe_view_manager_view_#{view.view_type}"/> @@ -511,25 +508,27 @@ <div class="oe_sidebar"> <t t-foreach="widget.sections" t-as="section"> <div class="oe_form_dropdown_section"> - <button class="oe_dropdown_toggle"><t t-esc="section.label"/></button> - <ul class="oe_dropdown_menu"> - <li t-foreach="widget.items[section.name]" t-as="item" t-att-class="item.classname"> - <a class="oe_sidebar_action_a" t-att-title="item.title" t-att-data-section="section.name" t-att-data-index="item_index" t-att-href="item.url" target="_blank"> - <t t-raw="item.label"/> - </a> - <a class="oe_sidebar_delete_item" t-att-data-id="item.id" title="Delete this attachment">x</a> - </li> - <li t-if="section.name == 'files'" class="oe_sidebar_add_attachment"> - <t t-call="HiddenInputFile"> - <t t-set="fileupload_id" t-value="widget.fileupload_id"/> - <t t-set="fileupload_action">/web/binary/upload_attachment</t> - <input type="hidden" name="model" t-att-value="widget.dataset and widget.dataset.model"/> - <input type="hidden" name="id" t-att-value="widget.model_id"/> - <input type="hidden" name="session_id" t-att-value="widget.session.session_id"/> - <span>Add...</span> - </t> - </li> - </ul> + <button class="oe_dropdown_toggle oe_dropdown_arrow"> + <t t-esc="section.label"/> + <ul class="oe_dropdown_menu"> + <li t-foreach="widget.items[section.name]" t-as="item" t-att-class="item.classname"> + <a class="oe_sidebar_action_a" t-att-title="item.title" t-att-data-section="section.name" t-att-data-index="item_index" t-att-href="item.url" target="_blank"> + <t t-raw="item.label"/> + </a> + <a t-if="section.name == 'files'" class="oe_sidebar_delete_item" t-att-data-id="item.id" title="Delete this attachment">x</a> + </li> + <li t-if="section.name == 'files'" class="oe_sidebar_add_attachment"> + <t t-call="HiddenInputFile"> + <t t-set="fileupload_id" t-value="widget.fileupload_id"/> + <t t-set="fileupload_action">/web/binary/upload_attachment</t> + <input type="hidden" name="model" t-att-value="widget.dataset and widget.dataset.model"/> + <input type="hidden" name="id" t-att-value="widget.model_id"/> + <input type="hidden" name="session_id" t-att-value="widget.session.session_id"/> + <span>Add...</span> + </t> + </li> + </ul> + </button> </div> </t> </div> @@ -617,7 +616,7 @@ </table> <div t-name="ListView.buttons" class="oe_list_buttons"> <t t-if="!widget.no_leaf and widget.options.action_buttons !== false and widget.options.addable"> - <button type="button" class="oe_button oe_list_add oe_form_button_hi"> + <button type="button" class="oe_button oe_list_add oe_highlight"> <t t-esc="widget.options.addable"/> </button> <span class="oe_fade">or</span> <a href="#" class="oe_bold oe_list_button_import">Import</a> @@ -765,11 +764,11 @@ </t> <t t-name="FormRenderingGroup"> <t t-if="string" t-call="FormRenderingSeparator"/> - <table border="0" cellpadding="0" cellspacing="0" width="100%" t-attf-class="oe_form_group #{classnames}"/> + <table border="0" cellpadding="0" cellspacing="0" t-attf-class="oe_form_group #{classnames}"/> </t> <t t-name="FormRenderingNotebook"> <div> - <ul t-attf-class="oe_form_notebook #{classnames}"> + <ul t-attf-class="oe_notebook #{classnames}"> <li t-foreach="pages" t-as="page" t-att-modifiers="page.modifiers"> <a t-attf-href="##{page.id}"> <t t-esc="page.string"/> @@ -779,7 +778,7 @@ </div> </t> <t t-name="FormRenderingNotebookPage"> - <div t-attf-class="oe_form_notebook_page #{classnames}" t-att-id="id"> + <div t-attf-class="oe_notebook_page #{classnames}" t-att-id="id"> </div> </t> <t t-name="FormRenderingSeparator"> @@ -877,9 +876,6 @@ <span class="oe_form_field oe_form_field_email oe_form_field_with_button"> <a t-if="widget.get('effective_readonly')" href="#" class="oe_form_uri"/> <t t-if="!widget.get('effective_readonly')"> - <button class="oe_button" tabindex="-1" type="button" title="Send an e-mail with your default e-mail client"> - <img t-att-src='_s + "/web/static/src/img/icons/terp-mail-message-new.png"'/> - </button> <div> <input type="text" t-att-id="widget.id_for_label" @@ -983,7 +979,7 @@ </t> </t> <t t-name="FieldReference"> - <table class="oe_form_field oe_form_field_reference oe_form" border="0" cellpadding="0" cellspacing="0"> + <table class="oe_form_field oe_form_field_reference" border="0" cellpadding="0" cellspacing="0"> <tr> <td t-attf-class="oe_form_frame_cell oe_form_selection"> <span t-attf-class="oe_form_view_reference_selection"/> @@ -1023,7 +1019,7 @@ </t> <t t-name="FieldBinaryImage"> <span class="oe_form_field oe_form_field_image"> - <div class="oe_form_field_image_controls oe_form_readonly_hidden"> + <div class="oe_form_field_image_controls oe_edit_only"> <t t-call="HiddenInputFile"> <t t-set="fileupload_id" t-value="widget.fileupload_id"/> <button class="oe_button" type="button" title="Set Image"> @@ -1074,10 +1070,12 @@ </t> </td> <td> - <button class="oe_button oe-binary-file-save" type="button" title="Save As"> - <img t-att-src='_s + "/web/static/src/img/icons/gtk-save.png"'/> - <span>Save As</span> - </button> + <a class="oe_binary_file_save_data"> + <button class="oe_button oe_binary_file_save" type="button" title="Save As"> + <img t-att-src='_s + "/web/static/src/img/icons/gtk-save.png"'/> + <span>Save As</span> + </button> + </a> </td> <td> <button class="oe_button oe-binary-file-clear" type="button" title="Clear"> @@ -1176,8 +1174,6 @@ </t> <t t-name="One2Many.viewmanager" t-extend="ViewManager"> - <t t-jquery=".oe_header_row_top" t-operation="replace"/> - <t t-jquery=".oe-view-manager-header"> this.attr('t-if', 'views.length != 1'); </t> @@ -1254,7 +1250,7 @@ </div> </t> <t t-name="SearchView.add_to_dashboard"> - <div class="oe_form"> + <div> <p><b>Select Dashboard to add this filter to:</b></p> <select style="width: 100%; margin-right: 1em;"> <option t-foreach="dashboards" t-as="menu" t-att-value="menu.id" t-att-selected="(menu.id == selected_menu_id) || undefined"><t t-esc="menu.name"/></option> |
