Project

General

Profile

Bug #20422 » replace_single_element.patch

Administrator Admin, 2009-05-14 17:21

View differences:

t3lib/class.t3lib_tceforms.php (Arbeitskopie)
}
}
}
if (setOK) {
// remove the existing option element if there is only one element allowed
var el = TBE_EDITOR.getElementFromFieldName(fName);
var range = String(el.range);
range = range.split(",");
if (range[1] == "1") {
setFormValueManipulate(fName, "Remove");
len = 0;
}
fObj.length++;
fObj.options[len].value = value;
fObj.options[len].text = unescape(label);
typo3/jsfunc.tbe_editor.js (Arbeitskopie)
document[TBE_EDITOR.formname][theField].value = RTEcontent;
alert(document[TBE_EDITOR.formname][theField].value);
},
// strips the "table", the "field" and the "uid" from the fName
extractDataFromFieldName: function(fName) {
var idx = 2 + TBE_EDITOR.prependFormFieldNamesCnt;
var table = TBE_EDITOR.split(fName, '[', idx);
var uid = TBE_EDITOR.split(fName, '[', idx + 1);
var field = TBE_EDITOR.split(fName, '[', idx + 2);
return { table: table.substr(0, table.length-1), uid: uid.substr(0, uid.length-1), field: field.substr(0,field.length-1) };
},
getElementFromFieldName: function(fName) {
var data = TBE_EDITOR.extractDataFromFieldName(fName);
return TBE_EDITOR.getElement('data[' + data.table + '][' + data.uid + ']', data.field);
},
fieldChanged_fName: function(fName,el) {
var idx=2+TBE_EDITOR.prependFormFieldNamesCnt;
var table = TBE_EDITOR.split(fName, "[", idx);
var uid = TBE_EDITOR.split(fName, "[", idx+1);
var field = TBE_EDITOR.split(fName, "[", idx+2);
table = table.substr(0,table.length-1);
uid = uid.substr(0,uid.length-1);
field = field.substr(0,field.length-1);
TBE_EDITOR.fieldChanged(table,uid,field,el);
var data = TBE_EDITOR.extractDataFromFieldName(fName);
TBE_EDITOR.fieldChanged(data.table, data.uid, data.field, el);
},
fieldChanged: function(table,uid,field,el) {
var theField = TBE_EDITOR.prependFormFieldNames+'['+table+']['+uid+']['+field+']';
(1-1/3)