[IMP] xml, css and js tweaks in advanced search view
authorGéry Debongnie <ged@odoo.com>
Fri, 17 Oct 2014 13:36:18 +0000 (15:36 +0200)
committerGéry Debongnie <ged@odoo.com>
Tue, 21 Oct 2014 07:33:53 +0000 (09:33 +0200)
addons/web/static/src/css/base.css
addons/web/static/src/css/base.sass
addons/web/static/src/js/search.js
addons/web/static/src/js/views.js
addons/web/static/src/xml/base.xml

index 11dd624..5445ab4 100644 (file)
@@ -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;
   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;
   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;
 }
   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;
 .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;
 .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;
 .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;
     top: 0px;
   }
 }
-
 .kitten-mode-activated {
   background-size: cover;
   background-attachment: fixed;
index da23bf3..3546a5c 100644 (file)
@@ -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
index 9556ba6..f0be141 100644 (file)
@@ -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);
         });
     },
index 47a56ca..cf33f7b 100644 (file)
@@ -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();
index 9b0121f..bd18417 100644 (file)
 <div t-name="ViewManager" class="oe-view-manager">
     <div class="oe-view-manager-header container-fluid">
         <div class="row">
-            <div class="col-md-6 oe-header-title">
+            <div class="col-lg-6 oe-header-title">
                 <div t-if="widget.session.debug" class="oe_debug_view btn-group btn-group-sm"/>
                 <ol class="oe-view-title breadcrumb" t-if="widget.flags.display_title !== false">
                 </ol>
             </div>
-            <div class="oe-view-manager-search-view col-md-6" />
+            <div class="oe-view-manager-search-view col-lg-6" />
         </div>
         <div class="row">
-            <div class="col-sm-6">
+            <div class="col-lg-6">
                 <div class="oe-view-manager-buttons">
                     <t t-foreach="widget.views" t-as="view">
                         <div t-attf-class="oe-#{view}-buttons"/>
                 </div>
                 <div class="oe-view-manager-sidebar"></div>
             </div>
-            <div class="col-sm-6">
+            <div class="col-lg-6">
                 <div class="oe-search-options btn-group"/>
                 <div class="oe-right-toolbar">
                     <div class="oe-view-manager-pager"></div>
                 <td style="width:100%">
                     <div class="oe-search-options btn-group"/>
                     <div class="oe_popup_search"></div>
-                </td>
-            </tr>
-            <tr style="width:100%">
-                <td style="width:100%">
                     <div class="oe_popup_list_pager"></div>
                 </td>
             </tr>
 </t>
 
 <div t-name="SearchView" class="oe_searchview form-control input-sm">
-    <div class="oe_searchview_unfold_drawer fa fa-lg fa-fw fa-chevron-right" title="Advanced Search..."/>
-    <div class="oe_searchview_facets"/>
     <div class="oe_searchview_search fa fa-lg fa-search" title="Search Again"/>
+    <div class="oe_searchview_facets"/>
+    <div class="oe_searchview_unfold_drawer fa fa-lg fa-fw fa-chevron-right" title="Advanced Search..."/>
 </div>
 
 <div t-name="SearchView.InputView"