diff --git a/t3lib/class.t3lib_tceforms.php b/t3lib/class.t3lib_tceforms.php
index 79303a7..af6f6eb 100644
--- a/t3lib/class.t3lib_tceforms.php
+++ b/t3lib/class.t3lib_tceforms.php
@@ -161,10 +161,6 @@ class t3lib_TCEforms {
public $templateFile = ''; // Form templates, relative to typo3 directory
- /**
- * @var t3lib_TCEforms_suggest
- */
- protected $suggest;
/**
* Constructor function, setting internal variables, loading the styles used.
@@ -1769,7 +1765,7 @@ class t3lib_TCEforms {
}
// Add an empty hidden field which will send a blank value if all items are unselected.
- $item .= '';
+ $item .= '';
// Remaining checkboxes will get their set-all link:
if (count($setAll)) {
@@ -5623,7 +5619,7 @@ class t3lib_TCEforms {
browserWin.focus();
}
function setFormValueFromBrowseWin(fName,value,label,title,exclusiveValues) {
- var formObj = setFormValue_getFObj(fName), fObj, isMultiple = false, isList = false, isCheckboxList = false, len;
+ var formObj = setFormValue_getFObj(fName), fObj, isMultiple = false, isList = false, len;
if (formObj && value !== "--div--") {
// Check if the form object has a "_list" element or not
// The "_list" element exists for multiple selection select types
@@ -5632,7 +5628,6 @@ class t3lib_TCEforms {
isMultiple = fObj.multiple && fObj.getAttribute("size") != "1";
isList = true;
} else {
- isCheckboxList = formObj[fName].className == "select-checkbox";
fObj = formObj[fName];
}
@@ -5696,20 +5691,6 @@ class t3lib_TCEforms {
setHiddenFromList(fObj,formObj[fName]);
' . $this->TBE_EDITOR_fieldChanged_func . '
}
- } else if (isCheckboxList) {
- var i=0;
- while (formObj[fName + "[" + i + "]"]) {
- if (formObj[fName + "[" + i + "]"].value == value) {
- fObj = formObj[fName + "[" + i + "]"];
- break;
- }
- i++;
- };
-
- if (fObj && !fObj.checked) {
- fObj.click();
- ' . str_replace('_list', '', $this->TBE_EDITOR_fieldChanged_func) . '
- }
} else {
// The incoming value consists of the table name, an underscore and the uid
// For a single selection field we need only the uid, so we extract it
@@ -5899,7 +5880,6 @@ class t3lib_TCEforms {
if (formObj[fName] &&
(
(formObj[fName].type == "select-one") ||
- (formObj[fName].className == "select-checkbox") ||
(formObj[fName + "_list"] && formObj[fName + "_list"].type.match(/select-(one|multiple)/))
)
) {
diff --git a/t3lib/js/jsfunc.tceforms_suggest.js b/t3lib/js/jsfunc.tceforms_suggest.js
index 1f29195..1aa216d 100644
--- a/t3lib/js/jsfunc.tceforms_suggest.js
+++ b/t3lib/js/jsfunc.tceforms_suggest.js
@@ -39,7 +39,6 @@ TCEForms.Suggest = Class.create({
suggestResultList: '',
minimumCharacters: 2,
defaultValue: '',
- fieldType: '',
/**
* Wrapper for script.aculo.us' Autocompleter functionality: Assigns a new autocompletion object to
@@ -51,14 +50,12 @@ TCEForms.Suggest = Class.create({
* @param integer uid The uid of the record which is currently edited
* @param integer pid The pid of the record which is currently edited
* @param integer minimumCharacters the minimum characaters that is need to trigger the initial search
- * @param string fieldType The TCA type of the field (e.g. group, select, ...)
*/
- initialize: function(objectId, table, field, uid, pid, minimumCharacters, fieldType) {
+ initialize: function(objectId, table, field, uid, pid, minimumCharacters) {
var PATH_typo3 = top.TS.PATH_typo3 || window.opener.top.TS.PATH_typo3;
this.objectId = objectId;
this.suggestField = objectId + 'Suggest';
this.suggestResultList = objectId + 'SuggestChoices';
- this.fieldType = fieldType;
new Ajax.Autocompleter(this.suggestField, this.suggestResultList, PATH_typo3 + 'ajax.php', {
paramName: 'value',
@@ -98,10 +95,8 @@ TCEForms.Suggest = Class.create({
var rec_field = arr[4];
var formEl = 'data[' + rec_table + '][' + rec_uid + '][' + rec_field + ']';
- var label = (item.firstChild.textContent ? item.firstChild.textContent : item.firstChild.innerText);
- var ins_uid_string = (this.fieldType == 'select') ? ins_uid : (ins_table + '_' + ins_uid);
-
- setFormValueFromBrowseWin(formEl, ins_uid_string, label);
+ var label = (item.firstChild.textContent ? item.firstChild.textContent : item.firstChild.innerText)
+ setFormValueFromBrowseWin(formEl, ins_table + '_' + ins_uid, label);
TBE_EDITOR.fieldChanged(rec_table, rec_uid, rec_field, formEl);
$(this.suggestField).value = this.defaultValue;
diff --git a/t3lib/tceforms/class.t3lib_tceforms_suggest.php b/t3lib/tceforms/class.t3lib_tceforms_suggest.php
index 305f1a4..450649a 100644
--- a/t3lib/tceforms/class.t3lib_tceforms_suggest.php
+++ b/t3lib/tceforms/class.t3lib_tceforms_suggest.php
@@ -92,17 +92,11 @@ class t3lib_TCEforms_Suggest {
}
$minChars = ($minChars > 0 ? $minChars : 2);
- // fetch the TCA field type to hand it over to the JS class
- $type = '';
- if (isset($config['fieldConf']['config']['type'])) {
- $type = $config['fieldConf']['config']['type'];
- }
-
// replace "-" with ucwords for the JS object name
$jsObj = str_replace(' ', '', ucwords(str_replace('-', ' ', t3lib_div::strtolower($suggestId))));
$this->TCEformsObj->additionalJS_post[] = '
var ' . $jsObj . ' = new TCEForms.Suggest("' . $fieldname . '", "' . $table . '", "' . $field .
- '", "' . $row['uid'] . '", ' . $row['pid'] . ', ' . $minChars . ', "' . $type . '");
+ '", "' . $row['uid'] . '", ' . $row['pid'] . ', ' . $minChars . ');
' . $jsObj . '.defaultValue = "' . t3lib_div::slashJS($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.findRecord')) . '";
';