Subversion Repositories wpShopGermany4

Rev

Rev 7560 | Rev 7760 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1067 daniel 1
<?php
2
 
3
	/**
4
	 * Template für die Liste der Versandzonen
5
	 */
6
 
7
?>
8
<?php if (!is_array($this->view['data']) || sizeof($this->view['data']) <= 0) { ?>
9
<?php echo __('Bisher keine Versandzonen hinterlegt.', 'wpsg'); ?>
10
<?php } else { ?>
5532 daniel 11
<table class="table wpsg_table_vz">
6306 hartmut 12
	<thead>
1067 daniel 13
	<tr>
3506 daniel 14
		<th class="col_name"><?php echo __('Bezeichnung', 'wpsg'); ?></th>
15
		<th class="col_innereu"><?php echo __('Inner- gemeinschaftlich', 'wpsg'); ?></th>
1067 daniel 16
		<th class="col_aktion"></th>
17
	</tr>
6306 hartmut 18
	</thead>
19
	<tbody>
1067 daniel 20
	<?php foreach ($this->view['data'] as $vz) { ?>
21
	<tr>
2946 david 22
		<td class="wpsg_editable col_name">
3506 daniel 23
			<span  id="vz_<?php echo $vz['id']; ?>_name" ><?php echo wpsg_hspc($vz['name']); ?></span>
24
			<br />
5532 daniel 25
			<div id="vz_<?php echo $vz['id']; ?>_plz" style="display:none" class="wpsg_plz_div">
26
				<textarea><?php echo wpsg_hspc($vz['param']); ?></textarea>
27
				<input type="submit" class="button" name="wpsg_mod_vz_submitsave" value="<?php echo __('Speichern', 'wpsg'); ?>" onclick="return wpsg_savePLZ(<?php echo $vz['id']; ?>);" />
3506 daniel 28
			</div>
2946 david 29
		</td>
3506 daniel 30
		<td class="col_innereu">
31
			<input class="wpsg_innereu" <?php echo (($vz['innereu'] == '1')?'checked="checked"':''); ?> type="checkbox" value="1" name="innereu_<?php echo $vz['id']; ?>" id="innereu_<?php echo $vz['id']; ?>" />
32
		</td>
1067 daniel 33
		<td class="col_aktion">
5532 daniel 34
 
35
			<a class="wpsg_icon_plzedit" href="#" title="<?php echo __('Versandzonen PLZ bearbeiten', 'wpsg'); ?>" onclick="return wpsg_editPLZ(<?php echo $vz['id']; ?>);">[ PLZ ]</a>
36
			<a class="glyphicon glyphicon-trash" href="#" title="<?php echo __('Versandzone löschen', 'wpsg'); ?>" onclick="return wpsg_removeVZ(<?php echo $vz['id']; ?>);"></a>
2952 david 37
 
7560 daniel 38
			<script>
1068 daniel 39
 
7560 daniel 40
				jQuery('#vz_<?php echo $vz['id']; ?>_name').wpsg_editable('<?php
41
 
42
						echo html_entity_decode(wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', 'wpsg-admin-versandzonen-inline_edit-'.$vz['id']));
43
 
44
					?>', {
1068 daniel 45
					submitdata: {
1067 daniel 46
			    		field: 'name',
47
			    		vz_id: '<?php echo $vz['id']; ?>'
1068 daniel 48
					},
7560 daniel 49
					submit: '<?php echo __('Speichern', 'wpsg'); ?>',
1068 daniel 50
					placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
51
					indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
1067 daniel 52
			    	tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
53
				});
1068 daniel 54
 
7560 daniel 55
				jQuery('#vz_<?php echo $vz['id']; ?>_value').wpsg_editable('<?php
56
 
57
						echo html_entity_decode(wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', 'wpsg-admin-versandzonen-inline_edit-'.$vz['id']));
58
 
59
					?>', {
1068 daniel 60
					submitdata: {
1067 daniel 61
			    		field: 'value',
62
			    		vz_id: '<?php echo $vz['id']; ?>'
1068 daniel 63
					},
7560 daniel 64
					submit: '<?php echo __('Speichern', 'wpsg'); ?>',
1068 daniel 65
					placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
66
					indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
1067 daniel 67
			    	tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
68
				});
1068 daniel 69
 
7560 daniel 70
				</script>
1067 daniel 71
		</td>
72
	</tr>
73
	<?php } ?>
6306 hartmut 74
	</tbody>
1067 daniel 75
</table>
3506 daniel 76
 
77
<script type="text/javascript">/* <![CDATA[ */
78
 
79
	jQuery(document).ready(function() {
80
 
81
		jQuery('.wpsg_innereu').bind('click', function() {
82
 
83
			var checked = "0"; if (jQuery(this).prop("checked")) checked = "1";
84
 
85
			jQuery.ajax( {
7754 daniel 86
				url: '<?php
87
 
88
                    echo html_entity_decode(wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', 'wpsg-admin-versandzonen-inline_edit-'.$vz['id']));
89
 
90
                ?>',
3506 daniel 91
				data: {
92
					field: 'innereu',
93
					vz_id: jQuery(this).attr("id").substr(8),
94
					value: checked
95
				}
96
			} );
97
 
98
		} );
99
 
100
	} );
101
 
102
/* ]]> */</script>
103
 
1067 daniel 104
<?php } ?>