From b2cae758951b03a04585c79ae4f3083bfc5186f9 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Wed, 27 May 2015 09:06:09 +0200 Subject: [PATCH] [IMP] UI fixes --- .../src/css/web_advanced_search_x2x.css | 36 +++++++++++-------- .../static/src/js/web_advanced_search_x2x.js | 27 +++++++++++--- 2 files changed, 44 insertions(+), 19 deletions(-) diff --git a/web_advanced_search_x2x/static/src/css/web_advanced_search_x2x.css b/web_advanced_search_x2x/static/src/css/web_advanced_search_x2x.css index a2585b83..67c3e194 100644 --- a/web_advanced_search_x2x/static/src/css/web_advanced_search_x2x.css +++ b/web_advanced_search_x2x/static/src/css/web_advanced_search_x2x.css @@ -2,27 +2,35 @@ { position: relative; } +.openerp .oe_searchview_drawer .web_advanced_search_x2x_domain +{ + max-width: 20em; + overflow: hidden; + text-overflow: ellipsis; + display: inline-block; +} /* copy search view's button style */ .openerp .oe_searchview_drawer .web_advanced_search_x2x_search:before { font: 21px "mnmliconsRegular"; content: "r"; color: #a3a3a3; + margin-left: 5px; } .openerp .oe_searchview_drawer .web_advanced_search_x2x_search { - font-size: 1px; - letter-spacing: -1px; - color: transparent; - text-shadow: none; - font-weight: normal; - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; - -moz-border-radius: 0; - -webkit-border-radius: 0; - border-radius: 0; - padding: 0; - border: none; - background: transparent; + font-size: 1px; + letter-spacing: -1px; + color: transparent; + text-shadow: none; + font-weight: normal; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; + padding: 0; + border: none; + background: transparent; } diff --git a/web_advanced_search_x2x/static/src/js/web_advanced_search_x2x.js b/web_advanced_search_x2x/static/src/js/web_advanced_search_x2x.js index 6265d5be..e34c2e1a 100644 --- a/web_advanced_search_x2x/static/src/js/web_advanced_search_x2x.js +++ b/web_advanced_search_x2x/static/src/js/web_advanced_search_x2x.js @@ -149,9 +149,15 @@ openerp.web_advanced_search_x2x = function(instance) }, get_domain: function() { - if(this.show_domain_selection() && this.domain) + if(this.show_domain_selection()) { var self = this; + if(!this.domain || this.domain.length == 0) + { + throw new instance.web.search.Invalid( + this.field.string, this.domain_representation, + instance.web._lt('invalid search domain')); + } return _.extend(new instance.web.CompoundDomain(), { __domains: [ _.map(this.domain, function(leaf) @@ -209,12 +215,14 @@ openerp.web_advanced_search_x2x = function(instance) { self.$buttonpane.find(".oe_selectcreatepopup-search-create").remove(); self.$buttonpane.prepend( - //TODO: take care that this is only clicked if we have a domain - jQuery('