Subversion Repositories wpShopGermany4

Rev

Rev 5439 | Rev 5934 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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