diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index b3082126142..2714925583b 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -1,4 +1,4 @@ -@charset "utf-8"; +@charset "UTF-8"; @font-face { font-family: "mnmliconsRegular"; src: url("/web/static/src/font/mnmliconsv21-webfont.eot") format("eot"); @@ -9,6 +9,17 @@ font-style: normal; } +@font-face { + font-family: "EntypoRegular"; + src: url("/web/static/src/font/entypo-webfont.eot") format("eot"); + src: url("/web/static/src/font/entypo-webfont.eot?#iefix") format("embedded-opentype"); + src: url("/web/static/src/font/entypo-webfont.woff") format("woff"); + src: url("/web/static/src/font/entypo-webfont.ttf") format("truetype"); + src: url("/web/static/src/font/entypo-webfont.svg") format("svg") active; + font-weight: normal; + font-style: normal; +} + .openerp.openerp-web-client-container { height: 100%; position: relative; @@ -93,6 +104,11 @@ 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; @@ -107,6 +123,12 @@ .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; @@ -426,7 +448,6 @@ width: 100%; height: 31px; border-top: solid 1px #d3d3d3; - border-bottom: solid 1px black; background-color: #646060; background-image: -webkit-gradient(linear, left top, left bottom, from(#646060), to(#262626)); background-image: -webkit-linear-gradient(top, #646060, #262626); @@ -435,13 +456,6 @@ background-image: -o-linear-gradient(top, #646060, #262626); background-image: linear-gradient(to bottom, #646060, #262626); } -.openerp .oe_topbar .oe_systray { - float: right; -} -.openerp .oe_topbar .oe_systray > div { - float: left; - padding: 0 4px 0 4px; -} .openerp .oe_topbar .oe_topbar_item li { float: left; } @@ -500,6 +514,7 @@ background: #f0eeee; border-right: 1px solid #afafb6; text-shadow: 0 1px 1px white; + padding-bottom: 16px; } .openerp a.oe_logo { width: 220px; @@ -596,6 +611,72 @@ -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; + padding: 0 4px 0 4px; +} +.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; @@ -657,16 +738,16 @@ width: 100%; display: inline-block; } -.openerp .oe_secondary_submenu li { +.openerp .oe_secondary_submenu > li { position: relative; - padding: 1px 0 1px 16px; + padding: 1px 0 1px 20px; } -.openerp .oe_secondary_submenu li a { +.openerp .oe_secondary_submenu > li a { display: block; color: #4c4c4c; padding: 2px 4px 2px 0; } -.openerp .oe_secondary_submenu li .oe_menu_label { +.openerp .oe_secondary_submenu > li .oe_menu_label { position: absolute; top: 1px; right: 1px; @@ -728,7 +809,7 @@ content: "&darr"; text-indent: -99999px; vertical-align: top; - margin-left: -8px; + margin-left: -12px; margin-top: 4px; margin-right: 4px; border-top: 4px solid transparent; @@ -739,7 +820,7 @@ } .openerp .oe_secondary_submenu .oe_menu_opened:before { margin-top: 6px; - margin-left: -12px; + margin-left: -16px; margin-right: 4px; border-left: 4px solid transparent; border-right: 4px solid transparent; @@ -844,7 +925,7 @@ color: white; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); } -.openerp .oe_view_manager_header2 { +.openerp .oe_view_manager_header { width: 100%; border-top: 1px solid #cacaca; border-bottom: 1px solid #cacaca; @@ -859,54 +940,74 @@ -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_header2 h2 { - float: left; - font-size: 18px; - margin: 1px 0; +.openerp .oe_view_manager_header .oe_header_row { + clear: both; + text-shadow: 0 1px 1px white; } -.openerp .oe_view_manager_header2 h2 a { - color: #8a89ba; +.openerp .oe_view_manager_header .oe_header_row td { + padding: 8px; } -.openerp .oe_view_manager_header2 td { - padding: 4px 8px; +.openerp .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 { + margin: 0px auto; + width: 400px; + text-align: center; +} +.openerp .oe_view_manager_header td { line-height: 26px; } -.openerp .oe_view_manager_header2 .oe_button_group { +.openerp .oe_view_manager_header h2 { + font-size: 18px; + margin: 0; + float: left; +} +.openerp .oe_view_manager_header h2 a { + color: #8a89ba; +} +.openerp .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_header2 .oe_button_group li { +.openerp .oe_view_manager_header .oe_button_group li { float: left; border-right: 1px solid #ababab; } -.openerp .oe_view_manager_header2 .oe_button_group li:last-child { +.openerp .oe_view_manager_header .oe_button_group li:last-child { border: none; } -.openerp .oe_view_manager_header2 .oe_button_group a { +.openerp .oe_view_manager_header .oe_button_group a { color: #4c4c4c; } -.openerp .oe_view_manager_header2 .oe_button_group a:hover { +.openerp .oe_view_manager_header .oe_button_group a:hover { text-decoration: none; } -.openerp .oe_view_manager_header2 .oe_button_group .active { +.openerp .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_header2 .oe_button_group .active a { +.openerp .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_header2 .oe_view_manager_buttons { +.openerp .oe_view_manager_header .oe_view_manager_buttons { white-space: nowrap; } .openerp .oe_view_manager_body h4 { margin: 8px 0; } +.openerp .oe_view_manager_pager { + line-height: 26px; +} .openerp .oe_pager_value { float: left; margin-right: 8px; @@ -950,34 +1051,41 @@ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); } .openerp .oe_view_manager_switch li { - padding-left: 1px; text-align: center; width: 24px; height: 24px; - line-height: 24px; + line-height: 16px; +} +.openerp .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 { - content: "ö"; + padding: 2px; + content: "i"; } .openerp .oe_view_manager_switch .oe_vm_switch_graph:after { - content: "ó"; + font-family: "mnmliconsRegular" !important; + font-size: 21px; + font-weight: 300 !important; + content: "}"; + top: -2px; + position: relative; } .openerp .oe_view_manager_switch .oe_vm_switch_gantt:after { - content: "y"; + content: "c"; } .openerp .oe_view_manager_switch .oe_vm_switch_calendar:after { - content: "b"; + content: "P"; } .openerp .oe_view_manager_switch .oe_vm_switch_kanban:after { - content: "ó"; + content: "k"; } .openerp .oe_view_manager_switch .oe_vm_switch_diagram:after { - content: "}"; + content: "f"; } .openerp .oe_form_dropdown_section { position: relative; display: inline-block; - margin-right: 4px; } .openerp .oe_dropdown_toggle:after { width: 0; @@ -1028,6 +1136,7 @@ line-height: 14px; color: #4c4c4c; text-decoration: none; + cursor: pointer; } .openerp .oe_dropdown_menu li a:hover { text-decoration: none; @@ -1051,18 +1160,28 @@ } .openerp .oe_searchview .VS-search .VS-search-box { min-height: 0; - border-width: 1px; padding: 0; - width: 410px; + width: 480px; + border: 1px solid #ababab; + -moz-border-radius: 13px; + -webkit-border-radius: 13px; + border-radius: 13px; + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset; + -box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset; } .openerp .oe_searchview .VS-search .VS-icon { - top: 5px; + top: 6px; } .openerp .oe_searchview .VS-search .VS-icon-search { - left: 5px; + left: 2px; + top: 3px; + height: 18px; + width: 18px; } .openerp .oe_searchview .VS-search .VS-search-inner { margin: 0 40px 0 17px; + padding: 1px 0; font-size: 13px; } .openerp .oe_searchview .VS-search .VS-search-inner input { @@ -1080,7 +1199,6 @@ height: 22px; } .openerp .oe_searchview .VS-search .VS-search-inner .search_input input, .openerp .oe_searchview .VS-search .VS-search-inner .search_input .VS-input-width-tester { - padding: 0 2px; height: inherit; margin: 0; } @@ -1140,11 +1258,23 @@ height: 100%; line-height: 23px; padding: 0 7px 0 4px; - color: #cccccc; + color: #4c4c4c; cursor: pointer; } .openerp .oe_searchview .VS-search .oe_vs_unfold_drawer:before { - content: "▾"; + position: absolute; + top: 9px; + right: 8px; + width: 0; + height: 0; + display: inline-block; + content: ""; + vertical-align: top; + border-top: 5px solid #4c4c4c; + border-left: 5px solid transparent; + border-right: 5px solid transparent; + filter: alpha(opacity=50); + opacity: 0.5; } .openerp .oe_searchview.oe_searchview_open_drawer .oe_searchview_drawer { display: block; @@ -1155,7 +1285,7 @@ top: 100%; right: 0; background-color: white; - width: 410px; + width: 480px; display: none; border: 1px solid #cccccc; text-align: left; @@ -1221,6 +1351,15 @@ .openerp .oe_searchview .oe_searchview_drawer .oe_searchview_advanced.oe_opened div { display: block; } +.openerp .oe_view_nocontent > img { + float: left; + margin-right: 1.5em; +} +.openerp .oe_view_nocontent > div { + overflow: hidden; + padding: 6px; + font-size: 125%; +} .openerp .oe_view_topbar { border-bottom: 1px solid #cacaca; background-color: #fcfcfc; @@ -1275,7 +1414,7 @@ line-height: 24px; vertical-align: top; padding: 0 10px; - margin: 3px 0; + margin: 3px 4px 3px 0; } .openerp .oe_form_topbar button span.i { line-height: 20px; @@ -1326,9 +1465,28 @@ font-weight: bold; color: #b33630; } +.openerp .oe_form_topbar.oe_form_topbar_hifirst button:first-child, .openerp button.oe_form_button_hi { + color: white; + background: #dc5f59; + background: -moz-linear-gradient(#dc5f59, #b33630); + background: -webkit-gradient(linear, left top, left bottom, from(#dc5f59), to(#b33630)); + background: -webkit-linear-gradient(#dc5f59, #b33630); + -moz-box-shadow: none; + -webkit-box-shadow: none; + -box-shadow: none; +} +.openerp .oe_form_topbar.oe_form_topbar_hifirst button:first-child:hover, .openerp button.oe_form_button_hi:hover { + background: #df6b66; + background: -moz-linear-gradient(#df6b66, #bf3a33); + background: -webkit-gradient(linear, left top, left bottom, from(#df6b66), to(#bf3a33)); + background: -webkit-linear-gradient(#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_application .oe_form_sheetbg { background: url(/web/static/src/img/form_sheetbg.png); - padding: 8px; + padding: 8px 0; border-bottom: 1px solid #dddddd; } .openerp .oe_application .oe_form_sheet_width { @@ -1346,12 +1504,12 @@ -box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); } .openerp .oe_form_autolayout .oe_button { - height: 22px; + height: 20px; } .openerp .oe_form_autolayout .oe_form_group_cell { line-height: 18px; padding: 2px; - height: 25px; + height: 20px; } .openerp .oe_form_autolayout .oe_form_group_cell > .oe_form_field_many2one, .openerp .oe_form_autolayout .oe_form_group_cell > .oe_form_field_many2one input, @@ -1427,11 +1585,22 @@ .openerp .oe_form select[readonly], .openerp .oe_form textarea[readonly], .openerp .oe_form input[disabled], -.openerp .oe_form select[disabled], -.openerp .oe_form textarea[disabled] { +.openerp .oe_form select[disabled] { background: #e5e5e5 !important; color: #666666; } +.openerp .oe_form textarea[disabled] { + border: none; + border-left: 8px solid #eeeeee; + padding-left: 8px; + -moz-box-shadow: none; + -webkit-box-shadow: none; + -box-shadow: none; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + color: #666666; +} .openerp .oe_form .oe_form_field_many2one input, .openerp .oe_form .oe_form_field_binary input, .openerp .oe_form .oe_form_field_binary input, @@ -1521,6 +1690,10 @@ right: 5px; top: 3px; } +.openerp .oe_form .oe_form_button > img { + vertical-align: -3px; + padding: 0 2px; +} .openerp .oe_form .oe-binary-file-set { overflow: hidden; position: relative; @@ -1542,10 +1715,8 @@ } .openerp .oe_horizontal_separator { font-weight: bold; - border: 0 solid #666666; - border-bottom-width: 1px; - margin: 3px 4px 3px 1px; - height: 17px; + font-size: 16px; + margin: 4px 0; } .openerp .oe_horizontal_separator:empty { height: 5px; @@ -1647,9 +1818,13 @@ height: auto; line-height: 16px; } +.openerp .oe-select-create-popup-view-form > .oe_formview > .oe_form_pager { + display: none; +} .openerp .oe_form .oe_form_title, .openerp .oe_form .oe_form_title input { font-size: 20px; font-weight: bold; + height: 30px; } .openerp .oe_form .oe_form_group_odd_border > tbody > tr.oe_form_group_row > td.oe_form_group_cell:nth-child(odd), .openerp .oe_form .oe_form_group_label_border > tbody > tr.oe_form_group_row > td.oe_form_group_cell_label { @@ -1664,83 +1839,33 @@ .openerp .oe_form .oe_form_group_label_border > tbody > tr.oe_form_group_row > td.oe_form_group_cell { padding: 2px 2px 2px 8px !important; } -.openerp .oe_listview_nocontent > img { - float: left; - margin-right: 1.5em; -} -.openerp .oe_listview_nocontent > div { - overflow: hidden; - padding: 6px; - font-size: 125%; -} .openerp .oe-listview-content { width: 100%; } -.openerp .oe-listview-content thead, .openerp .oe-listview-content tfoot { - border-bottom: 1px solid #cacaca; +.openerp .oe-listview-content > thead { + border-bottom: 2px solid #cacaca; background: #eeeeee; -} -.openerp .oe-listview-content tfoot { - border-bottom: 1px solid #cacaca; - font-weight: bold; -} -.openerp .oe-listview-content tbody { - cursor: pointer; - background: white; -} -.openerp .oe-listview-content thead { vertical-align: top; } -.openerp .oe-listview-content td.oe_list_checkbox:first-child, .openerp .oe-listview-content th.oe_list_checkbox:first-child { - width: 17px; -} -.openerp .oe-listview-content td.oe_list_checkbox:first-child:after, .openerp .oe-listview-content th.oe_list_checkbox:first-child:after { - border-width: 0; -} -.openerp .oe-listview-content tbody tr:nth-child(odd) td, .openerp .oe-listview-content tbody tr:nth-child(odd) th { - background-color: #f0f0fa; - 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); -} -.openerp .oe-listview-content tbody tr:hover td, .openerp .oe-listview-content tbody tr:hover th { - background-color: #eeeeee; - background-image: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), to(#dedede)); - background-image: -webkit-linear-gradient(top, #eeeeee, #dedede); - background-image: -moz-linear-gradient(top, #eeeeee, #dedede); - background-image: -ms-linear-gradient(top, #eeeeee, #dedede); - background-image: -o-linear-gradient(top, #eeeeee, #dedede); - background-image: linear-gradient(to bottom, #eeeeee, #dedede); -} -.openerp .oe-listview-content td, .openerp .oe-listview-content th { +.openerp .oe-listview-content > thead td, .openerp .oe-listview-content > thead th { padding: 3px 6px; line-height: 18px; } -.openerp .oe-listview-content td button, .openerp .oe-listview-content th button { - border: none; - background: transparent; - padding: 0; - -moz-box-shadow: none; - -webkit-box-shadow: none; - -box-shadow: none; +.openerp .oe-listview-content > thead th:after { + content: ""; + float: right; + margin-top: 7px; + border-width: 0 4px 4px; + border-style: solid; + border-color: black transparent; + visibility: hidden; } -.openerp .oe-listview-content .numeric { - text-align: right; - width: 82px; -} -.openerp .oe-listview-content .numeric input { - text-align: right; -} -.openerp .oe-listview-content table .sortdown:after, .openerp .oe-listview-content table .sortdown:hover:after { +.openerp .oe-listview-content > thead th.sortup:after { visibility: visible; filter: alpha(opacity=60); opacity: 0.6; } -.openerp .oe-listview-content table .sortup:after { +.openerp .oe-listview-content > thead th.sortdown:after { border-bottom: none; border-left: 4px solid transparent; border-right: 4px solid transparent; @@ -1752,6 +1877,66 @@ filter: alpha(opacity=60); opacity: 0.6; } +.openerp .oe-listview-content > tbody { + cursor: pointer; + background: white; +} +.openerp .oe-listview-content > tbody > tr { + border-top: 1px solid #dddddd; +} +.openerp .oe-listview-content > tbody > tr > td, .openerp .oe-listview-content > tbody > tr > th { + padding: 3px 6px; + line-height: 18px; +} +.openerp .oe-listview-content > tbody > tr > td > button, .openerp .oe-listview-content > tbody > tr > th > button { + border: none; + background: transparent; + padding: 0; + -moz-box-shadow: none; + -webkit-box-shadow: none; + -box-shadow: none; +} +.openerp .oe-listview-content > tbody > tr > td.oe_list_checkbox:first-child, .openerp .oe-listview-content > tbody > tr th.oe_list_checkbox:first-child { + width: 17px; +} +.openerp .oe-listview-content > tbody > tr > td.oe_list_checkbox:first-child:after, .openerp .oe-listview-content > tbody > tr th.oe_list_checkbox:first-child:after { + border-width: 0; +} +.openerp .oe-listview-content > tbody > tr > td.oe-number { + text-align: right !important; +} +.openerp .oe-listview-content > tbody > tr:nth-child(odd) { + background-color: #f0f0fa; + 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); +} +.openerp .oe-listview-content > tfoot { + border-top: 2px solid #cacaca; + border-bottom: 1px solid #cacaca; + background: #eeeeee; + font-weight: bold; +} +.openerp .oe-listview-content > tbody tr:hover td, .openerp .oe-listview-content tbody tr:hover th { + background-color: #eeeeee; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), to(#dedede)); + background-image: -webkit-linear-gradient(top, #eeeeee, #dedede); + background-image: -moz-linear-gradient(top, #eeeeee, #dedede); + background-image: -ms-linear-gradient(top, #eeeeee, #dedede); + background-image: -o-linear-gradient(top, #eeeeee, #dedede); + background-image: linear-gradient(to bottom, #eeeeee, #dedede); +} +.openerp .oe-listview-content .numeric { + text-align: right; + width: 82px; +} +.openerp .oe-listview-content .numeric input { + text-align: right; +} .openerp .oe_kanban_group_title { margin: 1px 1px 4px; font-size: 15px; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 412c36b3ee5..102e640b918 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -16,6 +16,16 @@ $colour4: #8a89ba font-weight: normal font-style: normal +@font-face + font-family: 'EntypoRegular' + src: url('/web/static/src/font/entypo-webfont.eot') format('eot') + src: url('/web/static/src/font/entypo-webfont.eot?#iefix') format('embedded-opentype') + src: url('/web/static/src/font/entypo-webfont.woff') format('woff') + src: url('/web/static/src/font/entypo-webfont.ttf') format('truetype') + src: url('/web/static/src/font/entypo-webfont.svg') format('svg') active + font-weight: normal + font-style: normal + @mixin vertical-gradient($startColor: #555, $endColor: #333) background-color: $startColor background-image: -webkit-gradient(linear, left top, left bottom, from($startColor), to($endColor)) /* Saf4+, Chrome */ @@ -123,6 +133,10 @@ $colour4: #8a89ba 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 @@ -133,6 +147,11 @@ $colour4: #8a89ba 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'] @@ -351,15 +370,8 @@ $colour4: #8a89ba width: 100% height: 31px border-top: solid 1px #d3d3d3 - border-bottom: solid 1px black @include vertical-gradient(#646060, #262626) - .oe_systray - float: right - .oe_systray > div - float: left - padding: 0 4px 0 4px - .oe_topbar_item li float: left @@ -408,6 +420,7 @@ $colour4: #8a89ba background: #f0eeee border-right: 1px solid #afafb6 text-shadow: 0 1px 1px white + padding-bottom: 16px a.oe_logo width: 220px display: block @@ -444,6 +457,7 @@ $colour4: #8a89ba float: left .oe_dropdown position: relative + .oe_dropdown_options float: left background: #333 @@ -479,6 +493,52 @@ $colour4: #8a89ba &:hover @include vertical-gradient(#292929, #191919) @include box-shadow(none) + hr + border-top: 1px solid #999 + border-bottom: 0 + // }}} + // Systray {{{ + .oe_systray > div + float: left + 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 @@ -527,9 +587,9 @@ $colour4: #8a89ba margin: 0 width: 100% display: inline-block - li + > li position: relative - padding: 1px 0 1px 16px + padding: 1px 0 1px 20px a display: block color: #4c4c4c @@ -580,7 +640,7 @@ $colour4: #8a89ba content: "&darr" text-indent: -99999px vertical-align: top - margin-left: -8px + margin-left: -12px margin-top: 4px margin-right: 4px border-top: 4px solid transparent @@ -589,7 +649,7 @@ $colour4: #8a89ba @include opacity(0.5) .oe_menu_opened:before margin-top: 6px - margin-left: -12px + margin-left: -16px margin-right: 4px border-left: 4px solid transparent border-right: 4px solid transparent @@ -669,21 +729,37 @@ $colour4: #8a89ba text-shadow: 0 1px 2px rgba(0,0,0,0.4) // }}} // ViewManager.header {{{ - .oe_view_manager_header2 + .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 + td + padding-top: 8px + .oe_view_manager_sidebar + margin: 0px auto + width: 400px + text-align: center + td + line-height: 26px h2 - float: left font-size: 18px - margin: 1px 0 + margin: 0 + float: left a color: $colour4 - td - padding: 4px 8px - line-height: 26px .oe_button_group display: inline-block border: 1px solid #ababab @@ -712,6 +788,8 @@ $colour4: #8a89ba margin: 8px 0 // }}} // ViewManager.pager {{{ + .oe_view_manager_pager + line-height: 26px .oe_pager_value float: left margin-right: 8px @@ -746,29 +824,47 @@ $colour4: #8a89ba // ViewManager.switches {{{ .oe_view_manager_switch li - padding-left: 1px text-align: center width: 24px height: 24px - line-height: 24px + line-height: 16px + a + position: relative .oe_vm_switch_list:after, .oe_vm_switch_tree:after - content: "ö" + padding: 2px + content: "i" .oe_vm_switch_graph:after - content: "ó" - .oe_vm_switch_gantt:after - content: "y" - .oe_vm_switch_calendar:after - content: "b" - .oe_vm_switch_kanban:after - content: "ó" - .oe_vm_switch_diagram:after + font-family: "mnmliconsRegular" !important + font-size: 21px + font-weight: 300 !important content: "}" + top: -2px + position: relative + .oe_vm_switch_gantt:after + content: "c" + .oe_vm_switch_calendar:after + content: "P" + .oe_vm_switch_kanban:after + content: "k" + .oe_vm_switch_diagram:after + content: "f" + //.oe_vm_switch_list:after, .oe_vm_switch_tree:after + //content: "ö" + //.oe_vm_switch_graph:after + //content: "ó" + //.oe_vm_switch_gantt:after + //content: "y" + //.oe_vm_switch_calendar:after + //content: "b" + //.oe_vm_switch_kanban:after + //content: "ó" + //.oe_vm_switch_diagram:after + //content: "}" // }}} // ViewManager.sidebar {{{ .oe_form_dropdown_section position: relative display: inline-block - margin-right: 4px .oe_dropdown_toggle:after width: 0 height: 0 @@ -810,6 +906,7 @@ $colour4: #8a89ba line-height: 14px color: #4c4c4c text-decoration: none + cursor: pointer &:hover text-decoration: none @include vertical-gradient(#f0f0fa, #eeeef6) @@ -824,26 +921,27 @@ $colour4: #8a89ba .VS-search .VS-search-box min-height: 0 - border-width: 1px padding: 0 - width: 410px - //border: 1px solid #ababab - //margin-top: 0 - //margin-bottom: 0 + width: 480px + border: 1px solid #ababab + @include radius(13px) + @include box-shadow(0 1px 2px rgba(0,0,0,0.2) inset) //padding: 4px 19px //font-size: 13px //background: url('../img/search.png') no-repeat 5px //background-color: white - //@include radius(13px) - //@include box-shadow(0 1px 2px rgba(0,0,0,0.2) inset) .VS-icon - top: 5px + top: 6px .VS-icon-search - left: 5px + left: 2px + top: 3px + height: 18px + width: 18px .VS-search-inner margin: 0 40px 0 17px + padding: 1px 0 font-size: 13px input @@ -860,7 +958,6 @@ $colour4: #8a89ba margin-left: 0 height: 22px input, .VS-input-width-tester - padding: 0 2px height: inherit margin: 0 @@ -915,10 +1012,21 @@ $colour4: #8a89ba height: 100% line-height: 23px padding: 0 7px 0 4px - color: #ccc + color: #4c4c4c cursor: pointer &:before - content: "▾" + position: absolute + top: 9px + right: 8px + width: 0 + height: 0 + display: inline-block + content: "" + vertical-align: top + border-top: 5px solid #4c4c4c + border-left: 5px solid transparent + border-right: 5px solid transparent + @include opacity(0.5) &.oe_searchview_open_drawer .oe_searchview_drawer @@ -930,7 +1038,7 @@ $colour4: #8a89ba top: 100% right: 0 background-color: white - width: 410px + width: 480px display: none border: 1px solid #ccc text-align: left @@ -993,7 +1101,16 @@ $colour4: #8a89ba div display: block // }}} - // View.topbar {{{ + // Views Common {{{ + .oe_view_nocontent + > img + float: left + margin-right: 1.5em + > div + // don't encroach on my arrow + overflow: hidden + padding: 6px + font-size: 125% .oe_view_topbar border-bottom: 1px solid #cacaca @include vertical-gradient(#fcfcfc, #dedede) @@ -1034,7 +1151,7 @@ $colour4: #8a89ba line-height: 24px vertical-align: top padding: 0 10px - margin: 3px 0 + margin: 3px 4px 3px 0 span.i line-height: 20px height: 24px @@ -1074,10 +1191,27 @@ $colour4: #8a89ba .oe_form_steps_active font-weight: bold color: #b33630 + .oe_form_topbar.oe_form_topbar_hifirst button:first-child, button.oe_form_button_hi + color: white + background: #DC5F59 + background: -moz-linear-gradient(#DC5F59, #B33630) + background: -webkit-gradient(linear, left top, left bottom, from(#DC5F59), to(#B33630)) + background: -webkit-linear-gradient(#DC5F59, #B33630) + -moz-box-shadow: none + -webkit-box-shadow: none + -box-shadow: none + .oe_form_topbar.oe_form_topbar_hifirst button:first-child:hover, button.oe_form_button_hi:hover + background: #DF6B66 + background: -moz-linear-gradient( #DF6B66, #BF3A33) + background: -webkit-gradient(linear, left top, left bottom, from( #DF6B66), to( #BF3A33)) + background: -webkit-linear-gradient( #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) .oe_application .oe_form_sheetbg background: url(/web/static/src/img/form_sheetbg.png) - padding: 8px + padding: 8px 0 border-bottom: 1px solid #ddd .oe_form_sheet_width min-width: 650px @@ -1089,30 +1223,15 @@ $colour4: #8a89ba min-height: 420px border: 1px solid #afafb6 @include box-shadow(0 0 10px rgba(0,0,0,0.3)) - //.avatar - // max-height: 52px - //.contacts - // li - // float: left - // width: 33% - // margin-bottom: 4px - // .avatar - // height: 40px - // width: 40px - // border: 1px solid - // border-color: #e5e5e5 #dbdbdb #d2d2d2 - // .data - // padding: 2px - // line-height: 18px // }}} // FormView.autolayout {{{ .oe_form_autolayout .oe_button - height: 22px + height: 20px .oe_form_group_cell line-height: 18px padding: 2px - height: 25px + height: 20px .oe_form_group_cell > .oe_form_field_many2one, .oe_form_group_cell > .oe_form_field_many2one input, .oe_form_group_cell > .oe_form_field_char input, @@ -1184,9 +1303,15 @@ $colour4: #8a89ba textarea[readonly], input[disabled], select[disabled], - textarea[disabled] background: #E5E5E5 !important color: #666 + textarea[disabled] + border: none + border-left: 8px solid #eee + padding-left: 8px + @include box-shadow(none) + @include radius(0px) + color: #666 .oe_form_field_many2one input, .oe_form_field_binary input, .oe_form_field_binary input, @@ -1266,6 +1391,9 @@ $colour4: #8a89ba filter: alpha(opacity=50) right: 5px top: 3px + .oe_form_button > img + vertical-align: -3px + padding: 0 2px // }}} // FormView.binaryfile {{{ /* http://www.quirksmode.org/dom/inputfile.html @@ -1294,10 +1422,8 @@ $colour4: #8a89ba // FormView.separator {{{ .oe_horizontal_separator font-weight: bold - border: 0 solid #666 - border-bottom-width: 1px - margin: 3px 4px 3px 1px - height: 17px + font-size: 16px + margin: 4px 0 .oe_horizontal_separator:empty height: 5px .oe_vertical_separator @@ -1387,6 +1513,8 @@ $colour4: #8a89ba li height: auto line-height: 16px + .oe-select-create-popup-view-form > .oe_formview > .oe_form_pager + display: none // }}} // FormView.classes for openerp views {{{ @@ -1394,6 +1522,7 @@ $colour4: #8a89ba .oe_form_title, .oe_form_title input font-size: 20px font-weight: bold + height: 30px .oe_form_group_odd_border > tbody > tr.oe_form_group_row > td.oe_form_group_cell:nth-child(odd), .oe_form_group_label_border > tbody > tr.oe_form_group_row > td.oe_form_group_cell_label border-right: 1px solid #ddd @@ -1405,69 +1534,79 @@ $colour4: #8a89ba padding: 2px 2px 2px 8px !important // }}} // ListView {{{ - .oe_listview_nocontent - > img - float: left - margin-right: 1.5em - > div - // don't encroach on my arrow - overflow: hidden - padding: 6px - font-size: 125% .oe-listview-content width: 100% - thead, tfoot - border-bottom: 1px solid #cacaca + > thead + border-bottom: 2px solid #cacaca background: #eee - tfoot - border-bottom: 1px solid #cacaca - font-weight: bold - tbody + vertical-align: top + td, th + padding: 3px 6px + line-height: 18px + th:after + content: "" + float: right + margin-top: 7px + border-width: 0 4px 4px + border-style: solid + border-color: #000 transparent + visibility: hidden + th.sortup:after + visibility: visible + @include opacity(0.6) + th.sortdown: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) + // 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 - thead - vertical-align: top - td.oe_list_checkbox:first-child, th.oe_list_checkbox:first-child - width: 17px - &:after - border-width: 0 - tbody tr:nth-child(odd) td, tbody tr:nth-child(odd) th - background-color: #f0f0fa - @include vertical-gradient(#f0f0fa, #eeeef6) - tbody tr:hover td, tbody tr:hover th + > tr + border-top: 1px solid #ddd + > td, > th + padding: 3px 6px + line-height: 18px + > button + border: none + background: transparent + padding: 0 + @include box-shadow(none) + > td.oe_list_checkbox:first-child, th.oe_list_checkbox:first-child + width: 17px + &:after + border-width: 0 + > td.oe-number + text-align: right !important + > tr:nth-child(odd) + background-color: #f0f0fa + @include vertical-gradient(#f0f0fa, #eeeef6) + > tfoot + border-top: 2px solid #cacaca + border-bottom: 1px solid #cacaca + background: #eee + font-weight: bold + + > tbody tr:hover td, tbody tr:hover th @include vertical-gradient(#eee, #dedede) - td, th - padding: 3px 6px - line-height: 18px - button - border: none - background: transparent - padding: 0 - @include box-shadow(none) + .numeric text-align: right width: 82px input text-align: right - //thead th:after - //content: "" - //float: right - //margin-top: 7px - //border-width: 0 4px 4px - //border-style: solid - //border-color: #000 transparent - //visibility: hidden - table .sortdown:after, table .sortdown:hover:after - visibility: visible - @include opacity(0.6) - table .sortup: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) // }}} // KanbanView {{{ .oe_kanban_group_title diff --git a/addons/web/static/src/css/base_old.css b/addons/web/static/src/css/base_old.css index 8f333fae761..74b660f7613 100644 --- a/addons/web/static/src/css/base_old.css +++ b/addons/web/static/src/css/base_old.css @@ -880,60 +880,6 @@ label.error { text-align: left; padding: 4px 5px; } -/* Shortcuts*/ -.oe-shortcut-toggle { - height: 20px; - margin-top: 3px; - padding: 0; - width: 24px; - cursor: pointer; - display: block; - background: url(/web/static/src/img/add-shortcut.png) no-repeat center center; - float: left; -} -.oe-shortcut-remove{ - background: url(/web/static/src/img/remove-shortcut.png) no-repeat center center; -} -.oe-shortcuts { - position: absolute; - margin: 0; - padding: 6px 15px; - top: 37px; - left: 197px; - right: 0; - height: 17px; - line-height: 1.2; -} -.oe-shortcuts ul { - display: block; - overflow: hidden; - list-style: none; - white-space: nowrap; - padding: 0; - margin: 0; -} -.oe-shortcuts li { - cursor: pointer; - display: -moz-inline-stack; - display: inline-block; - display: inline; /*IE7 */ - color: #fff; - text-align: center; - border-left: 1px solid #909090; - padding: 0 4px; - font-size: 80%; - font-weight: normal; - vertical-align: top; -} - -.oe-shortcuts li:hover { - background-color: #666; -} -.oe-shortcuts li:first-child { - border-left: none; - padding-left: 0; -} - ul.oe-arrow-list { padding-left: 1.1em; margin: 0; diff --git a/addons/web/static/src/font/entypo-webfont.eot b/addons/web/static/src/font/entypo-webfont.eot new file mode 100755 index 00000000000..2c09f336d57 Binary files /dev/null and b/addons/web/static/src/font/entypo-webfont.eot differ diff --git a/addons/web/static/src/font/entypo-webfont.svg b/addons/web/static/src/font/entypo-webfont.svg new file mode 100755 index 00000000000..c24d92adb5f --- /dev/null +++ b/addons/web/static/src/font/entypo-webfont.svg @@ -0,0 +1,198 @@ + + + + +This is a custom SVG webfont generated by Font Squirrel. +Copyright : Creative Commons CC BYSA 2012 +Designer : Daniel Bruce +Foundry : Daniel Bruce +Foundry URL : wwwdanielbrucese + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/addons/web/static/src/font/entypo-webfont.ttf b/addons/web/static/src/font/entypo-webfont.ttf new file mode 100755 index 00000000000..89b7a194cc7 Binary files /dev/null and b/addons/web/static/src/font/entypo-webfont.ttf differ diff --git a/addons/web/static/src/font/entypo-webfont.woff b/addons/web/static/src/font/entypo-webfont.woff new file mode 100755 index 00000000000..3879f5b811e Binary files /dev/null and b/addons/web/static/src/font/entypo-webfont.woff differ diff --git a/addons/web/static/src/img/list_empty_arrow.png b/addons/web/static/src/img/view_empty_arrow.png similarity index 100% rename from addons/web/static/src/img/list_empty_arrow.png rename to addons/web/static/src/img/view_empty_arrow.png diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index f43da0431ff..b740c61c9df 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -544,34 +544,33 @@ instance.web.Menu = instance.web.Widget.extend({ this._super.apply(this, arguments); this.has_been_loaded = $.Deferred(); this.maximum_visible_links = 'auto'; // # of menu to show. 0 = do not crop, 'auto' = algo + this.data = {data:{children:[]}}; }, start: function() { this._super.apply(this, arguments); this.$secondary_menus = this.getParent().$element.find('.oe_secondary_menus_container'); - this.$secondary_menus.on('click', 'a[data-menu]', this.on_menu_click); - $('html').bind('click', this.do_hide_more); + return this.do_reload(); }, do_reload: function() { - var self = this; - return this.rpc("/web/menu/load", {}, this.on_loaded).then(function () { - if (self.current_menu) { - self.open_menu(self.current_menu); - } - }); + return this.rpc("/web/menu/load", {}).then(this.on_loaded); }, on_loaded: function(data) { var self = this; this.data = data; this.renderElement(); this.limit_entries(); - this.$element.on('click', 'a[data-menu]', this.on_menu_click); + 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.$secondary_menus.html(QWeb.render("Menu.secondary", { widget : this })); + 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 this.$secondary_menus.find('.oe_menu_toggler').siblings('.oe_secondary_submenu').hide(); + if (self.current_menu) { + self.open_menu(self.current_menu); + } this.has_been_loaded.resolve(); }, limit_entries: function() { @@ -585,6 +584,7 @@ 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 @@ -603,6 +603,7 @@ instance.web.Menu = instance.web.Widget.extend({ open_menu: function (id) { var $clicked_menu, $sub_menu, $main_menu; $clicked_menu = this.$element.add(this.$secondary_menus).find('a[data-menu=' + id + ']'); + this.trigger('open_menu', id, $clicked_menu); if (this.$secondary_menus.has($clicked_menu).length) { $sub_menu = $clicked_menu.parents('.oe_secondary_menu'); @@ -620,6 +621,9 @@ instance.web.Menu = instance.web.Widget.extend({ this.$secondary_menus.find('.oe_secondary_menu').hide(); $sub_menu.show(); + // Hide/Show the leftbar menu depending of the presence of sub-items + this.$secondary_menus.parent('.oe_leftbar').toggle(!!$sub_menu.children().length); + // Activate current menu item and show parents this.$secondary_menus.find('.oe_active').removeClass('oe_active'); if ($main_menu !== $clicked_menu) { @@ -631,56 +635,60 @@ instance.web.Menu = instance.web.Widget.extend({ } } }, + /** + * Call open_menu with the first menu_item matching an action_id + * + * @param {Number} id the action_id to match + */ open_action: function (id) { var menu_id, $menu = this.$element.add(this.$secondary_menus).find('a[data-action-id=' + id + ']'); if (menu_id = $menu.data('menu')) { this.open_menu(menu_id); } }, - on_menu_click: function(ev, id) { - // TODO If first level menu doesnt have action trigger first leaf - this.do_hide_more(); - id = id || 0; - var $clicked_menu, manual = false; - + /** + * Process a click on a menu item + * + * @param {Number} id the menu_id + */ + menu_click: function(id) { if (id) { - // We can manually activate a menu with it's id (for hash url mapping) - manual = true; - $clicked_menu = this.$element.find('a[data-menu=' + id + ']'); - if (!$clicked_menu.length) { - $clicked_menu = this.$secondary_menus.find('a[data-menu=' + 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) { + $item = this.$secondary_menus.find('a[data-menu=' + id + ']'); + } + var action_id = $item.data('action-id'); + // If first level menu doesnt have action trigger first leaf + if (!action_id) { + if(this.$element.has($item).length) { + $sub_menu = this.$secondary_menus.find('.oe_secondary_menu[data-menu-parent=' + id + ']'); + $items = $sub_menu.find('a[data-action-id]').filter('[data-action-id!=""]'); + if($items.length) { + action_id = $items.data('action-id'); + id = $items.data('menu'); + } + } } - } else { - $clicked_menu = $(ev.currentTarget); - id = $clicked_menu.data('menu'); - } - - this.trigger('menuClicked', id, $clicked_menu); - - if (id) { this.open_menu(id); this.current_menu = id; this.session.active_id = id; - var action_id = $clicked_menu.data('action-id'); if (action_id) { - this.on_action(action_id); + this.trigger('menu_click', action_id, id, $item); } } - if (ev) { - ev.stopPropagation(); - } + }, + /** + * Jquery event handler for menu click + * + * @param {Event} ev the jquery event + */ + on_menu_click: function(ev) { + this.menu_click($(ev.currentTarget).data('menu')); + ev.stopPropagation(); return false; }, - do_show_secondary: function($sub_menu, $main_menu) { - var self = this; - this.$secondary_menus.show(); - if (!arguments.length) { - return; - } - $sub_menu.show(); - }, - on_action: function(action) { - } }); instance.web.UserMenu = instance.web.Widget.extend({ @@ -712,7 +720,7 @@ instance.web.UserMenu = instance.web.Widget.extend({ title: _t("Change Password"), width : 'auto' }).open(); - this.dialog.$element.html(QWeb.render("Change_Pwd", self)); + this.dialog.$element.html(QWeb.render("UserMenu.password", self)); this.dialog.$element.find("form[name=change_password_form]").validate({ submitHandler: function (form) { self.rpc("/web/session/change_password",{ @@ -746,64 +754,20 @@ instance.web.UserMenu = instance.web.Widget.extend({ return; var func = new instance.web.Model("res.users").get_func("read"); return func(self.session.uid, ["name", "company_id"]).pipe(function(res) { - // TODO: Show company if multicompany is in use - var topbar_name = _.str.sprintf("%s (%s)", res.name, instance.connection.db, res.company_id[1]); + var topbar_name = res.name; + if(instance.connection.debug) + topbar_name = _.str.sprintf("%s (%s)", topbar_name, instance.connection.db); + if(res.company_id[0] > 1) + topbar_name = _.str.sprintf("%s (%s)", topbar_name, res.company_id[1]); self.$element.find('.oe_topbar_name').text(topbar_name); var avatar_src = _.str.sprintf('%s/web/binary/image?session_id=%s&model=res.users&field=avatar&id=%s', self.session.prefix, self.session.session_id, self.session.uid); $avatar.attr('src', avatar_src); - return self.shortcut_load(); }); }; this.update_promise = this.update_promise.pipe(fct, fct); }, on_action: function() { }, - shortcut_load :function(){ - var self = this, - sc = self.session.shortcuts, - shortcuts_ds = new instance.web.DataSet(this, 'ir.ui.view_sc'); - self.$element.find('.oe_dropdown_options a[data-menu=shortcut]').each(function() { - $(this).parent().remove(); - }); - // TODO: better way to communicate between sections. - // sc.bindings, because jquery does not bind/trigger on arrays... - if (!sc.binding) { - sc.binding = {}; - $(sc.binding).bind({ - 'add': function (e, attrs) { - shortcuts_ds.create(attrs, function (out) { - var shortcut = QWeb.render('UserMenu.shortcut', { - shortcuts : [{ - name : attrs.name, - id : out.result, - res_id : attrs.res_id - }] - }); - $(shortcut).appendTo(self.$element.find('.oe_dropdown_options')); - attrs.id = out.result; - sc.push(attrs); - }); - }, - 'remove-current': function () { - var menu_id = self.session.active_id; - var $shortcut = self.$element.find('.oe_dropdown_options li a[data-id=' + menu_id + ']'); - var shortcut_id = $shortcut.data('shortcut-id'); - $shortcut.remove(); - shortcuts_ds.unlink([shortcut_id]); - var sc_new = _.reject(sc, function(shortcut){ return shortcut_id === shortcut.id}); - sc.splice(0, sc.length); - sc.push.apply(sc, sc_new); - } - }); - } - return this.rpc('/web/session/sc_list', {}, function(shortcuts) { - sc.splice(0, sc.length); - sc.push.apply(sc, shortcuts); - - $(QWeb.render('UserMenu.shortcut', {'shortcuts': shortcuts})) - .appendTo(self.$element.find('.oe_dropdown_options')); - }); - }, on_menu_logout: function() { }, on_menu_settings: function() { @@ -830,8 +794,8 @@ instance.web.UserMenu = instance.web.Widget.extend({ title: _t("Preferences"), width: '700px', buttons: [ - {text: _t("Cancel"), click: function(){ $(this).dialog('destroy'); }}, {text: _t("Change password"), click: function(){ self.change_password(); }}, + {text: _t("Cancel"), click: function(){ $(this).dialog('destroy'); }}, {text: _t("Save"), click: function(){ var inner_viewmanager = action_manager.inner_viewmanager; inner_viewmanager.views[inner_viewmanager.active_view].controller.do_save() @@ -850,7 +814,7 @@ instance.web.UserMenu = instance.web.Widget.extend({ on_menu_about: function() { var self = this; self.rpc("/web/webclient/version_info", {}).then(function(res) { - var $help = $(QWeb.render("About-Page", {version_info: res})); + var $help = $(QWeb.render("UserMenu.about", {version_info: res})); $help.find('a.oe_activate_debug_mode').click(function (e) { e.preventDefault(); window.location = $.param.querystring( @@ -860,16 +824,6 @@ instance.web.UserMenu = instance.web.Widget.extend({ modal: true, width: 960, title: _t("About")}); }); }, - on_menu_shortcut: function($link) { - var self = this, - id = $link.data('id'); - self.session.active_id = id; - self.rpc('/web/menu/action', {'menu_id': id}, function(ir_menu_data) { - if (ir_menu_data.action.length){ - self.on_action(ir_menu_data.action[0][2]); - } - }); - } }); instance.web.WebClient = instance.web.Widget.extend({ @@ -897,8 +851,6 @@ instance.web.WebClient = instance.web.Widget.extend({ this.session.on_session_valid.add(function() { self.show_application(); - self.user_menu.do_update(); - self.menu.do_reload(); if(self.action_manager) self.action_manager.destroy(); self.action_manager = new instance.web.ActionManager(self); @@ -929,11 +881,12 @@ instance.web.WebClient = instance.web.Widget.extend({ self.$element.append(self.$table); self.menu = new instance.web.Menu(self); self.menu.replace(this.$element.find('.oe_menu_placeholder')); - self.menu.on_action.add(this.proxy('on_menu_action')); + self.menu.on('menu_click', this, this.on_menu_action); self.user_menu = new instance.web.UserMenu(self); self.user_menu.replace(this.$element.find('.oe_user_menu_placeholder')); self.user_menu.on_menu_logout.add(this.proxy('on_logout')); self.user_menu.on_action.add(this.proxy('on_menu_action')); + self.user_menu.do_update(); }, show_common: function() { var self = this; @@ -994,8 +947,9 @@ instance.web.WebClient = instance.web.Widget.extend({ } else { self.menu.has_been_loaded.then(function() { var first_menu_id = self.menu.$element.find("a:first").data("menu"); - if(first_menu_id) - self.menu.on_menu_click(null,first_menu_id); + if(first_menu_id) { + self.menu.menu_click(first_menu_id); + } }); } }, @@ -1019,7 +973,7 @@ instance.web.WebClient = instance.web.Widget.extend({ // TODO replace by client action menuclick if(action.menu_id) { this.do_reload().then(function () { - self.menu.on_menu_click(null, action.menu_id); + self.menu.menu_click(action.menu_id); }); } }, diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js index 8f5f150f125..8e7b5d4f75d 100644 --- a/addons/web/static/src/js/coresetup.js +++ b/addons/web/static/src/js/coresetup.js @@ -69,7 +69,6 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess self.module_loaded[mod] = true; }); this.context = {}; - this.shortcuts = []; this.active_id = null; return this.session_init(); }, diff --git a/addons/web/static/src/js/view_editor.js b/addons/web/static/src/js/view_editor.js index 6a14c0ef7f9..f169887cc54 100644 --- a/addons/web/static/src/js/view_editor.js +++ b/addons/web/static/src/js/view_editor.js @@ -98,7 +98,7 @@ instance.web.ViewEditor = instance.web.OldWidget.extend({ var view_widget = [{'name': 'view_name', 'string':'View Name', 'type': 'char', 'required': true, 'value' : this.model + '.custom_' + Math.round(Math.random() * 1000)}, {'name': 'view_type', 'string': 'View Type', 'type': 'selection', 'required': true, 'value': 'Form', 'selection': [['',''],['tree', 'Tree'],['form', 'Form'],['graph', 'Graph'],['calendar', 'Calender']]}, {'name': 'proirity', 'string': 'Priority', 'type': 'float', 'required': true, 'value':'16'}]; - this.create_view_dialog.$element.append('
'); + this.create_view_dialog.$element.append('
'); this.create_view_widget = []; _.each(view_widget, function(widget) { var type_widget = new (self.property.get_any([widget.type])) (self.create_view_dialog, widget); @@ -877,7 +877,7 @@ instance.web.ViewEditor = instance.web.OldWidget.extend({ 'fonts' : {'name':'fonts', 'string': 'fonts', 'type': 'char'}, }; var arch_val = self.get_object_by_id(this.one_object.clicked_tr_id,this.one_object['main_object'], []); - this.edit_node_dialog.$element.append('
'); + this.edit_node_dialog.$element.append('
'); this.edit_widget = []; self.ready = $.when(self.on_groups(properties)).then(function () { _PROPERTIES_ATTRIBUTES['groups']['selection'] = self.groups; @@ -963,7 +963,7 @@ instance.web.ViewEditor = instance.web.OldWidget.extend({ {text: _t("Cancel"), click: function() { self.add_node_dialog.close(); }} ] }).open(); - this.add_node_dialog.$element.append('
'); + this.add_node_dialog.$element.append('
'); var table_selector = self.add_node_dialog.$element.find('table[id=rec_table] tbody'); _.each(render_list, function(node) { type_widget = new (self.property.get_any([node.type])) (self.add_node_dialog, node); diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 27606a564be..3b9cc7570d0 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -106,7 +106,6 @@ instance.web.FormView = instance.web.View.extend(_.extend({}, instance.web.form. this.rendering_engine.render_to($dest); } - this.$sidebar = this.options.$sidebar || this.$element.find('.oe_form_sidebar'); this.$buttons = $(QWeb.render("FormView.buttons", {'widget':self})); if (this.options.$buttons) { @@ -116,8 +115,6 @@ instance.web.FormView = instance.web.View.extend(_.extend({}, instance.web.form. } this.$buttons.on('click','.oe_form_button_create',this.on_button_create); this.$buttons.on('click','.oe_form_button_edit',this.on_button_edit); - this.$buttons.on('click','.oe_form_button_duplicate',this.on_button_duplicate); - this.$buttons.on('click','.oe_form_button_delete',this.on_button_delete); this.$buttons.on('click','.oe_form_button_save',this.on_button_save); this.$buttons.on('click','.oe_form_button_cancel',this.on_button_cancel); @@ -132,19 +129,18 @@ instance.web.FormView = instance.web.View.extend(_.extend({}, instance.web.form. self.on_pager_action(action); }); + this.$sidebar = this.options.$sidebar || this.$element.find('.oe_form_sidebar'); if (!this.sidebar && this.options.$sidebar) { this.sidebar = new instance.web.Sidebar(this); this.sidebar.appendTo(this.$sidebar); if(this.fields_view.toolbar) { this.sidebar.add_toolbar(this.fields_view.toolbar); } - this.sidebar.add_items('other', [{ - label: _t('Set Default'), - form: this, - callback: function (item) { - item.form.open_defaults_dialog(); - } - }]); + this.sidebar.add_items('other', [ + { label: _t('Delete'), callback: self.on_button_delete }, + { label: _t('Duplicate'), callback: self.on_button_duplicate }, + { label: _t('Set Default'), callback: function (item) { self.open_defaults_dialog(); } }, + ]); } this.on("change:mode", this, this.switch_mode); this.set({mode: this.options.initial_mode}); @@ -527,12 +523,14 @@ instance.web.FormView = instance.web.View.extend(_.extend({}, instance.web.form. if(this.get("mode") == "view") { self.$buttons.find('.oe_form_buttons_edit').hide(); self.$buttons.find('.oe_form_buttons_view').show(); + self.$sidebar.show(); _.each(this.fields,function(field){ field.set({"force_readonly": true}); }); } else { self.$buttons.find('.oe_form_buttons_edit').show(); self.$buttons.find('.oe_form_buttons_view').hide(); + self.$sidebar.hide(); _.each(this.fields,function(field){ field.set({"force_readonly": false}); }); @@ -1158,6 +1156,9 @@ instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInt if (width.substr(-1) === '%') { total -= iwidth; width = iwidth + '%'; + } else { + // Absolute width + $td.css('min-width', width + 'px'); } $td.attr('width', width); $child.removeAttr('width'); @@ -1715,6 +1716,7 @@ instance.web.form.AbstractField = instance.web.form.FormWidget.extend(_.extend({ }); }, renderElement: function() { + var self = this; this._super(); if (this.field.translate) { this.$element.addClass('oe_form_field_translatable'); @@ -1722,8 +1724,14 @@ instance.web.form.AbstractField = instance.web.form.FormWidget.extend(_.extend({ this.field_manager.open_translate_dialog(this); }, this)); } + this.$label = this.view.$element.find('label[for=' + this.id_for_label + ']'); if (instance.connection.debug) { - this.do_attach_tooltip(this, this.view.$element.find('label[for=' + this.id_for_label + ']')[0] || this.$element); + this.do_attach_tooltip(this, this.$label[0] || this.$element); + this.$label.off('dblclick').on('dblclick', function() { + console.log("Field '%s' of type '%s' in View: %o", self.name, (self.node.attrs.widget || self.field.type), self.view); + window.w = self; + console.log("window.w =", window.w); + }); } if (!this.disable_utility_classes) { this.off("change:required", this, this._set_required); @@ -2742,7 +2750,6 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({ if (self.get("effective_readonly")) { view.options.addable = null; view.options.deletable = null; - view.options.isClarkGable = false; } } else if (view.view_type === "form") { if (self.get("effective_readonly")) { @@ -3266,7 +3273,6 @@ instance.web.form.FieldMany2Many = instance.web.form.AbstractField.extend({ 'addable': self.get("effective_readonly") ? null : _t("Add"), 'deletable': self.get("effective_readonly") ? false : true, 'selectable': self.multi_selection, - 'isClarkGable': self.get("effective_readonly") ? false : true }); var embedded = (this.field.views || {}).tree; if (embedded) { diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 1fa3ca4fcee..5c9f41806c2 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -10,7 +10,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi // records can be selected one by one 'selectable': true, // list rows can be deleted - 'deletable': true, + 'deletable': false, // whether the column headers should be displayed 'header': true, // display addition button, with that label @@ -20,8 +20,6 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi 'sortable': true, // whether the view rows can be reordered (via vertical drag & drop) 'reorderable': true, - // display an edit icon linking to form view - 'isClarkGable': true }, /** * Core class for list-type displays. @@ -256,16 +254,17 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi e.stopPropagation(); var $this = $(this); self.dataset.sort($this.data('id')); - if ($this.find('span').length) { - $this.find('span').toggleClass( 'ui-icon-triangle-1-s ui-icon-triangle-1-n'); + if($this.hasClass("sortdown") || $this.hasClass("sortup")) { + $this.toggleClass("sortdown").toggleClass("sortup"); } else { - $this.append('') .siblings('.oe-sortable').find('span').remove(); + $this.toggleClass("sortdown"); } + $this.siblings('.oe-sortable').removeClass("sortup sortdown"); self.reload_content(); }); - // Add and delete + // Add button and Import link if (!this.$buttons) { this.$buttons = $(QWeb.render("ListView.buttons", {'widget':self})); if (this.options.$buttons) { @@ -275,11 +274,11 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi } this.$buttons.find('.oe_list_add') .click(this.proxy('do_add_record')) - .prop('disabled', grouped && this.options.editable) - .end() - .find('.oe_list_delete') - .click(this.proxy('do_delete_selected')) - .prop('disabled', true); + .prop('disabled', grouped && this.options.editable); + this.$buttons.on('click', '.oe_list_button_import', function() { + self.on_sidebar_import(); + return false; + }); } // Pager @@ -339,6 +338,9 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi if (!this.sidebar && this.options.$sidebar) { this.sidebar = new instance.web.Sidebar(this); this.sidebar.appendTo(this.options.$sidebar); + this.sidebar.add_items('other', [ + { label: _t('Delete'), callback: this.do_delete_selected }, + ]); this.sidebar.add_toolbar(this.fields_view.toolbar); } }, @@ -356,11 +358,18 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi this.dataset._length = dataset._length; } - var page = this.page + 1, - total = Math.floor(dataset.size() / this.limit()) + 1; + var total = dataset.size(); + var spager = '-'; + if (total) { + var range_start = this.page * this.limit() + 1; + var range_stop = range_start - 1 + this.limit(); + if (range_stop > total) { + range_stop = total; + } + spager = _.str.sprintf('%d-%d of %d', range_start, range_stop, total); + } - this.$pager.find('.oe-pager-state').text(isNaN(total) - ? '-' : _.str.sprintf('%d / %d', page, total)); + this.$pager.find('.oe-pager-state').text(spager); }, /** * Sets up the listview's columns: merges view and fields data, move @@ -598,7 +607,6 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi * @param {Array} records selected record values */ do_select: function (ids, records) { - this.$buttons.find('.oe_list_delete').attr('disabled', !ids.length); if (!ids.length) { this.dataset.index = 0; if (this.sidebar) { @@ -669,7 +677,12 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi * Handles deletion of all selected lines */ do_delete_selected: function () { - this.do_delete(this.groups.get_selection().ids); + var ids = this.groups.get_selection().ids; + if (ids.length) { + this.do_delete(this.groups.get_selection().ids); + } else { + this.do_warn(_t("Warning"), _t("You must select at least one record.")); + } }, /** * Computes the aggregates for the current list view, either on the @@ -807,15 +820,18 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi } }, no_result: function () { + this.$element.find('.oe_view_nocontent').remove(); if (this.groups.group_by || !this.options.action || !this.options.action.help) { return; } - this.$element.children('table').replaceWith( - $('
') - .append($('', { src: '/web/static/src/img/list_empty_arrow.png' })) - .append($('
').html(this.options.action.help))); + this.$element.find('table:first').hide(); + this.$element.prepend( + $('
') + .append($('', { src: '/web/static/src/img/view_empty_arrow.png' })) + .append($('
').html(this.options.action.help)) + ); } }); instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.ListView.List# */{ @@ -931,11 +947,7 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. if (!self.dataset.select_id(row_id)) { throw "Could not find id in dataset" } - var view; - if ($(e.target).is('.oe-record-edit-link-img')) { - view = 'form'; - } - self.row_clicked(e, view); + self.row_clicked(e); } }); }, @@ -1010,9 +1022,6 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. if (this.options.selectable) { cells.push(''); } - if (this.options.isClarkGable) { - cells.push(''); - } _(this.columns).each(function(column) { if (column.invisible === '1') { return; @@ -1321,9 +1330,6 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we if (self.options.selectable) { $row.append(''); } - if (self.options.isClarkGable) { - $row.append(''); - } _(self.columns).chain() .filter(function (column) {return !column.invisible;}) .each(function (column) { diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js index ff76f333ea9..c918012e60d 100644 --- a/addons/web/static/src/js/view_list_editable.js +++ b/addons/web/static/src/js/view_list_editable.js @@ -70,6 +70,8 @@ openerp.web.list_editable = function (instance) { */ do_add_record: function () { if (this.options.editable) { + this.$element.find('table:first').show(); + this.$element.find('.oe_view_nocontent').remove(); this.groups.new_record(); } else { this._super(); @@ -202,7 +204,7 @@ openerp.web.list_editable = function (instance) { var $new_row = $('', { id: _.uniqueId('oe-editable-row-'), 'data-id': record_id, - 'class': row ? $(row).attr('class') : '' + ' oe_forms', + 'class': (row ? $(row).attr('class') : '') + ' oe_form', click: function (e) {e.stopPropagation();} }) .delegate('button.oe-edit-row-save', 'click', function () { @@ -398,8 +400,6 @@ openerp.web.list_editable = function (instance) { if (this.view.editable_list.options.selectable) $("").appendTo($element); - if (this.view.editable_list.options.isClarkGable) - $("").appendTo($element); $xml.children().each(function(i, el) { var modifiers = JSON.parse($(el).attr("modifiers") || "{}"); diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 798c5bb1493..d2387c1ba3f 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -237,7 +237,7 @@ instance.web.ViewManager = instance.web.Widget.extend({ var self = this; this.$element.find('.oe_view_manager_switch a').click(function() { self.on_mode_switch($(this).data('view-type')); - }); + }).tipsy(); var views_ids = {}; _.each(this.views_src, function(view) { self.views[view.view_type] = $.extend({}, view, { @@ -636,8 +636,6 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({ var self = this; return $.when(this._super(view_type, no_store)).then(function () { - self.shortcut_check(self.views[view_type]); - var controller = self.views[self.active_view].controller, fvg = controller.fields_view, view_id = (fvg && fvg.view_id) || '--'; @@ -649,15 +647,6 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({ self.$element.find('.oe_view_title_text').text(fvg.arch.attrs.string || fvg.name); } - var $title = self.$element.find('.oe_view_title_text'), - $search_prefix = $title.find('span.oe_searchable_view'); - if (controller.searchable !== false && self.flags.search_view !== false) { - if (!$search_prefix.length) { - $title.prepend('' + _t("Search: ") + ''); - } - } else { - $search_prefix.remove(); - } }); }, do_push_state: function(state) { @@ -681,44 +670,6 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({ self.views[self.active_view].controller.do_load_state(state, warm); }); }, - shortcut_check : function(view) { - var self = this; - var grandparent = this.getParent() && this.getParent().getParent(); - // display shortcuts if on the first view for the action - var $shortcut_toggle = this.$element.find('.oe-shortcut-toggle'); - if (!this.action.name || - !(view.view_type === this.views_src[0].view_type - && view.view_id === this.views_src[0].view_id)) { - $shortcut_toggle.hide(); - return; - } - $shortcut_toggle.removeClass('oe-shortcut-remove').show(); - if (_(this.session.shortcuts).detect(function (shortcut) { - return shortcut.res_id === self.session.active_id; })) { - $shortcut_toggle.addClass("oe-shortcut-remove"); - } - this.shortcut_add_remove(); - }, - shortcut_add_remove: function() { - var self = this; - var $shortcut_toggle = this.$element.find('.oe-shortcut-toggle'); - $shortcut_toggle - .unbind("click") - .click(function() { - if ($shortcut_toggle.hasClass("oe-shortcut-remove")) { - $(self.session.shortcuts.binding).trigger('remove-current'); - $shortcut_toggle.removeClass("oe-shortcut-remove"); - } else { - $(self.session.shortcuts.binding).trigger('add', { - 'user_id': self.session.uid, - 'res_id': self.session.active_id, - 'resource': 'ir.ui.menu', - 'name': self.action.name - }); - $shortcut_toggle.addClass("oe-shortcut-remove"); - } - }); - }, display_title: function () { return this.action.name; } @@ -777,25 +728,6 @@ instance.web.Sidebar = instance.web.Widget.extend({ self.$element.html(QWeb.render('Sidebar', {widget: self})); this.$element.find('ul').hide(); }, - add_section: function() { - var self = this; - }, - add_toolbar: function(toolbar) { - var self = this; - _.each(['print','action','relate'], function(type) { - var items = toolbar[type]; - if (items) { - for (var i = 0; i < items.length; i++) { - items[i] = { - label: items[i]['name'], - action: items[i], - classname: 'oe_sidebar_' + type - } - } - self.add_items(type=='print' ? 'print' : 'other', items); - } - }); - }, /** * For each item added to the section: * @@ -828,6 +760,22 @@ instance.web.Sidebar = instance.web.Widget.extend({ this.redraw(); } }, + add_toolbar: function(toolbar) { + var self = this; + _.each(['print','action','relate'], function(type) { + var items = toolbar[type]; + if (items) { + for (var i = 0; i < items.length; i++) { + items[i] = { + label: items[i]['name'], + action: items[i], + classname: 'oe_sidebar_' + type + } + } + self.add_items(type=='print' ? 'print' : 'other', items); + } + }); + }, on_item_action_clicked: function(item) { var self = this; self.getParent().sidebar_context().then(function (context) { diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 3a24bebf924..c0c86af2780 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -125,7 +125,7 @@
  • Password
  • Back to Login
  • -
    + @@ -165,7 +165,7 @@
    CREATE DATABASE
    -
    + @@ -190,7 +190,7 @@
    DROP DATABASE
    -
    + @@ -216,7 +216,7 @@
    -
    + @@ -238,7 +238,7 @@
    RESTORE DATABASE
    -
    + @@ -333,7 +333,7 @@ t-att-data-action-model="menu.action ? menu.action.split(',')[0] : ''" t-att-data-action-id="menu.action ? menu.action.split(',')[1] : ''"> - +
    @@ -349,24 +349,14 @@
    - -
  • - - - -
  • -
    - +
    Activate the developper mode

    OpenERP

    @@ -383,8 +373,8 @@

    - - + +
    CHANGE MASTER PASSWORD
    @@ -408,27 +398,56 @@ + +
    + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    +
    + +
    - +
    - + + - - - - + + +
    -

    - -

    +

    + +

    +
    +
    +
    +
    +
    +
    @@ -436,6 +455,8 @@
    + +
    @@ -443,12 +464,9 @@
    + - - - - + - @@ -639,7 +656,6 @@ - @@ -649,12 +665,10 @@
    - - + or Import
    @@ -684,9 +698,6 @@ - - - - - - or - Discard + or Discard
    @@ -730,7 +738,7 @@
    -
    + @@ -839,7 +847,6 @@ t-att-title="help" t-attf-class="#{classnames} oe_form_label#{help ? '_help' : ''} oe_align_#{align}"> - ? @@ -1034,8 +1041,8 @@ @@ -1064,7 +1071,7 @@ -
    -
    +
    @@ -1338,7 +1345,7 @@ -
    +

    Select Dashboard to add this filter to: