/////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////FUNCTIONS//////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////// function ocultarColumna(tabla,num,ocultar) { dis = (ocultar==0) ? '' : 'none'; fila = document.getElementById(tabla).getElementsByTagName('tr'); fila[0].getElementsByTagName('th')[num].style.display=dis; for(i=1;i'+idioma_nombre+''); sortSelect(add_cdp_trad); $("#titulo"+idioma_id).attr('disabled','disabled'); $("#desc_corta"+idioma_id).attr('disabled','disabled'); $("#desc_larga"+idioma_id).attr('disabled','disabled'); var http = new_ajax(); http.open("GET", "http://www.mydocumenta.com/admin/utils/cdpDeleteTrad.php?idioma_id="+idioma_id, true); http.send(null); } function cdpDisable(){ var http = new_ajax(); http.open("GET", "http://www.mydocumenta.com/admin/utils/cdpDisable.php", true); http.onreadystatechange=function() { if(http.readyState == 4) { alert(http.responseText); document.location.href = 'http://www.mydocumenta.com/web/admin/cdpVentas.php'; } } http.send(null); } function cdpArrangeTrads(){ //el nou idioma del select idioma_id: //-no pot estar en el deplegable de trads //-no pot tenir trads visibles //la resta d'idiomes del select idioma_id: //-han d'estar en el desplegable de trads //-han de mantenir la visibilitat de les trads var i = $("#idioma_id").val(); $("#div_cdp_i18n_"+i).css('display','none'); $("#titulo"+i).attr('disabled','disabled'); $("#desc_corta"+i).attr('disabled','disabled'); $("#desc_larga"+i).attr('disabled','disabled'); $("#add_cdp_trad").empty(); $("#add_cdp_trad").append(''); $("#idioma_id option").each(function(){ if($(this).val()!=i && $("#div_cdp_i18n_"+$(this).val()).css('display')=='none'){ $("#add_cdp_trad").append(''); } }); sortSelect(add_cdp_trad); } function sortSelect(selElem) { var tmpAry = new Array(); for (var i=0;i 0) { selElem.options[0] = null; } for (var i=0;i 127) && (c < 2048)) { utftext += String.fromCharCode((c >> 6) | 192); utftext += String.fromCharCode((c & 63) | 128); } else { utftext += String.fromCharCode((c >> 12) | 224); utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode((c & 63) | 128); } } return utftext; }, // public method for url decoding decode : function (utftext) { var string = ""; var i = 0; var c = c1 = c2 = 0; while ( i < utftext.length ) { c = utftext.charCodeAt(i); if (c < 128) { string += String.fromCharCode(c); i++; } else if((c > 191) && (c < 224)) { c2 = utftext.charCodeAt(i+1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2; } else { c2 = utftext.charCodeAt(i+1); c3 = utftext.charCodeAt(i+2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3; } } return string; } }