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
158
159
160
161
162
163
164
165
166
167
168
|
<?php
/**
* Template für die Einstellungen des Export Moduls
*/
?>
<script type="text/javascript">
function wpsg_mod_export_profilSwitch()
{
jQuery('#profil_content').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
jQuery.ajax( {
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=wpsg_mod_export_profilSwitch&noheader=1',
data: {
profil: jQuery('#wpsg_mod_export_profil').val()
},
success: function(data) {
jQuery("#profil_content").html(data);
}
} );
return false;
} // function wpsg_mod_export_profilSwitch()
function wpsg_mod_export_addField(profil_id)
{
jQuery('#wpsg_mod_export_fields').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
jQuery.ajax( {
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=wpsg_mod_export_addField&noheader=1',
data: {
profil_id: profil_id
},
success: function(data) {
jQuery('#wpsg_mod_export_fields').html(data);
}
} );
return false;
}
function wpsg_mod_export_removeField(field_id)
{
if (!confirm('<?php echo __('Sind Sie sich sicher, dass das Feld gelöscht werden soll?', 'wpsg'); ?>')) return false;
jQuery('tr.wpsg_mod_export_fieldrow_' + field_id).parent().remove();
jQuery.ajax( {
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=wpsg_mod_export_removeField&noheader=1',
data: {
field_id: field_id
},
success: function(data) {
if (data != '1')
{
alert(data);
}
}
} );
return false;
} // function wpsg_mod_export_removeField(field_id)
function wpsg_mod_export_removeProfil(profil_id)
{
if (!confirm('<?php echo __('Sind sie sich sicher?', 'wpsg'); ?>')) return false;
jQuery('#profil_content').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
jQuery.ajax( {
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=wpsg_mod_export_removeProfil&noheader=1',
data: {
profil: profil_id
},
success: function(data) {
jQuery("#wpsg_profil_list").html(data);
}
} );
return false;
} // function wpsg_mod_export_removeProfil(profil_id)
function wpsg_mod_export_addProfil(type)
{
jQuery('#wpsg_profil_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
jQuery.ajax( {
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=wpsg_mod_export_addProfil&noheader=1',
data: {
type: type
},
success: function(data) {
jQuery("#wpsg_profil_list").html(data);
}
} );
return false;
} // function wpsg_addExportProfil()
function wpsg_mod_export_setAtt(htmlCheckbox, field_id)
{
var value = '0';
if (jQuery(htmlCheckbox).prop('checked') == true) value = '1';
jQuery.ajax( {
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=inlinedit&noheader=1',
data: {
'name': 'field_xml_att_' + field_id,
'value': value
},
success: function(data) {
if (data != '1' && data != '0')
{
alert(data);
}
}
} );
}
</script>
<a title="<?php echo __('Neues Exportprofil anlegen', 'wpsg'); ?>" href="#" class="" onclick="return wpsg_mod_export_addProfil(<?php echo wpsg_mod_export::TYPE_ORDER; ?>);"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Exportprofil für Bestellungen anlegen', 'wpsg'); ?></a><br />
<a title="<?php echo __('Neues Exportprofil anlegen', 'wpsg'); ?>" href="#" class="" onclick="return wpsg_mod_export_addProfil(<?php echo wpsg_mod_export::TYPE_PRODUCT; ?>);"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Exportprofil für Produkte anlegen', 'wpsg'); ?></a><br />
<a title="<?php echo __('Neues Exportprofil anlegen', 'wpsg'); ?>" href="#" class="" onclick="return wpsg_mod_export_addProfil(<?php echo wpsg_mod_export::TYPE_CUSTOMER; ?>);"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Exportprofil für Kunden anlegen', 'wpsg'); ?></a>
<br /><br />
<div id="wpsg_profil_list"><?php echo $this->callMod('wpsg_mod_export', 'profilList'); ?></div>
<br />
<fieldset>
<legend><?php echo __('Profil importieren', 'wpsg'); ?></legend>
<form method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=import&noheader=1" enctype="multipart/form-data">
<?php echo wpsg_drawForm_Upload('profil_file', __('JSON Profildatei', 'wpsg')); ?>
<input type="submit" value="<?php echo __('Profil importieren', 'wpsg'); ?>" class="button" />
</form>
</fieldset>
|