diff --git a/css/contacts.css b/css/contacts.css index db1bfae2..1cfb4fd7 100644 --- a/css/contacts.css +++ b/css/contacts.css @@ -137,8 +137,21 @@ #contact { margin: 1em; } #contact textarea { min-height: 5em; width: 100%; margin: 0 !important; padding: 0 !important; outline: 0 !important;} -#contact footer { padding: 1em; width: 100%; -moz-box-sizing: border-box; box-sizing: border-box; clear: both; } - +#contact footer { + padding: 5px; + width: 100%; + -moz-box-sizing: border-box; box-sizing: border-box; + clear: both; + white-space: nowrap; +} +#contact footer > * { + display: inline-block; + float: left; +} +#contact footer > .delete { + display: inline-block; + float: right; +} #contact input[type="checkbox"] { margin: 3px; padding:1px; vertical-align: bottom; float: left; } /*dl.form { display: block; width: auto; margin: 0; padding: 0; cursor: normal; }*/ diff --git a/js/app.js b/js/app.js index 082f5e3e..eac578ea 100644 --- a/js/app.js +++ b/js/app.js @@ -1282,11 +1282,15 @@ OC.Contacts = OC.Contacts || { return; } var self = this; - var $contact = $contactelem.find('#contact'); var adjustElems = function() { + var $contact = $contactelem.find('#contact'); var maxheight = document.documentElement.clientHeight - 200; // - ($contactelem.offset().top+70); - console.log('contact maxheight', maxheight); - $contactelem.find('ul').first().css({'max-height': maxheight, 'overflow-y': 'auto', 'overflow-x': 'hidden'}); + var $footer = $contactelem.find('footer'); + var minWidth = 0; + $.each($footer.children(), function(idx, child) { + minWidth += $(child).outerWidth(); + }); + $contact.css({'min-width' : Math.round(minWidth), 'max-height': maxheight, 'overflow-y': 'auto', 'overflow-x': 'hidden'}); }; $(window).resize(adjustElems); //$contact.resizable({ minWidth: 400, minHeight: 400, maxHeight: maxheight});