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

Revision

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