Skip to content

Commit

Permalink
Merge pull request #561 from adrexia/7497-file-upload-fixes
Browse files Browse the repository at this point in the history
BUGFIX: Make alignment of step 1 consistent in Insert Media panel (fixes #3 of #7497)
  • Loading branch information
sminnee committed Jun 22, 2012
2 parents 4aa4cd2 + f01c164 commit f17bb8f
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 12 deletions.
12 changes: 9 additions & 3 deletions admin/css/screen.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 29 additions & 1 deletion admin/scss/_style.scss
Expand Up @@ -1448,13 +1448,14 @@ body.cms-dialog {
border:none; border:none;
@include box-shadow-none; @include box-shadow-none;
width:55%; width:55%;
max-width:512px;
float:left; float:left;
position: relative; position: relative;


label { label {
position: absolute; position: absolute;
left: 8px; left: 8px;
top: 0px; top: 13px;
font-weight: normal; color: #888; font-weight: normal; color: #888;
} }


Expand All @@ -1467,6 +1468,7 @@ body.cms-dialog {
} }
} }
button.add-url{ button.add-url{
margin-top:13px;
padding-top:15px; padding-top:15px;
@include clearfix; @include clearfix;
border:none; border:none;
Expand Down Expand Up @@ -1577,6 +1579,32 @@ body.cms-dialog {
} }
} }


.ss-uploadfield{
&.from-web, &.from-CMS{
margin-bottom:48px;
.middleColumn {
width:auto;
background:none;
border:none;
margin-top:13px;
}
}

&.from-CMS{
margin-top:33px;
h4{
margin-top:3px;
}
.middleColumn {
margin-top:0;
.TreeDropdownField{
margin-top:23px;
}
}
}

}

.ss-uploadfield-editandorganize { .ss-uploadfield-editandorganize {
display: none; display: none;
} }
Expand Down
17 changes: 9 additions & 8 deletions forms/HtmlEditorField.php
Expand Up @@ -380,22 +380,23 @@ function MediaForm() {
$numericLabelTmpl = '<span class="step-label"><span class="flyout">%d</span><span class="arrow"></span><strong class="title">%s</strong></span>'; $numericLabelTmpl = '<span class="step-label"><span class="flyout">%d</span><span class="arrow"></span><strong class="title">%s</strong></span>';


$fromCMS = new CompositeField( $fromCMS = new CompositeField(
new LiteralField('headerSelect', '<h4 class="field header-select">' . sprintf($numericLabelTmpl, '1', _t('HtmlEditorField.Find', 'Find')) . '</h4>'), new LiteralField('headerSelect', '<h4>' . sprintf($numericLabelTmpl, '1', _t('HtmlEditorField.FindInFolder', 'Find in Folder')) . '</h4>'),
$selectComposite = new CompositeField( $select = new TreeDropdownField('ParentID', "", 'Folder'),
new TreeDropdownField('ParentID', _t('HtmlEditorField.FOLDER', 'Folder'), 'Folder'), $fileField
$fileField
)
); );

$fromCMS->addExtraClass('content ss-uploadfield from-CMS');
$select->addExtraClass('content-select');


$fromCMS->addExtraClass('content');
$selectComposite->addExtraClass('content-select');


$fromWeb = new CompositeField( $fromWeb = new CompositeField(
new LiteralField('headerURL', '<h4 class="field header-url">' . sprintf($numericLabelTmpl, '1', _t('HtmlEditorField.ADDURL', 'Add URL')) . '</h4>'), new LiteralField('headerURL', '<h4>' . sprintf($numericLabelTmpl, '1', _t('HtmlEditorField.ADDURL', 'Add URL')) . '</h4>'),
$remoteURL = new TextField('RemoteURL', 'http://'), $remoteURL = new TextField('RemoteURL', 'http://'),
new LiteralField('addURLImage', '<button class="action ui-action-constructive ui-button field add-url" data-icon="addMedia"></button>') new LiteralField('addURLImage', '<button class="action ui-action-constructive ui-button field add-url" data-icon="addMedia"></button>')
); );

$remoteURL->addExtraClass('remoteurl'); $remoteURL->addExtraClass('remoteurl');
$fromWeb->addExtraClass('content ss-uploadfield from-web');


Requirements::css(FRAMEWORK_DIR . '/css/AssetUploadField.css'); Requirements::css(FRAMEWORK_DIR . '/css/AssetUploadField.css');
$computerUploadField = Object::create('UploadField', 'AssetUploadField', ''); $computerUploadField = Object::create('UploadField', 'AssetUploadField', '');
Expand Down

0 comments on commit f17bb8f

Please sign in to comment.