Subversion-Projekte lars-tiefland.ci

Revision

Revision 1975 | Revision 1978 | 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 1977 2017-01-20 23:56:38Z 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(){
63
					$.post('/backend/herstellerkatalog/del/',$('#delForm').serializeArray());
64
					$(this).dialog("close")
65
				},
66
				"Nein":function()
67
				{
68
					$(this).dialog("close")
69
				}
70
			}
71
		})
1942 lars 72
	})
1955 lars 73
	function editHst()
74
	{
75
		$('#hstEditDlg').load("/backend/herstellerkatalog/edit/"+$(this).attr('data-id'),function(){
76
			$('#hstEditDlg').dialog('open');
77
		});
78
	}
1971 lars 79
	function delHst()
1970 lars 80
	{
81
		$('#hstDelDlg').load("/backend/herstellerkatalog/del/"+$(this).attr('data-id'),function(){
1974 lars 82
			$('#hstDelDlg').dialog('open');
1970 lars 83
		});
84
	}
1942 lars 85
</script>
1944 lars 86
<table style="width:100%">
1941 lars 87
	<tr>
1946 lars 88
		<th>Name</th>
89
		<th style="width:210px">Aktionen</th>
1941 lars 90
	</tr>
91
	{foreach $hersteller as $hst}
92
	<tr>
93
		<td>
94
			{$hst.name}
95
		</td>
1942 lars 96
		<td>
97
			<a class="edit_hst" data-id="{$hst.id}">ändern</a>
98
			<a class="del_hst" data-id="{$hst.id}" data-name="{$hst.name}">löschen</a>
99
		</td>
1941 lars 100
	</tr>
101
	{/foreach}
102
</table>
1955 lars 103
<div id="hstEditDlg"></div>
1973 lars 104
<div id="hstDelDlg" title="Hersteller löschen"></div>
1965 lars 105
<div id="result" title="Ergebnis"></div>
1941 lars 106
<!-- $Id: herstellerkatalog.tpl 1977 2017-01-20 23:56:38Z lars $ END -->
107
{include file="footer.tpl"}