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

Revision

Revision 143 | Revision 145 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
131 lars 1
{extends file="index.tpl"}
2
{block name="maincontent"}
3
    <!-- $Id: supplierList.tpl 144 2023-08-02 18:00:04Z lars $ BEGIN -->
143 lars 4
    <button id="new"></button>
5
    <br><br>
6
    <table class="keinRand" width="100%" cellspacing="0" cellpadding="3" id="dataTable">
144 lars 7
        <thead>
139 lars 8
        <tr class="links">
9
            <td>Lieferanten</td>
143 lars 10
            <td>Aktionen</td>
139 lars 11
        </tr>
144 lars 12
        </thead>
13
        <tbody>
139 lars 14
        {section loop=$lieferanten name=l_ind}
15
            {cycle values="ungerade, gerade" assign="class"}
16
            <tr class="rechts {$class}">
143 lars 17
                <td  style="text-align:left !important;">{$lieferanten[l_ind].name}</td>
18
                <td  style="text-align:left !important;">
19
                    <button class="edit" data-id="{$manufacturer.id}"></button>
20
                    <button class="del" data-id="{$manufacturer.id}"></button>
21
                </td>
139 lars 22
            </tr>
23
            {sectionelse}
24
        {/section}
25
        {if $webs.bgcolor_seite != 'FFFFFF'}
26
            <tr class="links">
27
                <td>&nbsp;</td>
28
            </tr>
29
        {/if}
144 lars 30
        </tbody>
139 lars 31
    </table>
32
    <script>
33
        $(".keinRand tr").not(':first').hover(
34
            function () {
35
                $(this).css("background-color","#ccc");
36
            },
37
            function () {
38
                $(this).css("background-color","");
39
            }
40
        );
41
    </script>
42
 
43
    <style>
44
        a:hover{
45
            color: #000 !important;
46
        }
47
    </style>
143 lars 48
    <script>
49
        $(function (){
50
            $("#dataTable").dataTable({
51
                "lengthMenu": [[100, -1], [100, "Alle"]],
52
                "language": {
53
                    "url": "/js/DataTables-1.10.19/German.json"
54
                }
55
            });
56
            $('#editDlg').dialog({
57
                autoOpen:false,
58
                modal:true,
59
                resizable:false,
60
                width:800,
61
                buttons:[
62
                    {
63
                        text:"Speichern",
64
                        icon:"ui-icon-check",
65
                        click:function (){
66
                            let url="/bestellwesen/suppliers";
67
                            if($("#ID").val())
68
                            {
69
                                url+="/"+$("#ID").val()
70
                            }
71
                            $.post(url,$('#supplierForm').serializeArray(),function(){
72
                                $('#editDlg').dialog("close")
73
                                location.reload()
74
                            });
75
                        }
76
                    },
77
                    {
78
                        text:"Abbrechen",
79
                        icon:"ui-icon-cancel",
80
                        click:function (){
81
                            $('#editDlg').dialog("close");
82
                        }
83
                    }
84
                ]
85
            })
86
            $('#delDlg').dialog({
87
                autoOpen:false,
88
                modal:true,
89
                resizable:false,
90
                width:800,
91
                buttons:[
92
                    {
93
                        text:"Löschen",
94
                        icon:"ui-icon-trash",
95
                        click:function (){
96
                            let url="/bestellwesen/suppliers/"+$("#mId").html();
97
                            $.post(url,$('#supplierDelForm').serializeArray(),function(){
98
                                $('#delDlg').dialog("close")
99
                                location.reload()
100
                            });
101
                        }
102
                    },
103
                    {
104
                        text:"Abbrechen",
105
                        icon:"ui-icon-cancel",
106
                        click:function (){
107
                            $('#delDlg').dialog("close");
108
                        }
109
                    }
110
                ]
111
            })
112
            $("#new").uibutton({
113
                icons:{
114
                    primary:"ui-icon-plus"
115
                }
116
            }).click(function()
117
            {
118
                let url="/bestellwesen/suppliers/create/";
119
                $('#editDlg').load(url).dialog("open");
120
            });
121
            $(".edit").uibutton({
122
                icons:{
123
                    primary:"ui-icon-pencil"
124
                }
125
            }).click(function() {
126
                let url="/bestellwesen/suppliers/"+$(this).attr("data-id")+"/edit/";
127
                $('#editDlg').load(url).dialog("open");
128
            });
129
            $(".del").uibutton({
130
                icons:{
131
                    primary:"ui-icon-trash"
132
                }
133
            }).click(function() {
134
                let mId=$(this).attr("data-id");
135
                $.get("/bestellwesen/suppliers/"+mId,function(name) {
136
                    $('#manufacturerName').html(name);
137
                    $('#mId').html(mId);
138
                    $('#delDlg').dialog("open");
139
                })
140
            })
141
 
142
        })
143
    </script>
144
    <div id="editDlg"></div>
145
    <div id="delDlg" title="Hersteller löschen">
146
        Wollen Sie den Lieferanten <span id="manufacturerName"></span> wirklich löschen?
147
        <span id="mId" style="display: none"></span>
148
        <form id="supplierDelForm">
149
            <input type="hidden" name="_method" value="DELETE">
150
            <input type="hidden" name="_token" value="{csrf_token()}">
151
        </form>
152
    </div>
131 lars 153
    <!-- $id$ END -->
154
{/block}