Subversion Repositories wpShopGermany4

Rev

Rev 6428 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1195 daniel 1
<?php
2
 
3
	/**
4
	 * Template für die Einstellungen des Export Moduls
5
	 */
6
 
7
?>
6428 daniel 8
 
1197 daniel 9
<script type="text/javascript">
1195 daniel 10
 
1197 daniel 11
	function wpsg_mod_export_profilSwitch()
12
	{
13
 
14
		jQuery('#profil_content').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
15
 
16
		jQuery.ajax( {
17
			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',
18
			data: {
19
				profil: jQuery('#wpsg_mod_export_profil').val()
20
			},
21
			success: function(data) {
22
				jQuery("#profil_content").html(data);
23
			}
24
		} );
25
 
26
		return false;
27
 
28
	} // function wpsg_mod_export_profilSwitch()
29
 
5896 daniel 30
	function wpsg_mod_export_addField(profil_id)
1198 daniel 31
	{
5896 daniel 32
 
33
		jQuery('#wpsg_mod_export_fields').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
34
 
35
		jQuery.ajax( {
36
			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',
37
			data: {
38
				profil_id: profil_id
39
			},
40
			success: function(data) {
41
 
42
				jQuery('#wpsg_mod_export_fields').html(data);
43
 
44
			}
45
		} );
46
 
47
		return false;
48
 
49
	}
50
 
51
	function wpsg_mod_export_removeField(field_id)
52
	{
1198 daniel 53
 
5896 daniel 54
		if (!confirm('<?php echo __('Sind Sie sich sicher, dass das Feld gelöscht werden soll?', 'wpsg'); ?>')) return false;
1198 daniel 55
 
5896 daniel 56
		jQuery('tr.wpsg_mod_export_fieldrow_' + field_id).parent().remove();
57
 
1198 daniel 58
		jQuery.ajax( {
59
			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',
60
			data: {
5896 daniel 61
				field_id: field_id
1198 daniel 62
			},
63
			success: function(data) {
5896 daniel 64
 
65
				if (data != '1')
1198 daniel 66
				{
5896 daniel 67
 
1198 daniel 68
					alert(data);
5896 daniel 69
 
1198 daniel 70
				}
5896 daniel 71
 
1198 daniel 72
			}
73
		} );
74
 
75
		return false;
76
 
5896 daniel 77
	} // function wpsg_mod_export_removeField(field_id)
1198 daniel 78
 
1197 daniel 79
	function wpsg_mod_export_removeProfil(profil_id)
80
	{
81
 
82
		if (!confirm('<?php echo __('Sind sie sich sicher?', 'wpsg'); ?>')) return false;
83
 
84
		jQuery('#profil_content').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
85
 
86
		jQuery.ajax( {
87
			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',
88
			data: {
89
				profil: profil_id
90
			},
91
			success: function(data) {
92
				jQuery("#wpsg_profil_list").html(data);
93
			}
94
		} );
95
 
96
		return false;
97
 
98
	} // function wpsg_mod_export_removeProfil(profil_id)
1195 daniel 99
 
6425 daniel 100
	function wpsg_mod_export_addProfil(type)
1197 daniel 101
	{
102
 
103
		jQuery('#wpsg_profil_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
104
 
105
		jQuery.ajax( {
6425 daniel 106
			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',
107
			data: {
108
				type: type
109
			},
1197 daniel 110
			success: function(data) {
6425 daniel 111
 
1197 daniel 112
				jQuery("#wpsg_profil_list").html(data);
6425 daniel 113
 
1197 daniel 114
			}
115
		} );
1195 daniel 116
 
1197 daniel 117
		return false;
118
 
119
	} // function wpsg_addExportProfil()
120
 
5911 daniel 121
	function wpsg_mod_export_setAtt(htmlCheckbox, field_id)
122
	{
123
 
124
		var value = '0';
125
		if (jQuery(htmlCheckbox).prop('checked') == true) value = '1';
126
 
127
		jQuery.ajax( {
128
			url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=inlinedit&noheader=1',
129
			data: {
130
				'name': 'field_xml_att_' + field_id,
131
				'value': value
132
			},
133
			success: function(data) {
134
 
6425 daniel 135
				if (data != '1' && data != '0')
5911 daniel 136
				{
137
 
138
					alert(data);
139
 
140
				}
141
 
142
			}
143
		} );
144
 
145
	}
146
 
1197 daniel 147
</script>
148
 
6425 daniel 149
<a title="<?php echo __('Neuens 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 />
6447 daniel 150
<a title="<?php echo __('Neuens 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 />
151
<a title="<?php echo __('Neuens 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>
6425 daniel 152
 
5683 daniel 153
<br /><br />
154
 
6428 daniel 155
<div id="wpsg_profil_list"><?php echo $this->callMod('wpsg_mod_export', 'profilList'); ?></div>
156
 
157
<br />
158
 
159
<fieldset>
160
	<legend><?php echo __('Profil importieren', 'wpsg'); ?></legend>
161
	<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">
162
 
163
		<?php echo wpsg_drawForm_Upload('profil_file', __('JSON Profildatei', 'wpsg')); ?>
164
 
165
		<input type="submit" value="<?php echo __('Profil importieren', 'wpsg'); ?>" class="button"  />
166
 
167
	</form>
168
</fieldset>