Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #561 from adrexia/7497-file-upload-fixes

BUGFIX: Make alignment of step 1 consistent in Insert Media panel (fixes #3 of #7497)
  • Loading branch information...
commit f17bb8f52c96b470e959f0fff39fc7ef333f89a9 2 parents 4aa4cd2 + f01c164
Sam Minnée sminnee authored
12 admin/css/screen.css
View
@@ -545,11 +545,11 @@ body.cms-dialog { overflow: auto; background: url("../images/textures/bg_cms_mai
/** -------------------------------------------- "Insert X" forms -------------------------------------------- */
.htmleditorfield-dialog.ui-dialog-content { padding: 0; position: relative; }
.htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb .CompositeField { overflow: hidden; *zoom: 1; }
-.htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb #RemoteURL { border: none; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; width: 55%; float: left; position: relative; }
-.htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb #RemoteURL label { position: absolute; left: 8px; top: 0px; font-weight: normal; color: #888; }
+.htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb #RemoteURL { border: none; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; width: 55%; max-width: 512px; float: left; position: relative; }
+.htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb #RemoteURL label { position: absolute; left: 8px; top: 13px; font-weight: normal; color: #888; }
.htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb #RemoteURL .middleColumn { margin-left: 0; }
.htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb #RemoteURL input.remoteurl { padding-left: 40px; }
-.htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb button.add-url { padding-top: 15px; overflow: hidden; *zoom: 1; border: none; background: none; opacity: 0.8; cursor: hand; }
+.htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb button.add-url { margin-top: 13px; padding-top: 15px; overflow: hidden; *zoom: 1; border: none; background: none; opacity: 0.8; cursor: hand; }
.htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb button.add-url .btn-icon-addMedia { width: 20px; height: 20px; }
.htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb button.add-url:hover, .htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb button.add-url:active { border: none; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; opacity: 1; }
.htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb button.add-url.ui-state-disabled, .htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb button.add-url.ui-state-disabled:hover, .htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb button.add-url.ui-state-disabled:active { opacity: 0.35; filter: Alpha(Opacity=35); }
@@ -571,6 +571,12 @@ body.cms-dialog { overflow: auto; background: url("../images/textures/bg_cms_mai
.htmleditorfield-linkform .step2 { margin-bottom: 16px; }
.htmleditorfield-mediaform .ss-gridfield tbody td:first-child img { max-height: 30px; }
+.htmleditorfield-mediaform .ss-uploadfield.from-web, .htmleditorfield-mediaform .ss-uploadfield.from-CMS { margin-bottom: 48px; }
+.htmleditorfield-mediaform .ss-uploadfield.from-web .middleColumn, .htmleditorfield-mediaform .ss-uploadfield.from-CMS .middleColumn { width: auto; background: none; border: none; margin-top: 13px; }
+.htmleditorfield-mediaform .ss-uploadfield.from-CMS { margin-top: 33px; }
+.htmleditorfield-mediaform .ss-uploadfield.from-CMS h4 { margin-top: 3px; }
+.htmleditorfield-mediaform .ss-uploadfield.from-CMS .middleColumn { margin-top: 0; }
+.htmleditorfield-mediaform .ss-uploadfield.from-CMS .middleColumn .TreeDropdownField { margin-top: 23px; }
.htmleditorfield-mediaform .ss-uploadfield-editandorganize { display: none; }
/** -------------------------------------------- Search forms (used in AssetAdmin, ModelAdmin, etc) -------------------------------------------- */
30 admin/scss/_style.scss
View
@@ -1448,13 +1448,14 @@ body.cms-dialog {
border:none;
@include box-shadow-none;
width:55%;
+ max-width:512px;
float:left;
position: relative;
label {
position: absolute;
left: 8px;
- top: 0px;
+ top: 13px;
font-weight: normal; color: #888;
}
@@ -1467,6 +1468,7 @@ body.cms-dialog {
}
}
button.add-url{
+ margin-top:13px;
padding-top:15px;
@include clearfix;
border:none;
@@ -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 {
display: none;
}
17 forms/HtmlEditorField.php
View
@@ -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>';
$fromCMS = new CompositeField(
- new LiteralField('headerSelect', '<h4 class="field header-select">' . sprintf($numericLabelTmpl, '1', _t('HtmlEditorField.Find', 'Find')) . '</h4>'),
- $selectComposite = new CompositeField(
- new TreeDropdownField('ParentID', _t('HtmlEditorField.FOLDER', 'Folder'), 'Folder'),
- $fileField
- )
+ new LiteralField('headerSelect', '<h4>' . sprintf($numericLabelTmpl, '1', _t('HtmlEditorField.FindInFolder', 'Find in Folder')) . '</h4>'),
+ $select = new TreeDropdownField('ParentID', "", 'Folder'),
+ $fileField
);
+
+ $fromCMS->addExtraClass('content ss-uploadfield from-CMS');
+ $select->addExtraClass('content-select');
- $fromCMS->addExtraClass('content');
- $selectComposite->addExtraClass('content-select');
$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://'),
new LiteralField('addURLImage', '<button class="action ui-action-constructive ui-button field add-url" data-icon="addMedia"></button>')
);
+
$remoteURL->addExtraClass('remoteurl');
+ $fromWeb->addExtraClass('content ss-uploadfield from-web');
Requirements::css(FRAMEWORK_DIR . '/css/AssetUploadField.css');
$computerUploadField = Object::create('UploadField', 'AssetUploadField', '');
Please sign in to comment.
Something went wrong with that request. Please try again.