Better styles for link clear (x) button

This commit is contained in:
Nathan Gray 2012-04-24 21:27:48 +00:00
parent cf34943445
commit ff96b27208
2 changed files with 20 additions and 6 deletions

View File

@ -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) {

View File

@ -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;
}