Project

General

Profile

Bug #22901 » 14749.diff

Administrator Admin, 2010-06-16 08:44

View differences:

t3lib/class.t3lib_tceforms.php (Arbeitskopie)
// Put palette together if there are fields in it:
if (count($parts)) {
$palFieldHeader = '';
if ($header) {
$out .= $this->intoTemplate(
$palFieldHeader = $this->intoTemplate(
array('HEADER' => htmlspecialchars($header)),
$this->palFieldTemplateHeader
);
......
$thePalIcon = '<span style="margin-left: 20px;">' . $thePalIcon . $collapsedHeader . '</span>';
}
$paletteHtml = $this->wrapPaletteField($this->printPalette($parts), $table, $row ,$palette, $collapsed);
$paletteHtml = $this->wrapPaletteField($palFieldHeader . $this->printPalette($parts), $table, $row ,$palette, $collapsed);
$out .= $this->intoTemplate(
array('PALETTE' => $thePalIcon . $paletteHtml),
......
$PA['label'] = t3lib_div::deHSCentities(htmlspecialchars($PA['label']));
if (t3lib_div::testInt($row['uid']) && $PA['fieldTSConfig']['linkTitleToSelf'] && !t3lib_div::_GP('columnsOnly')) {
$lTTS_url = $this->backPath.'alt_doc.php?edit['.$table.']['.$row['uid'].']=edit&columnsOnly='.$field.'&returnUrl='.rawurlencode($this->thisReturnUrl());
$PA['label'] = '<a href="'.htmlspecialchars($lTTS_url).'">'.$PA['label'].'</a>';
$label = $PA['label'] = '<a href="' . htmlspecialchars($lTTS_url) . '">' . $PA['label'] . '</a>';
} else {
$label = $PA['label'];
}
$helpText = $this->helpTextIcon($table, $field, 1);
$label = '<a href="#">' . $label . $helpText . '</a>';
// Create output value:
if ($PA['fieldConf']['config']['form_type']=='user' && $PA['fieldConf']['config']['noTableWrapping']) {
$out = $item;
} elseif ($PA['palette']) {
// Array:
$out=array(
'NAME'=>$PA['label'],
'NAME' => $label,
'ID'=>$row['uid'],
'FIELD'=>$field,
'TABLE'=>$table,
'ITEM'=>$item,
'HELP_TEXT' => $this->helpText($table, $field),
'HELP_ICON' => $this->helpTextIcon($table,$field,1)
);
$out = $this->addUserTemplateMarkers($out,$table,$field,$row,$PA);
} else {
// String:
$out=array(
'NAME'=>$PA['label'],
'NAME' => $label,
'ITEM'=>$item,
'TABLE'=>$table,
'ID'=>$row['uid'],
......
} elseif (in_array('year',$evalList)) {
$checkSetValue = gmdate('Y');
}
$cOnClick = 'typo3form.fieldGet('.$paramsList.',1,\''.$checkSetValue.'\');'.implode('',$PA['fieldChangeFunc']);
$item .= '<input type="checkbox" id="' . uniqid('tceforms-check-') . '" class="' . $this->formElStyleClassValue('check', TRUE) . '" name="' . $PA['itemFormElName'] . '_cb" onclick="' . htmlspecialchars($cOnClick) . '" />';
$cOnClickDefault = 'typo3form.fieldGet(' . $paramsList . ',1,\'' . $checkSetValue . '\');' . implode('', $PA['fieldChangeFunc']);
$cOnClickClear = 'typo3form.fieldGet(' . $paramsList . ',2,\'' . $checkSetValue . '\');' . implode('', $PA['fieldChangeFunc']);
if (isset($checkSetValue)) {
$defaultButton = '<a class="t3-form-defaultInputIcon" id="' . $PA['itemFormElName'] . '_cbd" onclick="' . htmlspecialchars($cOnClickDefault) . '">' . t3lib_iconWorks::getSpriteIcon('actions-edit-insert-default', array('style' => 'cursor:pointer;')) . '</a>';
}
}
if ((in_array('date',$evalList) || in_array('datetime',$evalList)) && $PA['itemFormElValue']>0){
// Add server timezone offset to UTC to our stored date
......
$mLgd = ($config['max']?$config['max']:256);
$iOnChange = implode('',$PA['fieldChangeFunc']);
if (isset($config['checkbox'])) {
$item .= '<div class="t3-form-inputContainer">';
}
$item.='<input type="text" id="' . $inputId . '" class="' . implode(' ', $cssClasses) . '" name="'.$PA['itemFormElName'].'_hr" value="" style="' . $cssStyle . '" maxlength="'.$mLgd.'" onchange="'.htmlspecialchars($iOnChange).'"'.$PA['onFocus'].' />'; // This is the EDITABLE form field.
if (isset($config['checkbox'])) {
$item .= '<div class="t3-form-clearInputField"><a class="t3-form-clearInputIcon" id="' . $PA['itemFormElName'] . '_cbi' . '" onclick="' . htmlspecialchars($cOnClickClear) . '">' . t3lib_iconWorks::getSpriteIcon('actions-selection-delete', array('style' => 'cursor:pointer;')) . '</a></div>';
$item .= '</div>' . $defaultButton;
}
$item.='<input type="hidden" name="'.$PA['itemFormElName'].'" value="'.htmlspecialchars($PA['itemFormElValue']).'" />'; // This is the ACTUAL form field - values from the EDITABLE field must be transferred to this field which is the one that is written to the database.
$item .= $fieldAppendix;
$this->extJSCODE.='typo3form.fieldSet('.$paramsList.');';
......
if(!$disabled && !(isset($config['disable_controls']) && t3lib_div::inList($config['disable_controls'], 'upload'))) {
// Adding the upload field:
if ($this->edit_docModuleUpload && $config['uploadfolder']) {
$item .= '<input type="file" name="' . $PA['itemFormElName_file'] . '"' . $this->formWidth() . ' size="60" onchange="' . implode('', $PA['fieldChangeFunc']) . '" />';
$item .= '<br /><input type="file" class="t3-form-uploadinput" size="40" name="' . $PA['itemFormElName_file'] . '" onchange="' . implode('', $PA['fieldChangeFunc']) . '" />';
}
}
break;
......
function wrapPaletteField($code,$table,$row,$palette,$collapsed ) {
$display = $collapsed ? 'none' : 'block';
$id = 'TCEFORMS_'.$table.'_'.$palette.'_'.$row['uid'];
$code = '<div id="'.$id.'" style="display:'.$display.';" >'.$code.'</div>';
$code = '<div class="t3-form-palette" id="' . $id . '" style="display:' . $display . ';" >' . $code . '</div>';
return $code;
}
......
// Wrapping a single field:
$this->fieldTemplate='
<div class="t3-form-field">
###FIELD_HELP_ICON### <label class="t3-form-field-label">###FIELD_NAME###</label>###FIELD_HELP_TEXT###
<img name="req_###FIELD_TABLE###_###FIELD_ID###_###FIELD_FIELD###" src="clear.gif" class="t3-form-reqImg" alt="" /><img name="cm_###FIELD_TABLE###_###FIELD_ID###_###FIELD_FIELD###" src="clear.gif" class="t3-TCEforms-contentchangedImg" alt="" />
###FIELD_ITEM######FIELD_PAL_LINK_ICON###
<div class="t3-form-field-container">
<label class="t3-form-field-label"><img name="req_###FIELD_TABLE###_###FIELD_ID###_###FIELD_FIELD###" src="clear.gif" class="t3-form-field-icon-required" alt="" /><img name="cm_###FIELD_TABLE###_###FIELD_ID###_###FIELD_FIELD###" src="clear.gif" class="t3-form-field-icon-contentchanged" alt="" />###FIELD_NAME###</label>###FIELD_HELP_TEXT###
<div class="t3-form-field">###FIELD_ITEM######FIELD_PAL_LINK_ICON###</div>
</div>';
$this->palFieldTemplate='
<div class="t3-form-palField">
<div class="t3-form-palette-field">
###FIELD_PALETTE###
</div>';
$this->palFieldTemplateHeader='
<div class="t3-form-palFieldHeader">
<div class="t3-form-palette-field-header">
<strong>###FIELD_HEADER###</strong>
</div>';
......
} else {
$lastLineWasLinebreak = FALSE;
$fieldIdentifierForJs = $content['TABLE'] . '_' . $content['ID'] . '_' . $content['FIELD'];
$iRow[$row][] = '<span class="t3-form-palette-field-container">' .
$content['HELP_ICON'] .
$iRow[$row][] = '<span class="t3-form-palette-field-inner-container">' .
'<label class="t3-form-palette-field-label">' .
$content['NAME'] .
'<img name="req_' . $fieldIdentifierForJs . '" src="clear.gif" class="t3-form-palette-icon-required" alt="" />' .
'<img name="cm_' . $fieldIdentifierForJs . '" src="clear.gif" class="t3-form-palette-icon-contentchanged" alt="" />' .
$content['NAME'] .
'</label>' .
'<span class="t3-form-palette-field">' .
'<span class="t3-form-palette-field-content">' .
$content['ITEM'] .
'</span>' .
'</span>';
......
*/
function helpTextIcon($table,$field,$force=0) {
if ($this->globalShowHelp && $GLOBALS['TCA_DESCR'][$table]['columns'][$field] && (($this->edit_showFieldHelp=='icon'&&!$this->doLoadTableDescr($table)) || $force)) {
return t3lib_BEfunc::helpTextIcon($table, $field, $this->backPath, $force);
} else {
// Detects fields with no CSH and outputs dummy line to insert into CSH locallang file:
return '<span class="t3-csh-not-available">&nbsp;</span>';
$text = t3lib_BEfunc::helpText($table, $field, $this->backPath);
return '<div class="typo3-csh-inline">' . $GLOBALS['LANG']->hscAndCharConv($text, false) . '</div>';
}
}
typo3/sysext/t3skin/stylesheets/structure/element_tceforms.css (Arbeitskopie)
padding: 10px 0;
}
.t3-form-field {
.t3-form-field-container,
.t3-form-palette {
margin: 0 10px;
padding: 9px 0;
}
.t3-form-palField .t3-form-palette-fieldset {
margin: 0px 10px 10px;
.t3-form-palette-field .t3-form-palette-fieldset {
margin: 0 10px 10px 0;
}
.t3-form-palFieldHeader {
margin: 15px 12px 5px;
}
.t3-form-palFieldHeader strong {
.t3-form-palette-field-header strong {
font-weight: bold;
}
.t3-form-palette-field-label,
.t3-form-field-label {
display: inline-block;
width: 80px;
}
.t3-form-palette-field-label a .typo3-csh-inline,
.t3-form-field-label a .typo3-csh-inline {
display: none;
}
.t3-form-palette-field-label a:hover .typo3-csh-inline,
.t3-form-field-label a:hover .typo3-csh-inline {
display: inline;
position: absolute;
max-width: 200px;
z-index: 2000;
}
.t3-icon-system-options-view,
.t3-form-field img,
.t3-form-palette-field img {
margin-left: 4px;
margin-left: 2px;
margin-right: 2px;
}
.typo3-TCEforms-selectIcons img {
......
margin-top: 15px;
}
.t3-form-palette-field-container {
.t3-form-field,
.t3-form-palette-field-inner-container {
display: inline-block;
width: 300px;
margin: 3px 20px 3px 0;
}
.t3-form-palette-field-label {
.t3-form-palette-field-inner-container {
display: inline-block;
margin-left: 4px;
width: 98px;
width: 300px;
margin: 3px 20px 3px 0;
}
.t3-form-palette-field select {
width: 125px;
}
.t3-form-palette-field .tceforms-textfield {
width: 101px !important;
}
......
vertical-align: middle;
}
.t3-form .t3-csh-not-available {
display: inline-block;
width: 18px;
.tceforms-textfield {
padding-right: 23px;
}
.t3-form-clearInputField {
position: absolute;
top: -1px;
right: 0px;
}
.t3-form-inputContainer {
display: inline;
position: relative;
}
.formField5 {
width: 300px !important;
}
......
margin: 0 10px;
padding: 9px 0;
}
.t3-form-uploadinput {
clear: left;
width: 200px;
}
typo3/sysext/t3skin/stylesheets/visual/element_tceforms.css (Arbeitskopie)
$Id$
- - - - - - - - - - - - - - - - - - - - - */
.t3-form-field {
.t3-form-field-container,
.t3-form-palette {
border-top: 1px solid #cdcdcd;
}
.t3-form-section:first-child > .t3-form-field:first-child {
.t3-form-section:first-child > .t3-form-field-container:first-child {
border-top: 0;
}
.t3-form-palField .t3-form-palette-fieldset {
.t3-form .t3-form-palette-fieldset {
border: 0;
}
......
background: none;
display: inline-block;
}
.t3-form-palette-field-label a:hover .typo3-csh-inline,
.t3-form-field-label a:hover .typo3-csh-inline {
background: #ffffff;
}
(1-1/3)