";
if (alternativeButtonText != null)
{
dialogContent = dialogContent.replace("CLOSE", 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( "https://www.it-matchmaker.com/core/ajax/ajax.php?PHPSESSID=c01fdbb7b0e5259c5070d75712b91a5a",
{
type: "CHECK_COOKIES",
app_language: "en",
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( "https://www.it-matchmaker.com/core/ajax/ajax.php?PHPSESSID=c01fdbb7b0e5259c5070d75712b91a5a",
{
type: "CREATE_EXCEL_FROM_TABLE",
page_charset: "utf-8",
app_language: "en",
data: alldata,
savename: savename
},
function(data)
{
unblockScreen();
if (data.length != 32)
{
infoDialog("ERROR", data);
}
else
{
var tempChangedContent = changedContent;
var tempDialogContentChanged = trv_dialogContentChanged;
if (tempChangedContent)
{
contentChanged(false);
}
if (tempDialogContentChanged)
{
dialogContentChanged(false);
}
location.href = "https://www.it-matchmaker.com/core/get_generated_file.php?file="+data;
if (tempChangedContent)
{
contentChanged(true);
}
if (tempDialogContentChanged)
{
dialogContentChanged(true);
}
}
});
}
else
{
infoDialog("ERROR", "The table with this ID does not exist!");
}
}
/**********************************************************************************************/
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().trim();
$('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, false);
}
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, false);
}
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( "https://www.it-matchmaker.com/core/ajax/ajax.php?PHPSESSID=c01fdbb7b0e5259c5070d75712b91a5a",
{
type: "GET_TABLE_TOOLBAR",
page_charset: "utf-8",
app_language: "en",
tableID: tableID,
filename: filename,
disableExcelFilter: disableExcelFilter,
legendeTemplate: legendeContent,
helpLink: helpLink
},
function(html)
{
$('#'+tableID).before(html);
});
}
else
{
infoDialog("ERROR", "The table with this ID does not exist!");
}
}
/**********************************************************************************************/
function addTableExcelFilter(tableID, callbackAfterFilter,callbackAfterFilterToggle)
{
if (($('#'+tableID).length) && !excelFilterExists(tableID))
{
var dialogPositions = "";
$('#'+tableID+'>thead:first th').each(function() {
dialogPositions = dialogPositions + ($(this).is(":visible")?1:0).toString()+";";
});
$.trv_postJson({
url: "https://www.it-matchmaker.com/core/ajax/ajax.php?PHPSESSID=c01fdbb7b0e5259c5070d75712b91a5a",
ajax_type: "ADD_EXCEL_TABLE_FILTER",
disableErrorOnReload: true,
parameter: {
page_charset: "utf-8",
app_language: "en",
appName: "homepage_de",
tableID: tableID,
callbackAfterFilter: callbackAfterFilter,
dialogPositions: dialogPositions.rtrim(";")
},
onSuccess: function(data)
{
$('#'+tableID+'>thead:first').prepend(data.filterContent);
if (callbackAfterFilterToggle != null)
{
eval(callbackAfterFilterToggle);
}
if (data.filterData != "")
{
eval(tableID+"_filter").setJsonFilter(data.filterData);
eval(tableID+"_filter").filterTable();
}
}
});
}
else
{
infoDialog("ERROR", "The table with this ID does not exist!");
}
}
/**********************************************************************************************/
function reinitTablesorter(tableID, tableUpdate = true)
{
if ($("table#"+tableID).length)
{
if (tableUpdate)
{
$("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,
delayInit: true,
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("ERROR", alternativeMessage, null, null, focusErrorClassAfterClose,position);
}
else
{
infoDialog("ERROR","Please fill in all mandatory fields!", null, null, focusErrorClassAfterClose,position);
}
return false;
}
}
else
{
infoDialog("ERROR", "isFormValid(): No form with the id '"+formID+"' found!", 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 'Changes to the data have not been saved yet!';
}
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("CONFIRMATION",disableContentChanged+onYesFunction,"Data has been changed and not been saved!
Continue anyway?",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 addValidatorPositivNumber()
{
jQuery.validator.addMethod("numberPositiv", function(value, element)
{
return this.optional(element) || /^(?:0|[1-9][0-9]*)(?:[,][0-9]+)?$/.test(value);
}, " ");
}
/**********************************************************************************************/
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;
}
}, " ");
}
/**********************************************************************************************/
// this function Valitate a phone number. The right form must be +länderkennung(max 3 zahlen) (vorwahl(max 5 zahlen))nummer
function addValidatorPhoneNumber()
{
jQuery.validator.addMethod("phoneNumber", function(value, element)
{
if (value != '' )
{
var regPhone = new RegExp(/^\+[\d]{1,3} [\d (]{2,6}[)][\d]+$/);
if (value.match(regPhone) == null)
{
return false;
}
return true;
}
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 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, false);
}
eval(tableID+"_filter = null");
$("div.trovarit_excel_filter_dialog").dialog('close');
$('table#'+tableID+'>thead>tr:first').remove();
}
}
/**********************************************************************************************/
function removeExcelFilterData(tableID)
{
$.post( "https://www.it-matchmaker.com/core/ajax/ajax.php?PHPSESSID=c01fdbb7b0e5259c5070d75712b91a5a",
{
type: "REMOVE_EXCEL_TABLE_FILTER_DATA",
app_language: "en",
appName: "homepage_de",
tableID: tableID
});
}
/**********************************************************************************************/
function saveExcelFilterData(tableID,filterData)
{
$.post( "https://www.it-matchmaker.com/core/ajax/ajax.php?PHPSESSID=c01fdbb7b0e5259c5070d75712b91a5a",
{
type: "SAVE_EXCEL_TABLE_FILTER_DATA",
page_charset: "utf-8",
app_language: "en",
appName: "homepage_de",
tableID: tableID,
filterData: filterData
});
}
/**********************************************************************************************/
function setExcelFilterVisible(tableID, filterVisible)
{
$.post( "https://www.it-matchmaker.com/core/ajax/ajax.php?PHPSESSID=c01fdbb7b0e5259c5070d75712b91a5a",
{
type: "SET_EXCEL_TABLE_FILTER_VISIBLE",
page_charset: "utf-8",
app_language: "en",
appName: "homepage_de",
tableID: tableID,
filterVisible: filterVisible
});
}
/**********************************************************************************************/
function getExcelFilterVisible(tableID,callbackAfterFilter,callbackAfterFilterToggle)
{
$.post( "https://www.it-matchmaker.com/core/ajax/ajax.php?PHPSESSID=c01fdbb7b0e5259c5070d75712b91a5a",
{
type: "GET_EXCEL_TABLE_FILTER_VISIBLE",
page_charset: "utf-8",
app_language: "en",
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( "https://www.it-matchmaker.com/core/ajax/ajax.php?PHPSESSID=c01fdbb7b0e5259c5070d75712b91a5a",
{
type: "GET_EXCEL_FILTER_DIALOG",
page_charset: "utf-8",
app_language: "en",
tableID: tableID,
position: position,
possibleFilter: JSON.stringify(this.getAllFilterData(element,position))
},
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 = 330;
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: 300,
width: 370,
minWidth: 300,
dialogClass: 'trovarit_filter_dialog',
position: [Math.round(dialogLeft),Math.round(posElement.offset().top+posElement.innerHeight()-pageOffsetTop)+3],
bgiframe: true,
modal: false,
buttons: { "Del.": function() { $("#trovarit_excel_filter_select input:checked").removeAttr("checked");eval(tableID+"_filter").setFilter(position);$(this).dialog('close');},"Cancel": 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 filterData = {};
var table = $(element).parents(".trovarit_sort_table");
$("tbody tr td:nth-child("+position+")",table).each(function()
{
var rowText = getTableCellText(this);
var isVisible = $(this).is(":visible");
var rowData = {};
if (rowText instanceof Array)
{
for( var k=0; k < rowText.length; k++ )
{
rowText[k]=rowText[k].replace(/(\r\n|\n|\r)/gm,"").trim();
if (filterData[rowText[k]] == null)
{
filterData[rowText[k]] = {"isVisible": isVisible};
}
else if (isVisible)
{
filterData[rowText[k]].isVisible = true;
}
}
}
else
{
rowText=rowText.replace(/(\r\n|\n|\r)/gm,"").trim();
if (filterData[rowText] == null)
{
filterData[rowText] = {"isVisible": isVisible};
}
else if (isVisible)
{
filterData[rowText].isVisible = true;
}
}
});
return filterData;
}
/**********************************************************************************************/
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)+" .trv_core_header_lable").text(value.length);
$('#'+tableID+' thead .trv_excel_filter-'+(col-1)+" .trv_core_excel_filter_delete_header").show();
}
else
{
$('#'+tableID+' thead .trv_excel_filter-'+(col-1)).removeClass("trovarit_table_excel_filter_active");
$('#'+tableID+' thead .trv_excel_filter-'+(col-1)+" .trv_core_header_lable").text("");
$('#'+tableID+' thead .trv_excel_filter-'+(col-1)+" .trv_core_excel_filter_delete_header").hide();
}
});
}
else
{
$('#'+tableID+' thead .trovarit_table_excel_filter').removeClass("trovarit_table_excel_filter_active");
$('#'+tableID+' thead .trovarit_table_excel_filter .trv_core_header_lable').text("");
$('#'+tableID+' thead .trovarit_table_excel_filter .trv_core_excel_filter_delete_header').hide();
}
}
/**********************************************************************************************/
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(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, false);
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){
var theList = [];
if (meta[3].indexOf("','") !== -1)
{
theList = meta[3].substring(1, meta[3].length-1).split("','");
}
else
{
theList.push(meta[3]);
}
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('
Printed on: Number of entries:
');
}
$('#'+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:['https://www.it-matchmaker.com/core/styles/table_print.css',
{href:'https://www.it-matchmaker.com/core/styles/table_print.css',media:'print'},
'https://www.it-matchmaker.com/core/modules/bar_chart/styles/bar_chart_print.css',
{href:'https://www.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, enableFullScreen)
{
var tablePlugin = "";
var tableToolbar = "";
var userNameAndDatePlugin = "";
var userNameAndDateToolbar = "";
var serialLetterVariablesPlugin = "";
var serialLetterVariablesToolbar = "";
var fullscreenPlugin = "";
var fullscreenToolbar = "";
if (selector == null)
{
selector = "textarea";
}
if(readonly_status == null)
{
readonly_status = false;
}
if(showTableEdit == null)
{
showTableEdit = false;
}
if(showAddUserNameAndDate == null)
{
showAddUserNameAndDate = false;
}
if(enableFullScreen == null)
{
enableFullScreen = false;
}
if (showTableEdit)
{
tablePlugin = " table";
tableToolbar = " | table";
}
if (showAddUserNameAndDate)
{
userNameAndDatePlugin = "user_and_date ";
userNameAndDateToolbar = "user_and_date_on_top user_and_date_cursor | ";
}
if (showSerialLetterVariables != null)
{
serialLetterVariablesPlugin = " serial_letter_variables ";
serialLetterVariablesToolbar = " | serial_letter_variables ";
}
if (enableFullScreen)
{
fullscreenPlugin = " fullscreen ";
fullscreenToolbar = " | fullscreen";
}
tinymce.baseURL = "https://www.it-matchmaker.com/core/jscripts/tinymce/";
tinymce.suffix = '.min';
tinymce.init({
readonly: readonly_status,
selector: selector,
skin_url: 'https://www.it-matchmaker.com/core/jscripts/tinymce/skins/lightgray',
entity_encoding : "raw",
elementpath: false,
resize:true,
branding: false,
content_css: 'https://www.it-matchmaker.com/core/styles/tinymce_content_fix.css',
menubar : false,
plugins: [
userNameAndDatePlugin+"advlist autolink lists charmap hr searchreplace wordcount visualblocks visualchars code textcolor paste preview noneditable link"+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 | link"+tableToolbar+serialLetterVariablesToolbar+fullscreenToolbar,
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_getPossibleSerialLetterVars()
{
//JB 14.08.2018: 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)
{
var isNegativNummer = false;
if (nummer < 0)
{
isNegativNummer = true;
nummer = nummer * (-1);
}
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 (isNegativNummer?"-":"")+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 = "NVlFXzhjbUlsYDx5b3JMaH1gI19ZP2g2OVhyJDNVWzQhYiw0NTtpS243eiFCeE15Q11eW3I4PyNmak9YPXVqcA,,";
var logAjaxError = function (url,parameter,errorStatus,errorStatusText,errorResponseText,requestStatusText)
{
var errorData = new Object();
errorData["errorStatus"] = errorStatus;
errorData["errorStatusText"] = errorStatusText;
errorData["errorResponseText"] = errorResponseText;
errorData["requestStatusText"] = requestStatusText;
$.post( "https://www.it-matchmaker.com/core/ajax/ajax.php?PHPSESSID=c01fdbb7b0e5259c5070d75712b91a5a",{
ajax_type: "LOG_AJAX_ERROR",
full_path: fullPath,
url: url,
parameter: $.toJSON(parameter),
error: $.toJSON(errorData)
});
}
var toggleSaveInfo = function(actionType)
{
if (settings.showSavingInfoIn != null)
{
trv_toggleSaveInfo($(settings.showSavingInfoIn),actionType,settings.alternativeSavingInfoText);
}
}
var settings = $.extend({
disableErrorOnReload: false,
errorDailogPosition: "top",
errorDailogWidth: 950,
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 = "/ajax/"+settings.ajaxFile+"?PHPSESSID=c01fdbb7b0e5259c5070d75712b91a5a";
}
else
{
settings.url = "https://www.it-matchmaker.com/core/modules/"+settings.module_name+"/ajax/"+settings.ajaxFile+"?app_language=en&PHPSESSID=c01fdbb7b0e5259c5070d75712b91a5a";
}
}
var internalErrorText = "INTERNAL ERROR: Perhaps your Internet connection has been interrupted?
Please try to repeat your action ...
";
$.post( settings.url,
settings.parameter,
function(data, status, xhr)
{
if (status == "success")
{
toggleSaveInfo("hide");
if (data === null || (!isNaN(parseFloat(data)) && typeof(data) !== 'object'))
{
settings.onErrorFirst.call(this,xhr);
unblockScreen();
infoDialog("ERROR",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 = "ERROR";
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("ERROR",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("ERROR",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 = "NVlFXzhjbUlsYDx5b3JMaH1gI19ZP2g2OVhyJDNVWzQhYiw0NTtpS243eiFCeE15Q11eW3I4PyNmak9YPXVqcA,,";
var logLoadError = function (url,errorStatus,errorStatusText,errorResponseText,requestStatusText)
{
var errorData = new Object();
errorData["errorStatus"] = errorStatus;
errorData["errorStatusText"] = errorStatusText;
errorData["errorResponseText"] = errorResponseText;
errorData["requestStatusText"] = requestStatusText;
$.post( "https://www.it-matchmaker.com/core/ajax/ajax.php?PHPSESSID=c01fdbb7b0e5259c5070d75712b91a5a",{
ajax_type: "LOG_LOAD_ERROR",
full_path: fullPath,
url: url,
error: $.toJSON(errorData)
});
}
var settings = $.extend({
disableErrorOnReload: false,
errorDailogPosition: "top",
errorDailogWidth: 750,
errorDailogCenterText: false,
blockScreen: true,
div_id: null,
path: null
}, options );
var internalErrorText = "INTERNAL ERROR: Perhaps your Internet connection has been interrupted?
Please try to repeat your action ...
";
$("#"+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("ERROR",responseText,null,null,null,null,null,null);
logLoadError('https://www.it-matchmaker.com',xhr.status,xhr.statusText,responseText,"Something is wrong in "+settings.div_id, 'NVlFXzhjbUlsYDx5b3JMaH1gI19ZP2g2OVhyJDNVWzQhYiw0NTtpS243eiFCeE15Q11eW3I4PyNmak9YPXVqcA,,');
$("#"+settings.div_id).remove();
}
}
);
return this;
};
$.fn.trv_tinyMCE_isLengthValid = function(showInvalidInfo)
{
var invalidText = "At least one text input exceeds the allowed length or is a mandatory field and must contain an entry.