Subversion Repositories wpShopGermany4

Rev

Rev 5896 | Rev 6425 | Go to most recent revision | 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
?>
1197 daniel 8
<script type="text/javascript">
1195 daniel 9
 
1197 daniel 10
	function wpsg_mod_export_profilSwitch()
11
	{
12
 
13
		jQuery('#profil_content').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
14
 
15
		jQuery.ajax( {
16
			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',
17
			data: {
18
				profil: jQuery('#wpsg_mod_export_profil').val()
19
			},
20
			success: function(data) {
21
				jQuery("#profil_content").html(data);
22
			}
23
		} );
24
 
25
		return false;
26
 
27
	} // function wpsg_mod_export_profilSwitch()
28
 
5896 daniel 29
	function wpsg_mod_export_addField(profil_id)
1198 daniel 30
	{
5896 daniel 31
 
32
		jQuery('#wpsg_mod_export_fields').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
33
 
34
		jQuery.ajax( {
35
			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',
36
			data: {
37
				profil_id: profil_id
38
			},
39
			success: function(data) {
40
 
41
				jQuery('#wpsg_mod_export_fields').html(data);
42
 
43
			}
44
		} );
45
 
46
		return false;
47
 
48
	}
49
 
50
	function wpsg_mod_export_removeField(field_id)
51
	{
1198 daniel 52
 
5896 daniel 53
		if (!confirm('<?php echo __('Sind Sie sich sicher, dass das Feld gelöscht werden soll?', 'wpsg'); ?>')) return false;
1198 daniel 54
 
5896 daniel 55
		jQuery('tr.wpsg_mod_export_fieldrow_' + field_id).parent().remove();
56
 
1198 daniel 57
		jQuery.ajax( {
58
			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',
59
			data: {
5896 daniel 60
				field_id: field_id
1198 daniel 61
			},
62
			success: function(data) {
5896 daniel 63
 
64
				if (data != '1')
1198 daniel 65
				{
5896 daniel 66
 
1198 daniel 67
					alert(data);
5896 daniel 68
 
1198 daniel 69
				}
5896 daniel 70
 
1198 daniel 71
			}
72
		} );
73
 
74
		return false;
75
 
5896 daniel 76
	} // function wpsg_mod_export_removeField(field_id)
1198 daniel 77
 
1197 daniel 78
	function wpsg_mod_export_removeProfil(profil_id)
79
	{
80
 
81
		if (!confirm('<?php echo __('Sind sie sich sicher?', 'wpsg'); ?>')) return false;
82
 
83
		jQuery('#profil_content').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&action=module&modul=wpsg_mod_export&do=wpsg_mod_export_removeProfil&noheader=1',
87
			data: {
88
				profil: profil_id
89
			},
90
			success: function(data) {
91
				jQuery("#wpsg_profil_list").html(data);
92
			}
93
		} );
94
 
95
		return false;
96
 
97
	} // function wpsg_mod_export_removeProfil(profil_id)
1195 daniel 98
 
1197 daniel 99
	function wpsg_mod_export_addProfil()
100
	{
101
 
102
		jQuery('#wpsg_profil_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
103
 
104
		jQuery.ajax( {
105
			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',
106
			success: function(data) {
107
				jQuery("#wpsg_profil_list").html(data);
108
			}
109
		} );
1195 daniel 110
 
1197 daniel 111
		return false;
112
 
113
	} // function wpsg_addExportProfil()
114
 
5911 daniel 115
	function wpsg_mod_export_setAtt(htmlCheckbox, field_id)
116
	{
117
 
118
		var value = '0';
119
		if (jQuery(htmlCheckbox).prop('checked') == true) value = '1';
120
 
121
		jQuery.ajax( {
122
			url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=inlinedit&noheader=1',
123
			data: {
124
				'name': 'field_xml_att_' + field_id,
125
				'value': value
126
			},
127
			success: function(data) {
128
 
129
				if (data != '1')
130
				{
131
 
132
					alert(data);
133
 
134
				}
135
 
136
			}
137
		} );
138
 
139
	}
140
 
1197 daniel 141
</script>
142
 
5683 daniel 143
<a title="<?php echo __('Neuens Exportprofil anlegen', 'wpsg'); ?>" href="#" class="" onclick="return wpsg_mod_export_addProfil();"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Exportprofil anlegen', 'wpsg'); ?></a>
144
<br /><br />
145
 
146
<div id="wpsg_profil_list"><?php echo $this->callMod('wpsg_mod_export', 'profilList'); ?></div>