From f01c1640c7913f07dd9e5436a52236c6d7b8d0f9 Mon Sep 17 00:00:00 2001 From: Naomi Guyer Date: Fri, 22 Jun 2012 18:04:13 +1200 Subject: [PATCH] BUGFIX: Alignment of http label in insert media --- admin/css/screen.css | 12 +++++++++--- admin/scss/_style.scss | 30 +++++++++++++++++++++++++++++- forms/HtmlEditorField.php | 17 +++++++++-------- 3 files changed, 47 insertions(+), 12 deletions(-) diff --git a/admin/css/screen.css b/admin/css/screen.css index afb983def..a883f3c1d 100644 --- a/admin/css/screen.css +++ b/admin/css/screen.css @@ -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) -------------------------------------------- */ diff --git a/admin/scss/_style.scss b/admin/scss/_style.scss index 8db3ff5d9..c566f3939 100644 --- a/admin/scss/_style.scss +++ b/admin/scss/_style.scss @@ -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; } diff --git a/forms/HtmlEditorField.php b/forms/HtmlEditorField.php index 90be1f668..1da956135 100644 --- a/forms/HtmlEditorField.php +++ b/forms/HtmlEditorField.php @@ -380,22 +380,23 @@ class HtmlEditorField_Toolbar extends RequestHandler { $numericLabelTmpl = '%d%s'; $fromCMS = new CompositeField( - new LiteralField('headerSelect', '

' . sprintf($numericLabelTmpl, '1', _t('HtmlEditorField.Find', 'Find')) . '

'), - $selectComposite = new CompositeField( - new TreeDropdownField('ParentID', _t('HtmlEditorField.FOLDER', 'Folder'), 'Folder'), - $fileField - ) + new LiteralField('headerSelect', '

' . sprintf($numericLabelTmpl, '1', _t('HtmlEditorField.FindInFolder', 'Find in Folder')) . '

'), + $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', '

' . sprintf($numericLabelTmpl, '1', _t('HtmlEditorField.ADDURL', 'Add URL')) . '

'), + new LiteralField('headerURL', '

' . sprintf($numericLabelTmpl, '1', _t('HtmlEditorField.ADDURL', 'Add URL')) . '

'), $remoteURL = new TextField('RemoteURL', 'http://'), new LiteralField('addURLImage', '') ); + $remoteURL->addExtraClass('remoteurl'); + $fromWeb->addExtraClass('content ss-uploadfield from-web'); Requirements::css(FRAMEWORK_DIR . '/css/AssetUploadField.css'); $computerUploadField = Object::create('UploadField', 'AssetUploadField', '');