Subversion-Projekte lars-tiefland.ci

Revision

Revision 1970 | Revision 1973 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1941 lars 1
{include file="header.tpl"}
2
<!-- $Id: herstellerkatalog.tpl 1971 2017-01-20 23:41:14Z lars $ BEGIN -->
1942 lars 3
<script>
4
	$(function(){
1966 lars 5
		$('#result').dialog({
6
			autoOpen:false,
7
			resizable:false,
8
			width:400,
9
			modal:true,
10
			buttons:{
11
				"OK":function(){
12
					$(this).dialog("close")
13
				}
14
			}
15
		})
1942 lars 16
		$(".del_hst").button({
17
			icons:{
1943 lars 18
				primary:"ui-icon-trash"
1942 lars 19
			}
1970 lars 20
		}).css("cursor","pointer").click(delHst);
1942 lars 21
		$(".edit_hst").button({
22
			icons:{
23
				primary:"ui-icon-pencil"
24
			}
1955 lars 25
		}).css("cursor","pointer").click(editHst);
26
		$('#hstEditDlg').dialog({
27
			autoOpen:false,
28
			modal:true,
29
			width:600,
1964 lars 30
			resizable:false,
31
			buttons:[{
32
				text:"speichern",
33
				icons: {
34
					primary: "ui-icon-check"
35
				},
36
				click:function()
37
				{
38
					$('#result').load("/backend/herstellerkatalog/save",$('#herstellerForm').serializeArray(),function(){
39
						$('#result').dialog("open");
40
					})
1966 lars 41
					$('#hstEditDlg').dialog("close");
1964 lars 42
				}
43
			},
44
			{
45
				text:"verwerfen",
46
				icons: {
47
					primary: "ui-icon-close"
48
				},
49
				click:function(){
1966 lars 50
					$('#hstEditDlg').dialog("close");
1964 lars 51
				}
52
			}
53
			]
1955 lars 54
		})
1970 lars 55
		$('#delHstDlg').dialog({
56
			autoOpen:false,
57
			resizable:false,
58
			modal:true,
59
			width:"90%",
60
			buttons:{
61
				"Ja":function(){
62
					$.post('/backend/herstellerkatalog/del/',$('#delForm').serializeArray());
63
					$(this).dialog("close")
64
				},
65
				"Nein":function()
66
				{
67
					$(this).dialog("close")
68
				}
69
			}
70
		})
1942 lars 71
	})
1955 lars 72
	function editHst()
73
	{
74
		$('#hstEditDlg').load("/backend/herstellerkatalog/edit/"+$(this).attr('data-id'),function(){
75
			$('#hstEditDlg').dialog('open');
76
		});
77
	}
1971 lars 78
	function delHst()
1970 lars 79
	{
80
		$('#hstDelDlg').load("/backend/herstellerkatalog/del/"+$(this).attr('data-id'),function(){
81
			$('#hstEditDlg').dialog('open');
82
		});
83
	}
1942 lars 84
</script>
1944 lars 85
<table style="width:100%">
1941 lars 86
	<tr>
1946 lars 87
		<th>Name</th>
88
		<th style="width:210px">Aktionen</th>
1941 lars 89
	</tr>
90
	{foreach $hersteller as $hst}
91
	<tr>
92
		<td>
93
			{$hst.name}
94
		</td>
1942 lars 95
		<td>
96
			<a class="edit_hst" data-id="{$hst.id}">ändern</a>
97
			<a class="del_hst" data-id="{$hst.id}" data-name="{$hst.name}">löschen</a>
98
		</td>
1941 lars 99
	</tr>
100
	{/foreach}
101
</table>
1955 lars 102
<div id="hstEditDlg"></div>
103
<div id="hstDelDlg"></div>
1965 lars 104
<div id="result" title="Ergebnis"></div>
1941 lars 105
<!-- $Id: herstellerkatalog.tpl 1971 2017-01-20 23:41:14Z lars $ END -->
106
{include file="footer.tpl"}