Subversion-Projekte lars-tiefland.ci

Revision

Revision 41 | Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

$(function(){
    
    update_versand($(this));
    
    $('.input1').keyup(function(e) {
        if(e.keyCode == 13) {
            $("form#login").submit();
            return false;
        }
    });
    
    $('#Lieferadresse_t').click(function(){
        $('#Lieferadresse').show();
        $('#packstation').hide();
        $('.dhl').attr("disabled",true);
        $('.adresse').removeAttr("disabled");
    });
    $('#Lieferadresse_f').click(function(){
        $('#Lieferadresse').hide();
        $('#packstation').hide();
        $('.dhl').attr("disabled",true);
        $('.adresse').attr("disabled",true);
    });
    $('#Lieferadresse_p').click(function(){
        $('#packstation').show();
        $('#Lieferadresse').hide();
        $('.dhl').removeAttr("disabled");
        $('.adresse').attr("disabled",true);
    });
    

    if (land != 1) {
        $('#ustidnr_text').show();
        $('#ustidnr_input').show();
    } else {
        $('#ustidnr_text').hide();
        $('#ustidnr_input').hide();
    }
    $('#Land').change(function() {
        land = $('#Land').val();
        if (land != 1) {
            $('#ustidnr_text').show();
            $('#ustidnr_input').show();
        } else {
            $('#ustidnr_text').hide();
            $('#ustidnr_input').hide();
        }

        if($(".lieferadresseChangeRadio:checked").val() == "false"){
            c_url="/source/update_versand.php?Land="+land+"&liefer=0"; 
            if(ppplus==1)
            {
                $.get(c_url,function(pppVersand){
                    $('#Versand').val(pppVersand);
                });
            }
            else
            {
                $('#versand_optionen').load(c_url);
            }
        }        
    })
    $("#liefer_Land").change(function(){
        update_versand($(this));   
    });

    $(document).delegate(".lieferadresseChangeRadio", "change", function(){
        
        if( $(this).val() == "false"  ){
            land = $("#Land").val();  
            c_url="/source/update_versand.php?Land="+land+"&liefer=0"; 
        }
        else
        {
            land = $("#liefer_Land").val();
            c_url="/source/update_versand.php?Land="+land+"&liefer=1";
        } 
        if(ppplus==1)
        {
            $.get(c_url,function(pppVersand){
                $('#Versand').val(pppVersand);
            });
        }
        else
        {
            $('#versand_optionen').load(c_url);
        }
    });
});
function update_versand(e)
{ 
    if( e != "undefined" )
    {
        land=e.val();
        c_url="/source/update_versand.php?Land="+land;
        if(this.id=="liefer_Land")
        {
            c_url+="&liefer=1";
        }
        else
        {
            c_url+="&liefer=0";
        }   
    }
    else
    {
        c_url="/source/update_versand.php?Land="+land+"&liefer=0";    
    }          
    if(ppplus==1)
    {
        alert(c_url);
        $.get(c_url,function(pppVersand){
            $('#Versand').val(pppVersand);
        });
    }
    else
    {
        $('#versand_optionen').load(c_url);
    }
}