Project

General

Profile

Bug #22901 » 14749_tbe_editor.diff

Administrator Admin, 2010-06-16 09:11

View differences:

typo3/jsfunc.tbe_editor.js (Arbeitskopie)
var theValue = document[TBE_EDITOR.formname][theField].value;
if (checkbox && theValue==checkboxValue) {
document[TBE_EDITOR.formname][theField+"_hr"].value="";
if (document[TBE_EDITOR.formname][theField+"_cb"]) document[TBE_EDITOR.formname][theField+"_cb"].checked = "";
if (theClearButton = document.getElementById(theField+"_cbi")) theClearButton.style.display = "none";
} else {
document[TBE_EDITOR.formname][theField+"_hr"].value = evalFunc.outputObjValue(theFObj, theValue);
if (document[TBE_EDITOR.formname][theField+"_cb"]) document[TBE_EDITOR.formname][theField+"_cb"].checked = "on";
if (theClearButton = document.getElementById(theField+"_cbi")) theClearButton.style.display = "block";
}
}
},
fieldGet: function(theField, evallist, is_in, checkbox, checkboxValue, checkbox_off, checkSetValue) {
fieldGet: function(theField, evallist, is_in, checkbox, checkboxValue, editAction, defaultValue) {
if (document[TBE_EDITOR.formname][theField]) {
var theFObj = new evalFunc_dummy (evallist,is_in, checkbox, checkboxValue);
if (checkbox_off) {
if (document[TBE_EDITOR.formname][theField+"_cb"].checked) {
var split = evallist.split(',');
for (var i = 0; split.length > i; i++) {
var el = split[i].replace(/ /g, '');
if (el == 'datetime' || el == 'date') {
var now = new Date();
checkSetValue = Date.parse(now)/1000 - now.getTimezoneOffset()*60;
break;
} else if (el == 'time' || el == 'timesec') {
checkSetValue = evalFunc_getTimeSecs(new Date());
break;
}
if (editAction == 1) {
// editAction 1 : default value
var split = evallist.split(',');
for (var i = 0; split.length > i; i++) {
var el = split[i].replace(/ /g, '');
if (el == 'datetime' || el == 'date') {
var now = new Date();
defaultValue = Date.parse(now)/1000 - now.getTimezoneOffset()*60;
break;
} else if (el == 'time' || el == 'timesec') {
defaultValue = evalFunc_getTimeSecs(new Date());
break;
}
document[TBE_EDITOR.formname][theField].value=checkSetValue;
} else {
document[TBE_EDITOR.formname][theField].value=checkboxValue;
}
document[TBE_EDITOR.formname][theField].value = defaultValue;
} else if (editAction == 2) {
// editAction 2 : empty field
document[TBE_EDITOR.formname][theField].value = checkboxValue;
}else{
document[TBE_EDITOR.formname][theField].value = evalFunc.evalObjValue(theFObj, document[TBE_EDITOR.formname][theField+"_hr"].value);
}
(2-2/3)