function expand( id ) { var details = document.getElementById('masTE' + id ); var enlaceMas= document.getElementById( 'expandTE' + id ); var enlaceMenos= document.getElementById( 'contraeTE' + id ); details.style.display = ( details.style.display == 'block' ) ? 'none' : 'block'; enlaceMas.style.display = ( details.style.display == 'block' ) ? 'none' : 'inline'; enlaceMenos.style.display = ( details.style.display == 'block' ) ? 'inline' : 'none'; } function expandLink( id ) { var details = document.getElementById( id ); var enlaceMas= document.getElementById( 'expandTE' + id ); var enlaceMenos= document.getElementById( 'contraeTE' + id ); details.style.display = ( details.style.display == 'block' ) ? 'none' : 'block'; enlaceMas.style.display = ( details.style.display == 'block' ) ? 'none' : 'inline'; enlaceMenos.style.display = ( details.style.display == 'block' ) ? 'inline' : 'none'; } function montre(id) { if (document.getElementById) { document.getElementById(id).style.display="block"; } else if (document.all) { document.all[id].style.display="block"; } else if (document.layers) { document.layers[id].display="block"; } } function cache(id) { if (document.getElementById) { document.getElementById(id).style.display="none"; } else if (document.all) { document.all[id].style.display="none"; } else if (document.layers) { document.layers[id].display="none"; } } function checkrequired(which) { var pass=true; if (document.images) { for (i=0;i < which.length;i++) { var tempobj=which.elements[i]; if (tempobj.name.substring(0,1)=="_") { if (((tempobj.type=="text"||tempobj.type=="textarea"||tempobj.type=="password")&& tempobj.value=='')||((tempobj.name=="_repetir_clave") && (document.login._clave.value!==tempobj.value)) ) { pass=false; break; } } } } if (!pass) { shortFieldName=tempobj.name.substring(1,25).toUpperCase(); alert("Por favor revise los datos de "+shortFieldName+"."); return false; }else return true; } function askData() { if (confirm('¿Esta seguro de que desea eliminar el termino o la relación?')){ return true; }else return false; } /* ---------------------------- */ /* AJAX search suggest */ /* ---------------------------- */ $().ready(function() { function formatItem(row) { return row[0] + " (término existente)"; } function formatResult(row) { return row[0].replace(/(<.+?>)/gi, ''); } $("#search-q").autocomplete('searcher.php', { width: 260, minChars: 2, selectFirst: false }); $("#search-q").result(function(event, data, formatted) { if (data) $(this).parent().next().find("input").val(data[1]); }); $("#addExistTerm").autocomplete('searcher.php?t=e', { width: 260, minChars: 2, selectFirst: false }); $("#addExistTerm").result(function(event, data, formatted) { if (data) $(this).parent().next().find("input").val(data[1]); }); $("#addTerms").autocomplete('searcher.php', { width: 300, multiple: true, matchContains: true, formatItem: formatItem, formatResult: formatResult, multipleSeparator: "\n", minChars: 2 }); $(":text, textarea").result(log).next().click(function() { $(this).prev().search(); }); $("#clear").click(function() { $(":input").unautocomplete(); }); }); /* ---------------------------- */ /* OBSERVATORIO */ /* ---------------------------- */ function recargaedit(a,b,c,d){ document.getElementById("value").value=a; document.getElementById("orden").value=b; document.getElementById("alias").value=c; document.getElementById("valueid").value=d; document.getElementById("doAdmin").value='modUserNotes'; document.getElementById("alias").disabled=1; } function envianota(){ document.getElementById("alias").disabled=0; document.getElementById("morenotas").submit(); } function preparaborrado2(a){ if (confirm("¿Realmente quiere eliminar este tipo de nota?")==true) { document.getElementById("value").value=a; document.getElementById("doAdmin").value='deleteUserNotes'; document.getElementById("morenotas").submit(); } }