BUGFIX: Uploads save button not visible (Trac #7294)

Fixed the calculation of height for the upload (non AssetUploads) area
so that the save button would show. Took off the min-height, as this
will cause UI issues when there are multiple files open for editing.
This commit is contained in:
Naomi Guyer 2012-05-10 16:47:52 +12:00 committed by Ingo Schommer
parent 106bd47e88
commit f2411cf13a
4 changed files with 12 additions and 11 deletions

View File

@ -17,7 +17,7 @@
.ss-uploadfield .ss-uploadfield-item-status.ui-state-error-text { color: red; font-weight: bold; }
.ss-uploadfield .ss-ui-button { display: block; float: left; margin: 0 10px 0 0; }
.ss-uploadfield .ss-ui-button.ss-uploadfield-fromcomputer { position: relative; overflow: hidden; }
.ss-uploadfield .ss-uploadfield-files { margin: 0; padding: 0; max-height: 272px; overflow: auto; position: relative; }
.ss-uploadfield .ss-uploadfield-files { margin: 0; padding: 0; overflow: auto; position: relative; }
.ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item, .ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item.ui-state-error { border: 0; border-bottom: 1px solid #b3b3b3; background: none; color: #444444; }
.ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item:last-child, .ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item.ui-state-error:last-child { border-bottom: 0; }
.ss-uploadfield .ss-uploadfield-files .ss-uploadfield-item-actions { height: 28px; margin: 6px 0 0; position: relative; }

View File

@ -314,25 +314,27 @@
$('div.ss-upload .ss-uploadfield-item-editform').entwine({
fitHeight: function() {
var iframe = this.find('iframe'), padding = 32;
var h = iframe.contents().find('form').height() + padding;
var iframe = this.find('iframe'), padding = 32, parentPadding = 2;
var h = iframe.contents().find('form').height() + padding;
if(this.hasClass('includeParent')){
padding=0;
parentPadding=12;
}
/* Set height of body except in IE8. Setting this in IE8 breaks the
dropdown */
if(!$.browser.msie && $.browser.version.slice(0,3) != "8.0"){
if(!$.browser.msie && $.browser.version.slice(0,3) != "8.0"){
iframe.contents().find('body').css({'height':(h-padding)});
}
}
// Set iframe to match its contents height
iframe.height(h);
// set container to match the same height
iframe.parent().height(h+parentPadding);
iframe.contents().find('body form').css({'width':'98%'});
iframe.parent().height(h+2);
iframe.contents().find('body form').css({'width':'98%'});
},
toggleEditForm: function() {
var itemInfo = this.prev('.ss-uploadfield-item-info'), status = itemInfo.find('.ss-uploadfield-item-status');

View File

@ -79,7 +79,6 @@
.ss-uploadfield-files {
margin: 0;
padding: 0;
max-height: 272px;
overflow: auto;
position: relative;

View File

@ -18,7 +18,7 @@
<% end_if %>
</div>
</div>
<div class="ss-uploadfield-item-editform loading">
<div class="ss-uploadfield-item-editform loading includeParent">
<iframe frameborder="0" src="$UploadFieldEditLink"></iframe>
</div>
</li>