mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-30 19:52:17 +01:00
Apply a min-width on contact popup. Fix owncloud/contacts#46
This commit is contained in:
parent
1788612aab
commit
620ea28204
@ -137,8 +137,21 @@
|
|||||||
|
|
||||||
#contact { margin: 1em; }
|
#contact { margin: 1em; }
|
||||||
#contact textarea { min-height: 5em; width: 100%; margin: 0 !important; padding: 0 !important; outline: 0 !important;}
|
#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; }
|
#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; }*/
|
/*dl.form { display: block; width: auto; margin: 0; padding: 0; cursor: normal; }*/
|
||||||
|
10
js/app.js
10
js/app.js
@ -1282,11 +1282,15 @@ OC.Contacts = OC.Contacts || {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var self = this;
|
var self = this;
|
||||||
var $contact = $contactelem.find('#contact');
|
|
||||||
var adjustElems = function() {
|
var adjustElems = function() {
|
||||||
|
var $contact = $contactelem.find('#contact');
|
||||||
var maxheight = document.documentElement.clientHeight - 200; // - ($contactelem.offset().top+70);
|
var maxheight = document.documentElement.clientHeight - 200; // - ($contactelem.offset().top+70);
|
||||||
console.log('contact maxheight', maxheight);
|
var $footer = $contactelem.find('footer');
|
||||||
$contactelem.find('ul').first().css({'max-height': maxheight, 'overflow-y': 'auto', 'overflow-x': 'hidden'});
|
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);
|
$(window).resize(adjustElems);
|
||||||
//$contact.resizable({ minWidth: 400, minHeight: 400, maxHeight: maxheight});
|
//$contact.resizable({ minWidth: 400, minHeight: 400, maxHeight: maxheight});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user