mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
106bd47e88
commit
f2411cf13a
@ -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; }
|
||||
|
@ -314,9 +314,14 @@
|
||||
|
||||
$('div.ss-upload .ss-uploadfield-item-editform').entwine({
|
||||
fitHeight: function() {
|
||||
var iframe = this.find('iframe'), padding = 32;
|
||||
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"){
|
||||
@ -327,12 +332,9 @@
|
||||
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');
|
||||
|
@ -79,7 +79,6 @@
|
||||
.ss-uploadfield-files {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
max-height: 272px;
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user