summaryrefslogtreecommitdiff
path: root/views/mods/mod_export/settings_edit.phtml
blob: 39aec296540b48c301f8d6a3774084401ed8598a (plain)
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
<?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_removeField(profil_id, field_key)
	{

		if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;
		
		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: {
				profil: profil_id,
				field_key: field_key
			},			
			success: function(data) {
				if (data == '1')
				{
					jQuery('tr.wpsg_mod_export_fieldrow_' + field_key).remove();
				}
				else
				{
					alert(data);
				}
			}
		} );

		return false;	
		
	} // function wpsg_mod_export_removeField(profil_id, field_key)
	
	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()
	{

		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',			
			success: function(data) {
				jQuery("#wpsg_profil_list").html(data);
			}
		} );
		
		return false;
		
	} // function wpsg_addExportProfil()

</script>

<div class="wpsg_admin_box">
	<div class="head">
		<div class="title">
			<div class="fulltab">
				<?php echo __('Exportprofile', 'wpsg'); ?>
				<a title="<?php echo __('Neuens Exportprofil anlegen', 'wpsg'); ?>" href="" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_mod_export_addProfil();"></a>
			</div>
		</div>
		<div id="wpsg_profil_list" class="content">
			<?php echo $this->callMod('wpsg_mod_export', 'profilList'); ?>
		</div>
	</div>
</div>