Subversion Repositories wpShopGermany4

Rev

Rev 3506 | Rev 5261 | 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 { ?>
11
<table class="wpsg_admin_vz_list wpsg_admin_table">
12
	<tr>
3506 daniel 13
		<th class="col_name"><?php echo __('Bezeichnung', 'wpsg'); ?></th>
14
		<th class="col_innereu"><?php echo __('Inner- gemeinschaftlich', 'wpsg'); ?></th>
1067 daniel 15
		<th class="col_aktion"></th>
16
	</tr>
17
	<?php foreach ($this->view['data'] as $vz) { ?>
18
	<tr>
2946 david 19
		<td class="wpsg_editable col_name">
3506 daniel 20
			<span  id="vz_<?php echo $vz['id']; ?>_name" ><?php echo wpsg_hspc($vz['name']); ?></span>
21
			<br />
22
			<?php if (!empty($vz['param'])) { $arPLZ = unserialize($vz['param']); } ?>
23
			<div id="vz_<?php echo $vz['id']; ?>_plz" style="display:none">
24
				<textarea style="float:left; width:100%;"><?php echo wpsg_hspc($vz['param']); ?></textarea>
25
				<input style="width:75px;" class="" type="submit" name="wpsg_mod_vz_submitsave" value="<?php echo __('Speichern', 'wpsg'); ?>" onclick="return wpsg_savePLZ(<?php echo $vz['id']; ?>);" />
26
			</div>
2946 david 27
		</td>
3506 daniel 28
		<td class="col_innereu">
29
			<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']; ?>" />
30
		</td>
1067 daniel 31
		<td class="col_aktion">
2952 david 32
 
1067 daniel 33
			<a class="wpsg_icon wpsg_icon_remove" href="#" title="<?php echo __('Versandzone löschen', 'wpsg'); ?>" onclick="return wpsg_removeVZ(<?php echo $vz['id']; ?>);"></a>
2952 david 34
			<span><a class="wpsg_icon wpsg_icon_right wpsg_icon_plzedit" href="#" title="<?php echo __('Versandzonen PLZ bearbeiten', 'wpsg'); ?>" onclick="return wpsg_editPLZ(<?php echo $vz['id']; ?>);"></a></span>
35
 
3506 daniel 36
			<script type="text/javascript">/* <![CDATA[ */
1068 daniel 37
 
1067 daniel 38
				jQuery('#vz_<?php echo $vz['id']; ?>_name').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', {
1068 daniel 39
					submitdata: {
1067 daniel 40
			    		field: 'name',
41
			    		vz_id: '<?php echo $vz['id']; ?>'
1068 daniel 42
					},
1587 daniel 43
					submit  : '<?php echo __('Speichern', 'wpsg'); ?>',
1068 daniel 44
					placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
45
					indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
1067 daniel 46
			    	tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
47
				});
1068 daniel 48
 
1067 daniel 49
				jQuery('#vz_<?php echo $vz['id']; ?>_value').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', {
1068 daniel 50
					submitdata: {
1067 daniel 51
			    		field: 'value',
52
			    		vz_id: '<?php echo $vz['id']; ?>'
1068 daniel 53
					},
1587 daniel 54
					submit  : '<?php echo __('Speichern', 'wpsg'); ?>',
1068 daniel 55
					placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
56
					indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
1067 daniel 57
			    	tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
58
				});
1068 daniel 59
 
3506 daniel 60
				/* ]]> */</script>
1067 daniel 61
		</td>
62
	</tr>
63
	<?php } ?>
64
</table>
3506 daniel 65
 
66
<script type="text/javascript">/* <![CDATA[ */
67
 
68
	jQuery(document).ready(function() {
69
 
70
		jQuery('.wpsg_innereu').bind('click', function() {
71
 
72
			var checked = "0"; if (jQuery(this).prop("checked")) checked = "1";
73
 
74
			jQuery.ajax( {
75
				url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1',
76
				data: {
77
					field: 'innereu',
78
					vz_id: jQuery(this).attr("id").substr(8),
79
					value: checked
80
				}
81
			} );
82
 
83
		} );
84
 
85
	} );
86
 
87
/* ]]> */</script>
88
 
1067 daniel 89
<?php } ?>