Subversion-Projekte lars-tiefland.ci

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
875 lars 1
$(function()
2
{
3
    $('#neu').attr("disabled","disabled").click(check_form);
4
    $("input[type=radio].position").click(check_pos);
5
    function check_pos()
6
    {
7
        $('#neu').removeAttr("disabled");
8
    }
9
    $('#bild_row').hide();
10
    $('#text_row').hide();
11
    $('#link_row').hide();
12
    $('#typ').change(toggle_untertyp);
13
 
14
    function toggle_untertyp()
15
    {
16
        val=$(this).val();
17
        if(val=="standard")
18
        {
19
            $('#untertyp_row').show();
20
            $('#bild_row').hide();
21
            $('#text_row').hide();
22
            $('#link_row').hide();
23
        }
24
        else
25
        {
26
            $('#untertyp_row').hide();
27
            $('#bild_row').show();
28
            $('#text_row').show();
29
            $('#link_row').show();
30
        }
31
    }
32
 
33
    function check_form(event)
34
    {
35
        type=$('#typ').val();
36
        stype=$('#untertyp').val();
37
        if(type=="0")
38
        {
39
            alert("Bitte einen Typ wählen!");
40
            return false;
41
        }
42
        if(type=="standard" && stype==0)
43
        {
44
            alert("Bitte einen Untertyp wählen!");
45
            return false;
46
        }
47
    }
48
});