Subversion-Projekte lars-tiefland.ci

Revision

Revision 855 | Revision 1292 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
855 lars 1
<script>
866 lars 2
	$(function(){
3
		$('.version').change(updateShopVersion);
4
		$('#shopVersion').DataTable({
5
			"ordering": false,
6
			"info":	 false,
7
			"paging":   false,
8
			"columnDefs": [
9
				{ "visible": false, "targets": 0 }
10
			],
11
			"dom": 'T<"clear">lfrtip',
12
			"tableTools": {
13
				"sSwfPath": "../js/DataTables-1.10.5/extensions/TableTools/swf/copy_csv_xls_pdf.swf"
14
			},
15
			"order": [[ 0, 'asc' ]],
16
			"language": {
855 lars 17
				"sEmptyTable": "Keine Daten in der Tabelle vorhanden",
18
				"sInfo": "_START_ bis _END_ von _TOTAL_ Eintr&auml;gen",
19
				"sInfoEmpty": "0 bis 0 von 0 Eintr&auml;gen",
20
				"sInfoFiltered": "(gefiltert von _MAX_ Eintr&auml;gen)",
21
				"sInfoPostFix": "",
22
				"sInfoThousands": ".",
23
				"sLengthMenu": "_MENU_ Eintr&auml;ge anzeigen",
24
				"sLoadingRecords": "Wird geladen...",
25
				"sProcessing": "Bitte warten...",
26
				"sSearch": "Suchen",
27
				"sZeroRecords": "Keine Eintr&auml;ge vorhanden.",
28
				"oPaginate": {
29
					"sFirst": "Erste",
30
					"sPrevious": "Zur&uuml;ck",
31
					"sNext": "N&auml;chste",
32
					"sLast": "Letzte"
33
				},
34
				"oAria": {
35
					"sSortAscending": ": aktivieren, um Spalte aufsteigend zu sortieren",
36
					"sSortDescending": ": aktivieren, um Spalte absteigend zu sortieren"
37
				}
38
			},
866 lars 39
			"drawCallback": function ( settings ) {
40
				var api = this.api();
41
				var rows = api.rows( { page:'current' } ).nodes();
42
				var last=null;
43
 
44
				api.column(0, { page:'current' } ).data().each( function ( group, i ) {
45
					if ( last !== group ) {
46
						$(rows).eq( i ).before(
47
							'<tr class="group"><th colspan="3">'+group+'</th></tr>'
48
						);
49
 
50
						last = group;
51
					}
52
				} );
53
			}
54
		});
55
	})
56
	function updateShopVersion()
57
	{
58
		shop=$(this).attr("data-shop");
59
		shop2=$(this).attr("data-shop2");
60
		verz=$(this).attr("data-dir");
61
		vers=$(this).val();
62
		server=$(this).attr("data-server");
63
		url="updateShopVersion.php?shop="+shop+"&verz="+verz+"&version="+vers+"&server="+server;
64
		$.get(url,function(html)
65
		{
66
			alert(html);
67
			$('#svnlog_'+shop2+'_'+verz).load("readSVNLog.php?version="+vers);
68
		})
69
	}
855 lars 70
</script>
71
<style>
866 lars 72
	#shopVersion tbody tr > th{
73
		text-align: left;
74
		background-color: #ccc;
75
	}
76
	#shopVersion tbody tr:nth-child(3n) td{
77
		border-bottom: 1px dashed;
78
	}
79
	#shopVersion tbody tr:last-child td{
80
		border-bottom: none;
81
	}
855 lars 82
</style>
83
<table style="width:100%" id="shopVersion" class="hover">
866 lars 84
	<thead>
85
		<tr>
86
			<th>Shop</th>
87
			<th>Verzeichnis</th>
88
			<th>Version</th>
89
			<th>Log-Meldung (SVN)</th>
90
		</tr>
91
	</thead>
92
	<tbody>
93
	{foreach $shops as $sName => $shop}
94
			{foreach $shop as $dir => $info}
95
			<tr>
96
				<td>{$sName}</td>
97
				<td>{$dir}</td>
98
				<td>
99
					<select name="{$sName}_{$dir}_version" class="version" data-shop="{$sName}" data-dir="{$dir}" data-server="{$info.server}" data-shop2={$sName|replace:".":"_"|replace:"-":"_"}>
100
					{html_options options=$versions selected=$info.version}
101
					</select>
102
				</td>
103
				<td>
104
					<div id="svnlog_{$sName|replace:".":"_"|replace:"-":"_"}_{$dir}">{$info.logmessage}</div>
105
				</td>
106
			</tr>
107
			{/foreach}
108
	{/foreach}
109
	</tbody>
855 lars 110
</table>