1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
<?php
/**
* Template für die Länderverwaltung
*/
?>
<div class="wpsg_admin_submenu">
<div class="list-group">
<span class="list-group-head list-group-item"><?php echo __('Konfiguration'); ?></span>
<?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
<a class="list-group-item <?php echo (($k == $this->view['subAction'])?'active':''); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a>
<?php } ?>
</div>
</div>
<div class="modal fade" id="Modal_wpsg_country_edit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel"><?php echo __('Land anlegen/bearbeiten', 'wpsg'); ?></h4>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" onclick="return wpsg_country_save();" data-dismiss="modal"><?php echo __('Speichern und schließen', 'wpsg'); ?></button>
</div>
</div>
</div>
</div>
<div class="wpsg_admin_content">
<form name="form1" method="post" enctype="multipart/form-data" action="<?php echo wpsg_hspc(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=laender&noheader=1'); ?>">
<?php echo wpsg_drawForm_AdminboxStart(__('Länderverwaltung', 'wpsg')); ?>
<div id="wpsg_country_list">
<?php echo $this->render(WPSG_PATH_VIEW.'/admin/laender_list.phtml'); ?>
</div>
<br />
</form>
<a href="#" onclick="return wpsg_country_add();"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Land anlegen.', 'wpsg'); ?></a><br />
<a href="#" onclick="return wpsg_country_import();"><span class="wpsg-glyphicon glyphicon glyphicon-import"></span><? echo __('Standardländer importieren.', 'wpsg'); ?></a><br />
<a href="#" onclick="return wpsg_country_importEU();"><span class="wpsg-glyphicon glyphicon glyphicon-import"></span><? echo __('EU-Länder importieren.', 'wpsg'); ?></a><br />
<br />
<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz"><span class="wpsg-glyphicon glyphicon glyphicon-wrench"></span><?php echo __('Zur Versandzonenverwaltung', 'wpsg'); ?></a>
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
<script type="text/javascript">/* <![CDATA[ */
function wpsg_country_check_all() { jQuery('td.col_check input').each(function() { jQuery(this).prop('checked', !jQuery(this).prop('checked')); } ); }
function wpsg_country_add()
{
jQuery('#Modal_wpsg_country_edit .modal-body').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
jQuery('#Modal_wpsg_country_edit').modal('show');
jQuery.ajax( {
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=add&noheader=1',
success: function(data) { jQuery('#Modal_wpsg_country_edit .modal-body').html(data); }
} );
return false;
} // function wpsg_country_add()
function wpsg_country_import()
{
if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;
jQuery('#wpsg_country_list').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
jQuery.ajax( {
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=import&noheader=1',
success: function(data) {
jQuery('#wpsg_country_list').html(data);
}
} );
return false;
} // function wpsg_country_import()
function wpsg_country_importEU()
{
if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;
jQuery('#wpsg_country_list').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
jQuery.ajax( {
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=eu_import&noheader=1',
success: function(data) {
jQuery('#wpsg_country_list').html(data);
}
} );
return false;
} // function wpsg_country_importEU()
function wpsg_country_save()
{
jQuery('#wpsg_country_list').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
jQuery.ajax( {
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=save&noheader=1',
data: {
form_data: jQuery('#wpsg_land_edit_form_edit').serialize()
},
success: function(data) {
jQuery('#wpsg_country_list').html(data);
}
} );
} // function wpsg_country_save()
function wpsg_country_edit(land_id)
{
jQuery('#Modal_wpsg_country_edit .modal-body').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
jQuery('#Modal_wpsg_country_edit').modal('show');
jQuery.ajax( {
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=edit&noheader=1&land_id=' + land_id,
success: function(data) { jQuery('#Modal_wpsg_country_edit .modal-body').html(data); }
} );
return false;
} // function wpsg_country_edit(edit_id)
/* ]]> */</script>
</div>
|