Subversion-Projekte lars-tiefland.ci

Revision

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