Subversion-Projekte lars-tiefland.cienc

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
8 lars 1
$(function(){
2
 
3
    update_versand($(this));
4
 
5
    $('.input1').keyup(function(e) {
6
        if(e.keyCode == 13) {
7
            $("form#login").submit();
8
            return false;
9
        }
10
    });
11
 
12
    $('#Lieferadresse_t').click(function(){
13
        $('#Lieferadresse').show();
14
        $('#packstation').hide();
15
        $('.dhl').attr("disabled",true);
16
        $('.adresse').removeAttr("disabled");
17
    });
18
    $('#Lieferadresse_f').click(function(){
19
        $('#Lieferadresse').hide();
20
        $('#packstation').hide();
21
        $('.dhl').attr("disabled",true);
22
        $('.adresse').attr("disabled",true);
23
    });
24
    $('#Lieferadresse_p').click(function(){
25
        $('#packstation').show();
26
        $('#Lieferadresse').hide();
27
        $('.dhl').removeAttr("disabled");
28
        $('.adresse').attr("disabled",true);
29
    });
30
 
31
 
32
    if (land != 1) {
33
        $('#ustidnr_text').show();
34
        $('#ustidnr_input').show();
35
    } else {
36
        $('#ustidnr_text').hide();
37
        $('#ustidnr_input').hide();
38
    }
39
    $('#Land').change(function() {
40
        land = $('#Land').val();
41
        if (land != 1) {
42
            $('#ustidnr_text').show();
43
            $('#ustidnr_input').show();
44
        } else {
45
            $('#ustidnr_text').hide();
46
            $('#ustidnr_input').hide();
47
        }
48
 
49
        if($(".lieferadresseChangeRadio:checked").val() == "false"){
50
            c_url="/source/update_versand.php?Land="+land+"&liefer=0";
51
            if(ppplus==1)
52
            {
53
                $.get(c_url,function(pppVersand){
54
                    $('#Versand').val(pppVersand);
55
                });
56
            }
57
            else
58
            {
59
                $('#versand_optionen').load(c_url);
60
            }
61
        }
62
    })
63
    $("#liefer_Land").change(function(){
64
        update_versand($(this));
65
    });
66
 
67
    $(document).delegate(".lieferadresseChangeRadio", "change", function(){
68
 
69
        if( $(this).val() == "false"  ){
70
            land = $("#Land").val();
71
            c_url="/source/update_versand.php?Land="+land+"&liefer=0";
72
        }
73
        else
74
        {
75
            land = $("#liefer_Land").val();
76
            c_url="/source/update_versand.php?Land="+land+"&liefer=1";
77
        }
78
        if(ppplus==1)
79
        {
80
            $.get(c_url,function(pppVersand){
81
                $('#Versand').val(pppVersand);
82
            });
83
        }
84
        else
85
        {
86
            $('#versand_optionen').load(c_url);
87
        }
88
    });
89
});
90
function update_versand(e)
91
{
92
    if( e != "undefined" )
93
    {
94
        land=e.val();
95
        c_url="/source/update_versand.php?Land="+land;
96
        if(this.id=="liefer_Land")
97
        {
98
            c_url+="&liefer=1";
99
        }
100
        else
101
        {
102
            c_url+="&liefer=0";
103
        }
104
    }
105
    else
106
    {
107
        c_url="/source/update_versand.php?Land="+land+"&liefer=0";
108
    }
109
    if(ppplus==1)
110
    {
111
        alert(c_url);
112
        $.get(c_url,function(pppVersand){
113
            $('#Versand').val(pppVersand);
114
        });
115
    }
116
    else
117
    {
118
        $('#versand_optionen').load(c_url);
119
    }
120
}