Subversion-Projekte lars-tiefland.content-management

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
        function getBilder()
2
        {
3
            $( '#bildverwaltung' ) . load( "/Online-Shop/bilder.php",
4
            {
5
                a_id : $( '#artikel_id' ).val()
6
            });
7
        }
8
 
9
        function add_images()
10
        {
11
            $( '#add_image_dialog' ).load( "/Online-Shop/getImages.php?a_id="+$( '#artikel_id' ).val()).dialog( "open" );
12
            return false;
13
        }
14
 
15
        function del_image()
16
        {
17
            id=this.id;
18
            id=id.split("_");
19
            a_id=id[3];
20
            b_id=id[2];
21
            b_name=$('#bild_name_'+b_id).html();
22
            $('#b_id').val(b_id);
23
            $('#bild_name').html(b_name);
24
            $('#del_image_dialog').dialog("open");
25
            return false;
26
        }
27
        $( function ()
28
        {
29
            getBilder();
30
            $( '#add_image' ).button().click(add_images);
31
            $( '#add_image_dialog' ).dialog("destroy").dialog(
32
            {
33
                autoOpen : false,
34
                modal : true,
35
                width : 700,
36
                height: 600,
37
                resizable : false,
38
                buttons :
39
                {
40
                    "Abbrechen" : function ()
41
                    {
42
                        $( this ) . dialog( "close" );
43
                    }
44
                }
45
            });
46
            $( '#del_image_dialog' ).dialog("destroy").dialog(
47
            {
48
                autoOpen : false,
49
                modal : true,
50
                width : 700,
51
                resizable : false,
52
                buttons :
53
                {
54
                    "Löschen": function(){
55
                        $('#bildverwaltung').load("/Online-Shop/del_image.php",$('#del_image_form').serializeArray(), function(html){
56
                            getBilder();
57
                        });
58
                        $(this).dialog("close");
59
                    },
60
                    "Abbrechen" : function ()
61
                    {
62
                        $( this ) . dialog( "close" );
63
                    }
64
                }
65
            });
66
        });