diff options
| author | hartmut <noreply@maennchen1.de> | 2017-03-08 07:34:56 +0000 |
|---|---|---|
| committer | hartmut <noreply@maennchen1.de> | 2017-03-08 07:34:56 +0000 |
| commit | bd56b6eb31cc1625d830dda84c8d2e28ff5c4ebd (patch) | |
| tree | d5efff789793e81e97b81c505cd32e9f4823e56e /views/mods | |
| parent | 4088aa3cabf3ccf35389576282dcb349bcc5d2ea (diff) | |
Adressteilung und Produktbilder mit Mediathek
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6094 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods')
5 files changed, 212 insertions, 125 deletions
diff --git a/views/mods/mod_kundenverwaltung/index.phtml b/views/mods/mod_kundenverwaltung/index.phtml index 49d06d7..b54e340 100644 --- a/views/mods/mod_kundenverwaltung/index.phtml +++ b/views/mods/mod_kundenverwaltung/index.phtml @@ -16,7 +16,7 @@ <div class="collapse navbar-collapse" id="bs-customer-navbar-collapse-1">
<ul class="nav navbar-nav">
<li role="presentation" class="wpsg-customer-tab-a active"><a href="#" onclick="return false;"><?php echo __("Kundenverwaltung", "wpsg"); ?></a></li>
- <li role="presentation" class="wpsg-customer-tab-a wpsg_showhide_filter <?php echo (($this->view['hasFilter'])?'active':''); ?>" id="wpsg-customer-tab-0"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
+ <li role="presentation" class="wpsg-customer-tab-a wpsg_showhide_filter <?php echo ((wpsg_isTrue($this->view['hasFilter']))?'active':''); ?>" id="wpsg-customer-tab-0"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
<li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'add'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=add"><span class="glyphicon glyphicon-plus"></span><?php echo __("Hinzufügen", "wpsg"); ?></a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
@@ -28,7 +28,7 @@ </div>
</div>
- <div class="wpsg-filter wpsg-customer-tab wpsg-customer-tab-0 container-fluid form-horizontal" style="display:<?php echo (($this->view['hasFilter'] === true)?'block':'none'); ?>;">
+ <div class="wpsg-filter wpsg-customer-tab wpsg-customer-tab-0 container-fluid form-horizontal" style="display:<?php echo ((wpsg_isTrue($this->view['hasFilter']))?'block':'none'); ?>;">
<div class="row">
<div class="col-lg-4">
<form method="post" id="filter_form">
diff --git a/views/mods/mod_productvariants/admin_edit.phtml b/views/mods/mod_productvariants/admin_edit.phtml index 11a8825..4a1f691 100644 --- a/views/mods/mod_productvariants/admin_edit.phtml +++ b/views/mods/mod_productvariants/admin_edit.phtml @@ -132,6 +132,24 @@ <td class="col_id"> </td>
<td class="col_image" colspan="<?php echo $colspan; ?>">
TODO: Bilder
+ <?php
+ $pbArr = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($this->view['product_id']));
+ $k = $this->view['variant']['id'];
+ $kv = $vari['id'];
+ $temp = $this->callMod('wpsg_mod_productvariants', 'getVariImages', array($this->view['product_id'], $k, $kv));
+ ?>
+ <?php $j = 0; foreach ($pbArr as $b) { $j ++; ?>
+ <?php // $this->view['variant']['id'] $vari $var $kv $_REQUEST['pic']
+ $file = $b['basename'];
+ $href = wp_get_attachment_image_src($b['post_id'], Array(25, 25));
+ ?>
+ <a class="<?php //echo ((in_array($file, explode(",", $vari['pic'])))?'mark':''); ?> pic" id="<?php echo $file; ?>"
+ onclick="return wpsg_vp_vari_setPic(this, <?php echo $k; ?>, <?php echo $kv; ?>, '<?php echo $file; ?>', <?php echo $j; ?>);" href="">
+ <img src="<?php echo $href[0]; ?>" alt="" width="25px" height="25px"/>
+ </a>
+ <?php } ?>
+
+
</td>
</tr>
@@ -142,6 +160,79 @@ <script type="text/javascript">/* <![CDATA[ */
+ function wpsg_vp_vari_setPic(htmlElement, var_id, vari_id, pic, pic_index)
+ {
+
+ <?php if (!isset($_REQUEST['wpsg_lang'])) { ?>
+
+ wpsg_vp_ajaxloading_show();
+
+ jQuery.ajax( {
+ url: "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_productvariants&cmd=wpsg_vp_vari_setPic&noheader=1&edit_id=<?php echo $this->view['product_id']; ?>",
+ async: false,
+ data: {
+ var_id: var_id,
+ vari_id: vari_id,
+ pic: pic
+ },
+ success: function(data) {
+ if (vari_id >= 0)
+ {
+
+ if (jQuery(htmlElement).hasClass('mark'))
+ {
+ jQuery(htmlElement).removeClass('mark');
+ }
+ else
+ {
+ jQuery(htmlElement).addClass('mark');
+ }
+
+ }
+ else
+ {
+
+ if (jQuery(htmlElement).hasClass('mark'))
+ {
+ jQuery(htmlElement).removeClass('mark');
+ }
+ else
+ {
+ jQuery(htmlElement).addClass('mark');
+ }
+
+ }
+
+ wpsg_vp_ajaxloading_hide();
+
+ }
+ } );
+
+ <?php } ?>
+
+ return false;
+
+ }
+
+ function wpsg_vp_ajaxloading_show()
+ {
+
+ jQuery('.wpsg_mod_varianten_ajaxloading').show();
+
+ }
+
+ function wpsg_vp_ajaxloading_hide()
+ {
+
+ jQuery('.wpsg_mod_varianten_ajaxloading').hide();
+
+ }
+
+
+ <?php
+ $p1 = wpsg_getInt($this->view['product_id']);
+ $p2 = ($this->view['variant']['product_id']);
+ ?>
<?php if (!wpsg_isSizedInt($this->view['product_id']) || wpsg_isSizedInt($this->view['variant']['product_id'])) { ?>
jQuery('.wpsg_mod_productvariants_table_variation').sortable( {
diff --git a/views/mods/mod_produktbilder/produkt_addedit_content.phtml b/views/mods/mod_produktbilder/produkt_addedit_content.phtml index bc4cabd..a23ab69 100644 --- a/views/mods/mod_produktbilder/produkt_addedit_content.phtml +++ b/views/mods/mod_produktbilder/produkt_addedit_content.phtml @@ -7,7 +7,7 @@ ?>
-<!-- Modal für FTP Pfad anzeige -->
+<!-- Modal für FTP Pfad Anzeige -->
<div class="modal fade" id="wpsg_mod_produktbilder_ftppath" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
@@ -25,6 +25,7 @@ </div>
</div>
+<!-- Modal für Löschabfrage -->
<div class="modal fade" tabindex="-1" role="dialog" id="wpsg_produktbilder_remove">
<div class="modal-dialog" role="document">
<div class="modal-content">
@@ -40,7 +41,7 @@ </div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Abbrechen', 'wpsg'); ?></button>
- <button type="button" class="btn btn-primary" onclick="return wpsg_remove_bild2OK();"><?php echo __('Löschen', 'wpsg'); ?></button>
+ <button type="button" class="btn btn-primary" onclick="return wpsg_remove_bild_MT_OK();"><?php echo __('Löschen', 'wpsg'); ?></button>
</div>
</div>
</div>
@@ -55,8 +56,6 @@ <?php if ($this->view['data']['id'] > 0) { ?>
- <div id="produktbilder_target"><?php echo $this->view['ProduktList']; ?></div>
-
<?php if (get_option("wpsg_classicupload") == "1") { ?>
<div class="wpsg_clear"></div><br />
@@ -66,125 +65,27 @@ <input type="file" multiple="multiple" name="wpsg_mod_produktbilder_file[]" />
<?php } else { ?>
-
- <div class="wpsg_clear"></div><br />
- <div><?php echo __("Bitte klicken Sie auf Upload um ein Bild hochzuladen. Um ein Bild zu löschen klicken Sie einfach auf das Bild.", "wpsg"); ?></div>
- <div class="wpsg_clear"></div><br />
-
- <input value="Upload" type="text" style="text-align:center;" size="10" id="upload_button" />
-
- <script type="text/javascript">/* <![CDATA[ */
-
- jQuery(document).ready(function() {
- new AjaxUpload(
- "upload_button", {
- action: "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_produktbilder&cmd=upload&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1",
- onSubmit: function(file, extension) {
- jQuery('#produktbilder_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
- },
- onComplete: function(file, response) {
+ <!-- Mediathek -->
- if (response == '1')
- {
-
- jQuery("#produktbilder_target").load("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_produktbilder&cmd=produktbilder_liste&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1");
+ <div id="produktbilder_target_MT"><?php echo $this->view['ProduktList_MT']; ?></div>
- if (typeof wpsg_vp_refresh == "function") wpsg_vp_refresh();
-
- }
- else
- {
- alert(response);
- }
-
- }
- }
- );
- });
-
- /* ]]> */</script>
-
- <?php } ?>
-
- <script type="text/javascript">/* <![CDATA[ */
-
- /**
- * Löscht den Bildercache dieses Produktes
- */
- function wpsg_clearImageCache()
- {
-
- jQuery.ajax( {
- url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_produktbilder&cmd=clearProductCache&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>',
- async: true,
- success: function(data) { alert(data); }
- } );
-
- return false;
-
- } // function wpsg_clearImageCache()
-
- /**
- * Wird beim löschen eines Bilds (anklicken) aufgerufen
- */
- function wpsg_remove_bild(strBild)
- {
-
- if (!confirm('<?php echo __('Sind Sie sicher, das Sie dieses Bild löschen möchten?', 'wpsg'); ?>')) return false;
-
- jQuery('#produktbilder_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_produktbilder&cmd=remove&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>',
- async: true,
- data: {
- file: strBild
- },
- success: function(data) {
-
- jQuery('#produktbilder_target').html(data);
-
- if (typeof wpsg_vp_refresh == "function") wpsg_vp_refresh();
-
- }
- } );
-
- return false;
-
- }
-
- /* ]]> */</script>
-
- <?php } else { ?>
- <p><?php echo __('Das Hochladen von Produktbildern ist erst nach erstmaligem speichern möglich.', 'wpsg'); ?></p>
- <?php } ?>
-
- <div class="wpsg_clear"></div><br />
-
- <?php if (wpsg_isSizedInt($this->view['data']['id'])) { ?>
- <a href="#" data-toggle="modal" data-target="#wpsg_mod_produktbilder_ftppath"><span class="wpsg-glyphicon glyphicon glyphicon-folder-open"></span><?php echo __('FTP Pfad anzeigen', 'wpsg'); ?></a><br />
- <a href="#" onclick="return wpsg_clearImageCache();"><span class="wpsg-glyphicon glyphicon glyphicon-trash"></span><?php echo __('Bildercache dieses Produktes löschen', 'wpsg'); ?></a><br />
- <?php } ?>
-
- <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_produktbilder"><span class="wpsg-glyphicon glyphicon glyphicon-wrench"></span><?php echo __('Zur Konfiguration der Produktbilder', 'wpsg'); ?></a>
+ <div class="wpsg_clear"></div>
+ <div><?php echo __("Bitte klicken Sie auf Mediathek um ein Bild hochzuladen. Um ein Bild zu löschen klicken Sie einfach auf das Bild.", "wpsg"); ?></div>
+ <div class="wpsg_clear"></div><br />
- <!-- Mediathek -->
- <hr>
- <div id="produktbilder_target2"><?php echo $this->view['ProduktList2']; ?></div>
-
- <input value="WPmedia" class="button" type="text" style="text-align:center;" size="10" id="btnAddImgLink" />
- <input value="Upload2" class="button" type="text" style="text-align:center;" size="10" id="upload_button2" />
+ <input value="Mediathek" class="button" type="text" style="text-align:center;" size="10" id="btnAddImgLink" />
+ <!-- <input value="UploadMT" class="button" type="text" style="text-align:center;" size="10" id="upload_button_mt" /> -->
<script type="text/javascript">/* <![CDATA[ */
+ /*
jQuery(document).ready(function() {
new AjaxUpload(
- "upload_button2", {
- action: "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_produktbilder&cmd=upload2&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1",
+ "upload_button_mt", {
+ action: "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_produktbilder&cmd=upload_mt&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1",
onSubmit: function(file, extension) {
- jQuery('#produktbilder_target2').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+ jQuery('#produktbilder_target_MT').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
},
onComplete: function(file, response) {
@@ -193,9 +94,9 @@ if (response == '1')
{
- jQuery("#produktbilder_target2").load("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_produktbilder&cmd=produktbilder_liste2&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1");
+ jQuery("#produktbilder_target_MT").load("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_produktbilder&cmd=produktbilder_liste_MT&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1");
- //jQuery('#produktbilder_target2').html(data);
+ //jQuery('#produktbilder_target_MT').html(data);
//if (typeof wpsg_vp_refresh == "function") wpsg_vp_refresh();
}
@@ -208,12 +109,14 @@ }
);
});
-
+ */
+
var post_id;
+
/**
* Wird beim löschen eines Bilds (anklicken) aufgerufen
*/
- function wpsg_remove_bild2(pid) {
+ function wpsg_remove_bild_MT(pid) {
post_id = pid;
//jQuery('#wpsg_produktbilder_remove').show();
@@ -222,17 +125,17 @@ }
- function wpsg_remove_bild2OK() {
+ function wpsg_remove_bild_MT_OK() {
delmt = jQuery('#dialog_produktbilder_delmt').is(':checked');
del = jQuery('#dialog_produktbilder_del').is(':checked');
jQuery('#wpsg_produktbilder_remove').modal('hide');
- jQuery('#produktbilder_target2').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+ jQuery('#produktbilder_target_MT').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_produktbilder&cmd=remove2&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>',
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_produktbilder&cmd=removemt&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>',
async: true,
data: {
del: del,
@@ -241,7 +144,7 @@ },
success: function(data) {
- jQuery('#produktbilder_target2').html(data);
+ jQuery('#produktbilder_target_MT').html(data);
//if (typeof wpsg_vp_refresh == "function") wpsg_vp_refresh();
@@ -307,7 +210,7 @@ },
success: function(data) {
- jQuery('#produktbilder_target2').html(data);
+ jQuery('#produktbilder_target_MT').html(data);
}
} );
@@ -336,6 +239,72 @@ });
/* ]]> */</script>
+
+
+ <?php } ?>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ /**
+ * Löscht den Bildercache dieses Produktes
+ */
+ function wpsg_clearImageCache()
+ {
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_produktbilder&cmd=clearProductCache&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>',
+ async: true,
+ success: function(data) { alert(data); }
+ } );
+
+ return false;
+
+ } // function wpsg_clearImageCache()
+
+ /**
+ * Wird beim löschen eines Bilds (anklicken) aufgerufen
+ */
+ function wpsg_remove_bild(strBild)
+ {
+
+ if (!confirm('<?php echo __('Sind Sie sicher, das Sie dieses Bild löschen möchten?', 'wpsg'); ?>')) return false;
+
+ jQuery('#produktbilder_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_produktbilder&cmd=remove&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>',
+ async: true,
+ data: {
+ file: strBild
+ },
+ success: function(data) {
+
+ jQuery('#produktbilder_target').html(data);
+
+ if (typeof wpsg_vp_refresh == "function") wpsg_vp_refresh();
+
+ }
+ } );
+
+ return false;
+
+ }
+
+ /* ]]> */</script>
+
+ <?php } else { ?>
+ <p><?php echo __('Das Hochladen von Produktbildern ist erst nach erstmaligem speichern möglich.', 'wpsg'); ?></p>
+ <?php } ?>
+
+ <div class="wpsg_clear"></div><br />
+
+ <?php if (false && wpsg_isSizedInt($this->view['data']['id'])) { ?>
+ <a href="#" data-toggle="modal" data-target="#wpsg_mod_produktbilder_ftppath"><span class="wpsg-glyphicon glyphicon glyphicon-folder-open"></span><?php echo __('FTP Pfad anzeigen', 'wpsg'); ?></a><br />
+ <a href="#" onclick="return wpsg_clearImageCache();"><span class="wpsg-glyphicon glyphicon glyphicon-trash"></span><?php echo __('Bildercache dieses Produktes löschen', 'wpsg'); ?></a><br />
+ <?php } ?>
+
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_produktbilder"><span class="wpsg-glyphicon glyphicon glyphicon-wrench"></span><?php echo __('Zur Konfiguration der Produktbilder', 'wpsg'); ?></a>
+
</div>
</div>
\ No newline at end of file diff --git a/views/mods/mod_produktbilder/produkt_edit_list_MT.phtml b/views/mods/mod_produktbilder/produkt_edit_list_MT.phtml new file mode 100644 index 0000000..b7e701b --- /dev/null +++ b/views/mods/mod_produktbilder/produkt_edit_list_MT.phtml @@ -0,0 +1,27 @@ +<?php
+
+ /**
+ * Template für die Liste der Bilder eines Produkts
+ */
+
+?>
+
+ <?php if (isset($this->view['ProduktBilder_MT']) && (sizeof($this->view['ProduktBilder_MT']) > 0)) { ?>
+
+ <?php foreach ($this->view['ProduktBilder_MT'] as $b) { ?>
+
+ <div class="wpsg_mod_produktbilder_admin_bild">
+
+ <a onclick="return wpsg_remove_bild_MT('<?php echo $b['pid']; ?>');" href="#" title="<?php echo __('Dieses Bild löschen.', 'wpsg'); ?>">
+ <img src="<?php echo $b['guid']; ?>" alt="<?php echo wpsg_hspc($b['fname']); ?>" />
+ <span><span class="glyphicon glyphicon-trash"></span></span>
+ </a>
+
+ </div>
+
+ <?php } ?>
+ <div class="wpsg_clear"></div>
+
+ <?php } else { ?>
+ <p><?php echo __('Bisher keine Produktbilder hochgeladen.', 'wpsg'); ?></p>
+ <?php } ?>
\ No newline at end of file diff --git a/views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml b/views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml index d27f09a..c091272 100644 --- a/views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml +++ b/views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml @@ -68,7 +68,7 @@ <?php
if (wpsg_isSizedString($this->view['wpsg_mod_shippingadress']['shipping_title']) && $this->view['wpsg_mod_shippingadress']['shipping_title'] != '-1')
- echo $this->view['arTitles'][$this->view['wpsg_mod_shippingadress']['shipping_title']];
+ echo $this->view['wpsg_mod_shippingadress']['shipping_title'];
?> <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_vname']); ?> <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_name']); ?><br />
<?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_strasse']); ?><br />
|
