1067 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Template für die Verwaltung der Versandzonen
|
|
|
5 |
*/
|
|
|
6 |
|
|
|
7 |
?>
|
|
|
8 |
<script type="text/javascript">
|
|
|
9 |
|
|
|
10 |
/**
|
|
|
11 |
* Wird aufgerufen um einen neuen Satz hinzuzufügen und die Liste neu zu lasen.
|
|
|
12 |
*/
|
|
|
13 |
function wpsg_addVZ()
|
|
|
14 |
{
|
|
|
15 |
|
|
|
16 |
jQuery('#wpsg_vz_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
|
|
|
17 |
|
|
|
18 |
jQuery.ajax( {
|
|
|
19 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=add&noheader=1',
|
|
|
20 |
success: function(data) {
|
|
|
21 |
jQuery('#wpsg_vz_list').html(data);
|
|
|
22 |
}
|
|
|
23 |
} );
|
|
|
24 |
|
|
|
25 |
return false;
|
|
|
26 |
|
|
|
27 |
} // function wpsg_addVZ()
|
|
|
28 |
|
|
|
29 |
/**
|
|
|
30 |
* Wird aufgerufen wenn eine Versandzone gelöscht werden soll
|
|
|
31 |
*/
|
|
|
32 |
function wpsg_removeVZ(vz_id)
|
|
|
33 |
{
|
|
|
34 |
|
|
|
35 |
if (!confirm('<?php echo __('Sind Sie sich sicher, dass sie diese Versandzone löschen möchten?', 'wpsg'); ?>')) return false;
|
|
|
36 |
|
|
|
37 |
jQuery('#wpsg_vz_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
|
|
|
38 |
|
|
|
39 |
jQuery.ajax( {
|
|
|
40 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=remove&noheader=1',
|
|
|
41 |
data: {
|
|
|
42 |
vz_id: vz_id
|
|
|
43 |
},
|
|
|
44 |
success: function(data) {
|
|
|
45 |
jQuery('#wpsg_vz_list').html(data);
|
|
|
46 |
}
|
|
|
47 |
} );
|
|
|
48 |
|
|
|
49 |
return false;
|
|
|
50 |
|
|
|
51 |
} // function wpsg_removeVZ(vz_id)
|
|
|
52 |
|
2946 |
david |
53 |
function wpsg_editPLZ(vz_id)
|
|
|
54 |
{
|
|
|
55 |
jQuery('#vz_' + vz_id + '_plz').attr('style', 'display:display');
|
|
|
56 |
|
|
|
57 |
return false;
|
|
|
58 |
}
|
|
|
59 |
|
|
|
60 |
function wpsg_savePLZ(vz_id)
|
|
|
61 |
{
|
|
|
62 |
|
|
|
63 |
jQuery.ajax( {
|
|
|
64 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=save_plz&noheader=1',
|
|
|
65 |
data: {
|
|
|
66 |
vz_id: vz_id,
|
2949 |
daniel |
67 |
textarea: jQuery('#vz_' + vz_id + '_plz textarea').val()
|
2946 |
david |
68 |
},
|
|
|
69 |
success: function(data) {
|
2949 |
daniel |
70 |
jQuery('#vz_' + vz_id + '_plz').attr('style', 'display:none');
|
2946 |
david |
71 |
}
|
|
|
72 |
} );
|
|
|
73 |
|
|
|
74 |
return false;
|
2949 |
daniel |
75 |
|
2946 |
david |
76 |
}
|
|
|
77 |
|
2656 |
daniel |
78 |
function wpsg_loadStandard()
|
|
|
79 |
{
|
|
|
80 |
|
|
|
81 |
if (!confirm('<?php echo __('Sind Sie sich sicher, dass sie die Standard Versandzonen und Länder laden möchten? Die alten Versandzonen und Länder gehen verloren.', 'wpsg'); ?>')) return false;
|
|
|
82 |
|
|
|
83 |
jQuery('#wpsg_vz_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
|
|
|
84 |
|
|
|
85 |
jQuery.ajax( {
|
|
|
86 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=loadStandard&noheader=1',
|
|
|
87 |
success: function(data) {
|
|
|
88 |
jQuery('#wpsg_vz_list').html(data);
|
|
|
89 |
}
|
|
|
90 |
} );
|
|
|
91 |
|
|
|
92 |
return false;
|
|
|
93 |
|
|
|
94 |
} // function wpsg_loadStandard()
|
|
|
95 |
|
1067 |
daniel |
96 |
</script>
|
|
|
97 |
|
|
|
98 |
<div class="wpsg_admin_submenu">
|
|
|
99 |
|
|
|
100 |
<div class="head">
|
|
|
101 |
<div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
|
|
|
102 |
<div style="clear:both;"></div>
|
|
|
103 |
</div>
|
|
|
104 |
|
|
|
105 |
<ul>
|
|
|
106 |
<?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
|
|
|
107 |
<li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
|
|
|
108 |
<?php } ?>
|
|
|
109 |
</ul>
|
|
|
110 |
|
|
|
111 |
</div>
|
|
|
112 |
|
|
|
113 |
<div class="wpsg_admin_content">
|
4061 |
daniel |
114 |
|
1067 |
daniel |
115 |
<div class="wpsg_admin_box">
|
|
|
116 |
|
|
|
117 |
<div class="head">
|
|
|
118 |
<div class="title">
|
|
|
119 |
<div class="fulltab">
|
|
|
120 |
<?php echo __('Versandzonen', 'wpsg'); ?>
|
|
|
121 |
<a title="<?php echo __('Neue Versandzone anlegen', 'wpsg'); ?>" href="" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_addVZ();"></a>
|
|
|
122 |
</div>
|
|
|
123 |
</div>
|
|
|
124 |
</div>
|
2656 |
daniel |
125 |
<div class="content">
|
|
|
126 |
<span id="wpsg_vz_list"><?php $this->view['adminController']->vz_listAction(); ?></span>
|
1067 |
daniel |
127 |
</div>
|
|
|
128 |
|
|
|
129 |
</div>
|
|
|
130 |
</div>
|