Changeset 1195 for trunk

Show
Ignore:
Timestamp:
02/21/11 18:29:34 (15 months ago)
Author:
jussara.oliveira
Message:

Campo con subcampos marc, #392

Location:
trunk/htdocs/central/dataentry
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/htdocs/central/dataentry/actualizarregistro.php

    r1148 r1195  
    7777                $t=explode('|',$fdt); 
    7878                $tag=$t[1]; 
     79                $dataentry=$t[7]; 
    7980                if (isset($variables["tag".$tag])){ 
    8081                        $rep=$t[4]; 
    8182                        $tipoc=$t[0]; 
    82                         $dataentry=$t[7]; 
    8383 
    8484                        if ($dataentry=="A") { 
    8585                                $variables["tag".$tag]=str_replace("\n","", $variables["tag".$tag]); 
    8686                                $variables["tag".$tag]=str_replace("\r","", $variables["tag".$tag]); 
    87                                 $variables["tag".$tag]=substr($variables["tag".$tag],0,16360); 
     87                                $variables["tag".$tag]=substr($variables["tag".$tag],0,16360);    //Esto es provisional porque es el largo m�mo que actualiza 
    8888                        } 
    8989                        $subc=rtrim($t[5]); 
     
    134134                                $variables["tag".$tag]= $salida; 
    135135                        } 
     136                }else{ 
     137                        if ($dataentry!="B") $variables["tag".$tag]="";       //THE EXTERNAL HTML IS NOT UPDATED 
    136138                } 
    137139        } 
     
    215217                                } 
    216218                        } 
    217 //echo "<xmp>$ValorCapturado</xmp>"; 
    218 //die; 
     219#echo "<xmp>$ValorCapturado</xmp>"; 
     220#die; 
     221#echo strlen($ValorCapturado); 
    219222 
    220223                        $ValorCapturado=urlencode($ValorCapturado); 
     
    272275                die; 
    273276        }else{ 
    274                 echo $output; 
     277                if (isset($output))echo $output; 
    275278        } 
    276279        $IsisScript=$xWxis."actualizar.xis"; 
  • trunk/htdocs/central/dataentry/js/campos.js

    r1169 r1195  
    8989    base=top.base 
    9090//    msgwin=window.open("campos.php?wks="+Wks+"&tag="+TagCampo+"&base="+base,"Window1" ,"status=yes,resizable=yes,toolbar=false,menu=no,scrollbars=yes,,height=500,top=50,left=0") 
    91     msgwin=window.open("campos.php?tag="+TagCampo+"&base="+base+wks,"Window1" ,"status=yes,resizable=yes,toolbar=false,menu=no,scrollbars=yes,,height=500,top=50,left=0") 
     91    msgwin=window.open("campos.php?tag="+TagCampo+"&base="+base+wks+"&is_marc="+is_marc,"Window1" ,"status=yes,resizable=yes,toolbar=false,menu=no,scrollbars=yes,,height=500,top=50,left=0") 
    9292    msgwin.focus() 
    9393 
  • trunk/htdocs/central/dataentry/js/editarocurrencias.js

    r1169 r1195  
    8989// si no hay indicadores pero el campo los debe tener se abren las dos casillas en blanco 
    9090        inctr="" 
    91         if (xsalida==""){ 
     91        if (xsalida=="" || xsalida=="^-"){ 
    9292                for (i=0;i<Tx[5].length;i++){ 
    9393                        sc=Tx[5].substr(i,1) 
     
    9595                } 
    9696        }else{ 
    97                 if (Tx[5].substr(0,1)==1){ 
     97                if (Tx[5].substr(0,1)==1 && is_marc=="S"){ 
    9898                        ixpos=xsalida.indexOf("^") 
    9999                        if (ixpos!=2) 
     
    115115        for (i=0;i<Tx[5].length;i++){ 
    116116                xd=SubCampos[i].split('|') 
    117                 if ((xd[5]==1 || xd[5]==2) && i<2){ 
     117                if ((xd[5]==1 || xd[5]==2) && i<2 && is_marc=="S"){ 
    118118            ix="I"+xd[5]          //ADD THE LETTER I TO THE INDICATOR CODE FOR NOT CONFUSING WITH SUBFIELD 2 
    119119            Desc_sc[ix]=xd[2] 
     
    124124    sc_ant="" 
    125125    len=campos.length 
    126         for (i=1;i<len;i++){ 
     126    for (i=1;i<len;i++){ 
    127127        new_subc=campos[i].substr(0,1) 
     128        list_subc=Tx[5].substr(i-1,1) 
    128129        pick="" 
    129130        for (j=0;j<Tx[5].length;j++){ 
     
    131132                tipoe=sc[7] 
    132133                Ind="" 
    133                 if (i<3 && (sc[5]==1 || sc[5]==2)) 
     134                if (i<3 && (sc[5]==1 || sc[5]==2) && is_marc=="S") 
    134135                        Ind="I" 
    135136                if (sc[5]==new_subc){ 
     
    148149        strsubc+=new_subc 
    149150        lista_sc[M]="t"+C_Sc+"_"+M 
    150         ixsc=Tx[5].indexOf(new_subc) 
    151  
    152         if (i>2 || C_Sc!=1 && C_Sc!=2){ 
     151        ixsc=Tx[5].indexOf(list_subc) 
     152 
     153        if (is_marc!="S" || i>2 || (C_Sc!=1 && C_Sc!=2)){ 
    153154                if (C_Sc!="-"){ 
    154155                        if (sc_ant!="-"){ 
     
    179180                //GET THE SUBFIELD NAME 
    180181        ixnamec=Tx[5].indexOf(C_Sc) 
    181         if ((C_Sc==1 || C_Sc==2) && i<3){ 
     182        if (is_marc=="S" && (C_Sc==1 || C_Sc==2) && i<3 ){ 
    182183                NombreSc=Desc_sc["I"+C_Sc]        //GET THE NAME OF THE INDICATOR 
    183184        }else{ 
    184185                NombreSc=Desc_sc[C_Sc]            //GET THE NAME OF THE SUBFIELD 
    185186        } 
    186         html+="<td  valign=top>"+NombreSc+"</a></td>" 
     187        html+="<td  valign=top>"+C_Sc+" "+NombreSc+"</a></td>" 
    187188        html+="<td class=td nowrap>" 
    188189        xsize="70" 
    189         if (i<3 && (C_Sc==1 || C_Sc==2)){ 
     190        if (is_marc=="S" && i<3 && (C_Sc==1 || C_Sc==2)){ 
    190191                xsize="1 maxlength=1" 
    191192        } 
     
    208209        } 
    209210 
    210         if (i>2 || C_Sc!=1 && C_Sc!=2){ 
     211        if (is_marc!="S" || (i>2 || C_Sc!=1 && C_Sc!=2 && is_marc=="S")){ 
    211212                html+="<select name=agregar id=at"+C_Sc+"_"+M+" onChange=AgregarSubcampo(this,"+j+") style=width:100px>" 
    212213                        html+="<option value=''>add" 
     
    273274        for (i=0;i<lista_sc.length;i++){ 
    274275                subc=lista_sc[i].substr(1,1) 
    275                 if ((i==0 || i==1 ) & (subc==1 || subc==2)){ 
     276                if ((i==0 || i==1 ) & (subc==1 || subc==2) && is_marc=="S"){ 
    276277                        xsalida+=valores[i] 
    277278                }else{ 
     
    303304        for (i=0;i<lista_sc.length;i++){ 
    304305                subc=lista_sc[i].substr(1,1) 
    305                 if ((i==0 || i==1 ) & (subc==1 || subc==2)){ 
     306                if ((i==0 || i==1 ) & (subc==1 || subc==2) && is_marc=="S"){ 
    306307                        xsalida+=valores[i] 
    307308                }else{ 
     
    319320        ctrl= returnObjById(ins) 
    320321        if (Trim(ctrl.value)=="") { 
    321                 subc.selectedIndex=0 
    322                 ins=-1 
    323                 return 
     322                if (ins.substr(1,1)!="-"){   //if the subfield is optional can be empty 
     323                        subc.selectedIndex=0 
     324                        ins=-1 
     325                        return 
     326                } 
    324327        } 
    325328        salida="" 
     
    338341                                salida+="^"+subc_act+valor 
    339342                        }else{ 
    340                                 if ((ixsc==0 || ixsc==1) && (subc_act=="1" || subc_act=="2")){ 
     343                                if ((ixsc==0 || ixsc==1) && (subc_act=="1" || subc_act=="2") && is_marc=="S"){ 
    341344                                        salida+=valor 
    342345                    }else( 
  • trunk/htdocs/central/dataentry/js/terminoseleccionado.js

    r1169 r1195  
    8282                        subc_act=nombre.substr(1,1) 
    8383                        valor=document.forma1.elements[i].value 
    84                         if (m<2 && (subc_act==1 || subc_act==2)){ 
     84                        if (is_marc=="S" && m<2 && (subc_act==1 || subc_act==2)){ 
    8585                                if (Trim(valor)=="") valor=" " 
    8686                                seleccion+=valor 
     
    107107                                valor=document.forma1.elements[i].options[document.forma1.elements[i].selectedIndex].value 
    108108                        document.forma1.elements[i].selectedIndex=-1 
    109                         if (m<2 && (subc_act==1 || subc_act==2)){ 
     109                        if (is_marc=="S" && m<2 && (subc_act==1 || subc_act==2)){ 
    110110                                if (Trim(valor)=="") valor=" " 
    111111                                seleccion+=valor 
     
    173173        if (j!=-1) { 
    174174                seleccion=(document.forma1.lista.options[j].value) 
    175                 if (xxs[5]=='-')  seleccion="^-"+seleccion 
     175                if (xxs[5]=='-' && seleccion!="")  seleccion="^-"+seleccion 
    176176        }else{ 
    177177                seleccion=""