diff --git a/etemplate/js/et2_widget_link.js b/etemplate/js/et2_widget_link.js index fb69f73ab4..83acdc95ad 100644 --- a/etemplate/js/et2_widget_link.js +++ b/etemplate/js/et2_widget_link.js @@ -366,6 +366,7 @@ var et2_link_entry = et2_inputWidget.extend({ if(opt_count == 1) { this.app_select.hide(); + this.div.addClass("no_app"); } self.options.value.app = this.app_select.val(); @@ -374,9 +375,8 @@ var et2_link_entry = et2_inputWidget.extend({ // .attr("type", "search") // Fake it for all browsers below .focus(function(){if(!self.options.application) { // Adjust width, leave room for app select & link button - self.search.css("width", "50%");self.app_select.show(); + self.div.removeClass("no_app");self.app_select.show(); }}) - .css("width", opt_count == 1 ? "100%" : "50%") .appendTo(this.div); this.set_blur(this.options.blur ? this.options.blur : this.egw().lang("search"), this.search); @@ -527,7 +527,7 @@ var et2_link_entry = et2_inputWidget.extend({ jQuery("option[value='"+_value.app+"']",this.app_select).attr("selected",true); this.app_select.hide(); - this.search.css("width", "100%"); + this.div.addClass("no_app"); }, set_blur: function(_value, input) { diff --git a/etemplate/templates/default/etemplate2.css b/etemplate/templates/default/etemplate2.css index d2a1d19276..16b738a1f5 100644 --- a/etemplate/templates/default/etemplate2.css +++ b/etemplate/templates/default/etemplate2.css @@ -326,15 +326,29 @@ span.et2_date span { /* Link entry - x button*/ div.et2_link_entry { + white-space: nowrap; } -.et2_link_entry input.ui-autocomplete-input { +div.et2_link_entry:after { + display: inline-block; + content: "."; + height: 0; + visibility: hidden; + margin: -20px; +} +/* Special layout for inside nm grid */ +.et2_nextmatch .et2_link_entry:after { + margin: 0px; +} +.et2_link_entry.no_app input.ui-autocomplete-input { + width: 100%; } .et2_link_entry .ui-icon-close { + display: inline-block; background-color: inherit; border: none; position: relative; - top: -20px; - right: -91%; + top: 3px; + left: -18px; cursor: pointer; }