//*****UTILERIAS CON EXT**** //***TDSI** //15/Julio/2009 israelsalazar if(true){ ErrorTimeOut=false; } function CerrarVentana(Id){ var vent=Ext.getCmp(Id); if(vent!=null) vent.close(); else alert("No Existe la ventana "+Id); } function Ventana(titulo,Id_,url,HerramientasB,HerramientasA,Alto,Ancho){ if(HerramientasB!=null && HerramientasA!=null){ var win = new Ext.Window({ title:titulo, id:Id_, width:Ancho, height:Alto, minimizable:true, maximizable:true, collapsible:true, modal:true, html:url, tbar: [HerramientasA], fbar: ['->',HerramientasB] }); }else{ if(HerramientasA!=null){ var win = new Ext.Window({ title:titulo, id:Id_, width:Ancho, height:Alto, minimizable:true, maximizable:true, collapsible:true, modal:true, html:url, tbar: [HerramientasA] }); } else { if(HerramientasB!=null){ var win = new Ext.Window({ title:titulo, id:Id_, width:Ancho, height:Alto, minimizable:true, maximizable:true, collapsible:true, modal:true, html:url, fbar: ['->',HerramientasB] }); } else { var win = new Ext.Window({ title:titulo, id:Id_, width:Ancho, height:Alto, minimizable:true, maximizable:true, collapsible:true, modal:true, html:url }); } } } win.show(); return win; } function _nVentana(titulo,Id_,url,HerramientasB,HerramientasA,Alto,Ancho){ if(HerramientasB!=null && HerramientasA!=null){ var win = new Ext.Window({ title:titulo, id:Id_, width:Ancho, height:Alto, minimizable:false, maximizable:false, resizable: false, collapsible:false, modal:true, html:url, tbar: [HerramientasA], fbar: ['->',HerramientasB] }); }else{ if(HerramientasA!=null){ var win = new Ext.Window({ title:titulo, id:Id_, width:Ancho, height:Alto, minimizable:false, maximizable:false, resizable: false, collapsible:false, modal:true, html:url, tbar: [HerramientasA] }); } else { if(HerramientasB!=null){ var win = new Ext.Window({ title:titulo, id:Id_, width:Ancho, height:Alto, minimizable:false, maximizable:false, resizable: false, collapsible:false, modal:true, html:url, fbar: ['->',HerramientasB] }); } else { var win = new Ext.Window({ title:titulo, id:Id_, width:Ancho, height:Alto, minimizable:false, maximizable:false, resizable: false, collapsible:false, modal:true, html:url }); } } } win.show(); return win; } //************ //FUNCION PARA CREAR VENTANAS DE DIALOGO NO MAXIMIZABLES //************ function VentanaDialogo(titulo,Id_,url,HerramientasB,HerramientasA,Alto,Ancho){ if(HerramientasB!=null && HerramientasA!=null){ var win = new Ext.Window({ title:titulo, id:Id_, width:Ancho, height:Alto, minimizable:false, maximizable:false, collapsible:false, modal:true, layout: 'fit', plain: true, autoScroll:true, html:url, tbar: [HerramientasA], fbar: ['->',HerramientasB] }); }else{ if(HerramientasA!=null){ var win = new Ext.Window({ title:titulo, id:Id_, width:Ancho, height:Alto, minimizable:false, maximizable:false, collapsible:false, modal:true, layout: 'fit', plain: true, autoScroll:true, html:url, tbar: [HerramientasA] }); } if(HerramientasB!=null){ var win = new Ext.Window({ title:titulo, id:Id_, width:Ancho, height:Alto, minimizable:false, maximizable:false, collapsible:false, modal:true, layout: 'fit', plain: true, autoScroll:true, html:url, fbar: ['->',HerramientasB] }); } if(HerramientasB==null && HerramientasA==null){ var win = new Ext.Window({ title:titulo, id:Id_, width:Ancho, height:Alto, minimizable:false, maximizable:false, collapsible:false, modal:true, layout: 'fit', plain: true, autoScroll:true, html:url }); } } win.show(); return win; } //************ //FUNCION PARA CREAR VENTANAS DE DIALOGO CON UN ARBOL INCRUSTADO NO MAXIMIZABLES //************ function VentanaDialogoArbol(titulo,Id_,items,HerramientasB,HerramientasA,Alto,Ancho){ if(Ext.getCmp(Id_)) Ext.getCmp(Id_).destroy(); if(HerramientasB!=null && HerramientasA!=null){ var win = new Ext.Window({ title:titulo, id:Id_, width:Ancho, height:Alto, minimizable:false, maximizable:false, collapsible:false, modal:true, layout: 'fit', plain: true, autoScroll:true, items: [items], tbar: [HerramientasA], fbar: ['->',HerramientasB] }); }else{ if(HerramientasA!=null){ var win = new Ext.Window({ title:titulo, id:Id_, width:Ancho, height:Alto, minimizable:false, maximizable:false, collapsible:false, modal:true, layout: 'fit', plain: true, autoScroll:true, items: [items], tbar: [HerramientasA] }); } if(HerramientasB!=null){ var win = new Ext.Window({ title:titulo, id:Id_, width:Ancho, height:Alto, minimizable:false, maximizable:false, collapsible:false, modal:true, layout: 'fit', plain: true, autoScroll:true, items: [items], fbar: ['->',HerramientasB] }); } } win.show(); } //************ //FUNCION PARA CREAR VENTANAS DE DIALOGO CON UN ARBOL INCRUSTADO MAXIMIZADAS //************ function VentanaMax(titulo,Id_,url){ var win = new Ext.Window({ title:titulo, id:Id_, maximized:true, minimizable:false, maximizable:false, collapsible:false, modal:true, layout: 'fit', plain: true, autoScroll:true, html: url }); win.show(); } /************************* */ //FORMATEO DE CAMPOS FECHA /************************* */ //create the date picker function Renderiza(){ var winDP; var seleccionoCampoFecha = function (DatePick, date){ //get the text field var field = document.getElementById(globalDP); //add the selected date to the field field.value = date.format('d/m/Y'); //hide the date picker winDP.destroy(); }; var clickCampoFecha=function(){ var DatePick = new Ext.DatePicker( { startDay: 1, listeners: { 'select':seleccionoCampoFecha } } ); winDP = new Ext.Window({ title: 'Date Picker', closeable: false, id: 'calendar_ctrl', width:'195px', height:'200px', resizable: false, items: [DatePick] // the date picker from above. }); globalDP=this.id //Muestra el DatePick winDP.show(this); if (document.getBoxObjectFor) { // Mozilla var PosX = document.getBoxObjectFor(this).x-1; var PosY = document.getBoxObjectFor(this).y+25; }else if (this.getBoundingClientRect) { // IE var PosX = this.getBoundingClientRect().left-2; var PosY = this.getBoundingClientRect().top+25; } winDP.setPosition(PosX,PosY); }; $("input").each(function(){ $(this).addClass("Util-Formulario_Campo"); }); $(".calendario").each(function(){ Ext.EventManager.on(this.id, 'click', clickCampoFecha); }); } /*****************************************************************/ /*DOMINO Server ExtJS "Server Timeout" Script @author mdm-adph @release 0.1 @license This script is licensed under the terms of the Open Source LGPL 3.0 license. Commercial use is permitted to the extent that the code/component(s) do NOT become part of another Open Source or Commercially licensed development library or toolkit without explicit permission. License details: http://www.gnu.org/licenses/lgpl.html @usage Insert into your overrides file -- script will run automatically whenever the Domino login page is returned from the server during the course of an Ajax call. In your original callback, you will need to check for the presence of a new response variable ("serverTimeout"), because this script will not stop you original callback from firing. Automatically tries to fire the last attempted Ajax request upon successful login with the Domino server. */ // Place this variable whereever you want -- it doesn't have to be in the global spec. // Just make sure to update the script below if you move it. var AJAXTIMEOUTCTRL = { VARS: {}, OBJ: {} }; Ext.Ajax.on({ "requestcomplete": function(conn, response, options){ // Hide progress msg windows here if necessary // Example: Ext.Msg.hide(); // If "timeout" page has been returned if (response.responseText.indexOf('action="/names.nsf?Login"') !== -1) { ErrorTimeOut=true; // Cache last "true" ajax request, if this failed request isn't a login page if (options.url != "/names.nsf?Login") { AJAXTIMEOUTCTRL.VARS.lastFailedAjaxRequest = options; } // Function run after user fills in reauthentication form function serverLogin() { AJAXTIMEOUTCTRL.OBJ.dominoLogin.hide(); Ext.Msg.wait("Obteniendo acceso al servidor...", "Por favor espere"); var password = Ext.getCmp("dominoLogin-password").getValue(); var username = Ext.getCmp("dominoLogin-username").getValue(); Ext.getCmp("dominoLogin-password").reset(); Ext.getCmp("dominoLogin-username").reset(); Ext.Ajax.request({ url: "/names.nsf?Login", params: { password: password, username: username // , RedirectTo: // an added parameter "RedirectTo" can be added here if necessary // to direct the Domino server to return a different page than normal // upon successful login. This can be used to return updated server // variables, user access levels, etc. }, callback: function (options, success, response) { if (success && !response.serverTimeout) { // Hide progress msg windows here if necessary // Example: Ext.Msg.hide(); Ext.Msg.alert("Mensaje del sistema", "Su conexión con el servidor ha sido reestablecida, favor de volver a seleccionar la opción."); ErrorTimeOut=false; $("object").show(); //$("#CierraTimeOut").click(); // Try to run the initially requested ajax Ext.Ajax.request(AJAXTIMEOUTCTRL.VARS.lastFailedAjaxRequest); } } }); }; // end serverLogin() // Create dominoLogin window object if not already created if (!AJAXTIMEOUTCTRL.OBJ.dominoLogin) { AJAXTIMEOUTCTRL.OBJ.dominoLogin = new Ext.Window({ bodyStyle: "padding: 5px;", border: false, closable: false, height: 160, layout: "form", labelAlign: "top", modal: true, plain: true, resizable: false, title: "Autentificacion de servidor requerida", width: 315, buttons: [{ text: 'OK', handler: serverLogin }], items: [{ xtype: "textfield", fieldLabel: "Username", id: "dominoLogin-username", width: "100%", value: "" // Add a variable holding current user's name here if necessary },{ xtype: "textfield", fieldLabel: "Password", id: "dominoLogin-password", inputType: "password", width: "100%", listeners: { "specialkey": function (theField, e) { if (e.getKey() == e.ENTER) { serverLogin(); } } } }] }); } // end if (!AJAXTIMEOUTCTRL.OBJ.dominoLogin) AJAXTIMEOUTCTRL.OBJ.dominoLogin.show(); $("object").hide(); // Delay the focus on the password input box, since the DOM doesn't like focusing while // it's still manipulating things Ext.getCmp("dominoLogin-password").focus(false, 500); // Create additional response flag here so that initial ajax request's callback // doesn't run response.serverTimeout = true; }// end if "timeout" page } }); function mensaje(tit,mensaje,icono){ //Mensajes de alerta con EXT if (icono==64){qicono=Ext.MessageBox.INFO} else if(icono==32){qicono=Ext.MessageBox.QUESTION} else if(icono==33){qicono=Ext.MessageBox.WARNING} else if(icono==16){qicono=Ext.MessageBox.ERROR} Ext.MessageBox.show({ title:tit, msg:mensaje, buttons:Ext.MessageBox.OK, icon: qicono }); } function mensaje(tit,mensaje,icono,fnMsg){ //Mensajes de alerta con EXT if (icono==64){qicono=Ext.MessageBox.INFO} else if(icono==32){qicono=Ext.MessageBox.QUESTION} else if(icono==33){qicono=Ext.MessageBox.WARNING} else if(icono==16){qicono=Ext.MessageBox.ERROR} Ext.MessageBox.show({ title:tit, msg:mensaje, fn:fnMsg, buttons:Ext.MessageBox.OK, icon: qicono }); } /*************** Barra de progreso con colores************************/ /**Pedro Fernando M�rquez Soto 1/Sept/2009*****/ function barra(av,w,h,idIn, idOut, idNum, maxi, c25, c50, c75, c99, c100){ var por=Ext.get(av); //av=valor de porcentaje w=largo h=altura var bar=Ext.get(idIn); //idIn=id de la tabla interna idOut=id de la tabla externa var barO=Ext.get(idOut);//idNum=id de textbox, maxi=valor max de la escala var num=Ext.get(idNum); //c25=color para <=25, etc... if(!idIn) Ext.Msg.alert("No hay ID de tabla interna"); if(!idOut) Ext.Msg.alert("No hay ID de tabla externa"); if(!av) av=0; if(!w) w=200; //valores por default, por si no se ponen parametros a la llamada de funci�n if(!h) h=10; if(!maxi) maxi=100; bar.setOpacity(0); if(av>maxi){ //si el valor de av (avance o porcentaje) es mayor a la escala maxima de la barra av=maxi; //se iguala al valor maximo Ext.Msg.alert("Valor incorrecto", "La barra solo puede llegar a "+maxi); } if(idNum){ $('#'+idNum).val(av+"%"); //Ext.fly(idNum).setOpacity(0); $('#'+idNum).attr('readonly','readonly'); } barO.setHeight(h); barO.setWidth(w); bar.setHeight(h); bar.setWidth(0); if (num!=null) num.setWidth((w/10)); var posx=barO.getX(); var posy=barO.getY(); var avan= av*(w/100); var aux=(h*7)/10+"pt"; //calcula el tama�o necesario de la fuente //bar.fadeIn(); if(av<=25) bar.setStyle("background-Color", c25); //asigna el color para <=25% else if(av<=50) bar.setStyle("background-Color", c50); //...<=50% else if(av<=75) bar.setStyle("background-Color", c75);//...<=75% else if(av<=99) bar.setStyle("background-Color", c99); //... y <=99% else if(av==100) bar.setStyle("background-Color", c100); //... y <=99% if(!c25) bar.setStyle("background-Color", "#6FA6BB"); if (num!=null){ num.setStyle("text-align","center"); num.setStyle("font-size",aux); } //bar.setStyle("border-width", "0"); //bar.setWidth()=1; barO.setStyle("border-width", "1"); barO.setStyle("border-style", "groove"); Ext.fly(idIn).scale(avan,bar.getHeight()); Ext.fly(idIn).setOpacity(avan); } function utilExt_CreaBarra(idb,idr,path){ var tb = new Ext.Toolbar({ id:'BarraDeAccion', autoWidth: true }); $('#'+idb).find("input").each(function(){ var idelemento=this.id; var icon = $(this).attr('class'); Ext.getCmp('BarraDeAccion').addButton({ text:'.'+$(this).val(), id: 'Ext_'+idelemento, icon:path+"/"+icon, listeners: {'click':function(){ $('#'+idelemento).click(); }} }); }); tb.render(idr); } Ext.override(Ext.chart.Chart, { onDestroy: function(){ Ext.chart.Chart.superclass.onDestroy.call(this); this.bindStore(null); var tip = this.tipFnName; if(!Ext.isEmpty(tip)){ try{ delete window[tip]; } catch(de) { window[tip] = null; } } } }); function utilExt_creaFieldfecha(nomDIV,nomField,enEdit,valorFec){ if (enEdit=="1"){ var fec=new Ext.form.DateField({ renderTo:nomDIV, allowBlank: false, format: 'd/m/Y', value:valorFec, listeners: { 'select': function(){ if($('#'+nomField).val()==undefined){ $('[name='+nomField+']').val(Ext.util.Format.date(this.getValue(),'d/m/Y')); $('[name='+nomField+']').focus();} else{ $('#'+nomField).val(Ext.util.Format.date(this.getValue(),'d/m/Y')); $('[name='+nomField+']').focus();} } } }) return fec } } function utilExt_creaFieldfechaXpage(nomDIV,nomField,enEdit,valorFec){ if (enEdit=="1"){ var fec=new Ext.form.DateField({ renderTo:nomDIV, allowBlank: false, format: 'd/m/Y', value:valorFec, listeners: { 'select': function(){ $('[name*='+nomField+']').val(Ext.util.Format.date(this.getValue(),'d/m/Y')); $('[name*='+nomField+']').focus(); } } }); return fec } } function utilExt_creaFieldfechaClase(nomDIV,nomField,enEdit,valorFec,clase){ if (enEdit=="1"){ var fec=new Ext.form.DateField({ renderTo:nomDIV, allowBlank: false, format: 'd/m/Y', id: 'Ext_'+nomField, editable: false, cls: clase, value:valorFec, listeners: { 'select': function(){ if($('#'+nomField).val()==undefined){ $('[name='+nomField+']').val(Ext.util.Format.date(this.getValue(),'d/m/Y')); $('[name='+nomField+']').focus();} else{ $('#'+nomField).val(Ext.util.Format.date(this.getValue(),'d/m/Y')); $('[name='+nomField+']').focus();} } } }) return fec } } function utilExt_creaFieldfechaValidadoCampos(nomDIV,nomField,enEdit,valorFec,esInicial,campo){ if (enEdit=="1"){ if(esInicial){ var fec=new Ext.form.DateField({ renderTo:nomDIV, allowBlank: false, format: 'd/m/Y', editable: false, id: 'Ext_'+nomField, vtype: 'daterange', endDateField: 'Ext_'+campo, // id of the end date field value:valorFec, listeners: { 'select': function(){ if($('#'+nomField).val()==undefined){ $('[name='+nomField+']').val(Ext.util.Format.date(this.getValue(),'d/m/Y')); $('[name='+nomField+']').focus();} else{ $('#'+nomField).val(Ext.util.Format.date(this.getValue(),'d/m/Y')); $('[name='+nomField+']').focus();} } } }) }else{ var fec=new Ext.form.DateField({ renderTo:nomDIV, allowBlank: false, format: 'd/m/Y', editable: false, id: 'Ext_'+nomField, vtype: 'daterange', startDateField: 'Ext_'+campo, // id of the end date field value:valorFec, listeners: { 'select': function(){ if($('#'+nomField).val()==undefined){ $('[name='+nomField+']').val(Ext.util.Format.date(this.getValue(),'d/m/Y')); $('[name='+nomField+']').focus();} else{ $('#'+nomField).val(Ext.util.Format.date(this.getValue(),'d/m/Y')); $('[name='+nomField+']').focus();} } } }) } return fec } } /* ***************Comentarios (agregar/editar/eliminar) ************** */ /* ************** *** David Juárez *** 9/Ago/2013 *** ************** */ var _coments; //Nombre caja comentarios var _comentTxt="mms"; //Nombre caja texto var _isEd; //Nombre campo si edicion var _usr; //Nombre campo usuario var _comentN=""; //Comentario nuevo var _isEditaComent; //Saber si se esta editando comentario var _divComent; //Div mostrar comentarios var _indG=0; //Indice de comentario a editar var _indM=0; //Indice de comentarios nuevos var _rst=0; //Bandera para comentarios var _isfir=-1; //Bandera de 0 comentarios var _recalc=true; //Bandera de recalculo de indMax var _nofir=false; //Bandera definitiva //Caja comentarios, caja texto, Campo edo. edición, Div mostrar comentarios, Campo Usuario function utilExtJS_Comentarios_parametros(_v1,_v2,_v3,_v4,_v5) { _coments=_v1; _comentTxt=_v2; _isEd=_v3; _divComent=_v4; _usr=_v5; } function utilExtJS_Comentarios_comenta() { _rst=1; var comentario = _comentN; var indx=0; var largo=$('[name='+_coments+']').val(); if (largo=="") _recalc=true; var comentarios = $('[name='+_coments+']').val().split('¬'); $('[name='+_comentTxt+']').blur(); var tiempo = new Date(); var usuario = $('[name='+_usr+']').val(); if (_recalc){ _isfir=-1; $.each(comentarios,function(indice, elemento) {_isfir+=1;}); if ((_indM==0)&&(_isfir==0)&&!_nofir){ //alert("Comentario nuevo!X="+indx+";M="+_indM+";F="+_isfir); _nofir=true; _recalc=false; } else { $.each(comentarios,function(indice, elemento) {indx+=1;}); _indM=indx; _recalc=false; //alert("Ya habia comentarios!X="+indx+";M="+_indM+";F="+_isfir); indx=0; } } if (_nofir) { indx=0; _nofir=false; } else { indx=0; //alert(comentarios.length); $.each(comentarios,function(indice, elemento) {indx+=1;}); } //alert(_nofir+";"+indx); $('#'+_divComent).html($('#'+_divComent).html() + '
 ' + usuario + '   Editar Comentario' +'  Eliminar Comentario
      ' + tiempo.format('d/m/Y H:i:s') + '
' + comentario + '

'); $('[name='+_comentTxt+']').val(''); $('[name='+_comentTxt+']').blur(); if ($('[name='+_coments+']').val().length > 0) $('[name='+_coments+']').val($('[name='+_coments+']').val()+"\n¬"+usuario+"~"+comentario+"~"+ tiempo.format('d/m/Y H:i:s')); else $('[name='+_coments+']').val(usuario+"~"+comentario+"~"+tiempo.format('d/m/Y H:i:s')); } function utilExtJS_Comentarios_cargaC() { $('#'+_divComent).html(""); if ($('[name='+_coments+']').val().length > 0) { var comentarios = $('[name='+_coments+']').val().split('¬'); $.each(comentarios,function(indice, elemento) { var tiempo = elemento.split('~')[2]; var comentario = elemento.split('~')[1]; var usuario = elemento.split('~')[0]; if (($('[name='+_isEd+']').val()=="1")&&(_indM<=indice)&&!_recalc){ $('#'+_divComent) .html($('#'+_divComent).html() + '
 ' + usuario + '   Editar Comentario' +'  Eliminar Comentario
      ' + tiempo + '
' + comentario + '

'); }else{ $('#'+_divComent).html($('#'+_divComent).html() + '
 ' + usuario + '
      ' + tiempo + '
' + comentario + '

'); } }); } } function utilExtJS_Comentarios_editaC(ind) { _rst=0; var comentarios = $('[name='+_coments+']').val().split('¬'); $.each(comentarios,function(indice, elemento) { var tiempo = elemento.split('~')[2]; var comentario = elemento.split('~')[1]; var usuario = elemento.split('~')[0]; _isEditaComent="Editando"; //alert("ind:"+ind+", indice:"+indice+" _indM:"+_indM+" _isfir:"+_isfir); if (indice==0&&(ind+_indM)==0&&_isfir==1){ //alert("entro al ind=1"); ind=1; } if (indice==ind){ //alert("entro"); _indG=indice; _comentN=comentario; $('[name='+_comentTxt+']').focus(); $('[name='+_comentTxt+']').removeClass("watermarkon").val(""); $('[name='+_comentTxt+']').val(comentario); } }); } function utilExtJS_Comentarios_cambiaC() { _rst=1; _isEditaComent="Comentando"; $('[name='+_comentTxt+']').blur(); var comentarios=$('[name='+_coments+']').val().split('¬'); var comentNuevo=""; $.each(comentarios,function(indice, elemento) { var tiempo = elemento.split('~')[2]; var comentario = elemento.split('~')[1]; var usuario = elemento.split('~')[0]; if (indice==_indG) { if (indice==0) comentNuevo=usuario+"~"+_comentN+"~"+tiempo; else comentNuevo+="¬"+usuario+"~"+_comentN+"~"+tiempo; } else { if (indice==0) comentNuevo=usuario+"~"+comentario+"~"+tiempo; else comentNuevo+="¬"+usuario+"~"+comentario+"~"+tiempo; } }); $('[name='+_comentTxt+']').blur(); $('[name='+_coments+']').val(comentNuevo); $('#editado').hide(); utilExtJS_Comentarios_cargaC(); } function utilExtJS_Comentarios_eliminaC(ind) { Ext.Msg.show({ title: "Mensaje del sistema", msg: "¿Esta seguro de eliminar el comentario?", buttons: Ext.Msg.YESNO, icon: Ext.Msg.QUESTION, fn: function(btn){ if(btn=="yes"){ $('[name='+_comentTxt+']').blur(); var comentarios=$('[name='+_coments+']').val().split('¬'); var comentNuevo=""; var _yac=false; $.each(comentarios,function(indice, elemento) { var tiempo = elemento.split('~')[2]; var comentario = elemento.split('~')[1]; var usuario = elemento.split('~')[0]; if (indice!=ind) { if(_indM>0){ if (indice==0) comentNuevo=usuario+"~"+comentario+"~"+tiempo; else comentNuevo+="¬"+usuario+"~"+comentario+"~"+tiempo; } else{ if (indice==0) { comentNuevo=usuario+"~"+comentario+"~"+tiempo; _yac=true; } else { if ((indice==1)&&(!_yac)) comentNuevo=usuario+"~"+comentario+"~"+tiempo; else comentNuevo+="¬"+usuario+"~"+comentario+"~"+tiempo; } } } }); $('[name='+_comentTxt+']').blur(); $('[name='+_coments+']').val(comentNuevo); $('#editado').hide(); utilExtJS_Comentarios_cargaC(); } } }); } //----------------------------------------------------------------------------------------------------- Ext.onReady(function() { setTimeout(function(){ if ($('[name='+_comentTxt+']').length) { $('[name='+_comentTxt+']').val("Escribe tu comentario aquí"); $('[name='+_comentTxt+']').focus( function(){ if ($(this).val()=="Escribe tu comentario aquí") $(this).removeClass("watermarkon").val(""); else $(this).val(_comentN).removeClass("watermarkon"); $(this).animate({"height": "85px"},"fast"); if (_isEditaComent!="Editando"){ $('#comentario').show(); $('#editado').hide(); } else{ $('#editado').show(); $('#comentario').hide(); } }).blur(function(){ if ($(this).val()!="Escribe tu comentario aquí") _comentN=$(this).val(); if ($(this).val()=="") $(this).val("Escribe tu comentario aquí").addClass("watermarkon").animate({"height":"45px"},"fast"); else $(this).val(_comentN); if (_rst){ $(this).val(''); _rst=0; } }); } },2000); }); function showMsgBlockID(id) { $(id).block({ message: "Cargando", css: { border: 0, color: "#707070" }, centerY: 0, centerX: 0 }); } function hideMsgBlockID(id) { $(id).unblock(); } function showMsgBlock(id) { $('#' + id).block({ message: "Cargando", css: { border: 0, color: "#707070" }, centerY: 0, centerX: 0 }); } function hideMsgBlock(id) { $('#' + id).unblock(); } /* ******************************************************************* */