var gridTableOffset = 52; var querystring = location.search.replace('?', '').split('&'); var queryObj = {}; for (var i = 0; i < querystring.length; i++) { var name = querystring[i].split('=')[0]; var value = querystring[i].split('=')[1]; queryObj[name] = value; } $.ajaxSetup({ cache: false }); $(document).keypress(function (e) { var code = (e.keyCode ? e.keyCode : e.which); if (code == 13) { portalSearch(); } }); function headerContainerHeight() { return $('div.headerContainer').height(); } function bannerHeight() { return $('#banner').height(); } function footerHeight() { return $('div.row.footer').height() + 8; } function contentHeight() { var wh = $(window).height(); var hch = headerContainerHeight(); var bh = bannerHeight(); var fh = footerHeight(); return wh - hch - bh - fh; } function gridTableHeight() { return contentHeight() - gridTableOffset; } function resizeGrid() { var tHeight = contentHeight(); $('#container').height(tHeight); } function oT(node, windowname, params) { var scope = node.getAttribute("sc"); var uri = node.getAttribute("uri"); var target = node.getAttribute("uritarget"); uri = '/portal/documents/?sc=' + scope + '&uri=' + encodeURIComponent(uri) + '&cid=' + queryObj["cid"] + '&did=' + queryObj["did"]; if (target != null && target == '_top') { top.document.location.replace(uri); } else { if (params == undefined) { window.open(uri, windowname); } else { window.open(uri, windowname, params); } } } function oT2(node) { var scope = node.getAttribute("sc"); var uri = node.getAttribute("uri"); var target = node.getAttribute("uritarget"); uri = '/portal/documents/?sc=' + scope + '&uri=' + encodeURIComponent(uri) + '&cid=' + queryObj["cid"] + '&did=' + queryObj["did"]; if (target != null && target == '_top') { top.document.location.replace(uri); } else { var link = document.createElement('a'); link.setAttribute("type", "hidden"); link.setAttribute("target", "_blank"); link.href = uri; document.body.appendChild(link); link.click(); setTimeout(function(){document.body.removeChild(link);},1000); } } function reversedOL() { if (!('reversed' in document.createElement('ol'))) { (function () { var myLists = $('ol[reversed]'), currCount = null, currChildren = null, val; myLists.each(function () { // check the existence of the start attribute if ($(this).attr('start')) { // if it exists, convert it to an integer; also ensures even decimal values work currCount = parseInt($(this).attr('start'), 10); // If it wasn't a number, it will return 'NaN'; if so, use the number of list items instead if (isNaN(currCount)) { currCount = $(this).children().length; } // do this if the start attribute is not present // the first number is derived from the number of list items } else { currCount = $(this).children().length; } // grab all the child list items currChildren = $(this).children(); // go through each list item, adding the 'value' attribute plus currCount number // then subract one from currCount so we're ready for the next one currChildren.each(function () { val = $(this).attr('value'); // here we check if a value attribute is set in the html // and we change the count accordingly if (val && !isNaN(val)) { $(this).attr('value', val); currCount = val; } $(this).attr('value', currCount); currCount = currCount - 1; }); }); }()); } } function portalSearch() { if ($('#pSearch').val() != '') { $('#portalSearch').attr("action", '/portal/members/search.aspx'); $('#portalSearch').submit(); } try { if ($('#searchValue').val() != '') { submitForm(); } } catch (e) { } } setTimeout('blendIn()', 800) function blendIn() { var id = $('#XAUTH').attr('n'); if (id != '' && id != undefined) { $('li[xAcc="' + id + '"]').each(function (index) { $(this).show(); }); } else { setTimeout('blendIn()', 800); } } /* Begin Direct-Link Anzeige */ function initDirectLink() { if ($("#dldialog").length > 0) { $('.infLnk').each(function () { $(this).addClass("ui-icon"); $(this).addClass("ui-icon-triangle-1-ne"); $(this).click(function () { var sc = $(this.nextSibling).attr('sc'); var uri = $(this.nextSibling).attr('uri'); var lnk = window.location.protocol + "//" + window.location.host + '/portal/documents/?sc=' + sc + '&uri=' + uri; var txt = $(this.nextSibling).text(); $(".lnkLink").text(lnk); $(".lnkName").text(txt); $("#dldialog").dialog({ maxWidth: $('#container').width(), width: ($('#container').width() * 0.8), modal: true }); return false; }); }); } } /* End Direct-Link Anzeige */ /* Begin Search */ function printSearchResult() { $('#searchresult').printElement({ pageTitle: 'IGR Suchergebnisse', printMode: 'popup', printBodyOptions: { styleToAdd: 'padding:10px;margin:10px;', classNameToAdd: '' }, overrideElementCSS: [ { href: '/portal/stylesheets/foundation.css', media: 'all' }, { href: '/portal/stylesheets/ui.jqgrid.css', media: 'all' }, { href: '/portal/stylesheets/smoothness/jquery-ui-1.10.0.custom.min.css', media: 'all' }, { href: '/portal/stylesheets/application/dqe.css', media: 'all' }, { href: '/portal/stylesheets/application/print.css', media: 'all' }] }); } function printSearchDetails() { $('#dWrapper').printElement({ pageTitle: 'IGR Suchergebnis', printMode: 'popup', printBodyOptions: { styleToAdd: 'padding:10px;margin:10px;', classNameToAdd: '' }, overrideElementCSS: [ { href: '/portal/stylesheets/foundation.css', media: 'all' }, { href: '/portal/stylesheets/ui.jqgrid.css', media: 'all' }, { href: '/portal/stylesheets/smoothness/jquery-ui-1.10.0.custom.min.css', media: 'all' }, { href: '/portal/stylesheets/application/dqe.css', media: 'all' }, { href: '/portal/stylesheets/application/print.css', media: 'all' }] }); } /* End Search */ /* Begin Cookies */ function createCookie(name, value, days) { var expires; if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); expires = "; expires=" + date.toGMTString(); } else { expires = ""; } document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) + expires + "; path=/"; } function readCookie(name) { var nameEQ = encodeURIComponent(name) + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) === ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) === 0) return decodeURIComponent(c.substring(nameEQ.length, c.length)); } return null; } function eraseCookie(name) { createCookie(name, "", -1); } /* End Cookies */ (function (window) { { var unknown = '-'; // screen var screenSize = ''; if (screen.width) { width = (screen.width) ? screen.width : ''; height = (screen.height) ? screen.height : ''; screenSize += '' + width + " x " + height; } //browser var nVer = navigator.appVersion; var nAgt = navigator.userAgent; var browser = navigator.appName; var version = '' + parseFloat(navigator.appVersion); var majorVersion = parseInt(navigator.appVersion, 10); var nameOffset, verOffset, ix; // Opera if ((verOffset = nAgt.indexOf('Opera')) != -1) { browser = 'Opera'; version = nAgt.substring(verOffset + 6); if ((verOffset = nAgt.indexOf('Version')) != -1) { version = nAgt.substring(verOffset + 8); } } // MSIE else if ((verOffset = nAgt.indexOf('MSIE')) != -1) { browser = 'Microsoft Internet Explorer'; version = nAgt.substring(verOffset + 5); } // Chrome else if ((verOffset = nAgt.indexOf('Chrome')) != -1) { browser = 'Chrome'; version = nAgt.substring(verOffset + 7); } // Safari else if ((verOffset = nAgt.indexOf('Safari')) != -1) { browser = 'Safari'; version = nAgt.substring(verOffset + 7); if ((verOffset = nAgt.indexOf('Version')) != -1) { version = nAgt.substring(verOffset + 8); } } // Firefox else if ((verOffset = nAgt.indexOf('Firefox')) != -1) { browser = 'Firefox'; version = nAgt.substring(verOffset + 8); } // MSIE 11+ else if (nAgt.indexOf('Trident/') != -1) { browser = 'Microsoft Internet Explorer'; version = nAgt.substring(nAgt.indexOf('rv:') + 3); } // Other browsers else if ((nameOffset = nAgt.lastIndexOf(' ') + 1) < (verOffset = nAgt.lastIndexOf('/'))) { browser = nAgt.substring(nameOffset, verOffset); version = nAgt.substring(verOffset + 1); if (browser.toLowerCase() == browser.toUpperCase()) { browser = navigator.appName; } } // trim the version string if ((ix = version.indexOf(';')) != -1) version = version.substring(0, ix); if ((ix = version.indexOf(' ')) != -1) version = version.substring(0, ix); if ((ix = version.indexOf(')')) != -1) version = version.substring(0, ix); majorVersion = parseInt('' + version, 10); if (isNaN(majorVersion)) { version = '' + parseFloat(navigator.appVersion); majorVersion = parseInt(navigator.appVersion, 10); } // mobile version var mobile = /Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(nVer); // cookie var cookieEnabled = (navigator.cookieEnabled) ? true : false; if (typeof navigator.cookieEnabled == 'undefined' && !cookieEnabled) { document.cookie = 'testcookie'; cookieEnabled = (document.cookie.indexOf('testcookie') != -1) ? true : false; } // system var os = unknown; var clientStrings = [ { s: 'Windows 3.11', r: /Win16/ }, { s: 'Windows 95', r: /(Windows 95|Win95|Windows_95)/ }, { s: 'Windows ME', r: /(Win 9x 4.90|Windows ME)/ }, { s: 'Windows 98', r: /(Windows 98|Win98)/ }, { s: 'Windows CE', r: /Windows CE/ }, { s: 'Windows 2000', r: /(Windows NT 5.0|Windows 2000)/ }, { s: 'Windows XP', r: /(Windows NT 5.1|Windows XP)/ }, { s: 'Windows Server 2003', r: /Windows NT 5.2/ }, { s: 'Windows Vista', r: /Windows NT 6.0/ }, { s: 'Windows 7', r: /(Windows 7|Windows NT 6.1)/ }, { s: 'Windows 8.1', r: /(Windows 8.1|Windows NT 6.3)/ }, { s: 'Windows 8', r: /(Windows 8|Windows NT 6.2)/ }, { s: 'Windows NT 4.0', r: /(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/ }, { s: 'Windows ME', r: /Windows ME/ }, { s: 'Android', r: /Android/ }, { s: 'Open BSD', r: /OpenBSD/ }, { s: 'Sun OS', r: /SunOS/ }, { s: 'Linux', r: /(Linux|X11)/ }, { s: 'iOS', r: /(iPhone|iPad|iPod)/ }, { s: 'Mac OS X', r: /Mac OS X/ }, { s: 'Mac OS', r: /(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/ }, { s: 'QNX', r: /QNX/ }, { s: 'UNIX', r: /UNIX/ }, { s: 'BeOS', r: /BeOS/ }, { s: 'OS/2', r: /OS\/2/ }, { s: 'Search Bot', r: /(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/ } ]; for (var id in clientStrings) { var cs = clientStrings[id]; if (cs.r.test(nAgt)) { os = cs.s; break; } } var osVersion = unknown; if (/Windows/.test(os)) { osVersion = /Windows (.*)/.exec(os)[1]; os = 'Windows'; } switch (os) { case 'Mac OS X': osVersion = /Mac OS X (10[\.\_\d]+)/.exec(nAgt)[1]; break; case 'Android': osVersion = /Android ([\.\_\d]+)/.exec(nAgt)[1]; break; case 'iOS': osVersion = /OS (\d+)_(\d+)_?(\d+)?/.exec(nVer); osVersion = osVersion[1] + '.' + osVersion[2] + '.' + (osVersion[3] | 0); break; } // flash (you'll need to include swfobject) /* script src="//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js" */ var flashVersion = 'no check'; if (typeof swfobject != 'undefined') { var fv = swfobject.getFlashPlayerVersion(); if (fv.major > 0) { flashVersion = fv.major + '.' + fv.minor + ' r' + fv.release; } else { flashVersion = unknown; } } } window.jscd = { screen: screenSize, browser: browser, browserVersion: version, mobile: mobile, os: os, osVersion: osVersion, cookies: cookieEnabled, flashVersion: flashVersion }; }(this)); /*alert( 'OS: ' + jscd.os + ' ' + jscd.osVersion + '\n' + 'Browser: ' + jscd.browser + ' ' + jscd.browserVersion + '\n' + 'Mobile: ' + jscd.mobile + '\n' + 'Flash: ' + jscd.flashVersion + '\n' + 'Cookies: ' + jscd.cookies + '\n' + 'Screen Size: ' + jscd.screen );*/ var dataTablesPageSizeSelectionObject = [[10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, -1], [10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, "Alle"]]; var dataTablesLanguageOption = { "sEmptyTable": "Keine Daten in der Tabelle vorhanden", "sInfo": "_START_ bis _END_ von _TOTAL_ Einträgen", "sInfoEmpty": "0 bis 0 von 0 Einträgen", "sInfoFiltered": "(gefiltert von _MAX_ Einträgen)", "sInfoPostFix": "", "sInfoThousands": ".", "sLengthMenu": "_MENU_ Einträge pro Seite", "sLoadingRecords": "Wird geladen...", "sProcessing": "Bitte warten...", "sSearch": "Suchen", "sZeroRecords": "Keine Einträge vorhanden.", "oPaginate": { "sFirst": "Erste", "sPrevious": "Zurück", "sNext": "Nächste", "sLast": "Letzte" }, "oAria": { "sSortAscending": ": aktivieren, um Spalte aufsteigend zu sortieren", "sSortDescending": ": aktivieren, um Spalte absteigend zu sortieren" } }; function SessionTimeOutCountDown(expirationTime) { var countDownDate = new Date(expirationTime).getTime(); var x = setInterval(function() { var now = new Date().getTime(); var distance = countDownDate - now; var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); var seconds = Math.floor((distance % (1000 * 60)) / 1000); document.getElementById("sessionTimeoutClock").innerHTML = minutes + "m " + seconds + "s "; if (distance < 0) { clearInterval(x); document.getElementById("sessionTimeoutClock").innerHTML = "EXPIRED"; } }, 1000); }