// execSubmit // Esta funcion se llama desde 'editor/functions.js' de la funcion 'iEditor_Done()' // Accion: realiza el submit del form 'form' dentro de doc_view.jsp que // guarda las modificaciones al documento realizadas desde el editor // Al finalizar, devuelve el control a la funcion que la llamo function execSubmit(formName) { eval('document.' + formName + '.submit()') } // --------------- // Control de la accion hide del menu pulldown. function runTimer() { timer=setTimeout('hideMenu()',500); } function clearTimer(){ if( typeof timer != 'undefined' ) { clearTimeout(timer); } } // ------------- function openApplication(app_autologin,app_execute) { goLoc = "/portal/modules/extapplications/autosend.jsp?id_app=" +app_execute; if (app_autologin != 1) {goLoc = "http://" +app_execute} app_window = openWindow(goLoc,700,500,null,null,'app_window',5,true,true,false); } function isEmail(obj) { if (!(result = ((obj.value == "") || ((obj.value.indexOf("@") != -1) && (obj.value.indexOf(".") != -1))))) { alert( "La dirección de eMail ingresada no es valida" ); obj.focus(); return false; } else { return true }; } function changePassword() { changePassword = openWindow('/portal/pass_change.jsp',300,185,null,null,'win_search_frm',5,false,false,false); } function requestPassword() { requestPassword = openWindow('login_req_password.jsp',300,185,null,null,'requestPassword',5,false,false,false); } function showUserDataSheet(iduser) { userDataSheet = openWindow("/portal/user/user_datasheet.jsp?id_user=" +iduser ,450,210,null,null,'userDataSheet',5,false,false,false); //GPA 06/02/2003 fix } function showCustomerCare(id_vector) { loginCustomerCare = window.open("/customercare/login/?id_vector=" + id_vector,'','width=350,height=250'); //openWindow("/customercare/?id_vector=" + id_vector ,350,300,null,null,'loginCustomerCare',5,false,false,false); } function showHome() { document.location="index.jsp"; } function showUserData() { document.location="index.jsp?Module=UserData&page=user/user_data.jsp"; } function showDocumentNotReaded() { document.location="index.jsp?Module=Documents&page=document/doc_list.jsp&doread=true"; } function showSurveys() { document.location="index.jsp?Module=Survey&page=modules/survey/index.jsp"; } function showLeave() { document.location="index.jsp?Module=Leave&page=modules/leave/index.jsp"; } function listDocument(id_section,id_document) { goLocation = "index.jsp?Module=Documents&page=document/doc_list.jsp&id_section=" + id_section; if (id_document > 0) { goLocation += "&id_document=" + id_document; } document.location = goLocation; } function disableEditableRegion() { oHTML = document.body.getElementsByTagName("DIV") for(var i=0;i 0) { goLocation += "&id_faqs_tips=" + id_faqs_tips + "&faqs_request=true"; } document.location = goLocation; } function listSection(id_section) { document.location="index.jsp?Module=Sections&page=sections/sec_list.jsp&id_section=" + id_section; } // PIC - 4/9/2002 // Motivo: se abre la ventana que muestra un clasificado function showClassified(id_classified) { windowShowClassified = openWindow("/portal/modules/classifieds/cls_view.jsp?id_classified=" + id_classified,700,500,null,null,'cls_view_window',5,true,true,false); } function showDocument(id_document,id_section,windowed) { document.location = "?page=document/doc_list.jsp&id_document=" + id_document; } function showSite(url) { document.location = "index.jsp?page=modules/centralsite/central_site.jsp&url=" + url; } function showMailbox() { document.location="index.jsp?page=modules/mailbox/index.jsp"; } function changeUserRol() { document.location="index.jsp?page=user/user_change_rol.jsp"; } function showExtApplications() { document.location="index.jsp?page=modules/extapplications/index.jsp"; } function searchBirthday() { birthday_search = openWindow("modules/birthday/birthday_search.jsp",650,450,null,null,'birthday_search',5,false,false,false); } function ShowFaqs(id_faqs_tips, id_section) { window.open('/portal/faqs_view.jsp?id_faqs_tips=' + id_faqs_tips + '&id_section=' + id_section,'View_Document','toolbar=no, scrollbars=yes, width=660, height=580, left=10, top=10'); } function ShowExtAttachWindow(file_name) { window.open('/storage/' + file_name,'Documentos','toolbar=yes, status=yes, dependent=yes, location=no, menubar=yes, scrollbars=yes, menubar=yes, width=800, height=600, left=10, top=10, resizable=yes'); } function fnGoToSection(page,id_section) { if(page == '/portal/') { top.window.opener.location.href = '/portal/' } else { top.window.opener.location.href = 'index.jsp?page=' + page + '&id_section=' + id_section } top.window.close() } function rowExpand(obj) { comm_obj = eval('comm_' + obj.name); if (comm_obj) { if (comm_obj.style.display == "none") { if(obj.name != 'XXX') { obj.innerHTML = "Haga click aquí para cerrar el comentario"; } comm_obj.style.display = ""; } else { if(obj.name != 'XXX') { obj.innerHTML = "Haga click aquí para leer el comentario"; } comm_obj.style.display = "none"; } } if(obj.name == 'XXX') { window.location.href = '#1' } } function fnCheckFrmComment(obj) { if(obj.frm_cmt_body.value.length > 255) { alert('El comentario es demasiado largo.') obj.frm_cmt_body.focus() } else { if(obj.frm_cmt_body.value == '') { alert('Debe ingresar un comentario') obj.frm_cmt_body.focus() } else { obj.submit() } } } // JES 31 may 2002 // Función para links internos que pega el Editor function getDocument(id_document) { if (top.window.name == 'doc_view_window') { // La ventana ya esta abierta document.location='doc_view.jsp?id_document=' + id_document; } else { showDocument(id_document,0); } } function fnexecSendEditor() { try { if( document.getElementById ) { //alert(document.getElementById( 'view_id_document' ).getAttribute("value")); //alert('Tipo de nodo:'+document.getElementById( 'form_send' ).childNodes.item(10).getAttribute("value")); //form_send = document.getElementById( 'form_send' ); doc_version = parseInt(document.getElementById( 'view_doc_version' ).getAttribute("value")) + 1; // proximo destinatario doc_emails = document.getElementById( 'mailTo' ).getAttribute("value"); var emailSplit = doc_emails.split("&"); if (doc_version >= emailSplit.length) doc_version = 0; //alert('Envia mail a:'+emailSplit[doc_version]); //form_doc_version = document.getElementById( 'view_doc_version' ); document.getElementById( 'form_send' ).childNodes.item(10).setAttribute("value", doc_version.toString()); //doc_resource = document.getElementById( 'doc_resource' ); document.getElementById( 'form_send' ).childNodes.item(8).setAttribute("value", document.getElementById( 'doc_resource' ).getAttribute("value")); //mailTo = document.getElementById( 'mailTo' ); document.getElementById( 'form_send' ).childNodes.item(6).setAttribute("value", doc_emails); //doc_title = document.getElementById( 'doc_title' ); document.getElementById( 'form_send' ).childNodes.item(4).setAttribute("value", document.getElementById( 'doc_title' ).getAttribute("value")); //form_id_document = document.getElementById( 'view_id_document' ); document.getElementById( 'form_send' ).childNodes.item(2).setAttribute("value", document.getElementById( 'view_id_document' ).getAttribute("value")); document.getElementById( 'view_doc_version' ).setAttribute("value", doc_version.toString()); setChildsValueAttr( doc_resource ); } else { alert( 'Esta versión del navegador no permite el envío de documentos por email. Por favor, actualice su navegador de internet.' ); } } catch( e ){ alert( 'Excepcion : ' + e ); } if( form_send && doc_resource && mailTo && doc_title ) { try { form_send.doc_resource.value = doc_resource.innerHTML; form_send.doc_title.value = doc_title.value; form_send.mailTo.value = mailTo.value; // se quitan botones e imágenes del documento a enviar por mail form_send.doc_resource.value = form_send.doc_resource.value.replace( /(]*>)|((]*value=(Enviar|"Enviar")[^>]*>)|(]*name=(mailTo|"mailTo")[^>]*>)/g, '' ); // se inhabilitan campos input, select y textarea form_send.doc_resource.value = form_send.doc_resource.value.replace( /