');}catch(e){/*nojqery*/ return true;}
if (typeof updateurl === 'undefined') { updateurl = './ajax/checkncacheNewMessage.php';}
$('#messagetext').val('');
$('.autosaveinfo,#autosaveinfo,#autosave_info,.autosave_info').remove();
data = {"clear":1,"thread":t,"forum":f};
$.ajax({url : updateurl ,processData: true,contentType: "application/x-www-form-urlencoded; charset:utf-8",data: data,dataType:'json',type : "POST",
success: function(res){if(res.cleared){/*done*/}}
});
$('#messagetext').focus();
}
function clearPNAutosave(){
try{$('
');}catch(e){/*nojqery*/ return true;}
if (typeof updateurl === 'undefined') { updateurl = './ajax/checkncacheNewMessage.php';}
$('#messagetext').val('');
$('.autosaveinfo,#autosaveinfo,#autosave_info,.autosave_info').remove();
var recs = [];
var temprecs =$(document.forms.sendmail).find('input[name="name[]"]');
$.each(temprecs,function(){
var curval = $(this).val();
if(curval && curval.length){recs.push(curval)}
});
if(!recs.length){recs=0;}
data = {"clear":1,"thread":recs,"forum":"pn"};
$.ajax({url : updateurl ,processData: true,contentType: "application/x-www-form-urlencoded; charset:utf-8",data: data,dataType:'json',type : "POST",
success: function(res){if(res.cleared){/*done*/}}
});
$('#messagetext').focus();
}
var WindowWidth = 0;
var WindowHeight = 0;
var OffsetX = 0;
var OffsetY = 0;
var dimSet = 0;
var modalContParent = 0;
var modalContElement = 0;
var scrollTopOffset = 0;
function doForumModal(id,header,mwidth){
if(!dimSet) setForumDimensions();
mwidth = mwidth ? mwidth : (WindowWidth/2);
mwidth = parseInt(mwidth);
modalDiv = document.createElement('div');
modalDiv.className = 'modalDivContainer content panel box';
modalDiv.id = 'modalDivContainer';
modalDiv.style.position = 'absolute';
modalDiv.style.top = 0;
modalDiv.style.left = 0;
modalDiv.style.width = (WindowWidth + OffsetX)+"px";
modalDiv.style.height = (WindowHeight + OffsetY)+"px";
modalDiv.style.filter = 'Alpha(opacity=50)';
modalDiv.style.opacity = 0.5;
modalDiv.style.zIndex = 55555;
modalDiv.style.background = '#000000';
modalDiv.onclick = function() {closeForumModal()};
contentdiv = document.createElement('div');
contentdiv.className = 'modalDivContainer content panel box';
contentdiv.id = 'modalDivContent';
contentdiv.style.position='absolute';
//contentdiv.style.top = parseInt(OffsetY + (WindowHeight / 2.8))+"px";
contentdiv.style.top = "100px";
contentdiv.style.left = parseInt((WindowWidth/2) - (mwidth/2))+"px";
contentdiv.style.width = mwidth ? mwidth + 'px' : "500px";
contentdiv.style.height = 'auto';
contentdiv.style.background = '#ffffff';
contentdiv.style.border = '3px solid #3579A1';
contentdiv.style.zIndex = 55556;
contentdiv.style.margin = "0px";
contentdiv.style.padding = "0px";
if(header){
contentheaderdiv = document.createElement('div');
contentheaderdiv .className = 'modalDivHeader boxheader';
contentheaderdiv.innerHTML = '
X';
}
contentcontentdiv= document.createElement('div');
contentcontentdiv.className = 'modalDivContent boxcontent c_r_content2 panel tms1';
contentcontentdiv.style.marginBottom = "0px";
var innercontent = document.getElementById(id);
modalContParent = innercontent.parentNode;
modalContElement = innercontent;
innercontent .style.display = 'block';
contentcontentdiv.appendChild(innercontent );
if(header){contentdiv.appendChild(contentheaderdiv);}
contentdiv.appendChild(contentcontentdiv);
xaddClass(document.body,"stop_scrolling");
document.body.appendChild(modalDiv);
document.body.appendChild(contentdiv);
}
function closeForumModal(){
xremoveClass(document.body,"stop_scrolling");
try{if(scrollTopOffset > 0){window.scrollBy(0,scrollTopOffset );}}catch(e){}
modalContElement.style.display = 'none';
modalContParent.appendChild(modalContElement)
document.getElementById('modalDivContent').parentNode.removeChild(document.getElementById('modalDivContent'));
document.getElementById('modalDivContainer').parentNode.removeChild(document.getElementById('modalDivContainer'));
}
function setForumDimensions(){
if(typeof(window.innerWidth) == 'number'){
//Non-IE
WindowWidth = window.innerWidth ;
WindowHeight = window.innerHeight;
OffsetX = window.pageXOffset;
OffsetY = window.pageYOffset;
}
else if(document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight )){
//IE 6+ in standard compliant mode
WindowWidth = document.documentElement.clientWidth;
WindowHeight = document.documentElement.clientHeight;
OffetX = document.body.scrollLeft ;
OffsetY = document.body.scrollTop;
}
else if(document.body && ( document.body.clientWidth || document.body.clientHeight )){
//IE 4 compatible
WindowWidth = document.body.clientWidth;
WindowHeight = document.body.clientHeight;
OffetX = document.body.scrollLeft ;
OffsetY = document.body.scrollTop;
}
scrollTopOffset = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop;
dimSet = 1;
}
function xhasClass(ele,cls) {
return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
}
function xaddClass(ele,cls) {
if (!this.xhasClass(ele,cls)) ele.className += " "+cls;
}
function xremoveClass(ele,cls) {
if (xhasClass(ele,cls)) {
var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
ele.className=ele.className.replace(reg,' ');
}
}
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function(obj, start) {
for (var i = (start || 0), j = this.length; i < j; i++) {
if (this[i] === obj) { return i; }
}
return -1;
}
}
function warningModal(targetid,targettype){
document.getElementById("hidden_targetid").value = targetid;
document.getElementById("hidden_targettype").value = targettype;
doForumModal("warnmodal","");
//prüfen, ob treshold erreicht wird:
try{
document.getElementById("warnmodal").className = "";
if(document.getElementById("warn_treshold_"+targetid)){
document.getElementById("warnmodal").className = "treshold";
}
}
catch(e){console.log(e);}
}
function undoWarning(targetid,ttype,iid){
if(!unwarnurl){var unwarnurl = "/ajax/handler.php?method=unwarn";}
var param_string = "target_id="+targetid+"&target_type="+ttype+'&integration_id='+iid;
warning_request = hpm_createHttpRequestObject();
warning_request.open("POST",unwarnurl,true);
warning_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
warning_request.setRequestHeader("Content-length", param_string.length);
warning_request.setRequestHeader("Connection", "close");
warning_request.onreadystatechange=warningdone;
warning_request.send(param_string);
}
function undoWarningById(id){
if(!unwarnurl){var unwarnurl = "/ajax/handler.php?method=unwarn";}
var param_string = "id="+id;
warning_request = hpm_createHttpRequestObject();
warning_request.open("POST",unwarnurl,true);
warning_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
warning_request.setRequestHeader("Content-length", param_string.length);
warning_request.setRequestHeader("Connection", "close");
warning_request.onreadystatechange=warningdone;
warning_request.send(param_string);
}
var warningactive = false;
function doWarning(){
if(warningactive) return false;
warningactive = true;
var targetid = document.getElementById("hidden_targetid").value;
var ttype = document.getElementById("hidden_targettype").value;
var selVal = document.getElementById("warntype_select").selectedIndex;
var warntype = document.getElementById("warntype_select").options[selVal].value;
var doPn = document.getElementById("dopn").value;
var custPn = document.getElementById("custpn").value;
if(!warnurl){var warnurl = "/ajax/handler.php?method=warning";}
var param_string = "target_id="+targetid+"&target_type="+ttype+"&warning_type="+warntype+"&dopn="+doPn ;
var custwarning = false;
if(warntype== "custom"){
custwarning = document.getElementById("custwarning").value;
if(custwarning == ""){try{document.getElementById("custwarning_error").style.display='block'; return true;}catch(e){}}
custwarning = escape(xconvert2entity(custwarning ));
param_string = param_string + "&warning_string=" + custwarning;
}
var pnText = "";
var skipescape = 0;
if(custPn){pnText = document.getElementById("custpntext").innerHTML;}
else{
if(custwarning){pnText = custwarning; skipescape = 1;}
else{pnText = document.getElementById("warnoptdesc_"+warntype).innerHTML; }
}
if(!skipescape){pnText = escape(xconvert2entity(pnText));}
param_string = param_string + "&pn_string=" + pnText;
warning_request = hpm_createHttpRequestObject();
warning_request.open("POST",warnurl,true);
warning_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
warning_request.setRequestHeader("Content-length", param_string.length);
warning_request.setRequestHeader("Connection", "close");
warning_request.onreadystatechange=warningdone;
warning_request.send(param_string);
}
function warningdone(){
if(warning_request.readyState == 4){
try{rdata=JSON.parse(warning_request.responseText);}
catch(e){try{console.log("Error: "+ e + " Response was:"+ warning_request.responseText)}catch(e){}}
if(rdata.done){location.reload();}
else{
warningactive = false;
if(rdata.errormsg){
if(rdata.errormsg == "notactive"){alert("{[notactive]}")}
if(rdata.errormsg == "norights"){alert("{[norights]}")}
if(rdata.errormsg == "notfound"){alert("{[notfound]}")}
// alert(rdata.errormsg);
}}
}
}
var trackingurl = '/ajax/handler.php?method=hitcounter';
function xtrack(track_what,tracking_id){
var cururl = trackingurl + "&what=" + track_what + "&whatid=" + tracking_id;
var param_string = "";
warning_request = hpm_createHttpRequestObject();
warning_request.open("GET",cururl ,true);
warning_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
warning_request.setRequestHeader("Content-length", param_string.length);
warning_request.setRequestHeader("Connection", "close");
warning_request.send();
return true;
}
function makeFeedEntry(){
var formstring = "
Neuen Eintrag erstellen
";
$entryform = $(formstring);
$entryform.appendTo('body');
doForumModal('newfeedentry');
}
function addFeedEntry(entry){
$.ajax({
type: "POST",
url: '/ajax/handler.php?method=addFeedEntry',
data: {'entry':entry},
success: function(result){
location.reload();
}
});
}
function removeFeedEntry(actionid,entryid){
if(!confirm("{[confirm_delete_generic]}")){return false;}
var querystring = "&actionid="+actionid;
$('#'+actionid).remove();
if(typeof document.selection != 'undefined'){querystring += "&entryid=" + entryid;}
$.ajax({
type: "GET",
url: '/ajax/contentHandler.php?action=del&ctype=70' + querystring,
success: function(result){
}
});
}
function isInt(value) {
return !isNaN(parseInt(value,10)) && (parseFloat(value,10) == parseInt(value,10));
}
function createForumActionInfoBox(){
var $skel = $('
');
$('
').appendTo($skel);
$skel.appendTo("body");
return $skel;
}
var generalNotifierTimer;
function xGeneralNotifier(text,header,hideafter){
try{clearTimeout(generalNotifierTimer);}catch(e){/*No timer*/}
if(!$('#forumActionInfo').length){$noteBox = createForumActionInfoBox();}
else{$noteBox = $('#forumActionInfo');}
if(header){text = header+"
"+text;}
$noteBox.find('#forumActionInfoCont').html(text);
var boxwidth = (478+80);
var boxleft = (parseInt($(window).width()) - boxwidth) /2;
$noteBox.css('left',boxleft+"px");
$('#forumActionInfo').fadeTo('slow', 1);
if(hideafter){
generalNotifierTimer= setTimeout("$('#forumActionInfo').fadeTo('slow', 0, function(){$('#forumActionInfo').hide();});",(hideafter*1000));
}
}
function xaddslashes(str) {
return (str + '')
.replace(/[\\"']/g, '\\$&')
.replace(/\u0000/g, '\\0');
}
/*add the indexOf-Method for IE */
if(!Array.indexOf){
Array.prototype.indexOf = function(obj){
for(var i=0; i
'+
''+
'
Dieser Hinweis wird nur für Administratoren angezeigt
';
$(infodiv).insertBefore($(el)); $(el).remove();
}
function makePwVisibleHelper($input){
$input.on('keypress',function(){
if($(this).val() == ""){
$('#passwordunhider').remove();
$(this).prop('type', 'password');
}else if(! $('#passwordunhider').length){
let unhider = $('
');
unhider.insertAfter($(this));
$(this).insertBefore('#passwordunhider');
$(this).focus();
$("#passwordunhider a").on('click', function(event) {
let curpwinput = $(this).closest('#input-group-cont').find('input');
let curpwinputicon = $(this).closest('#input-group-cont').find('i.fa');
event.preventDefault();
if(curpwinput.prop("type") == "text"){
curpwinput.prop('type', 'password');
curpwinputicon.addClass( "fa-eye-slash" );
curpwinputicon.removeClass( "fa-eye" );
}else if(curpwinput.prop("type") == "password"){
curpwinput.prop('type', 'text');
curpwinputicon.removeClass( "fa-eye-slash" );
curpwinputicon.addClass( "fa-eye" );
}
});
}
});
}