Subversion Repositories wpShopGermany4

Rev

Rev 5439 | Rev 5877 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5439 Rev 5690
Line 6... Line 6...
6
 
6
 
7
?>
7
?>
8
<script type="text/javascript">/* <![CDATA[ */
8
<script type="text/javascript">/* <![CDATA[ */
9
 
9
 
10
	jQuery(document).ready(function() {
10
	jQuery(document).ready(function() {
11
	
11
	/*
12
		jQuery('.wpsg_mod_ordercondition_edit_name').each(function() {
12
		jQuery('.wpsg_mod_ordercondition_edit_name').each(function() {
13
	
13
	
14
			var oc_id = jQuery(this).attr("id").replace(/wpsg_mod_ordercondition_name_/, '');
14
			var oc_id = jQuery(this).attr("id").replace(/wpsg_mod_ordercondition_name_/, '');
15
			
15
			
16
			jQuery(this).wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1', {
16
			jQuery(this).wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1', {
Line 39... Line 39...
39
					oc_id: oc_id
39
					oc_id: oc_id
40
				}				
40
				}				
41
			} );
41
			} );
42
			
42
			
43
		} );
43
		} );
-
 
44
	*/
44
	
45
 
45
		jQuery('#wpsg_oc_list .wpsg_icon_remove').bind('click', function() {
46
		jQuery('.wpsg_oc_removeLink').bind('click', function() {
46
	
47
	
47
			if (!confirm('<?php echo __('Sind Sie sich sicher, dass sie diese Bestellbedingung entfernen möchten?', 'wpsg'); ?>')) return false;
48
			if (!confirm('<?php echo __('Sind Sie sich sicher, dass sie diese Bestellbedingung entfernen möchten?', 'wpsg'); ?>')) return false;
48
 
49
 
49
			jQuery('#wpsg_oc_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
50
			jQuery('#wpsg_oc_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
50
			
51
			
51
			jQuery.ajax( {
52
			jQuery.ajax( {
52
				url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=remove&noheader=1',
53
				url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=remove&noheader=1',
53
				data: {
54
				data: {
54
					oc_id: jQuery(this).parent().attr("id")
55
					oc_id: jQuery(this).attr("data-id")
55
				},
56
				},
56
				success: function(data)
57
				success: function(data)
57
				{
58
				{
58
 
59
 
59
					jQuery('#wpsg_oc_list').html(data);
60
					jQuery('#wpsg_oc_list').html(data);
Line 68... Line 69...
68
/* ]]> */</script>
69
/* ]]> */</script>
69
<?php if (!is_array($this->view['wpsg_mod_ordercondition']['data']) || sizeof($this->view['wpsg_mod_ordercondition']['data']) <= 0) { ?>
70
<?php if (!is_array($this->view['wpsg_mod_ordercondition']['data']) || sizeof($this->view['wpsg_mod_ordercondition']['data']) <= 0) { ?>
70
<?php echo __('Bisher keine Bestellbedingungen angelegt.', 'wpsg'); ?>
71
<?php echo __('Bisher keine Bestellbedingungen angelegt.', 'wpsg'); ?>
71
<?php } else { ?>
72
<?php } else { ?>
72
<?php $i = 0; foreach ($this->view['wpsg_mod_ordercondition']['data'] as $oc) { $i ++; ?>
73
<?php $i = 0; foreach ($this->view['wpsg_mod_ordercondition']['data'] as $oc) { $i ++; ?>
73
	
74
 
-
 
75
    <hr />
-
 
76
 
74
	<div id="wpsg_mod_ordercondition_row_<?php echo $oc['id']; ?>">
77
	<div id="wpsg_mod_ordercondition_row_<?php echo $oc['id']; ?>">
75
 
78
 
76
		<?php echo wpsg_drawForm_Input($oc['id'], __('ID', 'wpsg'), $oc['id'], array('text' => true, 'remove' => '1')); ?>
79
        <?php echo wpsg_drawForm_TextStart(); ?>
77
		<?php echo wpsg_drawForm_Input('wpsg_mod_ordercondition_name_'.$oc['id'], __('Bezeichnung', 'wpsg'), $oc['name'], array('text' => true, 'class_text' => 'wpsg_mod_ordercondition_edit_name wpsg_editable')); ?>
80
        <?php echo $oc['id']; ?><a data-id="<?php echo $oc['id']; ?>" class="wpsg_oc_removeLink" href="#"><span class="wpsg-glyphicon glyphicon glyphicon-trash"></span></a>
78
		<?php echo wpsg_drawForm_Select('wpsg_mod_ordercondition_typ_'.$oc['id'], __('Wirkungsbereich', 'wpsg'), array('0' => __('Inaktiv', 'wpsg'), '1' => __('Jede Bestellung', 'wpsg'), '2' => __('Bestimmte Produkte', 'wpsg')), $oc['typ'], array('class_select' => 'wpsg_editable wpsg_mod_ordercondition_edit_typ')); ?>
81
        <?php echo wpsg_drawForm_TextEnd(__('ID', 'wpsg')); ?>
79
		
82
 
80
		<div class="wpsg_form_field">
83
        <?php echo wpsg_drawForm_TextStart(); ?>
-
 
84
        <span id="oc_name_<?php echo $oc['id']; ?>"><?php echo $oc['name']; ?></span>
-
 
85
        <?php echo wpsg_drawForm_TextEnd(__('Bezeichnung', 'wpsg')); ?>
-
 
86
        <script type="text/javascript">/* <![CDATA[ */
-
 
87
 
-
 
88
            jQuery('#oc_name_<?php echo $oc['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1', {
81
			<div class="wpsg_form_left">
89
                submitdata: {
-
 
90
                    field: 'name',
82
				<label for="wpsg_mod_ordercondition_text_<?php echo $oc['id']; ?>"><?php echo __('Bedingungstext', 'wpsg'); ?>:</label>
91
                    oc_id: '<?php echo $oc['id']; ?>'
-
 
92
                }
83
			</div>
93
            });
-
 
94
 
84
			<div class="wpsg_form_right">
95
        /* ]]> */</script>
85
				<p>
96
 
-
 
97
        <?php echo wpsg_drawForm_TextStart(); ?>
86
					<a href="#" onclick="return wpsg_showOCText(<?php echo $oc['id']; ?>);"><?php echo __('Editor anzeigen/verbergen', 'wpsg'); ?></a>
98
        <span id="oc_typ_<?php echo $oc['id']; ?>"><?php
87
				</p>
99
 
-
 
100
            if ($oc['typ'] == '1') echo __('Jede Bestellung', 'wpsg');
-
 
101
            else if ($oc['typ'] == '2') echo __('Bestimmte Produkte', 'wpsg');
-
 
102
            else echo __('Inaktiv', 'wpsg');
88
			</div>
103
 
89
		</div>
104
        ?></span>
-
 
105
        <?php echo wpsg_drawForm_TextEnd(__('Wirkungsbereich', 'wpsg')); ?>
90
		<div class="wpsg_clear"></div>
106
        <script type="text/javascript">/* <![CDATA[ */
91
				
107
 
92
		<div class="wpsg_form_field wpsg_mod_ordercondition_editor wpsg_mod_ordercondition_editor_<?php echo $oc['id']; ?>" style="display:none; width:745px; min-height:225px;">	
108
            jQuery('#oc_typ_<?php echo $oc['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1', {
-
 
109
                type: 'string',
93
			<textarea class="wpsg_mod_ordercondition_text" id="oc_<?php echo $oc['id']; ?>" name="oc[<?php echo $oc['id']; ?>]"><?php echo wpsg_hspc($oc['text']); ?></textarea>
110
                data: '<?php echo json_encode(array('0' => __('Inaktiv', 'wpsg'), '1' => __('Jede Bestellung', 'wpsg'), '2' => __('Bestimmte Produkte', 'wpsg'))); ?>',
-
 
111
                submitdata: {
94
			<div class="wpsg_clear"></div><br />
112
                    field: 'typ',
95
			<input class="button" type="button" onclick="wpsg_saveOCText(<?php echo $oc['id']; ?>);" value="<?php echo __('Text speichern', 'wpsg'); ?>" /><br /><br />
113
                    oc_id: '<?php echo $oc['id']; ?>'
-
 
114
                }
96
		</div>
115
            });
97
	
116
 
98
		<div class="wpsg_form_field">
117
        /* ]]> */</script>
-
 
118
    
99
			<div class="wpsg_form_left">
119
        <?php echo wpsg_drawForm_TextStart(); ?>
100
				<label for="wpsg_mod_ordercondition_errortext_<?php echo $oc['id']; ?>"><?php echo __('Fehlertext', 'wpsg'); ?>:</label>
120
        <span class="wpsg_editable" id="oc_text_<?php echo $oc['id']; ?>"><?php echo wpsg_hspc($oc['text']); ?></span>
101
			</div>
-
 
-
 
121
        <?php echo wpsg_drawForm_TextEnd(__('Bedinungstext', 'wpsg')); ?>
102
			<div class="wpsg_form_right">
122
        <script type="text/javascript">/* <![CDATA[ */
103
				<p>
123
 
104
					<a href="#" onclick="return wpsg_showOCErrorText(<?php echo $oc['id']; ?>);"><?php echo __('Editor anzeigen/verbergen', 'wpsg'); ?></a>
124
            jQuery('#oc_text_<?php echo $oc['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1', {
-
 
125
                submitdata: {
-
 
126
                    field: 'text',
-
 
127
                    oc_id: '<?php echo $oc['id']; ?>'
105
				</p>
128
                },
-
 
129
                type: 'textarea'
106
			</div>
130
            });
107
		</div>
131
 
108
		<div class="wpsg_clear"></div>
132
        /* ]]> */</script>
109
				
133
 
110
		<div class="wpsg_form_field wpsg_mod_ordercondition_editor wpsg_mod_ordercondition_editor_errortext_<?php echo $oc['id']; ?>" style="display:none; width:745px; min-height:225px;">	
134
        <?php echo wpsg_drawForm_TextStart(); ?>
111
			<textarea class="wpsg_mod_ordercondition_text" id="oc_errortext_<?php echo $oc['id']; ?>" name="oc[<?php echo $oc['id']; ?>]"><?php echo wpsg_hspc($oc['errortext']); ?></textarea>
135
        <span class="wpsg_editable" id="oc_errortext_<?php echo $oc['id']; ?>"><?php echo wpsg_hspc($oc['errortext']); ?></span>
-
 
136
        <?php echo wpsg_drawForm_TextEnd(__('Fehlertext', 'wpsg')); ?>
112
			<div class="wpsg_clear"></div><br />
137
        <script type="text/javascript">/* <![CDATA[ */
-
 
138
 
113
			<input class="button" type="button" onclick="wpsg_saveOCErrorText(<?php echo $oc['id']; ?>);" value="<?php echo __('Text speichern', 'wpsg'); ?>" /><br />
139
            jQuery('#oc_errortext_<?php echo $oc['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1', {
-
 
140
                submitdata: {
-
 
141
                    field: 'errortext',
-
 
142
                    oc_id: '<?php echo $oc['id']; ?>'
-
 
143
                },
-
 
144
                type: 'textarea'
114
		</div>		
145
            });
-
 
146
 
-
 
147
        /* ]]> */</script>
115
	
148
 
116
		<?php if ($i < sizeof($this->view['wpsg_mod_ordercondition']['data'])) { ?><br /><hr /><?php } ?>
149
		<?php if ($i == sizeof($this->view['wpsg_mod_ordercondition']['data'])) { ?><hr /><?php } ?>
117
	
150
	
118
	</div>
151
	</div>
119
 
152
 
120
<?php } ?>
153
<?php } ?>
121
<?php } ?>
154
<?php } ?>
122
155