[TASK] Fix styling of NULL value fields
authorOliver Hader <oliver@typo3.org>
Tue, 20 Nov 2012 23:20:07 +0000 (00:20 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Tue, 20 Nov 2012 23:28:41 +0000 (00:28 +0100)
Change-Id: Ib1b9f2f4bc274bcb1f180507a8ca0257323fd4bc
Releases: 6.0
Reviewed-on: http://review.typo3.org/16642
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
t3lib/stddb/tca_sys_file_reference.php
typo3/sysext/backend/Classes/Form/FormEngine.php
typo3/sysext/t3skin/stylesheets/visual/element_tceforms.css

index de757d1..d5d8c7d 100644 (file)
@@ -134,7 +134,7 @@ $TCA['sys_file_reference'] = array(
                        'config' => array(
                                'type' => 'input',
                                'eval' => 'null',
-                               'size' => '22',
+                               'size' => '20',
                                'placeholder' => '__row|uid_local|title',
                        )
                ),
@@ -165,7 +165,7 @@ $TCA['sys_file_reference'] = array(
                        'config' => array(
                                'type' => 'text',
                                'eval' => 'null',
-                               'cols' => '24',
+                               'cols' => '20',
                                'rows' => '5',
                                'placeholder' => '__row|uid_local|description',
                        )
@@ -177,7 +177,7 @@ $TCA['sys_file_reference'] = array(
                        'config' => array(
                                'type' => 'input',
                                'eval' => 'null',
-                               'size' => '22',
+                               'size' => '20',
                                'placeholder' => '__row|uid_local|alternative',
                        ),
                ),
index f3e9bfd..e5204f2 100644 (file)
@@ -235,6 +235,13 @@ class FormEngine {
         */
        public $form_rowsToStylewidth = 9.58;
 
+       /**
+        * Value that gets added for style="width: ...px" for textareas compared to input fields.
+        *
+        * @var integer
+        */
+       protected $form_additionalTextareaStyleWidth = 23;
+
        // Form field width compensation: Compensation for large documents, doc-tab (editing)
        /**
         * @todo Define visibility
@@ -4329,6 +4336,11 @@ function ' . $evalData . '(value) {
                } else {
                        // Setting width by style-attribute. 'cols' MUST be avoided with NN6+
                        $widthInPixels = ceil($size * $this->form_rowsToStylewidth);
+
+                       if ($textarea) {
+                               $widthInPixels += $this->form_additionalTextareaStyleWidth;
+                       }
+
                        $fieldWidthAndStyle['style'] = 'width: ' . $widthInPixels . 'px; ' . $this->defStyle . $this->formElStyle(($textarea ? 'text' : 'input'));
                        $fieldWidthAndStyle['class'] = $this->formElClass($textarea ? 'text' : 'input');
                }
index c1dace6..ffc1413 100644 (file)
@@ -37,16 +37,23 @@ table#typo3-altdoc-header input,
 .t3-tceforms-input-wrapper,
 .t3-tceforms-input-wrapper-hover,
 .t3-tceforms-input-wrapper-datetime,
-.t3-tceforms-input-wrapper-datetime-hover,
-.t3-tceforms-widget-null-wrapper {
+.t3-tceforms-input-wrapper-datetime-hover {
        display: block;
        float: left;
        position: relative;
 }
 
-
 .t3-tceforms-widget-null-wrapper {
-       margin-right: 5px;
+       display: inline-block;
+       float: right;
+       position: relative;
+       width: 20px;
+       max-width: 20px;
+}
+
+.t3-tceforms-widget-null-wrapper input {
+       margin-left: 2px;
+       margin-top: 42%;
 }
 
 
@@ -514,9 +521,9 @@ TCEforms Sections
        display: none;
 }
 .t3-form-field-item.disabled .t3-form-field-disable {
-       z-index: 3000;
+       z-index: 8000;
        background: #f4f4f4;
-       display: inline-block;
+       display: block;
        position: absolute;
        width: 100%;
        height: 100%;