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 |
|
6425 |
daniel |
99 |
function wpsg_mod_export_addProfil(type)
|
1197 |
daniel |
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( {
|
6425 |
daniel |
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 |
data: {
|
|
|
107 |
type: type
|
|
|
108 |
},
|
1197 |
daniel |
109 |
success: function(data) {
|
6425 |
daniel |
110 |
|
1197 |
daniel |
111 |
jQuery("#wpsg_profil_list").html(data);
|
6425 |
daniel |
112 |
|
1197 |
daniel |
113 |
}
|
|
|
114 |
} );
|
1195 |
daniel |
115 |
|
1197 |
daniel |
116 |
return false;
|
|
|
117 |
|
|
|
118 |
} // function wpsg_addExportProfil()
|
|
|
119 |
|
5911 |
daniel |
120 |
function wpsg_mod_export_setAtt(htmlCheckbox, field_id)
|
|
|
121 |
{
|
|
|
122 |
|
|
|
123 |
var value = '0';
|
|
|
124 |
if (jQuery(htmlCheckbox).prop('checked') == true) value = '1';
|
|
|
125 |
|
|
|
126 |
jQuery.ajax( {
|
|
|
127 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=inlinedit&noheader=1',
|
|
|
128 |
data: {
|
|
|
129 |
'name': 'field_xml_att_' + field_id,
|
|
|
130 |
'value': value
|
|
|
131 |
},
|
|
|
132 |
success: function(data) {
|
|
|
133 |
|
6425 |
daniel |
134 |
if (data != '1' && data != '0')
|
5911 |
daniel |
135 |
{
|
|
|
136 |
|
|
|
137 |
alert(data);
|
|
|
138 |
|
|
|
139 |
}
|
|
|
140 |
|
|
|
141 |
}
|
|
|
142 |
} );
|
|
|
143 |
|
|
|
144 |
}
|
|
|
145 |
|
1197 |
daniel |
146 |
</script>
|
|
|
147 |
|
6425 |
daniel |
148 |
<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 />
|
|
|
149 |
<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>
|
|
|
150 |
|
5683 |
daniel |
151 |
<br /><br />
|
|
|
152 |
|
|
|
153 |
<div id="wpsg_profil_list"><?php echo $this->callMod('wpsg_mod_export', 'profilList'); ?></div>
|