From 782da3ac06064bc252cbc2fb57a6062ed75d5833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Fri, 17 Oct 2014 15:36:18 +0200 Subject: [PATCH] [IMP] xml, css and js tweaks in advanced search view --- addons/web/static/src/css/base.css | 53 +++++++++++++++++------------ addons/web/static/src/css/base.sass | 48 ++++++++++++++++---------- addons/web/static/src/js/search.js | 5 ++- addons/web/static/src/js/views.js | 4 +-- addons/web/static/src/xml/base.xml | 16 ++++----- 5 files changed, 72 insertions(+), 54 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 11dd6240800..5445ab404a5 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -8,7 +8,6 @@ font-weight: normal; font-style: normal; } - @font-face { font-family: "EntypoRegular"; src: url("/web/static/src/font/entypo-webfont.eot") format("eot"); @@ -19,7 +18,6 @@ font-weight: normal; font-style: normal; } - #oe_main_menu_navbar { min-height: 34px; z-index: 1001; @@ -1034,19 +1032,9 @@ display: table-row; background-color: #f0eeee; border-bottom: 1px solid #afafb6; -} -.openerp .oe-view-manager-header .selected { - display: block; -} -.openerp .oe-view-manager-header .selected a { - font-weight: bold; -} -.openerp .oe-view-manager-header .selected a:before { - font-family: FontAwesome; - position: absolute; - left: 6px; - top: 3px; - content: ""; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; } .openerp .oe-view-manager-header .dropdown-menu li { position: relative; @@ -1081,6 +1069,11 @@ margin: 0; background-color: #f0eeee; } +.openerp .oe-view-manager-header .oe-view-title li { + -moz-user-select: initial; + -webkit-user-select: initial; + user-select: initial; +} .openerp .oe-view-manager-header .oe-view-manager-search-view { padding-top: 5px; } @@ -1128,12 +1121,15 @@ background-color: #f5f5f5; } .openerp .oe-view-manager-header .oe-view-manager-sidebar .oe_file_attachment { - display: inline; padding: 3px 20px; + display: inline-block; } .openerp .oe-view-manager-header .oe-view-manager-sidebar .oe_sidebar_delete_item { - display: inline; padding: 0; + display: inline-block; +} +.openerp .oe-view-manager-header .oe-view-manager-sidebar .dropdown-menu li a { + width: 100%; } .openerp .oe-view-manager-header .oe_form_buttons { padding: 0; @@ -1144,6 +1140,19 @@ .openerp .oe_view_manager_inline > .oe-view-manager-header, .openerp .oe_view_manager_inlineview > .oe-view-manager-header { display: none; } +.openerp .oe-search-options .selected { + display: block; +} +.openerp .oe-search-options .selected a { + font-weight: bold; +} +.openerp .oe-search-options .selected a:before { + font-family: FontAwesome; + position: absolute; + left: 6px; + top: 3px; + content: ""; +} .openerp .oe_application > div > div > .oe-view-manager-body { position: absolute; top: 90px; @@ -1179,18 +1188,18 @@ .openerp .oe_searchview .oe_searchview_unfold_drawer { position: absolute; top: 8px; - left: 5px; + right: 5px; cursor: pointer; } .openerp .oe_searchview .oe_searchview_search { cursor: pointer; position: absolute; - right: 6px; top: 8px; + left: 5px; } .openerp .oe_searchview .oe_searchview_facets { min-height: 22px; - margin: 2px 20px 0 10px; + margin: 2px 20px 0 0; } .openerp .oe_searchview .oe_searchview_facets * { vertical-align: top; @@ -1217,6 +1226,9 @@ .openerp .oe_searchview .oe_searchview_facets .oe_searchview_input:focus { outline: none; } +.openerp .oe_searchview .oe_searchview_facets .oe_searchview_input:first-child { + margin-left: 10px; +} .openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet { position: relative; cursor: pointer; @@ -2714,7 +2726,6 @@ top: 0px; } } - .kitten-mode-activated { background-size: cover; background-attachment: fixed; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index da23bf3e754..3546a5c6e28 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -900,16 +900,9 @@ $sheet-padding: 16px display: table-row background-color: rgb(240, 238, 238) border-bottom: 1px solid #afafb6 - .selected - display: block - a - font-weight: bold - a:before - font-family: FontAwesome - position: absolute - left: 6px - top: 3px - content: "\f00c" + -webkit-user-select: none + -moz-user-select: none + user-select: none .dropdown-menu li position: relative @@ -933,6 +926,10 @@ $sheet-padding: 16px padding-left: 0 margin: 0 background-color: rgb(240, 238, 238) + li + -moz-user-select: initial + -webkit-user-select: initial + user-select: initial .oe-view-manager-search-view padding-top: 5px .oe-view-manager-switch @@ -967,12 +964,15 @@ $sheet-padding: 16px .oe_form_binary_form:hover background-color: #f5f5f5 .oe_file_attachment - display: inline padding: 3px 20px + display: inline-block .oe_sidebar_delete_item - display: inline padding: 0 - + display: inline-block + .dropdown-menu + li + a + width: 100% .oe_form_buttons padding: 0 .oe-pager-buttons @@ -980,6 +980,18 @@ $sheet-padding: 16px .oe_view_manager_inline, .oe_view_manager_inlineview > .oe-view-manager-header display: none + .oe-search-options + .selected + display: block + a + font-weight: bold + a:before + font-family: FontAwesome + position: absolute + left: 6px + top: 3px + content: "\f00c" + .oe_application > div > div @@ -1017,18 +1029,16 @@ $sheet-padding: 16px .oe_searchview_unfold_drawer position: absolute top: 8px - left: 5px + right: 5px cursor: pointer - .oe_searchview_search cursor: pointer position: absolute - right: 6px top: 8px - + left: 5px .oe_searchview_facets min-height: 22px - margin: 2px 20px 0 10px + margin: 2px 20px 0 0 * vertical-align: top display: inline-block @@ -1046,6 +1056,8 @@ $sheet-padding: 16px height: 16px &:focus outline: none + .oe_searchview_input:first-child + margin-left: 10px .oe_searchview_facet position: relative cursor: pointer diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index 9556ba650b8..f0be141ce8d 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -1591,7 +1591,7 @@ instance.web.search.FavoriteMenu = instance.web.Widget.extend({ this.$save_name = this.$('.oe-save-name'); this.$inputs = this.$save_name.find('input'); this.$divider = this.$('.divider'); - + this.$inputs.eq(0).val(this.searchview.getParent().title); var $shared_filter = this.$inputs.eq(1), $default_filter = this.$inputs.eq(2); $shared_filter.click(function () {$default_filter.prop('checked', false)}); @@ -1749,8 +1749,7 @@ instance.web.search.FavoriteMenu = instance.web.Widget.extend({ }) .appendTo($filter); } - this.$filters[key].unbind('click').click(function (event) { - event.stopPropagation(); + this.$filters[key].unbind('click').click(function () { self.toggle_filter(filter); }); }, diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 47a56ca5806..cf33f7bb8d0 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -116,7 +116,7 @@ instance.web.ActionManager = instance.web.Widget.extend({ }); if (!vms) { this.view_managers = []; - this.inner_widget = null; + this.inner_widget = null; } }, do_push_state: function(state) { @@ -661,7 +661,7 @@ instance.web.ViewManager = instance.web.Widget.extend({ if (self.searchview) { var is_hidden = self.active_view.controller.searchable === false; self.searchview.toggle_visibility(!is_hidden); - self.$header_col.toggleClass('col-md-6', !is_hidden).toggleClass('col-md-12', is_hidden); + self.$header_col.toggleClass('col-lg-6', !is_hidden).toggleClass('col-lg-12', is_hidden); self.$search_col.toggle(!is_hidden); } self.display_breadcrumbs(); diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 9b0121fd6af..bd184171ca8 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -472,15 +472,15 @@
-
+
-
+
-
+
@@ -488,7 +488,7 @@
-
+
@@ -1478,10 +1478,6 @@
- - - -
@@ -1547,9 +1543,9 @@
-
-