summaryrefslogtreecommitdiff
path: root/views/mods
diff options
context:
space:
mode:
authorthomas <noreply@maennchen1.de>2016-11-02 11:58:59 +0000
committerthomas <noreply@maennchen1.de>2016-11-02 11:58:59 +0000
commite6d178d1d27d5c65cc356068a43b4935250baa83 (patch)
treef2dc6cd94852bbfc1207186b51b13d3302fe37f1 /views/mods
parentb7760be020bdd90c4e960fe4ef28bf80fbe7e7d7 (diff)
- Gruppierungen im Produktbackend
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5890 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods')
-rw-r--r--views/mods/mod_scaleprice/product_edit_allgemein.phtml204
-rw-r--r--views/mods/mod_stock/produkt_edit_sidebar.phtml4
-rw-r--r--views/mods/mod_topseller/produkt_addedit_allgemein.phtml2
3 files changed, 207 insertions, 3 deletions
diff --git a/views/mods/mod_scaleprice/product_edit_allgemein.phtml b/views/mods/mod_scaleprice/product_edit_allgemein.phtml
new file mode 100644
index 0000000..e03be46
--- /dev/null
+++ b/views/mods/mod_scaleprice/product_edit_allgemein.phtml
@@ -0,0 +1,204 @@
+<?php
+
+ /**
+ * Template für die Integration der Staffelpreise in die Produktverwaltung
+ */
+
+?>
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_mod_scaleprice_activ').bind('change', function() {
+
+ if (jQuery(this).attr('checked') == 'checked') jQuery('#wpsg_mod_scaleprice_layer').show();
+ else jQuery('#wpsg_mod_scaleprice_layer').hide();
+
+ } ).change();
+
+ jQuery('#wpsg_mod_scaleprice_typ').bind('change', function() { wpsg_mod_scaleprice_refresh(); } );
+ jQuery('#wpsg_mod_scaleprice_calc').bind('change', function() { wpsg_mod_scaleprice_saveAjax(); } );
+
+ <?php /* echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_downloadprodukte&edit_id=<?php echo $this->view['data']['id'] ?>&noheader=1&cmd=upload_file*/?>
+
+ } );
+
+ function wpsg_mod_scaleprice_add()
+ {
+
+ var wpsg_scale = jQuery('#wpsg_mod_scaleprice_scale').val();
+ var wpsg_value = jQuery('#wpsg_mod_scaleprice_value').val();
+
+ jQuery('#wpsg_mod_scaleprice_target').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-Produkt&action=ajax&mod=wpsg_mod_scaleprice&edit_id=<?php echo $this->view['wpsg_mod_scaleprice']['product']['id']; ?>&noheader=1&cmd=add',
+ data: {
+ 'scale': wpsg_scale,
+ 'value': wpsg_value
+ },
+ success: function(data) {
+
+ jQuery('#wpsg_mod_scaleprice_target').html(data);
+ wpsg_mod_scaleprice_clearErrorField();
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_scaleprice_add()
+
+ function wpsg_mod_scaleprice_refresh()
+ {
+
+ jQuery('#wpsg_mod_scaleprice_target').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-Produkt&action=ajax&mod=wpsg_mod_scaleprice&edit_id=<?php echo $this->view['wpsg_mod_scaleprice']['product']['id']; ?>&noheader=1&cmd=refresh',
+ data: {
+ typ: jQuery('#wpsg_mod_scaleprice_typ').val(),
+ calc: jQuery('#wpsg_mod_scaleprice_calc').val()
+ },
+ success: function(data) {
+
+ jQuery('#wpsg_mod_scaleprice_target').html(data);
+ wpsg_mod_scaleprice_clearErrorField();
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_scaleprice_refresh()
+
+ function wpsg_mod_scaleprice_saveAjax()
+ {
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_scaleprice&edit_id=<?php echo $this->view['wpsg_mod_scaleprice']['product']['id']; ?>&noheader=1&cmd=ajaxSave',
+ data: {
+ typ: jQuery('#wpsg_mod_scaleprice_typ').val(),
+ calc: jQuery('#wpsg_mod_scaleprice_calc').val()
+ },
+ success: function(data) {
+
+ wpsg_mod_scaleprice_clearErrorField();
+
+ }
+ } );
+
+ } // function wpsg_mod_scaleprice_saveAjax()
+
+ function wpsg_mod_scaleprice_clearErrorField()
+ {
+
+ var wpsg_product_edit_change_new = Array();
+
+ for (var i = 0; i < wpsg_product_edit_change.length; i++)
+ {
+
+ if (!wpsg_product_edit_change[i].match(/^wpsg_mod_scaleprice/))
+ {
+
+ wpsg_product_edit_change_new.push(wpsg_product_edit_change[i]);
+
+ }
+
+ }
+
+ wpsg_product_edit_change = wpsg_product_edit_change_new;
+
+ }
+
+ function wpsg_mod_scaleprice_change(ev)
+ {
+
+ if (!wpsg_in_array(ev.target.id, wpsg_product_edit_change) && jQuery(ev.target).val() != "")
+ {
+
+ wpsg_product_edit_change.push(ev.target.id);
+
+ }
+ else if (jQuery(ev.target).val() == "" && wpsg_in_array(ev.target.id, wpsg_product_edit_change))
+ {
+
+ for (var i = 0; i < wpsg_product_edit_change.length; i++)
+ {
+
+ if (wpsg_product_edit_change[i] == ev.target.id)
+ {
+
+ wpsg_product_edit_change.splice(i, 1);
+ jQuery('#' + ev.target.id).removeClass('wpsg_change_error');
+
+ }
+
+ }
+
+ }
+
+ } // function wpsg_mod_scaleprice_change(ev)
+
+ function wpsg_mod_scaleprice_remove(scale_id)
+ {
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher, dass sie diese Staffel entfernen möchten?', 'wpsg'); ?>')) return false;
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_scaleprice&edit_id=<?php echo $this->view['wpsg_mod_scaleprice']['product']['id']; ?>&noheader=1&cmd=remove',
+ data: {
+ scale_id: scale_id
+ },
+ success: function(data) {
+
+ jQuery('#wpsg_mod_scaleprice_row_' + scale_id).remove();
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_scaleprice_remove(scale_id)
+
+/* ]]> */</script>
+
+<div class="panel panel-default">
+ <div class="panel-heading clearfix">
+ <h3 class="panel-title">
+ <span><?php echo __('Staffelpreise', 'wpsg'); ?></span>
+ </h3>
+ </div>
+ <div class="panel-body">
+
+ <?php if ($this->view['wpsg_mod_scaleprice']['product']['id'] <= 0) { ?>
+ <p><?php echo __('Staffelpreise können erst nach einmaligem Speichern des Produktes definiert werden.', 'wpsg'); ?>
+ <?php } else { ?>
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_scaleprice_activ', __('Staffelpreise aktiv', 'wpsg'), $this->view['wpsg_mod_scaleprice']['product']['wpsg_mod_scaleprice_activ']); ?>
+
+ <div id="wpsg_mod_scaleprice_layer">
+
+ <?php if (wpsg_isSizedArray($this->view['wpsg_mod_scaleprice']['arTyp']) && sizeof($this->view['wpsg_mod_scaleprice']['arTyp']) > 0) { ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_scaleprice_typ', __('Bezugsgröße', 'wpsg'), array(
+ wpsg_mod_scaleprice::TYP_QUANTITY => __('Menge', 'wpsg'),
+ wpsg_mod_scaleprice::TYP_WEIGHT => __('Gewicht', 'wpsg')
+ ), $this->view['wpsg_mod_scaleprice']['product']['wpsg_mod_scaleprice_typ']); ?>
+ <?php } else { ?>
+ <input type="hidden" name="wpsg_mod_scaleprice_typ" id="wpsg_mod_scaleprice_typ" value="0" />
+ <?php } ?>
+
+ <?php echo wpsg_drawForm_Select('wpsg_mod_scaleprice_calc', __('Berechnung', 'wpsg'), array(
+ wpsg_mod_scaleprice::CALC_REPLACE => __('Ersetzung', 'wpsg'),
+ wpsg_mod_scaleprice::CALC_ADD => __('Addition', 'wpsg')
+ ), $this->view['wpsg_mod_scaleprice']['product']['wpsg_mod_scaleprice_calc']); ?>
+
+ <div id="wpsg_mod_scaleprice_target"><?php echo $this->view['wpsg_mod_scaleprice']['list']; ?></div>
+
+ </div>
+
+ <?php } ?>
+ <br /><br />
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_scaleprice"><span class="wpsg-glyphicon glyphicon glyphicon-wrench"></span><?php echo __('Zur Konfiguration der Staffelpreise', 'wpsg'); ?></a>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_stock/produkt_edit_sidebar.phtml b/views/mods/mod_stock/produkt_edit_sidebar.phtml
index 1fcce65..7056f0b 100644
--- a/views/mods/mod_stock/produkt_edit_sidebar.phtml
+++ b/views/mods/mod_stock/produkt_edit_sidebar.phtml
@@ -11,6 +11,6 @@
<?php /* Mailbenachrichtigung beim Erreichen des Minimalbestandes des Produktes */ ?>
<?php if ($this->get_option('wpsg_mod_stock_minstockproduct') == '1') { ?>
-<?php echo wpsg_drawForum_Input('wpsg_mod_minstockproduct', __('Mindestlagerbestand', 'wpsg'), wpsg_getStr($this->view['data']['minstockproduct_count'])); ?>
-<?php echo wpsg_drawForum_Input('wpsg_mod_stock_minstockproduct_mail', __('Benachrichtigung an', 'wpsg'), wpsg_getStr($this->view['data']['minstockproduct_mail'])); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_minstockproduct', __('Mindestlagerbestand', 'wpsg'), wpsg_getStr($this->view['data']['minstockproduct_count'])); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_stock_minstockproduct_mail', __('Benachrichtigung an', 'wpsg'), wpsg_getStr($this->view['data']['minstockproduct_mail'])); ?>
<?php }?>
diff --git a/views/mods/mod_topseller/produkt_addedit_allgemein.phtml b/views/mods/mod_topseller/produkt_addedit_allgemein.phtml
index a2fec75..c4968bd 100644
--- a/views/mods/mod_topseller/produkt_addedit_allgemein.phtml
+++ b/views/mods/mod_topseller/produkt_addedit_allgemein.phtml
@@ -8,7 +8,7 @@
<div id="wpsg_fuellmenge" class="panel panel-default">
<div class="panel-heading clearfix">
<h3 class="panel-title">
- <?php echo __('Topseller', 'wpsg'); ?> </span>
+ <span><?php echo __('Topseller', 'wpsg'); ?></span>
</h3>
</div>
<div class="panel-body">