Commit 447ca753 authored by Horst Elvers's avatar Horst Elvers

Update test.js

parent c2506a7e
var CookieName= document.title;
if((window.location.href).search("editArea")>0){CookieName +=' Area'};
CookieName = CookieName.replace("(", "");
CookieName = CookieName.replace(")", "");
CookieName = CookieName.replace(/ /g,"");
var CookieName = encodeURI(document.title).toString().replace(/-|%|\(|\)|20/g, "");
if((window.location.href).search("editArea")>0){CookieName +='Area'}
$(document).bind('ready', function(){
TabStopSetOnPageReady();
valueReed(CookieName + 'Set', getElements('HoldValueControll'));
valueReed(CookieName + 'Val', getElements('CookieValue'));
$('#inputForm').focus();
$(inputFormSave).bind('click', function(){
valueSave(CookieName + 'Val', getElements('CookieValue'));
});
......@@ -32,6 +28,21 @@ $(window).unload(function(){
valueSave(CookieName+ 'Tab', getElements('TabStopControll'));
valueSave(CookieName + 'Set', getElements('HoldValueControll'));
});
function casifyNameChecked(obj){
/*Rechtschreibprüfung, wenn deaktiviert Rückgabe des Aufruf-Wertes*/
if ($(casifyOff).prop('checked')){return obj.value;}
else{return casifyName(obj);}
}
function HideRow(RowId){
/* Funktion zum ausblenden von TableZeilen mit Prüfung ob DatenFelder leer sind */
$('#' + RowId).css('display', '');
var inputFormValueId = $('#'+ RowId).children('td').children().filter('.ui-autocomplete-input').attr('id') ;
if ($('#' + inputFormValueId).prop('type')==='checkbox'){
var CheckBoxVal = $('#' + inputFormValueId).prop('checked');}
if (($('#' + inputFormValueId).val()) === '' || ($('#' + inputFormValueId).val()) === null || CheckBoxVal === false){
$('#' + RowId).css('display', 'none');
}
}
function getElements(ClassId){
var elementsResult = [];
......@@ -39,6 +50,7 @@ function getElements(ClassId){
for (i2 = 0; i2 < elements.length; i2++) {
elementsResult.push(elements[i2].id);
}
elementsResult.sort();
return (elementsResult)
}
......@@ -75,7 +87,7 @@ function valueReed(cookieName, saveFelder, filterOn){
if (loadCookie === null){valueSave(cookieName, saveFelder, true);return}
var res = loadCookie.split("|"); res.pop();
for (i = 0; i < res.length; i++) {
if($('#hold' + saveFelder[i]).length !=0){
if($('#hold' + saveFelder[i]).length !==0){
if ($('#hold' + saveFelder[i]).prop('checked')=== true || filterOn=== false)
if ($('#' + saveFelder[i]).prop('type')==='checkbox'){
$('#' + saveFelder[i]).prop('checked', eval(res[i]));
......@@ -99,4 +111,4 @@ function setCookie(key, value) {
function getCookie(key) {
var keyValue = document.cookie.match('(^|;) ?' + key + '=([^;]*)(;|$)');
return keyValue ? keyValue[2] : null;
}
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment