Subversion-Projekte lars-tiefland.webanos.faltradxxs.de

Revision

Revision 78 | Revision 80 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
63 lars 1
{extends file="index.tpl"}
64 lars 2
{block name="maincontent"}
63 lars 3
    <!-- $Id: index.tpl 79 2023-05-20 22:20:23Z lars $ BEGIN -->
77 lars 4
    <button class="neu" id="vportale_0" title="neues Portal anlegen">Neues Portal anlegen</button>
5
    <table style="width: 100%" id="vPortale">
6
        <thead>
7
        <tr>
8
            <td>Name</td>
9
            <td>Art</td>
10
            <td>Aktion</td>
11
        </tr>
12
        </thead>
13
        <tbody>
14
        {foreach $salesPortals as $salesPortal}
15
            <tr class="{cycle values=",gerade"}">
16
                <td>{$salesPortal->name}</td>
17
                <td>{$salesPortal->sales_portal_type->type}</td>
18
                <td>
19
                    <button class="edit" id="edit_{$vportal.id}">Ändern</button>
20
                    <button class="del" id="del_{$vportal.id}_{$vportal.name}">Löschen</button>
21
                </td>
22
            </tr>
23
        {/foreach}
24
        </tbody>
25
    </table>
26
    <div id="vportale_dlg" title="Verkaufsportal ändern / hinzufügen">
27
    </div>
28
    <div id="vportale_del_dlg" style="display:none">
29
        Wollen Sie dieses Portal wirklich löschen?
30
    </div>
70 lars 31
    <script>
32
        $(function (){
75 lars 33
            $('#vPortale').dataTable({
34
                "language": {
35
                    "url": "../js/DataTables-1.10.9/German.json"
36
                },
37
                "columnDefs": [
38
                    { "searchable": false, "targets": [ 2 ] },
39
                    { "orderable": false, "targets": [ 2 ] }
40
                ]
41
            });
76 lars 42
            $('.neu').uibutton({
75 lars 43
                icons:{
44
                    primary:"ui-icon-plus"
45
                }
46
            }).click(edit_vportale);
76 lars 47
            $('.edit').uibutton({
75 lars 48
                icons:{
49
                    primary:"ui-icon-pencil"
50
                }
51
            }).click(edit_vportale);
76 lars 52
            $('.del').uibutton({
75 lars 53
                icons:{
54
                    primary:"ui-icon-trash"
55
                }
56
            }).click(del_vportale);
57
            $('#vportale_dlg').dialog({
58
                autoOpen:false,
59
                modal:true,
60
                resizable:false,
61
                width:700,
62
                buttons:{
63
                    "speichern": function(){
64
                        $('#vportale_content').load("vportale.php",$('#vportale_form').serializeArray());
65
                        $(this).dialog("close");
66
                    }
67
                }
68
            })
70 lars 69
        });
78 lars 70
        function edit_vportale()
71
        {
79 lars 72
            let vp_id = this.id;
78 lars 73
            vp_id = vp_id.split("_");
74
            vp_id = vp_id[1];
75
            //(vp_id);
76
            $('#vportale_dlg').load("vportale.php?action=edit&id="+vp_id).dialog("open");
77
        }
78
        function del_vportale()
79
        {
79 lars 80
            let vp_id = this.id;
78 lars 81
            vp_id = vp_id.split("_");
79 lars 82
            let vp_name = vp_id[2];
78 lars 83
            vp_id = vp_id[1];
84
            //(vp_id);
85
            //$('#vportale_dlg').load("vportale.php?action=del&id="+vp_id).dialog("open");
86
            $('#vportale_del_dlg').dialog({
87
                modal:true,
88
                width:400,
89
                resizable:false,
79 lars 90
                title:"Verkaufsportal "+vp_name+" löschen",
78 lars 91
                buttons:{
92
                    "Nein":function()
93
                    {
94
                        $(this).dialog("close");
95
                    },
96
                    "Ja":function()
97
                    {
98
                        $('#vportale_content').load("vportale.php?action=del&id="+vp_id);
99
                        $(this).dialog("close");
100
                    }
101
                }
102
            })
103
        }
70 lars 104
    </script>
63 lars 105
    <!-- $Id: index.tpl 79 2023-05-20 22:20:23Z lars $ END -->
64 lars 106
{/block}