1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-01-18 07:52:21 +01:00

Apply a min-width on contact popup. Fix owncloud/contacts#46

This commit is contained in:
Thomas Tanghus 2013-05-20 13:20:37 +02:00
parent 1788612aab
commit 620ea28204
2 changed files with 22 additions and 5 deletions

View File

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

View File

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