grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026/** * This array is used to remember mark status of rows in browse mode */ var marked_row = new Array; var timeoutglobalvar; /** * modifier la propriete display d'un element * * @param objet * @param statut **/ function setdisplay(objet, statut) { var e = objet; if (e.style.display != statut) { e.style.display = statut; } return true; } /** * tester le type de navigateur **/ function isIe() { var ie = false; var appVer = navigator.appVersion.toLowerCase(); var iePos = appVer.indexOf('msie'); if (iePos != -1) { var is_minor = parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos))); var is_major = parseInt(is_minor); } if (navigator.appName.substring(0,9) == "Microsoft") { // Check if IE version is 6 or older if (is_major <= 6) { ie = true; } } return ie; } /** * @param id **/ function cleandisplay(id) { var e = document.getElementById(id); if (e) { setdisplay(e,'block'); if (isIe()) { doHideSelect(e); } } } /** * @param id **/ function cleanhide(id) { var e = document.getElementById(id); if (e) { if (isIe()) { doShowSelect(e); } setdisplay(e,'none'); } } /** * @param id **/ function completecleandisplay(id) { var e = document.getElementById(id); if (e) { setdisplay(e,'block'); /* if(document.getElementById('show_entities')){ var oneTime=0; var divHeight = document.getElementById('show_entities').offsetHeight; var divWidth = document.getElementById('show_entities').offsetWidth; if (divHeight>300){ document.getElementById('show_entities').style.overflow = 'auto'; document.getElementById('show_entities').style.height = '400px'; // document.getElementById('show_entities').style.width = divWidth + 'px'; document.getElementById('show_entities').style.width = '300px'; } } */ if (isIe()) { e.onmouseleave = function(){ completecleanhide(id) }; hideSelect(0,0,document.documentElement.clientWidth,document.documentElement.clientHeight); } else { e.onmouseout = function(){ completecleanhide(id) }; } } } /** * @param id **/ function completecleanhide(id) { var e = document.getElementById(id); if (e) { setdisplay(e,'none'); if (isIe()) { showSelect(0,0,document.documentElement.clientWidth,document.documentElement.clientHeight); } } } /** * effacer tous les menus du menu principal * afficher les select du document * * @param idMenu **/ function hidemenu(idMenu) { var e = document.getElementById(idMenu); var e = e.getElementsByTagName('ul'); for (var i=0 ; i x) && (selx < (x + w)) && ((sely + selh) > y) && (sely < (y + h))) || (selx < 0) || (sely < 0)) { sel[i].style.visibility="visible"; } } return true; } /** * execute la fonction hideMenu * * @param objet **/ function doHideSelect(object) { var e = object; if (isIe()) { var selx = 0; var sely = 0; var selp; selx = getLeft(e); sely = getTop(e); selw = e.offsetWidth; selh = e.offsetHeight; hideSelect(selx,sely,selw,selh); } return true; } /** * masque les select du document * * @param x * @param y * @param w * @param h **/ function hideSelect(x,y,w,h) { var selx,sely,selw,selh,i; var sel = document.getElementsByTagName("SELECT"); for (i=0 ; i x) && (selx < (x + w)) && ((sely + selh) > y) && (sely < (y + h))) || (selx < 0) || (sely < 0 )) { sel[i].style.visibility="hidden"; } } return true; } /** * @param id * @param idMenu **/ function menuAff(id,idMenu){ var m = document.getElementById(idMenu); var item = m.getElementsByTagName('li'); for (var i=0 ; i= 3)) || ((browserName == "Microsoft Internet Explorer") && (browserVer >= 4))){ version = "n3"; } else { version = "n2"; } function historyback() { history.back(); } function historyforward() { history.forward(); } /** * @param Type * @param Id **/ function fillidfield(Type,Id) { window.opener.document.forms["helpdeskform"].elements["items_id"].value = Id; window.opener.document.forms["helpdeskform"].elements["itemtype"].value = Type; window.close(); } /** * marks all checkboxes inside the given element * the given element is usaly a table or a div containing the table or tables * * @param container_id DOM element **/ function markCheckboxes(container_id) { var checkboxes = document.getElementById(container_id).getElementsByTagName('input'); for (var j=0 ; j 0) { current_el.attr('src', current_el.attr('src').replace('_active', '')); } else { current_el.attr('src', current_el.attr('src').replace(/\.(png)$/, '_active.$1')); } //find active classname active_classnames = []; $('.filter_timeline .h_active').each(function(index) { active_classnames.push(".h_content."+$(this).attr('class').replace(' h_active', '')); }) $(active_classnames.join(', ')).each(function(index){ $(this).parent().removeClass('h_hidden'); }) //show all items when no active filter if (active_classnames.length == 0) { $('.h_item').removeClass('h_hidden'); } }); } read_more = function() { $(document).on("click", ".long_text .read_more a", function(event) { $(this).parents('.long_text').removeClass('long_text'); $(this).parent('.read_more').remove(); return false; }); } var split_button_fct_called = false; split_button = function() { if (split_button_fct_called) { return true; } split_button_fct_called = true // unfold status list $(document).on("click", '.x-button-drop', function(event) { $(this).parents(".x-split-button").toggleClass('open'); }); $(document).on("click", '.x-split-button', function(event) { event.stopPropagation(); }); //click on an element of status list $(document).on("click", '.x-button-drop-menu li', function(event) { if (event.target.children.length) { var xBtnDrop = $(this).parent().siblings(".x-button-drop"); //clean old status class xBtnDrop.attr('class','x-button x-button-drop'); //find status match = event.target.children[0].src.match(/.*\/(.*)\.png/); cstatus = match[1]; //add status to dropdown button xBtnDrop.addClass(cstatus); //fold status list $(this).parents(".x-split-button").removeClass('open'); } }); //fold status list on click on document $(document).on("click", function(event) { if ($('.x-split-button').hasClass('open')) { $('.x-split-button').removeClass('open'); } }); } // Responsive header if ($(window).width() <= 700) { var didScroll; var lastScrollTop = 0; var delta = 5; var navbarHeight = $('header').outerHeight(); $(window).scroll(function(event){ didScroll = true; }); setInterval(function() { if (didScroll) { scollHeaderResponsive(); didScroll = false; } }, 250); var scollHeaderResponsive = function() { var st = $(this).scrollTop(); // Make sure they scroll more than delta if(Math.abs(lastScrollTop - st) <= delta) return; if (st > lastScrollTop && st > navbarHeight){ // Scroll Down $('#header').removeClass('nav-down').addClass('nav-up'); } else { // Scroll Up if(st + $(window).height() < $(document).height()) { $('#header').removeClass('nav-up').addClass('nav-down'); } } lastScrollTop = st; } } // prevent jquery ui dialog to keep focus $(function(){ $.ui.dialog.prototype._focusTabbable = function(){}; });