var changedContent = false; var trv_dialogContentChanged = false; var trv_multiContentChanged = new Object(); var trv_core_progressFetch = new Object(); Date.now = Date.now || function() { return +new Date(); }; $(function() { initTooltip();}); /**********************************************************************************************/ function initTooltip() { if ($.isFunction($.fn.tooltip)) { $('.trovarit_tooltip[title]').tooltip({ showURL: false, id: "trovarit_tooltip", showBody: "; ", fade: 250 }); $('.trovarit_tooltip_width[title]').tooltip({ showURL: false, id: "trovarit_tooltip", showBody: "; ", fade: 250, extraClass: "tooltip_width" }); } } /**********************************************************************************************/ function showBockscreenProgressBar(alternativeLable) { if (alternativeLable != null) { $(".trv_uploadProgressbar").parent().prev().text(alternativeLable); } $(".trv_uploadProgressbar").progressbar({ value: false, change: function() { $(".trv_uploadProgressbar .progress-label").text( $(".trv_uploadProgressbar").progressbar( "value" ) + "%" ); } }); $(".trv_uploadProgressbar").append('
'); $("#trv_blockScreenProgress").show(); } /**********************************************************************************************/ function hideBockscreenProgressBar() { $(".trv_uploadProgressbar .ui-progressbar-overlay").remove(); $("#trv_blockScreenProgress").hide(); } /**********************************************************************************************/ function setBockscreenText(text) { if (isScreenBlocked) { $("table td.trovarit_wait_dialog").html(text); } } /**********************************************************************************************/ function setBockscreenProgressValue(setPercent) { if (setPercent >= 0) { if (setPercent == 0 && $(".trv_uploadProgressbar .progress-label").text() == "") { $(".trv_uploadProgressbar .progress-label").text("0%"); } $(".trv_uploadProgressbar .ui-progressbar-overlay").remove(); } else if($(".trv_uploadProgressbar .ui-progressbar-overlay").length == 0) { $(".trv_uploadProgressbar").append('
'); } $(".trv_uploadProgressbar").progressbar( "option", {value:setPercent}); } /**********************************************************************************************/ function callOnEnter(e,functionToCall,argArray) { var keycode; if (window.event) keycode = window.event.keyCode; else if (e) keycode = e.which; else return true; if (keycode == 13) { if ((argArray == null) || (argArray == "")) { argArray = new Array(); } functionToCall.apply(this, argArray); return false; } else return true; } /**********************************************************************************************/ function submitEnter(myfield,e) { var keycode; if (window.event) keycode = window.event.keyCode; else if (e) keycode = e.which; else return true; if (keycode == 13) { myfield.form.submit(); return false; } else return true; } /**********************************************************************************************/ function confirmDialog(title, onYesClick, question, height, width, onNoClick, position) { if (height == null) { height="auto"; } if (width == null) { width=350; } if (onNoClick == null) { onNoClick=""; } if (position == null) { position="center"; } var currentTime = Date.now(); $("body").append(""); var dialogContent = "
question
JA NEIN
"; dialogContent = dialogContent.replace(/-CurrentTimeID-/g, currentTime); dialogContent = dialogContent.replace(/onYesClick/, onYesClick); dialogContent = dialogContent.replace(/onNoClick/, onNoClick); dialogContent = dialogContent.replace(/question/, question); $("#trv_core_confirm_dialog_"+currentTime).html(dialogContent); $("#trv_core_confirm_dialog_"+currentTime).dialog({ close: function(event, ui) { $(this).dialog('destroy'); $("#trv_core_confirm_dialog_"+currentTime).remove(); }, resizable: false, draggable: false, height: height, width: width, bgiframe: true, modal: true, position: position, title: title }); return currentTime; } /**********************************************************************************************/ function infoDialog(title, content, height, width, onCloseClick, position, alternativeButtonText, isErrorInfo) { if (height == null) { height="auto"; } if (width == null) { width=400; } if (onCloseClick == null) { onCloseClick=""; } if (position == null) { position="center"; } var currentTime = Date.now(); $("body").append(""); var dialogContent = "
boxcontent
SCHLIESSEN
"; if (alternativeButtonText != null) { dialogContent = dialogContent.replace("SCHLIESSEN", alternativeButtonText); } if (isErrorInfo == true) { dialogContent = dialogContent.replace(/trovarit_dialog_info/, 'trovarit_dialog_error'); } if (height!="auto") { dialogContent = dialogContent.replace(/height: 150px/, 'height: '+(height-100)+'px;'); } else { dialogContent = dialogContent.replace(/height: 150px/, ''); } dialogContent = dialogContent.replace(/-CurrentTimeID-/g, currentTime); dialogContent = dialogContent.replace(/boxcontent/, content); $("#trv_core_info_dialog_"+currentTime).html(dialogContent); $("#trv_core_info_dialog_"+currentTime).dialog({ close: function(event, ui) { if (typeof shortcut == "object") { shortcut.remove("Return"); } eval(onCloseClick); $(this).dialog('destroy'); $("#trv_core_info_dialog_"+currentTime).remove(); }, resizable: false, draggable: false, height: height, minHeight: 130, width: width, bgiframe: true, modal: true, position: position, title: title }); } /**********************************************************************************************/ function checkCookiesActive() { $.post( "http://cyberkmu.portal.it-matchmaker.com/core/ajax/ajax.php", { type: "CHECK_COOKIES", app_language: "de", page_charset: "utf-8" }, function(html) { if (html != 1) { $(".trovarit_cookies_error").html(html); } }); } /**********************************************************************************************/ function encode_utf8( s ) { return unescape( encodeURIComponent( s ) ); } /**********************************************************************************************/ function decode_utf8( s ) { return decodeURIComponent( escape( s ) ); } /**********************************************************************************************/ function addslashes(str) { str=str.replace(/\\/g,'\\\\'); str=str.replace(/\"/g,'\\"'); str=str.replace(/\0/g,'\\0'); str=str.replace(/\n/g,''); str=str.replace(/\t/g,''); return str; } function stripslashes(str) { str=str.replace(/\\'/g,'\''); str=str.replace(/\\"/g,'"'); str=str.replace(/\\0/g,'\0'); str=str.replace(/\\\\/g,'\\'); return str; } /**********************************************************************************************/ function exportTableToExcel(tableID, savename) { if (savename == null || savename == '') { savename = "export" } if ($('#'+tableID).length > 0) { blockScreen(); var headerData = '"header":['; $('#'+tableID+' >thead>tr>th:not(.noExport)').each(function (index, element) { if ($(element).find("span").length != 0 && $(element).html().indexOf("data-index")==-1) { var idTH = $(element).attr("id"); var headerSet = 0; $('#'+idTH+' span:not(.noExport) ').each(function (secondIndex, test) { headerData += '"'+addslashes($(this).text().replace(/^\s+|\s+$/g, ''))+'",'; headerSet = 1; }); if(headerSet == 0) { headerData += '"'+addslashes($(this).text().replace(/^\s+|\s+$/g, ''))+'",'; } } else { headerData += '"'+addslashes($(this).text().replace(/^\s+|\s+$/g, ''))+'",'; } }); headerData = headerData.slice(0, -1) + '],'; var tableData = '"data": ['; $('#'+tableID+'>tbody>tr:visible:not([class*=repated-header])').each(function (i) { var rowData = '['; $("td:not(.noExport)",this).each(function(j) { var tdContent = ""; tdContent = addslashes($(".exportThis",this).text().replace(/^\s+|\s+$/g, '')); if (tdContent == "") { tdContent = addslashes($(".sortThis",this).text().replace(/^\s+|\s+$/g, '')); } rowData += '"'+tdContent+'",'; }); rowData = rowData.slice(0, -1) + '],'; tableData = tableData + rowData; }); tableData = tableData.slice(0, -1) + ']'; alldata = "{"+headerData+tableData+"}"; $.post( "http://cyberkmu.portal.it-matchmaker.com/core/ajax/ajax.php", { type: "CREATE_EXCEL_FROM_TABLE", page_charset: "utf-8", app_language: "de", data: alldata, savename: savename }, function(data) { unblockScreen(); if (data.length != 32) { infoDialog("FEHLER", data); } else { var tempChangedContent = changedContent; var tempDialogContentChanged = trv_dialogContentChanged; if (tempChangedContent) { contentChanged(false); } if (tempDialogContentChanged) { dialogContentChanged(false); } location.href = "http://cyberkmu.portal.it-matchmaker.com/core/get_generated_file.php?file="+data; if (tempChangedContent) { contentChanged(true); } if (tempDialogContentChanged) { dialogContentChanged(true); } } }); } else { infoDialog("FEHLER", "Die Tabelle mit der ID existiert nicht!"); } } /**********************************************************************************************/ function tableToolbarFilter(tableID, callbackAfterSet) { if (!excelFilterExists(tableID)) { blockScreen(true); setTimeout(function(){callTableToolbarFilter(tableID,callbackAfterSet);}, 150); } else { $("div.trovarit_excel_filter_dialog").dialog('close'); if (eval(tableID+"_filter").getData().length) { eval(tableID+"_filter").clearExcelFilterData(); eval(tableID+"_filter").setFilter(); } } } /**********************************************************************************************/ function excelFilterExists(tableID) { return $('#'+tableID+' .trovarit_table_excel_filter').length > 0; } /**********************************************************************************************/ function callTableToolbarFilter(tableID,callbackAfterSet) { if (!excelFilterExists(tableID)) { var filterText = $('input#'+tableID+'_input_filter').val(); $('table#'+tableID+'>tbody>tr:visible').removeHighlight(); if (!filterText.length && $("table#"+tableID+">tbody>tr:hidden").length) { $('table#'+tableID+'>tbody>tr').show(); setToolbarInfo(tableID, false); reinitTablesorter(tableID); } else if (filterText.length) { $('table#'+tableID+'>tbody>tr:containsNC("'+filterText+'")').show(); $('table#'+tableID+'>tbody>tr:not(:containsNC("'+filterText+'"))').hide(); $('table#'+tableID+'>tbody>tr:visible').highlight(filterText); setToolbarInfo(tableID, false); reinitTablesorter(tableID); } if (callbackAfterSet != null) { eval(callbackAfterSet); } unblockScreen(true); } } $.extend($.expr[":"], { "containsNC": function(elem, i, match, array) { return (elem.textContent || elem.innerText || "").toLowerCase().indexOf((match[3] || "").toLowerCase()) >= 0; } }); /**********************************************************************************************/ function setToolbarInfo(tableID, initTotalCount) { if ($('table#'+tableID+'>tbody>tr:not([class*="table_toolbar_no_count"])').length == 0) { $('#'+tableID+'_visible_count').text(0); } else { $('#'+tableID+'_visible_count').text($('table#'+tableID+'>tbody>tr:not([class*="table_toolbar_no_count"]):visible').length); } if (initTotalCount) { $('#'+tableID+'_all_count').text($('table#'+tableID+'>tbody>tr:not([class*="table_toolbar_no_count"])').length); } } /**********************************************************************************************/ function tableToolbarFilterReset(tableID,callbackAfterSet) { if (!excelFilterExists(tableID)) { $('input#'+tableID+'_input_filter').val(""); } tableToolbarFilter(tableID,callbackAfterSet); } /**********************************************************************************************/ function addTableToolbar(tableID, filename, legendeContent, helpLink, disableExcelFilter) { if (disableExcelFilter == null) { disableExcelFilter = false; } if (($('#'+tableID).length == 1) && ($('#'+tableID).prev().attr("class") != "trovarit_table_toolbar_container")) { $.post( "http://cyberkmu.portal.it-matchmaker.com/core/ajax/ajax.php", { type: "GET_TABLE_TOOLBAR", page_charset: "utf-8", app_language: "de", tableID: tableID, filename: filename, disableExcelFilter: disableExcelFilter, legendeTemplate: legendeContent, helpLink: helpLink }, function(html) { $('#'+tableID).before(html); }); } else { infoDialog("FEHLER", "Die Tabelle mit der ID existiert nicht!"); } } /**********************************************************************************************/ function addTableExcelFilter(tableID, callbackAfterFilter,callbackAfterFilterToggle) { if (($('#'+tableID).length) && !excelFilterExists(tableID)) { var dialogPositions = ""; $('#'+tableID+'>thead th').each(function() { dialogPositions = dialogPositions + ($(this).is(":visible")?1:0).toString()+";"; }); $.trv_postJson({ url: "http://cyberkmu.portal.it-matchmaker.com/core/ajax/ajax.php", ajax_type: "ADD_EXCEL_TABLE_FILTER", disableErrorOnReload: true, parameter: { page_charset: "utf-8", app_language: "de", appName: "homepage_de", tableID: tableID, callbackAfterFilter: callbackAfterFilter, dialogPositions: dialogPositions.rtrim(";") }, onSuccess: function(data) { $('#'+tableID+'>thead').prepend(data.filterContent); if (callbackAfterFilterToggle != null) { eval(callbackAfterFilterToggle); } if (data.filterData != "") { eval(tableID+"_filter").setJsonFilter(data.filterData); eval(tableID+"_filter").filterTable(); } } }); } else { infoDialog("FEHLER", "Die Tabelle mit der ID existiert nicht!"); } } /**********************************************************************************************/ function reinitTablesorter(tableID) { if ($("table#"+tableID).length) { $("table#"+tableID).trigger("update"); $("table#"+tableID).trigger("appendCache"); if ($("table#"+tableID)[0].config != null) { $("table#"+tableID).trigger("sorton", [$("table#"+tableID)[0].config.sortList]); } setZebraTableSorter(tableID); } } /**********************************************************************************************/ function initTablesorter(tableID, sortRow, sortDescending,sortList) { if (sortRow == null) { sortRow = 0; } if (sortDescending == null) { sortDescending = 0; } var sortArray = [[sortRow,sortDescending]]; if (sortList != null) sortArray = sortList; $('table#'+tableID).tablesorter({ widgets: ['zebra'], sortList: sortArray, textExtraction: function(node) { return $("span.sortThis", node).text(); } }); setZebraTableSorter(tableID); } function setZebraTableSorter(tableID) { if ($('table#'+tableID+'>tbody>tr:visible').length == 1) { setTableZebra(tableID); } } function initTablesorterWithChilds(tableID, sortRow, sortDescending, collapsed) { if (sortRow == null) { sortRow = 0; } if (sortDescending == null) { sortDescending = 0; } $('table#'+tableID).collapsible("td.collapsible", {collapse: collapsed}); $('table#'+tableID).tablesorter ({ sortList: [[sortRow,sortDescending]], widgets: ['zebra'], headers: {0: {sorter: false}}, textExtraction: function(node) {return $("span.sortThis", node).text();} }); setZebraTableSorter(tableID); } /**********************************************************************************************/ function initFormValidator(formID, errorClass, ignoreElements) { if (errorClass == null) { errorClass = "trovarit_validation_error"; } if (ignoreElements == null) { ignoreElements = ":hidden"; } return $("#"+formID).validate({ meta: "validate", errorClass: errorClass, ignore: ignoreElements, errorPlacement: function(error, element) { } }); } /**********************************************************************************************/ function isFormValid(formID, position, isIFrame, focusErrorClassAfterClose, showFirstTabWithError, alternativeMessage) { if ($('#'+formID).length > 0) { if ($('#'+formID).valid()) { return true; } else { if (isIFrame == true) { setIframeTop(); } if (focusErrorClassAfterClose != null) { focusErrorClassAfterClose = "$('."+focusErrorClassAfterClose+":first').focus();"; } if (showFirstTabWithError == true) { findFirstTabWithError(formID); } if (alternativeMessage != null && alternativeMessage != "") { infoDialog("FEHLER", alternativeMessage, null, null, focusErrorClassAfterClose,position); } else { infoDialog("FEHLER","Bitte füllen Sie alle rot markierten Felder korrekt aus!", null, null, focusErrorClassAfterClose,position); } return false; } } else { infoDialog("FEHLER", "isFormValid(): Kein Formular mit der ID '"+formID+"' gefunden!", null, null, null,position); } } /**********************************************************************************************/ function findFirstTabWithError(formID) { $("#"+formID+" ul.tabs li.tabs a").each(function(tabIndex, domEle) { if ($(this).parents(".trv_core_tabs").find($(this).attr("href")).find(".trv_core_input_white_validator_error:first").length == 1) { $(this).parents(".trv_core_tabs").tabs("select",tabIndex); return false; } }); } /**********************************************************************************************/ function dialogContentChanged(changed) { multiContentChanged(changed); } /**********************************************************************************************/ function multiContentChanged(changed,contentID) { if (changed) { if (contentID != null) { trv_multiContentChanged[contentID] = changed; } trv_dialogContentChanged = changed; setUnload(changed); } else { if (contentID != null) { delete trv_multiContentChanged[contentID]; } if (Object.keys(trv_multiContentChanged).length == 0) { trv_dialogContentChanged = changed; setUnload(changed); } } } /**********************************************************************************************/ function contentChanged(changed) { changedContent = changed; setUnload(changed); } /**********************************************************************************************/ function setUnload(enabled, infoText) { if (enabled) { if (!isSetUnload()) { $("a.trv_core_show_block_screen").unbind("click"); $(window).bind('beforeunload', function() { if (infoText == null) { return 'Daten haben sich geändert und wurden noch nicht gespeichert!'; } else { return infoText; } }); $("body").data('setBeforeUnload',true); } } else if(!changedContent && !trv_dialogContentChanged && Object.keys(trv_multiContentChanged).length == 0) { if (isSetUnload()) { $(window).unbind('beforeunload'); $("a.trv_core_show_block_screen").bind("click", function(){blockScreen();}); $("body").data('setBeforeUnload',false); } } } /**********************************************************************************************/ function isSetUnload() { return $("body").data('setBeforeUnload')==true?true:false; } /**********************************************************************************************/ function trv_confirmClose(onYesFunction,type,isIFrame,contentID) { if ((type == 1 && (trv_dialogContentChanged || (contentID != null && trv_multiContentChanged[contentID]))) || (type == 0 && changedContent)) { isIFrame = (isIFrame == null || !isIFrame) ? 0:1; var position = getIFramePosition(isIFrame); var disableContentChanged = "dialogContentChanged(false);" if (contentID != null && type == 1) { disableContentChanged = "multiContentChanged(false,'"+contentID+"');" } if (type == 0) { disableContentChanged = "contentChanged(false);" } confirmDialog("BESTÄTIGUNG",disableContentChanged+onYesFunction,"Daten wurden geändert und noch nicht gespeichert!

Ohne speichern fortfahren?",null,400,null,position); return false; } else if (type == 1 || type == 0) { eval(onYesFunction); return true; } } /**********************************************************************************************/ function addValidatorCombobox() { jQuery.validator.addMethod("selectCombobox", function(value, element) { if (value == "") { return false; } return true; }, " "); } /**********************************************************************************************/ function addValidatorDateDE() { jQuery.validator.addMethod("dateDE", function(value, element) { var check = false; var re = /^\d{2}\.\d{2}\.\d{4}$/; if(value == "") { check = true; } else if( re.test(value)) { var adata = value.split('.'); var gg = parseInt(adata[0],10); var mm = parseInt(adata[1],10); var aaaa = parseInt(adata[2],10); var xdata = new Date(aaaa,mm-1,gg); if ( ( xdata.getFullYear() == aaaa ) && ( xdata.getMonth () == mm - 1 ) && ( xdata.getDate() == gg ) ) check = true; else check = false; } else check = false; return this.optional(element) || check; }, " "); } /**********************************************************************************************/ function addValidatorCurrency() { jQuery.validator.addMethod("currency", function(value, element) { if(value != "") { return String(value).search (/^-?\d{1,3}(?:\.?\d{3})*(?:,\d{1,2})?$/) != -1; } else { return true; } }, " "); } /**********************************************************************************************/ String.prototype.rtrim = function(chars) { chars = chars || "\\s"; return this.replace(new RegExp("[" + chars + "]+$", "g"), ""); } /**********************************************************************************************/ String.prototype.ltrim = function(chars) { chars = chars || "\\s"; return this.replace(new RegExp("^[" + chars + "]+", "g"), ""); } /**********************************************************************************************/ String.prototype.trim = function(chars) { return this.ltrim(chars).rtrim(chars); } /**********************************************************************************************/ function getJsonArray(myArray, arrayLabel) { if (myArray == null) { return ""; } var jsonString = '{"'+arrayLabel+'":['; $.each(myArray, function(key, value) { jsonString += '"'+addslashes(value)+'",'; }); jsonString = jsonString.rtrim(","); jsonString += ']}'; return jsonString; } /**********************************************************************************************/ /**********************************************************************************************/ function getTableCellText(tableCell) { if (jQuery(".multiSelectFilterData",tableCell).length) { var cellText = jQuery(".multiSelectFilterData",tableCell).text().trim(); return cellText.split("#;#"); } else { return (jQuery(".exportThis",tableCell).text().trim() || jQuery(".sortThis",tableCell).text().trim() || tableCell.textContent.trim() || ''); } } /**********************************************************************************************/ if(!Array.indexOf){ Array.prototype.indexOf = function(obj){ for(var i=0; i < this.length; i++){ if(this[i]==obj){ return i; } } return -1; } } /**********************************************************************************************/ function removeTableExcelFilter(tableID) { if (excelFilterExists(tableID)) { setExcelFilterVisible(tableID,0); if (eval(tableID+"_filter").hasExcelFilterData()) { $("#"+tableID+">tbody>tr").show(); setToolbarInfo(tableID,false); reinitTablesorter(tableID); } eval(tableID+"_filter = null"); $("div.trovarit_excel_filter_dialog").dialog('close'); $('table#'+tableID+'>thead>tr:first').remove(); } } /**********************************************************************************************/ function removeExcelFilterData(tableID) { $.post( "http://cyberkmu.portal.it-matchmaker.com/core/ajax/ajax.php", { type: "REMOVE_EXCEL_TABLE_FILTER_DATA", app_language: "de", appName: "homepage_de", tableID: tableID }); } /**********************************************************************************************/ function saveExcelFilterData(tableID,filterData) { $.post( "http://cyberkmu.portal.it-matchmaker.com/core/ajax/ajax.php", { type: "SAVE_EXCEL_TABLE_FILTER_DATA", page_charset: "utf-8", app_language: "de", appName: "homepage_de", tableID: tableID, filterData: filterData }); } /**********************************************************************************************/ function setExcelFilterVisible(tableID, filterVisible) { $.post( "http://cyberkmu.portal.it-matchmaker.com/core/ajax/ajax.php", { type: "SET_EXCEL_TABLE_FILTER_VISIBLE", page_charset: "utf-8", app_language: "de", appName: "homepage_de", tableID: tableID, filterVisible: filterVisible }); } /**********************************************************************************************/ function getExcelFilterVisible(tableID,callbackAfterFilter,callbackAfterFilterToggle) { $.post( "http://cyberkmu.portal.it-matchmaker.com/core/ajax/ajax.php", { type: "GET_EXCEL_TABLE_FILTER_VISIBLE", page_charset: "utf-8", app_language: "de", appName: "homepage_de", tableID: tableID }, function(data) { if (data == 1 && !excelFilterExists(tableID)) { toggleTableExcelFilter(tableID,callbackAfterFilter,callbackAfterFilterToggle); } }); } /**********************************************************************************************/ function toggleTableExcelFilter(tableID, callbackAfterFilter,callbackAfterFilterToggle) { blockScreen(true); if (excelFilterExists(tableID)) { removeTableExcelFilter(tableID); $('#'+tableID+'_excel_filter').removeClass('trovarit_toolbar_button_active'); eval(tableID+"_toggleSearch(true);"); if (callbackAfterFilterToggle != null) { eval(callbackAfterFilterToggle); } } else { $('input#'+tableID+'_input_filter').val(""); blockScreen(true);callTableToolbarFilter(tableID); addTableExcelFilter(tableID, callbackAfterFilter,callbackAfterFilterToggle); $('#'+tableID+'_excel_filter').addClass('trovarit_toolbar_button_active'); eval(tableID+"_toggleSearch(false);"); } unblockScreen(true); } /**********************************************************************************************/ function excelFilter(tableID, callbackAfterFilter) { var filterData = new Array(); var tableID = tableID; var colMapping = new Array(); var callbackAfterFilter = callbackAfterFilter; this.getFilterDialog = function(element,position) { if ($("div.trovarit_excel_filter_dialog:visible").length == 1) { $("div.trovarit_excel_filter_dialog").dialog('close'); } else { blockScreen(true); $.post( "http://cyberkmu.portal.it-matchmaker.com/core/ajax/ajax.php", { type: "GET_EXCEL_FILTER_DIALOG", page_charset: "utf-8", app_language: "de", tableID: tableID, position: position, possibleFilter: getJsonArray(this.getAllFilterData(element,position),'possibleFilter') }, function(data) { openExcelSelectDialog(element,data, tableID, position); }); } } /**********************************************************************************************/ this.filterTable = function() { blockScreen(true); eval("setTimeout(function(){"+tableID+"_filter.filterTableNow();}, 150)"); } /**********************************************************************************************/ function openExcelSelectDialog(element,content, tableID,position) { var posElement = $(element).parent().parent(); $("body").append("
"); $("div.trovarit_excel_filter_dialog").hide().html(content); var pageOffsetTop = window.pageYOffset || document.documentElement && document.documentElement.scrollTop || document.body.scrollTop; var pageOffsetLeft = window.pageXOffset || document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft; var dialogWidth = 230; var dialogLeft = posElement.offset().left-1; if (dialogLeft+dialogWidth > ($('#'+tableID).position().left+$('#'+tableID).innerWidth())) { dialogLeft = posElement.offset().left+posElement.innerWidth()-dialogWidth-pageOffsetLeft-1; } $("div.trovarit_excel_filter_dialog").dialog({ close: function(event, ui) { $(this).dialog('destroy'); $("div.trovarit_excel_filter_dialog").remove(); }, resize: function(event, ui) { var tableHeight = $('.trovarit_excel_filter_dialog.ui-dialog-content').height()-$('.trovarit_excel_filter_dialog.ui-dialog-content .trovarit_table_toolbar_container').height()-8; $('div#trovarit_excel_filter_select').height(tableHeight); }, resizable: true, draggable: true, height: 200, width: 230, minWidth: 200, dialogClass: 'trovarit_filter_dialog', position: [Math.round(dialogLeft),Math.round(posElement.offset().top+posElement.innerHeight()-pageOffsetTop)+3], bgiframe: true, modal: false, buttons: { "Löschen": function() { $("#trovarit_excel_filter_select input:checked").removeAttr("checked");eval(tableID+"_filter").setFilter(position);$(this).dialog('close');},"Abbr.": function() { $(this).dialog("close"); },"OK": function() { eval(tableID+"_filter").setFilter(position);$(this).dialog('close'); } } }); } /**********************************************************************************************/ function getExcelFilterData(position, filterData) { if (position == null) { return filterData; } else { return filterData[position]; } } /**********************************************************************************************/ this.getData = function() { return filterData; } /**********************************************************************************************/ this.setData = function(newFilterData) { filterData = newFilterData; } /**********************************************************************************************/ this.setExcelFilterData = function(position, filter) { filterData[position] = filter; } /**********************************************************************************************/ this.clearExcelFilterData = function() { filterData = new Array(); } /**********************************************************************************************/ this.hasExcelFilterData = function() { for ( i=0; i < filterData.length; i++ ) { if (filterData[i] != 'undefined' && filterData[i] != null) { return true; } } return false; } /**********************************************************************************************/ this.getExcelFilterCount = function() { var filterCount = 0; for ( i=0; i < filterData.length; i++ ) { if (filterData[i] != 'undefined' && filterData[i] != null) { filterCount++; } } return filterCount; } /**********************************************************************************************/ this.getAllFilterData = function(element,position) { var filterText = new Array(); var table = $(element).parents(".trovarit_sort_table"); $("tbody tr:visible td:nth-child("+position+")",table).each(function() { var rowText = getTableCellText(this); if (rowText instanceof Array) { for( var k=0; k < rowText.length; k++ ) { rowText[k]=rowText[k].replace(/(\r\n|\n|\r)/gm,"").trim(); if (filterText.indexOf(rowText[k]) == -1) { filterText.push(rowText[k]); } } } else { rowText=rowText.replace(/(\r\n|\n|\r)/gm,"").trim(); if (filterText.indexOf(rowText) == -1) { filterText.push(rowText); } } }); filterText.sort(); return filterText; } /**********************************************************************************************/ this.setCheckedDialogFilter = function(position) { var values = getExcelFilterData(position,filterData); if ((values != null) && (values != 'undefined')) { $.each(values, function(key, value) { $("input[value='"+value.replace(/\'/g,"\\'")+"']").attr("checked","checked"); }); } } /**********************************************************************************************/ this.setFilterHeader = function() { if (this.hasExcelFilterData()) { $.each(filterData, function(col, value) { if (value != 'undefined' && value != null) { $($('#'+tableID+' thead .trv_excel_filter-'+(col-1))).addClass("trovarit_table_excel_filter_active"); $($('#'+tableID+' thead .trv_excel_filter-'+(col-1))).find("td:first").text(value.length); } else { $($('#'+tableID+' thead .trv_excel_filter-'+(col-1))).removeClass("trovarit_table_excel_filter_active"); $($('#'+tableID+' thead .trv_excel_filter-'+(col-1))).find("td:first").text(""); } }); } else { $('#'+tableID+' thead .trovarit_table_excel_filter').removeClass("trovarit_table_excel_filter_active"); $('#'+tableID+' thead .trovarit_table_excel_filter').find("td:first").text(""); } } /**********************************************************************************************/ this.setFilter = function(position) { var filterArray = new Array(); $("input[name='filter']:checked").each(function(key, value) { filterArray.push($(this).val()); }); if (filterArray.length == 0) { filterArray = null; } this.setExcelFilterData(position,filterArray); if (filterData.length == 0) { removeExcelFilterData(tableID); } else { saveExcelFilterData(tableID, this.getJsonFilter()); } this.filterTable(); } /**********************************************************************************************/ this.setHeaderLabel = function() { $.each(getExcelFilterData(position, filterData), function(key, value) { $("input[value='"+value+"']").attr("checked","checked"); }); } /**********************************************************************************************/ this.getFilterPositions = function() { var positions = new Array(); $.each(filterData, function(key, value) { if (value != 'undefined' && value != null) { positions.push(key); } }); return positions; } /**********************************************************************************************/ this.getJsonFilter = function() { var jsonString = '{"length":'+filterData.length+','; $.each(filterData, function(key, value) { if (value != 'undefined' && value != null) { jsonString += '"'+key+'":['; $.each(value, function(innerKey, innerValue) { jsonString += '"'+addslashes(innerValue)+'",'; }); jsonString = jsonString.rtrim(","); jsonString += '],'; } }); jsonString = jsonString.rtrim(","); jsonString += '}'; return jsonString; } /**********************************************************************************************/ this.setJsonFilter = function(jsonString) { var data = $.parseJSON(stripslashes(jsonString)); this.clearExcelFilterData(); for(var i=0; i< data["length"]; i++) { if (data[i] != 'undefined' && data[i] != null) { this.setExcelFilterData(i,data[i]); } } } /**********************************************************************************************/ this.filterTableNow = function() { this.setFilterHeader(); $("#"+tableID+">tbody>tr").removeClass("trv_found"); if (this.hasExcelFilterData()) { var colPositions = this.getFilterPositions(); var foundRowsArray = new Array; var preselectFilter = new Array; $.each(colPositions, function(keyCol,colPosition) { preselectFilter.push(["#"+tableID+">tbody>tr>td:nth-child("+colPosition+")",":tableCellContains('"+filterData[colPosition].join("','")+"')"]); }); $.each(preselectFilter, function(index,selector) { var innerRows = new Array(); $(selector[0]).filter(selector[1]).each(function(){ innerRows.push($(this).parents("tr:first")); }); foundRowsArray.push(innerRows); }); var foundRows = foundRowsArray.shift().reduce(function(res, v) { if (!trv_isObjectInArray(v,res) && foundRowsArray.every(function(a) { return trv_isObjectInArray(v,a); })) res.push(v[0]); return res; }, []); $(foundRows).addClass("trv_found").show(); $("#"+tableID+">tbody>tr:visible:not('.trv_found')").hide(); } else { $("#"+tableID+">tbody>tr").show(); } setToolbarInfo(tableID,false); reinitTablesorter(tableID); if (callbackAfterFilter != null) { eval(callbackAfterFilter); } unblockScreen(true); } } function trv_isObjectInArray(obj, searchArray) { returnValue = false; $.each(searchArray, function(index,arrayObject) { if (obj.is(arrayObject)) { returnValue = true; return; } }); return returnValue; } jQuery.expr[':'].tableCellContains = function(obj, index, meta, stack){ theList = meta[3].trim("'").split("','"); if (jQuery(".multiSelectFilterData",obj).length) { var content = jQuery(".multiSelectFilterData",obj).text().trim(); } else { var content = (jQuery(".exportThis",obj).text().trim() || jQuery(".sortThis",obj).text().trim() || obj.textContent.trim() || ''); } content = content.replace(/(\r\n|\n|\r)/gm,""); if (content.indexOf("#;#") !== -1) { content = content.split("#;#"); if (theList.length == 1) { return content.indexOf(theList[0]) !== -1; } else { returnVal = false; $.each(content, function (index, searchText) { if (theList.indexOf(searchText) !== -1) { returnVal = true; return; } }); return returnVal; } } else { return theList.indexOf(content) !== -1; } }; /**********************************************************************************************/ function setTableZebra(tableID) { $("#"+tableID+">tbody>tr:not([class*='table_toolbar_no_count']):visible:even").removeClass("even odd").addClass("odd"); $("#"+tableID+">tbody>tr:not([class*='table_toolbar_no_count']):visible:odd").removeClass("even odd").addClass("even"); } /**********************************************************************************************/ function setIframeTop(jquerySelectorTag, offsetPixel) { var topPosition = 0; if (jquerySelectorTag == null) { jquerySelectorTag = "body,html,document"; } else { topPosition = $(jquerySelectorTag).position().top; } if (offsetPixel != null) { topPosition += offsetPixel; } $("body").append(''); $('#trv_top_scroll_dummy').focus(); $('#trv_top_scroll_dummy').remove(); } /**********************************************************************************************/ function getIFramePosition(isIFrame) { var position = "center"; if (isIFrame) { position = ['center',20]; setIframeTop(); } return position; } /**********************************************************************************************/ $.fn.animateHighlight = function(highlightColor, duration, onComplete) { var highlightBg = highlightColor || "#FF6060"; var animateMs = duration || 2000; var originalBg = this.css("backgroundColor"); this.stop().css("background-color", highlightBg).animate({backgroundColor: originalBg}, animateMs, function() {$(this).css({"background-color":""});eval(onComplete)}); }; /**********************************************************************************************/ function trv_setPiwik(url,title) { if (typeof _paq !== 'undefined') { _paq.push(['trackPageView',title]); } } /**********************************************************************************************/ $.extend({ getUrlVars: function(){ var vars = [], hash; var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); for(var i = 0; i < hashes.length; i++) { hash = hashes[i].split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } return vars; }, getUrlVar: function(name){ return $.getUrlVars()[name]; } }); /**********************************************************************************************/ $(document).ready( function() { var trvShowInfo = $.getUrlVar('trvShowInfo'); var isIFrame = $.getUrlVar('isIFrame'); $("._blank").attr("target", "_blank"); if (trvShowInfo != null && trvShowInfo.length > 0) { isIFrame = (isIFrame == null || !isIFrame) ? 0:1; var position = getIFramePosition(isIFrame); infoDialog("INFORMATION",decodeURIComponent(trvShowInfo),null,null,null, position); } }); /**********************************************************************************************/ function showServiceWarning() { var serviceContainer = '
'; $(".trv_core_service_warning_container").html(serviceContainer); } /**********************************************************************************************/ function trv_printTable(tableID) { if ($('#'+tableID).prev().attr("class") != "trv_core_print_additional_info") { $('#'+tableID).before('
'); } if ($('#'+tableID).prev(".trv_core_print_additional_info").find(".trv_core_print_logo").length == 0) { $('#'+tableID).prev().prepend('
Gedruckt am:
Anzahl Einträge:
'); } $('#'+tableID).prev().find(".trv_core_print_row_count").text($('#'+tableID+"_visible_count").text()); $('#'+tableID).prev().find(".trv_core_print_lable_create_date").text(trv_core_get_current_date()); $('#'+tableID).parent().printElement( { printMode:'popup', leaveOpen:true, overrideElementCSS:['http://cyberkmu.portal.it-matchmaker.com/core/styles/table_print.css', {href:'http://cyberkmu.portal.it-matchmaker.com/core/styles/table_print.css',media:'print'}, 'http://cyberkmu.portal.it-matchmaker.com/core/modules/bar_chart/styles/bar_chart_print.css', {href:'http://cyberkmu.portal.it-matchmaker.com/core/modules/bar_chart/styles/bar_chart_print.css',media:'print'}] }); } /**********************************************************************************************/ function trv_core_get_current_date() { var now = new Date(); var month = (now.getMonth()+1)<10?"0"+(now.getMonth()+1):(now.getMonth()+1); var day = now.getDate()<10?"0"+now.getDate():now.getDate(); var year = now.getFullYear(); var hour = now.getHours()<10?"0"+now.getHours():now.getHours(); var min = now.getMinutes()<10?"0"+now.getMinutes():now.getMinutes(); return day+"."+month+"."+year+" - "+hour+":"+min; } /**********************************************************************************************/ function ie_fix_HrefJSLinks() { if (navigator.appVersion.indexOf("MSIE") != -1) { $('a').filter(function() { return (/^javascript\:/i).test($(this).attr('href')); }).each(function() { var hrefscript = $(this).attr('href'); hrefscript = hrefscript.substr(11); $(this).data('hrefscript', hrefscript); }).click(function() { var hrefscript = $(this).data('hrefscript'); eval(hrefscript); return false; }).attr('href', '#'); } } /**********************************************************************************************/ $.fn.focusToEnd = function(addSpaceAtEnd) { return this.each(function() { var v = $(this).val(); if (addSpaceAtEnd == true && v.length > 0) { v = v.rtrim()+" "; } $(this).focus().val("").val(v); }); }; function initTinyMCE(selector,afterInit, readonly_status, showTableEdit, showAddUserNameAndDate, showSerialLetterVariables) { var tablePlugin = ""; var tableToolbar = ""; var userNameAndDatePlugin = ""; var userNameAndDateToolbar = ""; var serialLetterVariablesPlugin = ""; var serialLetterVariablesToolbar = ""; if (selector == null) { selector = "textarea"; } if(readonly_status == null) { readonly_status = false; } if(showTableEdit == null) { showTableEdit = false; } if(showAddUserNameAndDate == null) { showAddUserNameAndDate = false; } if (showTableEdit) { tablePlugin = " table"; tableToolbar = " | table"; } if (showAddUserNameAndDate) { userNameAndDatePlugin = "user_and_date "; userNameAndDateToolbar = "user_and_date | "; } if (showSerialLetterVariables != null) { serialLetterVariablesPlugin = " serial_letter_variables "; serialLetterVariablesToolbar = " | serial_letter_variables "; } tinymce.baseURL = "http://cyberkmu.portal.it-matchmaker.com/core/jscripts/tinymce/"; tinymce.suffix = '.min'; tinymce.init({ readonly: readonly_status, selector: selector, skin_url: 'http://cyberkmu.portal.it-matchmaker.com/core/jscripts/tinymce/skins/lightgray', entity_encoding : "raw", elementpath: false, resize:true, menubar : false, plugins: [ userNameAndDatePlugin+"advlist autolink lists charmap hr searchreplace wordcount visualblocks visualchars code textcolor paste preview"+tablePlugin+serialLetterVariablesPlugin ], toolbar: userNameAndDateToolbar+"undo redo | visualblocks | formatselect fontsizeselect forecolor | bold italic underline strikethrough | removeformat | alignleft aligncenter alignright alignjustify | hr | cut copy paste pastetext | bullist numlist | searchreplace | code preview"+tableToolbar+serialLetterVariablesToolbar, language : "de", paste_word_valid_elements: "@[style],-strong/b,-em/i,-span,-p,-ol,-ul,-li,-table,-tr,-td[colspan|rowspan],-th,-thead,-tfoot,-tbody,-a[href|name],sub,sup,strike,br,u", setup : function(editor) { editor.on("change", tinyOnChangeHandler); editor.on("init", afterInit); } }); } function tinyOnChangeHandler() { //JB 11.08.2014: Platzhalter, damit es keinen Fehler gibt, wenn die Funktion nicht gesetzt wird } function trv_core_jump_top() { if ($(".ui-dialog-titlebar").length > 0) { setIframeTop('.ui-dialog-titlebar:last'); } else { setIframeTop(); } } function trv_setLastViewedTableRowMarker(tableRowID) { $('tr#'+tableRowID).parent().find("tr").removeClass("trv_core_last_viewed_marker"); $('tr#'+tableRowID).addClass("trv_core_last_viewed_marker"); } function trv_number_format(nummer,nachkommastellen,seperator,tausender_seperator) { nummer = Math.round( nummer * Math.pow(10, nachkommastellen) ) / Math.pow(10, nachkommastellen); str_nummer = nummer+""; arr_int = str_nummer.split("."); if(!arr_int[0]) arr_int[0] = "0"; if(!arr_int[1]) arr_int[1] = ""; if(arr_int[1].length < nachkommastellen){ nachkomma = arr_int[1]; for(i=arr_int[1].length+1; i <= nachkommastellen; i++){ nachkomma += "0"; } arr_int[1] = nachkomma; } if(tausender_seperator != "" && arr_int[0].length > 3){ Begriff = arr_int[0]; arr_int[0] = ""; for(j = 3; j < Begriff.length ; j+=3){ Extrakt = Begriff.slice(Begriff.length - j, Begriff.length - j + 3); arr_int[0] = tausender_seperator + Extrakt + arr_int[0] + ""; } str_first = Begriff.substr(0, (Begriff.length % 3 == 0)?3:(Begriff.length % 3)); arr_int[0] = str_first + arr_int[0]; } return arr_int[0]+seperator+arr_int[1]; } function nl2br (str) { var breakTag = '
'; return (str + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + breakTag + '$2'); } (function ( $ ) { jQuery.trv_postJson = function (options) { var fullPath = "NVlFXzhjbUlsYDx5b3JMaH0zY15zejVrLi9eWVU4cXlnS1tWJXwpLVFbWChQYVoxT29mdmN3en1GW0VDYGVRdjpUTillRX1zbldDT3ZpU0krU2pKaVFJKHVYUjk,"; var logAjaxError = function (url,parameter,errorStatus,errorStatusText,errorResponseText,requestStatusText) { } var toggleSaveInfo = function(actionType) { if (settings.showSavingInfoIn != null) { trv_toggleSaveInfo($(settings.showSavingInfoIn),actionType,settings.alternativeSavingInfoText); } } var settings = $.extend({ disableErrorOnReload: false, errorDailogPosition: "top", errorDailogWidth: 750, errorDailogCenterText: false, alternativeErrorMessage: null, blockScreen: true, ajax_type: null, showSavingInfoIn: null, // must be element alternativeSavingInfoText: null, module_name: null, url: null, ajaxFile: "ajax.php", full_path: fullPath, parameter: null, onSuccess: function(data) {}, onErrorFirst:function(data) {} }, options ); if (settings.blockScreen) { blockScreen(true); } toggleSaveInfo("show"); if (settings.parameter == null) { settings.parameter = new Object(); } if (settings.full_path != null) { settings.parameter.full_path = settings.full_path; } if (settings.ajax_type != null) { settings.parameter.ajax_type = settings.ajax_type; } if (settings.url == null) { if (settings.module_name == null) { settings.url = "/homepage/ajax/"+settings.ajaxFile+""; } else { settings.url = "http://cyberkmu.portal.it-matchmaker.com/core/modules/"+settings.module_name+"/ajax/"+settings.ajaxFile+"?app_language=de"; } } var internalErrorText = "INTERNER FEHLER: Wurde vielleicht Ihre Internetverbindung unterbrochen?

Bitte versuchen Sie Ihre Aktion zu wiederholen ...


Bitte überprüfen Sie Ihre Firewall oder Ihren Virusscanner! Diese können auch die Verbindung unterbrechen falls die Inhalte dieser Seite als gefährlich eingestuft worden sind. Das kann auch zu dieser Fehlermeldung führen."; $.post( settings.url, settings.parameter, function(data, status, xhr) { if (status == "success") { toggleSaveInfo("hide"); if (data == null || !isNaN(parseFloat(data))) { settings.onErrorFirst.call(this,xhr); unblockScreen(); infoDialog("FEHLER",settings.alternativeErrorMessage || internalErrorText,null,600,null,settings.errorDailogPosition); var info = "Number returned"; if (data == null) { info = "NULL returned"; } logAjaxError(settings.url,settings.parameter,xhr.status,xhr.statusText,"",info); } else if (data.postJsonMessage != null) { settings.onErrorFirst.call(this,xhr); var messageTitle = "FEHLER"; var messageDialogWidth = 400; if (data.postJsonMessageTitle != null) { messageTitle = data.postJsonMessageTitle; } if (data.postJsonMessageDialogWidth != null) { messageDialogWidth = data.postJsonMessageDialogWidth; } unblockScreen(); infoDialog(messageTitle,data.postJsonMessage,null,messageDialogWidth,null,settings.errorDailogPosition,null,!settings.errorDailogCenterText); } else { settings.onSuccess.call(this,data); } } if (status == "error" || status == "timeout" || status == "parsererror") { settings.onErrorFirst.call(this,xhr); var statusResponseText = xhr.responseText; if (statusResponseText == "" || statusResponseText == null) { statusResponseText = internalErrorText; } toggleSaveInfo("hide"); unblockScreen(); infoDialog("FEHLER",settings.alternativeErrorMessage || (status+"
"+xhr.statusText+" ("+xhr.status+")
"+statusResponseText),null,settings.errorDailogWidth,null,settings.errorDailogPosition,null,!settings.errorDailogCenterText); logAjaxError(settings.url,settings.parameter,xhr.status,xhr.statusText,statusResponseText,status); } if (settings.blockScreen) { unblockScreen(true); } },"json").error(function (error) { settings.onErrorFirst.call(this,error); if (!settings.disableErrorOnReload || (settings.disableErrorOnReload && error.readyState != 0 && error.status != 0)) { toggleSaveInfo("hide"); unblockScreen(); var responseText = error.responseText; if (responseText == "" || responseText == null) { responseText = internalErrorText; } infoDialog("FEHLER",settings.alternativeErrorMessage || responseText,null,settings.errorDailogWidth,null,settings.errorDailogPosition,null,!settings.errorDailogCenterText); logAjaxError(settings.url,settings.parameter,error.status,error.statusText,responseText,"Is not a JSON string"); } }); } $.fn.trv_load = function (options) { var fullPath = "NVlFXzhjbUlsYDx5b3JMaH0zY15zejVrLi9eWVU4cXlnS1tWJXwpLVFbWChQYVoxT29mdmN3en1GW0VDYGVRdjpUTillRX1zbldDT3ZpU0krU2pKaVFJKHVYUjk,"; var logLoadError = function (url,errorStatus,errorStatusText,errorResponseText,requestStatusText) { } var settings = $.extend({ disableErrorOnReload: false, errorDailogPosition: "top", errorDailogWidth: 750, errorDailogCenterText: false, blockScreen: true, div_id: null, path: null }, options ); var internalErrorText = "INTERNER FEHLER: Wurde vielleicht Ihre Internetverbindung unterbrochen?

Bitte versuchen Sie Ihre Aktion zu wiederholen ...


Bitte überprüfen Sie Ihre Firewall oder Ihren Virusscanner! Diese können auch die Verbindung unterbrechen falls die Inhalte dieser Seite als gefährlich eingestuft worden sind. Das kann auch zu dieser Fehlermeldung führen."; $("#"+settings.div_id).load(settings.path, function(response, status, xhr) { if(status == "error" || status == "timeout" || status == "parsererror") { unblockScreen(); var responseText = xhr.responseText; if (responseText == "" || responseText == null) { responseText = internalErrorText; } infoDialog("FEHLER",responseText,null,null,null,null,null,null); logLoadError('http://cyberkmu.portal.it-matchmaker.com/homepage',xhr.status,xhr.statusText,responseText,"Something is wrong in "+settings.div_id, 'NVlFXzhjbUlsYDx5b3JMaH0zY15zejVrLi9eWVU4cXlnS1tWJXwpLVFbWChQYVoxT29mdmN3en1GW0VDYGVRdjpUTillRX1zbldDT3ZpU0krU2pKaVFJKHVYUjk,'); $("#"+settings.div_id).remove(); } } ); return this; }; $.fn.trv_tinyMCE_isLengthValid = function(showInvalidInfo) { var invalidText = "Mindestens eine Texteingabe überschreitet die erlaubte Länge.

Bitte korrigieren Sie Ihre Eingabe ..."; var allValid = true; var foundElement = this; $(tinyMCE.editors).each(function(index,editor){ $(foundElement).each(function() { if ($(editor.targetElm).get(0) == $(this).get(0) && !editor.plugins.charcount_with_limit.isLengthValid()) { allValid = false; return false; } }) if (!allValid) return false; }) if (!allValid && showInvalidInfo) { infoDialog("FEHLER",invalidText,null,500); } return allValid; } $.fn.trv_tinyMCE_destroy = function(){ var foundElement = this; $(tinyMCE.editors).each(function(index,editor){ $(foundElement).each(function() { if ($(editor.targetElm).get(0) == $(this).get(0)) { editor.destroy(); } }) }) } $.fn.trv_tinyMCE_init = function(options){ var settings = $.extend({ readOnly: false, enableFullscreen: false, showTableEdit: false, showAddUserNameAndDate: false, showSerialLetterVariables: false, maxChar: 0, afterInit: function(data) {}, onChange:function(data) {} }, options ); var tablePlugin = ""; var tableToolbar = ""; var userNameAndDatePlugin = ""; var userNameAndDateToolbar = ""; var serialLetterVariablesPlugin = ""; var serialLetterVariablesToolbar = ""; var fullscreenPlugin = ""; var fullscreenToolbar = ""; if (settings.showTableEdit) { tablePlugin = " table"; tableToolbar = " | table"; } if (settings.enableFullscreen) { fullscreenPlugin = " fullscreen "; fullscreenToolbar = " | fullscreen"; } if (settings.showAddUserNameAndDate) { userNameAndDatePlugin = "user_and_date "; userNameAndDateToolbar = "user_and_date | "; } if (settings.showSerialLetterVariables) { serialLetterVariablesPlugin = " serial_letter_variables "; serialLetterVariablesToolbar = " | serial_letter_variables "; } tinymce.baseURL = "http://cyberkmu.portal.it-matchmaker.com/core/jscripts/tinymce/"; tinymce.suffix = '.min'; tinymce.init({ readonly: settings.readOnly, selector: this.selector, skin_url: 'http://cyberkmu.portal.it-matchmaker.com/core/jscripts/tinymce/skins/lightgray', entity_encoding : "raw", elementpath: false, resize: true, menubar : false, max_char: settings.maxChar, plugins: [ userNameAndDatePlugin+"advlist autolink lists charmap hr searchreplace charcount_with_limit visualblocks visualchars code textcolor paste preview"+tablePlugin+serialLetterVariablesPlugin+fullscreenPlugin ], toolbar: userNameAndDateToolbar+"undo redo | visualblocks | formatselect fontsizeselect forecolor | bold italic underline strikethrough | removeformat | alignleft aligncenter alignright alignjustify | hr | cut copy paste pastetext | bullist numlist | searchreplace | code preview"+tableToolbar+serialLetterVariablesToolbar+fullscreenToolbar, language : "de", paste_word_valid_elements: "@[style],-strong/b,-em/i,-span,-p,-ol,-ul,-li,-table,-tr,-td[colspan|rowspan],-th,-thead,-tfoot,-tbody,-a[href|name],sub,sup,strike,br,u", setup : function(editor) { editor.on("change", settings.onChange); editor.on("init", settings.afterInit); } }); } $.fn.trv_scrollTo = function( target, options, callback ){ if(typeof options == 'function' && arguments.length == 2){ callback = options; options = target; } var settings = $.extend({ scrollTarget : target, offsetTop : 50, duration : 500, easing : 'swing' }, options); return this.each(function(){ var scrollPane = $(this); var scrollTarget = (typeof settings.scrollTarget == "number") ? settings.scrollTarget : $(settings.scrollTarget); var scrollY = (typeof scrollTarget == "number") ? scrollTarget : scrollTarget.offset().top + scrollPane.scrollTop() - parseInt(settings.offsetTop); scrollPane.animate({scrollTop : scrollY }, parseInt(settings.duration), settings.easing, function(){ if (typeof callback == 'function') { callback.call(this); } }); }); } }( jQuery )); function trv_toggleSaveInfo(element,actionType,alternativeText) { var infoText = "Daten werden gespeichert ..."; if (actionType == null) { actionType = "auto"; } if (alternativeText != null) { infoText = alternativeText; } $(element).each(function() { var elementHeight = $(this).innerHeight(); var elementWidth = $(this).innerWidth(); var tableRowStyle = ''; if ($(element).css("display") == "table-row") { tableRowStyle = 'position:relative;display:inline-table;margin-left:-'+elementWidth+'px;'; elementHeight = elementHeight-1; } var saveInfoPanel = '
'+infoText+'
'; if ($(this).css("position") == "static") { $(this).css("position","relative"); } if ($(this).find(".trv_core_save_info_overlay").length == 0 && (actionType == "show" || actionType == "auto")) { $(this).append(saveInfoPanel); } else if (actionType == "hide" || actionType == "auto") { $(this).find(".trv_core_save_info_overlay").remove(); } }); } function trv_searchTree(treeID,searchText) { if ($("#"+treeID).length > 0) { $("#"+treeID).jstree(true).search(searchText); } } function trv_core_startProgressFetch(progressID, alternativeLable) { showBockscreenProgressBar(alternativeLable); trv_core_progressFetch.currentProgressValue = 0; trv_core_progressFetch.progressID = progressID; trv_core_progressFetch.instance = setInterval(function() { $.get( "http://cyberkmu.portal.it-matchmaker.com/core/ajax/progress.php?id="+trv_core_progressFetch.progressID, function(data) { data = parseInt(data); if (data >= 0 && data <= 100 && data >= trv_core_progressFetch.currentProgressValue) { setBockscreenProgressValue(data); trv_core_progressFetch.currentProgressValue = data; } }); }, 150); } function trv_core_stopProgressBar() { if (trv_core_progressFetch != null) { clearInterval(trv_core_progressFetch.instance); hideBockscreenProgressBar(); trv_core_progressFetch = new Object(); } } function checkUsernameModule(userName, inputFormID, errorClass, showSelectDialog, isIFrame, callbackOnValidUserName, checkUpperCase) { var position = getIFramePosition(isIFrame); if (checkUpperCase == null) { checkUpperCase = 1; } checkUpperCase = checkUpperCase?1:0; $.trv_postJson({ errorDailogPosition: position, module_name: "check_username", ajax_type: "CHECK_USER_NAME", parameter: { userName: userName, checkUpperCase: checkUpperCase }, onSuccess: function(data) { if (data.userValid == 1) { $("#"+inputFormID).removeClass(errorClass); if(callbackOnValidUserName != null && (typeof callbackOnValidUserName == "function")) { callbackOnValidUserName(); } } else if (data.userValid == 0) { $("#"+inputFormID).addClass(errorClass); if (showSelectDialog) { openSelectNewUserNameDialog(userName, inputFormID, errorClass, isIFrame); } } } }); } function openSelectNewUserNameDialog(userName, inputFormID, errorClass, isIFrame) { if ($("#trv_module_dialog_check_user_name").length == 0) { blockScreen(); isIFrame = (isIFrame == null || !isIFrame) ? 0:1; var position = getIFramePosition(isIFrame); $("body").append(""); $("#trv_module_dialog_check_user_name").load("http://cyberkmu.portal.it-matchmaker.com/core/modules/check_username/components/dialog_select_user_name.php?userName="+encodeURI(userName)+"&inputFormID="+encodeURI(inputFormID)+"&errorClass="+encodeURI(errorClass)+"&full_path=NVlFXzhjbUlsYDx5b3JMaH0zY15zejVrLi9eWVU4cXlnS1tWJXwpLVFbWChQYVoxT29mdmN3en1GW0VDYGVRdjpUTillRX1zbldDT3ZpU0krU2pKaVFJKHVYUjk,&app_language=de").dialog({ close: function(event, ui) { $(this).dialog('destroy'); $("#trv_module_dialog_check_user_name").remove(); $("#"+inputFormID).focus(); $("#"+inputFormID).select(); }, closeOnEscape: true, resizable: false, position: position, minHeight: 300, height: 'auto', width: 400, modal: true, bgiframe: true, title: "Auswahl eines anderen Benutzernames" }); } } function openModuleContactDialog(mailSubject,isIFrame,useSessionData,mailAdressSelector,mailAdressCCSelector,mailAdressBCCSelector,portalName,userCoreHeaderImages,additionalText) { if ($("#trv_module_dialog_contact").length == 0) { blockScreen(); mailAdressSelector = mailAdressSelector == null?"":mailAdressSelector; mailAdressCCSelector = mailAdressCCSelector == null?"":mailAdressCCSelector; mailAdressBCCSelector = mailAdressBCCSelector == null?"":mailAdressBCCSelector; portalName = portalName == null?"":portalName; additionalText = additionalText == null?"":additionalText; userCoreHeaderImages = userCoreHeaderImages == null || userCoreHeaderImages == 1?1:0; var dialogHeight = 470; useSessionData = (useSessionData == null || !useSessionData) ? 0:1; mailSubject = (mailSubject == null) ? "":mailSubject; isIFrame = (isIFrame == null || !isIFrame) ? 0:1; var position = getIFramePosition(isIFrame); if (useSessionData) { dialogHeight = 330; } $("body").append(""); $("#trv_module_dialog_contact").load("http://cyberkmu.portal.it-matchmaker.com/core/modules/contact/components/dialog_contact.php?userCoreHeaderImages="+encodeURIComponent(userCoreHeaderImages)+"&portalName="+encodeURIComponent(portalName)+"&additionalText="+encodeURIComponent(additionalText)+"&mailAdressSelector="+encodeURIComponent(mailAdressSelector)+"&mailAdressCCSelector="+encodeURIComponent(mailAdressCCSelector)+"&mailAdressBCCSelector="+encodeURIComponent(mailAdressBCCSelector)+"&isIFrame="+isIFrame+"&useSessionData="+useSessionData+"&mailSubject="+encodeURIComponent(mailSubject)+"&full_path=NVlFXzhjbUlsYDx5b3JMaH0zY15zejVrLi9eWVU4cXlnS1tWJXwpLVFbWChQYVoxT29mdmN3en1GW0VDYGVRdjpUTillRX1zbldDT3ZpU0krU2pKaVFJKHVYUjk,&app_language=de").dialog({ close: function(event, ui) { moduleContactContentChanged(false); $(this).dialog('destroy'); $("#trv_module_dialog_contact").remove(); }, beforeClose: function(event, ui) { return closeContactDialog(isIFrame); }, closeOnEscape: false, resizable: false, position: position, minHeight: dialogHeight, height: 'auto', width: 530, modal: true, bgiframe: true, title: "Kontakt" }); } } function moduleContactSend(isIFrame,mailAdressSelector,mailAdressCCSelector,mailAdressBCCSelector) { isIFrame = (isIFrame == null || !isIFrame) ? 0:1; var position = getIFramePosition(isIFrame); if (isFormValid('trv_module_contact_form',position, isIFrame,'trv_core_input_white_validator_error')) { mailAdressSelector = mailAdressSelector == null?"":mailAdressSelector; mailAdressCCSelector = mailAdressCCSelector == null?"":mailAdressCCSelector; mailAdressBCCSelector = mailAdressBCCSelector == null?"":mailAdressBCCSelector; $.trv_postJson({ module_name: "contact", ajax_type: "SEND_CONTACT", parameter: { mailAdressSelector: mailAdressSelector, mailAdressCCSelector: mailAdressCCSelector, mailAdressBCCSelector: mailAdressBCCSelector, contactData: $('#trv_module_contact_form').serialize() }, onSuccess: function(data) { moduleContactContentChanged(false); $("#trv_module_dialog_contact").dialog("close"); infoDialog("INFORMATION","Ihre Kontaktanfrage wurde an uns gesendet.
Wir setzen uns mit Ihnen schnellstmöglich in Verbindung.",null,null,null, position); } }); } } var moduleContactContentChangedVar = false; function moduleContactContentChanged(changed) { moduleContactContentChangedVar = changed; setUnload(changed, "Das Kontaktformular wurde ausgefüllt aber nicht abgesendet!"); } function closeContactDialog(isIFrame) { if (moduleContactContentChangedVar) { confirmCloseContactDialog(isIFrame); return false; } return true; } function confirmCloseContactDialog(isIFrame) { isIFrame = (isIFrame == null || !isIFrame) ? 0:1; var position = getIFramePosition(isIFrame); confirmDialog("BESTÄTIGUNG","moduleContactContentChanged(false);$('#trv_module_dialog_contact').dialog('close');","Das Kontaktformular wurde ausgefüllt aber nicht abgesendet!

Wollen Sie den Kontaktvorgang wirklich beenden?",null,400,null,position); } function trv_upload_deleteFile(parameter, callAfterSucess, isIFrame) { var position = getIFramePosition(isIFrame); $.trv_postJson({ errorDailogPosition: position, module_name: "document_manager", ajax_type: "DELETE_FILE", parameter: { parameter: parameter }, onSuccess: function(data) { eval(callAfterSucess); } }); } function trv_upload_removeSelectedUploadFile(uploadName) { var oldFile = eval("current_file_link_"+uploadName); if (oldFile != "") { $('#input_'+uploadName).html(oldFile); $('#input_'+uploadName).parent().attr("title",oldFile.replace(/(<([^>]+)>)/ig,"")); } else { $('#input_'+uploadName).html(""); $('#input_'+uploadName).parent().removeAttr("title"); } eval("file_changed_"+uploadName+" = false"); } function trv_upload_verifyAllowedFileType(fileName, allowedExtensions, isIFrame) { var fileExtension = "."+fileName.split('.').pop().toLowerCase(); allowedExtensions = allowedExtensions.split(","); if (jQuery.inArray(fileExtension, allowedExtensions)!=-1) { return true; } else { var position = getIFramePosition(isIFrame); infoDialog("FEHLER", "'"+fileName+"'

Sie dürfen diesen Dateityp hier nicht hochladen!

Erlaubte Dateitypen sind: "+allowedExtensions.join(", ")+"", null,600, null, position); return false; } } /** * AJAX Upload ( http://valums.com/ajax-upload/ ) * Copyright (c) Andrew Valums * Licensed under the MIT license */ (function () { /** * Attaches event to a dom element. * @param {Element} el * @param type event name * @param fn callback This refers to the passed element */ function addEvent(el, type, fn){ if (el.addEventListener) { el.addEventListener(type, fn, false); } else if (el.attachEvent) { el.attachEvent('on' + type, function(){ fn.call(el); }); } else { throw new Error('not supported or DOM not loaded'); } } /** * Attaches resize event to a window, limiting * number of event fired. Fires only when encounteres * delay of 100 after series of events. * * Some browsers fire event multiple times when resizing * http://www.quirksmode.org/dom/events/resize.html * * @param fn callback This refers to the passed element */ function addResizeEvent(fn){ var timeout; addEvent(window, 'resize', function(){ if (timeout){ clearTimeout(timeout); } timeout = setTimeout(fn, 100); }); } // Needs more testing, will be rewriten for next version // getOffset function copied from jQuery lib (http://jquery.com/) if (document.documentElement.getBoundingClientRect){ // Get Offset using getBoundingClientRect // http://ejohn.org/blog/getboundingclientrect-is-awesome/ var getOffset = function(el){ var box = el.getBoundingClientRect(); var doc = el.ownerDocument; var body = doc.body; var docElem = doc.documentElement; // for ie var clientTop = docElem.clientTop || body.clientTop || 0; var clientLeft = docElem.clientLeft || body.clientLeft || 0; // In Internet Explorer 7 getBoundingClientRect property is treated as physical, // while others are logical. Make all logical, like in IE8. var zoom = 1; if (body.getBoundingClientRect) { var bound = body.getBoundingClientRect(); zoom = (bound.right - bound.left) / body.clientWidth; } if (zoom > 1) { clientTop = 0; clientLeft = 0; } var top = box.top / zoom + (window.pageYOffset || docElem && docElem.scrollTop / zoom || body.scrollTop / zoom) - clientTop, left = box.left / zoom + (window.pageXOffset || docElem && docElem.scrollLeft / zoom || body.scrollLeft / zoom) - clientLeft; return { top: top, left: left }; }; } else { // Get offset adding all offsets var getOffset = function(el){ var top = 0, left = 0; do { top += el.offsetTop || 0; left += el.offsetLeft || 0; el = el.offsetParent; } while (el); return { left: left, top: top }; }; } /** * Returns left, top, right and bottom properties describing the border-box, * in pixels, with the top-left relative to the body * @param {Element} el * @return {Object} Contains left, top, right,bottom */ function getBox(el){ var left, right, top, bottom; var offset = getOffset(el); left = offset.left; top = offset.top; right = left + el.offsetWidth; bottom = top + el.offsetHeight; return { left: left, right: right, top: top, bottom: bottom }; } /** * Helper that takes object literal * and add all properties to element.style * @param {Element} el * @param {Object} styles */ function addStyles(el, styles){ for (var name in styles) { if (styles.hasOwnProperty(name)) { el.style[name] = styles[name]; } } } /** * Function places an absolutely positioned * element on top of the specified element * copying position and dimentions. * @param {Element} from * @param {Element} to */ function copyLayout(from, to){ var box = getBox(from); addStyles(to, { position: 'absolute', left : box.left + 'px', top : box.top + 'px', width : from.offsetWidth + 'px', height : from.offsetHeight + 'px' }); } /** * Creates and returns element from html chunk * Uses innerHTML to create an element */ var toElement = (function(){ var div = document.createElement('div'); return function(html){ div.innerHTML = html; var el = div.firstChild; return div.removeChild(el); }; })(); /** * Function generates unique id * @return unique id */ var getUID = (function(){ var id = 0; return function(){ return 'ValumsAjaxUpload' + id++; }; })(); /** * Get file name from path * @param {String} file path to file * @return filename */ function fileFromPath(file){ return file.replace(/.*(\/|\\)/, ""); } /** * Get file extension lowercase * @param {String} file name * @return file extenstion */ function getExt(file){ return (-1 !== file.indexOf('.')) ? file.replace(/.*[.]/, '') : ''; } function hasClass(el, name){ var re = new RegExp('\\b' + name + '\\b'); return re.test(el.className); } function addClass(el, name){ if ( ! hasClass(el, name)){ el.className += ' ' + name; } } function removeClass(el, name){ var re = new RegExp('\\b' + name + '\\b'); el.className = el.className.replace(re, ''); } function removeNode(el){ el.parentNode.removeChild(el); } /** * Easy styling and uploading * @constructor * @param button An element you want convert to * upload button. Tested dimentions up to 500x500px * @param {Object} options See defaults below. */ window.AjaxUpload = function(button, options){ this._settings = { // Location of the server-side upload script action: 'upload.php', // File upload name name: 'userfile', // Select & upload multiple files at once FF3.6+, Chrome 4+ multiple: false, // Additional data to send data: {}, // Submit file as soon as it's selected autoSubmit: true, acceptFiles: '', // The type of data that you're expecting back from the server. // html and xml are detected automatically. // Only useful when you are using json data as a response. // Set to "json" in that case. responseType: false, // Class applied to button when mouse is hovered hoverClass: 'hover', // Class applied to button when button is focused focusClass: 'focus', // Class applied to button when AU is disabled disabledClass: 'disabled', // When user selects a file, useful with autoSubmit disabled // You can return false to cancel upload onChange: function(file, extension){ }, // Callback to fire before file is uploaded // You can return false to cancel upload onSubmit: function(file, extension){ }, // Fired when file upload is completed // WARNING! DO NOT USE "FALSE" STRING AS A RESPONSE! onComplete: function(file, response){ } }; // Merge the users options with our defaults for (var i in options) { if (options.hasOwnProperty(i)){ this._settings[i] = options[i]; } } // button isn't necessary a dom element if (button.jquery){ // jQuery object was passed button = button[0]; } else if (typeof button == "string") { if (/^#.*/.test(button)){ // If jQuery user passes #elementId don't break it button = button.slice(1); } button = document.getElementById(button); } if ( ! button || button.nodeType !== 1){ throw new Error("Please make sure that you're passing a valid element"); } if ( button.nodeName.toUpperCase() == 'A'){ // disable link addEvent(button, 'click', function(e){ if (e && e.preventDefault){ e.preventDefault(); } else if (window.event){ window.event.returnValue = false; } }); } // DOM element this._button = button; // DOM element this._input = null; // If disabled clicking on button won't do anything this._disabled = false; // if the button was disabled before refresh if will remain // disabled in FireFox, let's fix it this.enable(); this._rerouteClicks(); }; // assigning methods to our class AjaxUpload.prototype = { setData: function(data){ this._settings.data = data; }, disable: function(){ addClass(this._button, this._settings.disabledClass); this._disabled = true; var nodeName = this._button.nodeName.toUpperCase(); if (nodeName == 'INPUT' || nodeName == 'BUTTON'){ this._button.setAttribute('disabled', 'disabled'); } // hide input if (this._input){ if (this._input.parentNode) { // We use visibility instead of display to fix problem with Safari 4 // The problem is that the value of input doesn't change if it // has display none when user selects a file this._input.parentNode.style.visibility = 'hidden'; } } }, enable: function(){ removeClass(this._button, this._settings.disabledClass); this._button.removeAttribute('disabled'); this._disabled = false; }, /** * Creates invisible file input * that will hover above the button *
*/ _createInput: function(){ var self = this; var input = document.createElement("input"); input.setAttribute('type', 'file'); input.setAttribute('name', this._settings.name); if (this._settings.acceptFiles != '') { input.setAttribute('accept', this._settings.acceptFiles); } if(this._settings.multiple) input.setAttribute('multiple', 'multiple'); addStyles(input, { 'position' : 'absolute', // in Opera only 'browse' button // is clickable and it is located at // the right side of the input 'right' : 0, 'margin' : 0, 'padding' : 0, 'fontSize' : '480px', // in Firefox if font-family is set to // 'inherit' the input doesn't work 'fontFamily' : 'sans-serif', 'cursor' : 'pointer', 'zIndex': 10000 }); var div = document.createElement("div"); addStyles(div, { 'display' : 'block', 'position' : 'absolute', 'overflow' : 'hidden', 'margin' : 0, 'padding' : 0, 'opacity' : 0, // Make sure browse button is in the right side // in Internet Explorer 'direction' : 'ltr', //Max zIndex supported by Opera 9.0-9.2 'zIndex': 2147483583 }); // Make sure that element opacity exists. // Otherwise use IE filter if ( div.style.opacity !== "0") { if (typeof(div.filters) == 'undefined'){ throw new Error('Opacity not supported by the browser'); } div.style.filter = "alpha(opacity=0)"; } addEvent(input, 'change', function(){ if ( ! input || input.value === ''){ return; } // Get filename from input, required // as some browsers have path instead of it var file = fileFromPath(input.value); if (false === self._settings.onChange.call(self, file, getExt(file))){ self._clearInput(); return; } // Submit form when value is changed if (self._settings.autoSubmit) { self.submit(); } }); addEvent(input, 'mouseover', function(){ addClass(self._button, self._settings.hoverClass); }); addEvent(input, 'mouseout', function(){ removeClass(self._button, self._settings.hoverClass); removeClass(self._button, self._settings.focusClass); if (input.parentNode) { // We use visibility instead of display to fix problem with Safari 4 // The problem is that the value of input doesn't change if it // has display none when user selects a file input.parentNode.style.visibility = 'hidden'; } }); addEvent(input, 'focus', function(){ addClass(self._button, self._settings.focusClass); }); addEvent(input, 'blur', function(){ removeClass(self._button, self._settings.focusClass); }); div.appendChild(input); document.body.appendChild(div); this._input = input; }, _clearInput : function(){ if (!this._input){ return; } // this._input.value = ''; Doesn't work in IE6 removeNode(this._input.parentNode); this._input = null; this._createInput(); removeClass(this._button, this._settings.hoverClass); removeClass(this._button, this._settings.focusClass); }, /** * Function makes sure that when user clicks upload button, * the this._input is clicked instead */ _rerouteClicks: function(){ var self = this; // IE will later display 'access denied' error // if you use using self._input.click() // other browsers just ignore click() addEvent(self._button, 'mouseover', function(){ if (self._disabled){ return; } if ( ! self._input){ self._createInput(); } var div = self._input.parentNode; copyLayout(self._button, div); div.style.visibility = 'visible'; }); // commented because we now hide input on mouseleave /** * When the window is resized the elements * can be misaligned if button position depends * on window size */ //addResizeEvent(function(){ // if (self._input){ // copyLayout(self._button, self._input.parentNode); // } //}); }, /** * Creates iframe with unique name * @return {Element} iframe */ _createIframe: function(){ // We can't use getTime, because it sometimes return // same value in safari :( var id = getUID(); // We can't use following code as the name attribute // won't be properly registered in IE6, and new window // on form submit will open // var iframe = document.createElement('iframe'); // iframe.setAttribute('name', id); var iframe = toElement('') .dialog({ autoOpen: false, modal: true, width:750, height:750, title: "Newsletter Anmeldung" }); $dialog.dialog('open'); } function trv_homepage_admin_cancel_newsletter_form() { $("#trv_module_homepage_admin_newsletter_form_box").remove(); } function trv_homepage_admin_send_newsletter_form() { if($("#trv_module_homepage_admin_newsletter_form").valid()) { $.post( "http://cyberkmu.portal.it-matchmaker.com/core/modules/homepage_admin/ajax/ajax.php?full_path=NVlFXzhjbUlsYDx5b3JMaH0zY15zejVrLi9eWVU4cXlnS1tWJXwpLVFbWChQYVoxT29mdmN3en1GW0VDYGVRdjpUTillRX1zbldDT3ZpU0krU2pKaVFJKHVYUjk,&app_language=de", { ajax_type: "SAVE_NEWSLETTER_SUBSCRIPTION_DATA", NewsletterFormData: $('#trv_module_homepage_admin_newsletter_form').serialize() }, function(result) { unblockScreen(); data = JSON.parse(result); if (data.success == 1) { infoDialog("FEHLER","Fehler: Bei der Übermittlung Ihrer Anmeldung ist ein Fehler aufgetreten! Bitte versuchen Sie es noch einmal oder nehmen Sie Kontakt zu unserem Support auf!",null,750,null,null,null,true); } else { infoDialog("Trovarit Newsletter Anmeldung","Ihre Newsletter-Anmeldung wurde erfolgreich gespeichert!",null,750,null,null,null,true); trv_homepage_admin_cancel_newsletter_form(); } } ); } return false; } function trv_homepage_admin_open_guided_tours_anmeldung() { title = 'Anmeldung Guided Tours'; $("body").append(""); $("#trv_module_homepage_admin_guided_tours_anmeldung_box").load("http://cyberkmu.portal.it-matchmaker.com/core/modules/homepage_admin/components/guided_tours_anmeldung.php?full_path=NVlFXzhjbUlsYDx5b3JMaH0zY15zejVrLi9eWVU4cXlnS1tWJXwpLVFbWChQYVoxT29mdmN3en1GW0VDYGVRdjpUTillRX1zbldDT3ZpU0krU2pKaVFJKHVYUjk,&app_language=de").dialog({ close: function(event, ui) { $(this).dialog('destroy'); $("#trv_module_homepage_admin_guided_tours_anmeldung_box").remove(); }, closeOnEscape: true, resizable: false, height: 'auto', minHeight: 350, width: 850, modal: true, bgiframe: true, title: title, position: ['center',60] }); blockScreen(); } function trv_homepage_admin_send_guided_tours_anmeldung_form() { if($('#trv_module_homepage_admin_guided_tours_anmeldung_form').valid()) { $.post( "http://cyberkmu.portal.it-matchmaker.com/core/modules/homepage_admin/ajax/ajax.php?full_path=NVlFXzhjbUlsYDx5b3JMaH0zY15zejVrLi9eWVU4cXlnS1tWJXwpLVFbWChQYVoxT29mdmN3en1GW0VDYGVRdjpUTillRX1zbldDT3ZpU0krU2pKaVFJKHVYUjk,&app_language=de", { ajax_type: "SAVE_GUIDED_TOURS_ANMELDUNG_DATA", GuidedToursFormData: $('#trv_module_homepage_admin_guided_tours_anmeldung_form').serialize() }, function(result) { unblockScreen(); data = JSON.parse(result); if (data.success == 1) { infoDialog("Anmeldung Guided Tours","Ihre Anmeldung wurde erfolgreich abgeschickt!",null,750,null,null,null,true); trv_homepage_admin_cancel_guided_tours_anmeldung_form(); } else { infoDialog("FEHLER","Fehler: Bei der Übermittlung Ihrer Anmeldung ist ein Fehler aufgetreten! Bitte versuchen Sie es noch einmal oder nehmen Sie Kontakt zu unserem Support auf!",null,750,null,null,null,true); } } ); } return false; } function trv_homepage_admin_cancel_guided_tours_anmeldung_form() { $("#trv_module_homepage_admin_guided_tours_anmeldung_box").remove(); } function trv_homepage_admin_open_wordpress_form() { title = 'Anmeldung ERP-Challenge'; $("body").append(""); $("#trv_module_homepage_admin_wordpress_form_box").load("http://cyberkmu.portal.it-matchmaker.com/core/modules/homepage_admin/components/wordpress_form.php?full_path=NVlFXzhjbUlsYDx5b3JMaH0zY15zejVrLi9eWVU4cXlnS1tWJXwpLVFbWChQYVoxT29mdmN3en1GW0VDYGVRdjpUTillRX1zbldDT3ZpU0krU2pKaVFJKHVYUjk,&app_language=de").dialog({ close: function(event, ui) { $(this).dialog('destroy'); $("#trv_module_homepage_admin_wordpress_form_box").remove(); }, closeOnEscape: true, resizable: false, height: 'auto', minHeight: 250, width: 700, modal: true, bgiframe: true, title: title, position: ['center',60] }); blockScreen(); } function trv_homepage_admin_send_wordpress_form() { if($('#trv_module_homepage_admin_wordpress_form').valid()) { $.post( "http://cyberkmu.portal.it-matchmaker.com/core/modules/homepage_admin/ajax/ajax.php?full_path=NVlFXzhjbUlsYDx5b3JMaH0zY15zejVrLi9eWVU4cXlnS1tWJXwpLVFbWChQYVoxT29mdmN3en1GW0VDYGVRdjpUTillRX1zbldDT3ZpU0krU2pKaVFJKHVYUjk,&app_language=de", { ajax_type: "SAVE_WORDPRESS_FORM_DATA", GuidedToursFormData: $('#trv_module_homepage_admin_wordpress_form').serialize() }, function(result) { unblockScreen(); data = JSON.parse(result); if (data.success == 1) { infoDialog("Anmeldung erfolgreich","Vielen Dank für Ihre Anmeldung, Sie erhalten umgehend eine Bestätigungsmail!",null,750,null,null,null,true); trv_homepage_admin_cancel_wordpress_form(); } else { infoDialog("FEHLER","Fehler: Bei der Übermittlung Ihrer Anmeldung ist ein Fehler aufgetreten! Bitte versuchen Sie es noch einmal oder nehmen Sie Kontakt zu unserem Support auf!",null,750,null,null,null,true); } } ); } } function trv_homepage_admin_cancel_wordpress_form() { $("#trv_module_homepage_admin_wordpress_form_box").remove(); } /*! jQuery Timepicker Addon - v1.5.2 - 2015-03-15 * http://trentrichardson.com/examples/timepicker * Copyright (c) 2015 Trent Richardson; Licensed MIT */ (function(e){"function"==typeof define&&define.amd?define(["jquery","jquery.ui"],e):e(jQuery)})(function($){if($.ui.timepicker=$.ui.timepicker||{},!$.ui.timepicker.version){$.extend($.ui,{timepicker:{version:"1.5.2"}});var Timepicker=function(){this.regional=[],this.regional[""]={currentText:"Now",closeText:"Done",amNames:["AM","A"],pmNames:["PM","P"],timeFormat:"HH:mm",timeSuffix:"",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second",millisecText:"Millisecond",microsecText:"Microsecond",timezoneText:"Time Zone",isRTL:!1},this._defaults={showButtonPanel:!0,timeOnly:!1,timeOnlyShowDate:!1,showHour:null,showMinute:null,showSecond:null,showMillisec:null,showMicrosec:null,showTimezone:null,showTime:!0,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,stepMicrosec:1,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,microsecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,microsecMax:999,minDateTime:null,maxDateTime:null,maxTime:null,minTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,microsecGrid:0,alwaysSetTime:!0,separator:" ",altFieldTimeOnly:!0,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,altRedirectFocus:!0,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:!0,timezoneList:null,addSliderAccess:!1,sliderAccessArgs:null,controlType:"slider",oneLine:!1,defaultValue:null,parse:"strict",afterInject:null},$.extend(this._defaults,this.regional[""])};$.extend(Timepicker.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,microsec_slider:null,timezone_select:null,maxTime:null,minTime:null,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,microsecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,microsecMaxOriginal:null,ampm:"",formattedDate:"",formattedTime:"",formattedDateTime:"",timezoneList:null,units:["hour","minute","second","millisec","microsec"],support:{},control:null,setDefaults:function(e){return extendRemove(this._defaults,e||{}),this},_newInst:function($input,opts){var tp_inst=new Timepicker,inlineSettings={},fns={},overrides,i;for(var attrName in this._defaults)if(this._defaults.hasOwnProperty(attrName)){var attrValue=$input.attr("time:"+attrName);if(attrValue)try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}overrides={beforeShow:function(e,t){return $.isFunction(tp_inst._defaults.evnts.beforeShow)?tp_inst._defaults.evnts.beforeShow.call($input[0],e,t,tp_inst):void 0},onChangeMonthYear:function(e,t,i){$.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)&&tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],e,t,i,tp_inst)},onClose:function(e,t){tp_inst.timeDefined===!0&&""!==$input.val()&&tp_inst._updateDateTime(t),$.isFunction(tp_inst._defaults.evnts.onClose)&&tp_inst._defaults.evnts.onClose.call($input[0],e,t,tp_inst)}};for(i in overrides)overrides.hasOwnProperty(i)&&(fns[i]=opts[i]||null);tp_inst._defaults=$.extend({},this._defaults,inlineSettings,opts,overrides,{evnts:fns,timepicker:tp_inst}),tp_inst.amNames=$.map(tp_inst._defaults.amNames,function(e){return e.toUpperCase()}),tp_inst.pmNames=$.map(tp_inst._defaults.pmNames,function(e){return e.toUpperCase()}),tp_inst.support=detectSupport(tp_inst._defaults.timeFormat+(tp_inst._defaults.pickerTimeFormat?tp_inst._defaults.pickerTimeFormat:"")+(tp_inst._defaults.altTimeFormat?tp_inst._defaults.altTimeFormat:"")),"string"==typeof tp_inst._defaults.controlType?("slider"===tp_inst._defaults.controlType&&$.ui.slider===void 0&&(tp_inst._defaults.controlType="select"),tp_inst.control=tp_inst._controls[tp_inst._defaults.controlType]):tp_inst.control=tp_inst._defaults.controlType;var timezoneList=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840];null!==tp_inst._defaults.timezoneList&&(timezoneList=tp_inst._defaults.timezoneList);var tzl=timezoneList.length,tzi=0,tzv=null;if(tzl>0&&"object"!=typeof timezoneList[0])for(;tzl>tzi;tzi++)tzv=timezoneList[tzi],timezoneList[tzi]={value:tzv,label:$.timepicker.timezoneOffsetString(tzv,tp_inst.support.iso8601)};return tp_inst._defaults.timezoneList=timezoneList,tp_inst.timezone=null!==tp_inst._defaults.timezone?$.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone):-1*(new Date).getTimezoneOffset(),tp_inst.hour=tp_inst._defaults.hourtp_inst._defaults.hourMax?tp_inst._defaults.hourMax:tp_inst._defaults.hour,tp_inst.minute=tp_inst._defaults.minutetp_inst._defaults.minuteMax?tp_inst._defaults.minuteMax:tp_inst._defaults.minute,tp_inst.second=tp_inst._defaults.secondtp_inst._defaults.secondMax?tp_inst._defaults.secondMax:tp_inst._defaults.second,tp_inst.millisec=tp_inst._defaults.millisectp_inst._defaults.millisecMax?tp_inst._defaults.millisecMax:tp_inst._defaults.millisec,tp_inst.microsec=tp_inst._defaults.microsectp_inst._defaults.microsecMax?tp_inst._defaults.microsecMax:tp_inst._defaults.microsec,tp_inst.ampm="",tp_inst.$input=$input,tp_inst._defaults.altField&&(tp_inst.$altInput=$(tp_inst._defaults.altField),tp_inst._defaults.altRedirectFocus===!0&&tp_inst.$altInput.css({cursor:"pointer"}).focus(function(){$input.trigger("focus")})),(0===tp_inst._defaults.minDate||0===tp_inst._defaults.minDateTime)&&(tp_inst._defaults.minDate=new Date),(0===tp_inst._defaults.maxDate||0===tp_inst._defaults.maxDateTime)&&(tp_inst._defaults.maxDate=new Date),void 0!==tp_inst._defaults.minDate&&tp_inst._defaults.minDate instanceof Date&&(tp_inst._defaults.minDateTime=new Date(tp_inst._defaults.minDate.getTime())),void 0!==tp_inst._defaults.minDateTime&&tp_inst._defaults.minDateTime instanceof Date&&(tp_inst._defaults.minDate=new Date(tp_inst._defaults.minDateTime.getTime())),void 0!==tp_inst._defaults.maxDate&&tp_inst._defaults.maxDate instanceof Date&&(tp_inst._defaults.maxDateTime=new Date(tp_inst._defaults.maxDate.getTime())),void 0!==tp_inst._defaults.maxDateTime&&tp_inst._defaults.maxDateTime instanceof Date&&(tp_inst._defaults.maxDate=new Date(tp_inst._defaults.maxDateTime.getTime())),tp_inst.$input.bind("focus",function(){tp_inst._onFocus()}),tp_inst},_addTimePicker:function(e){var t=$.trim(this.$altInput&&this._defaults.altFieldTimeOnly?this.$input.val()+" "+this.$altInput.val():this.$input.val());this.timeDefined=this._parseTime(t),this._limitMinMaxDateTime(e,!1),this._injectTimePicker(),this._afterInject()},_parseTime:function(e,t){if(this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),t||!this._defaults.timeOnly){var i=$.datepicker._get(this.inst,"dateFormat");try{var s=parseDateTimeInternal(i,this._defaults.timeFormat,e,$.datepicker._getFormatConfig(this.inst),this._defaults);if(!s.timeObj)return!1;$.extend(this,s.timeObj)}catch(a){return $.timepicker.log("Error parsing the date/time string: "+a+"\ndate/time string = "+e+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+i),!1}return!0}var n=$.datepicker.parseTime(this._defaults.timeFormat,e,this._defaults);return n?($.extend(this,n),!0):!1},_afterInject:function(){var e=this.inst.settings;$.isFunction(e.afterInject)&&e.afterInject.call(this)},_injectTimePicker:function(){var e=this.inst.dpDiv,t=this.inst.settings,i=this,s="",a="",n=null,r={},l={},o=null,c=0,u=0;if(0===e.find("div.ui-timepicker-div").length&&t.showTimepicker){var m=" ui_tpicker_unit_hide",d='
'+'
"+t.timeText+"
"+'
';for(c=0,u=this.units.length;u>c;c++){if(s=this.units[c],a=s.substr(0,1).toUpperCase()+s.substr(1),n=null!==t["show"+a]?t["show"+a]:this.support[s],r[s]=parseInt(t[s+"Max"]-(t[s+"Max"]-t[s+"Min"])%t["step"+a],10),l[s]=0,d+='
'+t[s+"Text"]+"
"+'
',n&&t[s+"Grid"]>0){if(d+='
',"hour"===s)for(var h=t[s+"Min"];r[s]>=h;h+=parseInt(t[s+"Grid"],10)){l[s]++;var p=$.datepicker.formatTime(this.support.ampm?"hht":"HH",{hour:h},t);d+='"}else for(var _=t[s+"Min"];r[s]>=_;_+=parseInt(t[s+"Grid"],10))l[s]++,d+='";d+="
'+p+"'+(10>_?"0":"")+_+"
"}d+="
"}var f=null!==t.showTimezone?t.showTimezone:this.support.timezone;d+='
'+t.timezoneText+"
",d+='
',d+="
";var g=$(d);for(t.timeOnly===!0&&(g.prepend('
'+t.timeOnlyTitle+"
"+"
"),e.find(".ui-datepicker-header, .ui-datepicker-calendar").hide()),c=0,u=i.units.length;u>c;c++)s=i.units[c],a=s.substr(0,1).toUpperCase()+s.substr(1),n=null!==t["show"+a]?t["show"+a]:this.support[s],i[s+"_slider"]=i.control.create(i,g.find(".ui_tpicker_"+s+"_slider"),s,i[s],t[s+"Min"],r[s],t["step"+a]),n&&t[s+"Grid"]>0&&(o=100*l[s]*t[s+"Grid"]/(r[s]-t[s+"Min"]),g.find(".ui_tpicker_"+s+" table").css({width:o+"%",marginLeft:t.isRTL?"0":o/(-2*l[s])+"%",marginRight:t.isRTL?o/(-2*l[s])+"%":"0",borderCollapse:"collapse"}).find("td").click(function(){var e=$(this),t=e.html(),a=parseInt(t.replace(/[^0-9]/g),10),n=t.replace(/[^apm]/gi),r=e.data("for");"hour"===r&&(-1!==n.indexOf("p")&&12>a?a+=12:-1!==n.indexOf("a")&&12===a&&(a=0)),i.control.value(i,i[r+"_slider"],s,a),i._onTimeChange(),i._onSelectHandler()}).css({cursor:"pointer",width:100/l[s]+"%",textAlign:"center",overflow:"hidden"}));if(this.timezone_select=g.find(".ui_tpicker_timezone").append("").find("select"),$.fn.append.apply(this.timezone_select,$.map(t.timezoneList,function(e){return $("