Line 4... |
Line 4... |
4 |
* Template für die Liste der Bestellvariablen
|
4 |
* Template für die Liste der Bestellvariablen
|
5 |
*/
|
5 |
*/
|
6 |
|
6 |
|
7 |
?>
|
7 |
?>
|
8 |
<?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
|
8 |
<?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
|
9 |
<table class="wpsg_ov_table">
|
9 |
<table class="wpsg_ov_table table table-body-striped">
|
- |
|
10 |
<thead>
|
10 |
<tr>
|
11 |
<tr>
|
11 |
<th><?php echo __('ID', 'wpsg'); ?></th>
|
12 |
<th><?php echo __('ID', 'wpsg'); ?></th>
|
12 |
<th class="wpsg_label"><?php echo __('Name', 'wpsg'); ?></th>
|
13 |
<th class="wpsg_label"><?php echo __('Name', 'wpsg'); ?></th>
|
13 |
<th class="wpsg_typ"><?php echo __('Typ', 'wpsg'); ?></th>
|
14 |
<th class="wpsg_typ"><?php echo __('Typ', 'wpsg'); ?></th>
|
14 |
<th class="wpsg_pflicht"><?php echo __('Pflicht', 'wpsg'); ?></th>
|
15 |
<th class="wpsg_pflicht"><?php echo __('Pflicht', 'wpsg'); ?></th>
|
15 |
<th class="wpsg_delcol"></th>
|
16 |
<th class="wpsg_delcol"></th>
|
16 |
</tr>
|
17 |
</tr>
|
- |
|
18 |
</thead>
|
17 |
<?php $i = 0; foreach ($this->view['data'] as $ov) { $i ++; ?>
|
19 |
<?php $i = 0; foreach ($this->view['data'] as $ov) { $i ++; ?>
|
- |
|
20 |
<tbody id="ov_<?php echo $ov['id']; ?>">
|
18 |
<tr class="wpsg_table wpsg_tablerow <?php echo (($i % 2 == 0)?'odd':'even'); ?>" id="ov_<?php echo $ov['id']; ?>">
|
21 |
<tr class="wpsg_table wpsg_tablerow <?php echo (($i % 2 == 0)?'odd':'even'); ?>">
|
19 |
<td class="wpsg_id"><?php echo $ov['id']; ?></td>
|
22 |
<td class="wpsg_id"><?php echo $ov['id']; ?></td>
|
20 |
<td id="wpsg_ov_name_<?php echo $ov['id']; ?>" class="wpsg_label wpsg_editable"><?php echo wpsg_hspc(__($ov['name'], 'wpsg')); ?></td>
|
23 |
<td><span id="wpsg_ov_name_<?php echo $ov['id']; ?>"><?php echo wpsg_hspc(__($ov['name'], 'wpsg')); ?></span></td>
|
21 |
<td id="wpsg_ov_typ_<?php echo $ov['id']; ?>" class="wpsg_typ wpsg_editable"><?php echo $this->mod->arTypen[$ov['typ']]; ?></td>
|
24 |
<td><span id="wpsg_ov_typ_<?php echo $ov['id']; ?>"><?php echo $this->mod->arTypen[$ov['typ']]; ?></span></td>
|
22 |
<td class="wpsg_pflicht"><input type="checkbox" <?php echo (($ov['pflicht'] == '1')?'checked="checked"':''); ?> id="wpsg_ov_pflicht_<?php echo $ov['id']; ?>" /></td>
|
25 |
<td class="wpsg_pflicht"><input type="checkbox" <?php echo (($ov['pflicht'] == '1')?'checked="checked"':''); ?> id="wpsg_ov_pflicht_<?php echo $ov['id']; ?>" /></td>
|
23 |
<td class="wpsg_delcol">
|
26 |
<td class="wpsg_delcol">
|
24 |
|
27 |
|
25 |
<a class="wpsg_icon wpsg_icon_remove" href="#" title="<?php echo __('Bestellvariable löschen', 'wpsg'); ?>" onclick="return wpsg_removeOV(<?php echo $ov['id']; ?>);"></a>
|
28 |
<a class="wpsg_icon wpsg_icon_remove" href="#" title="<?php echo __('Bestellvariable löschen', 'wpsg'); ?>" onclick="return wpsg_removeOV(<?php echo $ov['id']; ?>);"></a>
|
26 |
|
29 |
|
27 |
<script type="text/javascript">
|
30 |
<script type="text/javascript">
|
28 |
|
31 |
|
29 |
jQuery('#wpsg_ov_name_<?php echo $ov['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
|
32 |
jQuery('#wpsg_ov_name_<?php echo $ov['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
|
30 |
submitdata: {
|
33 |
submitdata: {
|
31 |
field: 'name',
|
34 |
field: 'name',
|
32 |
ov_id: '<?php echo $ov['id']; ?>'
|
35 |
ov_id: '<?php echo $ov['id']; ?>'
|
33 |
},
|
36 |
},
|
34 |
submit: '<?php echo __('Speichern', 'wpsg'); ?>',
|
37 |
submit: '<?php echo __('Speichern', 'wpsg'); ?>',
|
35 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
38 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
36 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
39 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
37 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
|
40 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
|
38 |
});
|
41 |
});
|
39 |
|
42 |
|
40 |
jQuery('#wpsg_ov_pflicht_<?php echo $ov['id']; ?>').bind('change', function() {
|
43 |
jQuery('#wpsg_ov_pflicht_<?php echo $ov['id']; ?>').bind('change', function() {
|
41 |
|
44 |
|
42 |
jQuery.ajax( {
|
45 |
jQuery.ajax( {
|
43 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&noheader=1&do=inlinedit',
|
46 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&noheader=1&do=inlinedit',
|
44 |
data: {
|
47 |
data: {
|
45 |
field: 'pflicht',
|
48 |
field: 'pflicht',
|
46 |
ov_id: '<?php echo $ov['id']; ?>',
|
49 |
ov_id: '<?php echo $ov['id']; ?>',
|
47 |
value: ((jQuery(this).attr("checked") == "checked")?'1':'0')
|
50 |
value: ((jQuery(this).attr("checked") == "checked")?'1':'0')
|
48 |
}
|
51 |
}
|
49 |
} );
|
52 |
} );
|
50 |
|
53 |
|
51 |
} );
|
54 |
} );
|
52 |
|
55 |
|
53 |
jQuery('#wpsg_ov_typ_<?php echo $ov['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
|
56 |
jQuery('#wpsg_ov_typ_<?php echo $ov['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
|
54 |
submitdata: {
|
57 |
submitdata: {
|
55 |
field: 'typ',
|
58 |
field: 'typ',
|
56 |
ov_id: '<?php echo $ov['id']; ?>'
|
59 |
ov_id: '<?php echo $ov['id']; ?>'
|
57 |
},
|
60 |
},
|
58 |
submit: '<?php echo __('Speichern', 'wpsg'); ?>',
|
61 |
submit: '<?php echo __('Speichern', 'wpsg'); ?>',
|
59 |
data: '<?php echo json_encode($this->mod->arTypen); ?>',
|
62 |
data: '<?php echo json_encode($this->mod->arTypen); ?>',
|
60 |
type: 'select',
|
63 |
type: 'select',
|
61 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
64 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
62 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
65 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
63 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
66 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
64 |
callback: function(el) {
|
67 |
callback: function(el) {
|
65 |
if (el == '<?php echo __('Auswahl', 'wpsg'); ?>')
|
68 |
if (el == '<?php echo __('Auswahl', 'wpsg'); ?>')
|
66 |
{
|
69 |
{
|
67 |
jQuery('#wpsg_ov_auswahlrow_<?php echo $ov['id']; ?>').show();
|
70 |
jQuery('#wpsg_ov_auswahlrow_<?php echo $ov['id']; ?>').show();
|
68 |
}
|
71 |
}
|
69 |
else
|
72 |
else
|
70 |
{
|
73 |
{
|
71 |
jQuery('#wpsg_ov_auswahlrow_<?php echo $ov['id']; ?>').hide();
|
74 |
jQuery('#wpsg_ov_auswahlrow_<?php echo $ov['id']; ?>').hide();
|
72 |
}
|
75 |
}
|
73 |
}
|
76 |
}
|
74 |
});
|
77 |
});
|
75 |
|
78 |
|
76 |
function wpsg_removeOV(id)
|
79 |
function wpsg_removeOV(id)
|
77 |
{
|
80 |
{
|
78 |
jQuery.ajax({
|
81 |
jQuery.ajax({
|
79 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&noheader=1&do=del',
|
82 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&noheader=1&do=del',
|
80 |
data: {
|
83 |
data: {
|
81 |
ov_id: id
|
84 |
ov_id: id
|
82 |
},
|
85 |
},
|
83 |
success: function(data){
|
86 |
success: function(data){
|
84 |
if (data == 1)
|
87 |
if (data == 1)
|
85 |
{
|
88 |
{
|
86 |
location.reload();
|
89 |
location.reload();
|
87 |
}
|
90 |
}
|
88 |
}
|
91 |
}
|
89 |
});
|
92 |
});
|
90 |
}
|
93 |
}
|
91 |
|
94 |
|
92 |
</script>
|
95 |
</script>
|
93 |
|
96 |
|
94 |
</td>
|
97 |
</td>
|
95 |
</tr>
|
98 |
</tr>
|
96 |
<tr class="wpsg_tablerow <?php echo (($i % 2 == 0)?'odd':'even'); ?>" id="wpsg_ov_auswahlrow_<?php echo $ov['id']; ?>" style="<?php echo (($ov['typ'] != '1')?'display:none;':''); ?>">
|
99 |
<tr class="wpsg_tablerow <?php echo (($i % 2 == 0)?'odd':'even'); ?>" id="wpsg_ov_auswahlrow_<?php echo $ov['id']; ?>" style="<?php echo (($ov['typ'] != '1')?'display:none;':''); ?>">
|
97 |
<td class="wpsg_id"></td>
|
100 |
<td class="wpsg_id"></td>
|
98 |
<td class="wpsg_select" colspan="4">
|
101 |
<td class="wpsg_select" colspan="4">
|
99 |
<?php echo __('Auswahl', 'wpsg'); ?>:
|
102 |
<?php echo __('Auswahl', 'wpsg'); ?>:
|
100 |
<span class="wpsg_editable" id="wpsg_ov_auswahl_<?php echo $ov['id']; ?>"><?php echo wpsg_hspc($ov['auswahl']); ?></span>
|
103 |
<span class="wpsg_editable" id="wpsg_ov_auswahl_<?php echo $ov['id']; ?>"><?php echo wpsg_hspc($ov['auswahl']); ?></span>
|
101 |
<script type="text/javascript">
|
104 |
<script type="text/javascript">
|
102 |
|
105 |
|
103 |
jQuery('#wpsg_ov_auswahl_<?php echo $ov['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
|
106 |
jQuery('#wpsg_ov_auswahl_<?php echo $ov['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
|
104 |
submitdata: {
|
107 |
submitdata: {
|
105 |
field: 'auswahl',
|
108 |
field: 'auswahl',
|
106 |
ov_id: '<?php echo $ov['id']; ?>'
|
109 |
ov_id: '<?php echo $ov['id']; ?>'
|
107 |
},
|
110 |
},
|
108 |
submit: '<?php echo __('Speichern', 'wpsg'); ?>',
|
111 |
submit: '<?php echo __('Speichern', 'wpsg'); ?>',
|
109 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
112 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
110 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
113 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
111 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
|
114 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
|
112 |
});
|
115 |
});
|
113 |
|
116 |
|
114 |
</script>
|
117 |
</script>
|
- |
|
118 |
</td>
|
115 |
</td>
|
119 |
</tr>
|
116 |
</tr>
|
120 |
</tbody>
|
117 |
<?php } ?>
|
121 |
<?php } ?>
|
118 |
</table>
|
122 |
</table>
|
119 |
<p class="wpsg_hinweis"><?php echo __('Die Reihenfolge lässt sich mittels Drag&Drop verändern.', 'wpsg'); ?>
|
123 |
<p class="wpsg_hinweis"><?php echo __('Die Reihenfolge lässt sich mittels Drag&Drop verändern.', 'wpsg'); ?>
|
120 |
|
124 |
|
121 |
<script type="text/javascript">/* <![CDATA[ */
|
125 |
<script type="text/javascript">/* <![CDATA[ */
|
122 |
|
126 |
|
123 |
jQuery(document).ready(function() {
|
127 |
jQuery(document).ready(function() {
|
124 |
|
128 |
|
125 |
jQuery('.wpsg_ov_table').sortable( {
|
129 |
jQuery('.wpsg_ov_table').sortable( {
|
126 |
helper: wpsg_Tablefix,
|
130 |
helper: wpsg_Tablefix,
|
127 |
items: 'tr.wpsg_tablerow',
|
131 |
items: 'tbody',
|
128 |
handler: '.wpsg_id',
|
132 |
handler: '.wpsg_id',
|
129 |
update: function(event, ui) {
|
133 |
update: function(event, ui) {
|
130 |
|
134 |
|
131 |
var wpsg_reorder = jQuery(this).sortable('serialize');
|
135 |
var wpsg_reorder = jQuery(this).sortable('serialize');
|
132 |
|
136 |
|