Subversion-Projekte lars-tiefland.webanos.marine-sales.de

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
2 lars 1
function clickEdit(){
2
    $(".aktionsname").hover(
3
        function(){
4
            $(this).css("cursor", "pointer");
5
        },
6
        function(){
7
            $(this).css("cursor", "normal");
8
        }
9
    ).click(function(){
10
        let id = $(this).parent().attr("ID");
11
 
12
        $("#mode").val("edit");
13
        $("#aktionsIDUebersicht").val(id);
14
 
15
        $("#aktionEdit").submit();
16
    })
17
}
18
function changeArt(){
19
    $(".aktionsArt").change(function(){
20
        let data = [];
21
        let id = $(this).val();
22
        let aktionsID = $("#aktionsID").val();
23
 
24
        data.push({ name: "aktionsArtID", value: id });
25
        data.push({ name: "aktionsID", value: aktionsID });
26
 
27
        $.ajax({
28
            type: "POST",
29
            url: "aktion_v2.php?mode=changeAktionsArt",
30
            data: data
31
        }).done(function(html){
32
            $(".darstellungListe").html(html);
33
        });
34
    });
35
}
36
/**
37
 * Initialisiert die Tabs der Aktionsverwaltung
38
 */
39
function initTab(){
40
    $(".tabs").uitabs();
41
}
42
 
43
 
44
/**
45
* Weist der Klasse datepicker das JQuery Plugin Datepicker im Deutschen Format zu.
46
*/
47
function getDatepicker(){
48
    $( ".datepicker" ).datepicker({
49
        dateFormat: 'dd.mm.yy',
50
        monthNames: ['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'],
51
        dayNames: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag','Samstag'],
52
        dayNamesMin: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa']
53
    });
54
}
55
 
56
function initTinyMCE(){
57
    tinyMCE.init({
58
        // General options
59
        selector: "textarea",
60
        theme : "modern",
61
        language: "de",
62
        plugins: [
63
            "advlist autolink lists link image charmap preview anchor",
64
            "searchreplace visualblocks code fullscreen",
65
            "insertdatetime media table contextmenu paste" ],
66
        toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
67
 
68
    });
69
}
70
 
71
function clickDelete(){
72
    $(".deleteAktion").hover(
73
        function(){
74
            $(this).css("cursor", "pointer");
75
        },
76
        function(){
77
            $(this).css("cursor", "normal");
78
        }
79
    ).click(function(){
80
        let loeschen = confirm("Soll die Aktion wirklich entfernt werden?");
81
 
82
        if (loeschen == true) {
83
 
84
            let data = [];
85
            let idArray = $(this).attr("ID");
86
            let ids = idArray.split("_");
87
            let id = ids[1];
88
 
89
            data.push({ name: "aktionsID", value: id });
90
 
91
            $.ajax({
92
 
93
                type: "POST",
94
                url: "aktion_v2.php?mode=delete",
95
                data: data,
96
                success: function(){
97
                    window.location.assign(document.URL);
98
                }
99
            })
100
        }
101
 
102
    })
103
}
104
 
105