summaryrefslogtreecommitdiff
path: root/views/mods
diff options
context:
space:
mode:
authorDaniel Schmitzer <noreply@maennchen1.de>2017-09-01 14:35:06 +0000
committerDaniel Schmitzer <noreply@maennchen1.de>2017-09-01 14:35:06 +0000
commit0ccd23f52859f01c59ea3fdeba4004091612f8d5 (patch)
tree6428cb5bacba6d304a7cf0e4d7d3ad5254b8dba1 /views/mods
parent20a7d849c923f99a6452607f9124c542bafc25ae (diff)
- Bilder / Varianten umgebaut vereinheitlicht und aufgeräumt
- Produktbilder Modul durch "Imagehandler" ersetzt git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6438 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods')
-rw-r--r--views/mods/mod_productvariants/admin_edit.phtml104
-rw-r--r--views/mods/mod_productvariants/produkt.phtml22
-rw-r--r--views/mods/mod_produktbilder/dummy.jpgbin5946 -> 0 bytes
-rw-r--r--views/mods/mod_produktbilder/produkt_addedit_content.phtml364
-rw-r--r--views/mods/mod_produktbilder/produkt_edit_list.phtml24
-rw-r--r--views/mods/mod_produktbilder/produkt_edit_list2.phtml27
-rw-r--r--views/mods/mod_produktbilder/produkt_edit_list_MT.phtml27
-rw-r--r--views/mods/mod_produktbilder/settings_edit.phtml7
8 files changed, 41 insertions, 534 deletions
diff --git a/views/mods/mod_productvariants/admin_edit.phtml b/views/mods/mod_productvariants/admin_edit.phtml
index 1c403c1..987e076 100644
--- a/views/mods/mod_productvariants/admin_edit.phtml
+++ b/views/mods/mod_productvariants/admin_edit.phtml
@@ -173,29 +173,27 @@
<tr class="wpsg_mod_productvariants_productimage_row">
<td class="col_id">&nbsp;</td>
<?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, $vari['iid']));
+
+ $arAttachmentIDs = $this->imagehandler->getAttachmentIDs($this->view['product_id'], $vari['id']);
+
?>
- <td class="ui-sortable" colspan="<?php echo $colspan; ?>" id="wpsg_mod_productvariants_productimage_<?php echo $k; ?>_<?php echo $kv; ?>" >
- <?php $j = 0; foreach ($temp as $b) { $j ++; ?>
- <?php // $this->view['variant']['id'] $vari $var $kv $_REQUEST['pic']
- $file2 = $b['basenameori'];
- $href = wp_get_attachment_image_src($b['post_id'], Array(25, 25));
- ?>
- <a class="<?php echo ((in_array($file2, explode(",", $vari['pic'])))?'mark':''); ?> pic" id="<?php echo $file2; ?>" data-pid="<?php echo $b['post_id']; ?>"
- onclick="return wpsg_vp_vari_setPic(this, <?php echo $k; ?>, <?php echo $kv; ?>, '<?php echo $file2; ?>', <?php echo $j; ?>, <?php echo $b['post_id']; ?>);">
- <img src="<?php echo $href[0]; ?>" alt="" width="25px" height="25px"/>
- </a>
- <?php } ?>
+ <td class="ui-sortable" colspan="<?php echo $colspan; ?>" id="wpsg_images_productimage_<?php echo $this->view['variant']['id']; ?>_<?php echo $vari['id']; ?>" >
+
+ <?php foreach ($arAttachmentIDs as $attachment_id) { ?>
+
+ <a href="#" class="<?php echo ((in_array($attachment_id, explode(",", $vari['images_set'])))?'mark':''); ?> pic" id="<?php echo $attachment_id; ?>" onclick="return wpsg_vp_vari_setPic(this, <?php echo $this->view['variant']['id']; ?>, <?php echo $vari['id'] ?>, '<?php echo $attachment_id; ?>', <?php echo $this->view['product_id']; ?>);">
+
+ <?php echo wp_get_attachment_image($attachment_id, array(25, 25), true); ?>
+
+ </a>
+
+ <?php } ?>
- <?php if (wpsg_isSizedInt($j)) { ?>
- <script type="text/javascript">/* <![CDATA[ */
+ <script type="text/javascript">
- jQuery(document).ready(function() {
-
- jQuery('#wpsg_mod_productvariants_productimage_<?php echo $k; ?>_<?php echo $kv; ?>').sortable( {
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_images_productimage_<?php echo $this->view['variant']['id']; ?>_<?php echo $vari['id']; ?>').sortable( {
items: 'a',
helper : 'clone',
update: function(event, ui) {
@@ -203,39 +201,33 @@
wpsg_vp_ajaxloading_show();
var wpsg_reorder = jQuery(this).sortable('toArray');
- var wpsg_postids = jQuery(this).sortable('toArray', {attribute: 'data-pid'});
- alert(wpsg_postids + ' ' + wpsg_reorder);
- var iid = jQuery('#productvariation_iid_' + <?php echo $kv; ?>).val();
- //alert('iid: ' + iid);
-
+
jQuery.ajax( {
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_productvariants&cmd=wpsg_var_setImageOrder&noheader=1&edit_id=<?php echo $this->view['product_id']; ?>',
async: false,
data: {
- 'var_id': <?php echo $k; ?>,
- 'vari_id': <?php echo $kv; ?>,
- 'iid': iid,
- 'wpsg_postids': wpsg_postids,
+ 'var_id': <?php echo $this->view['variant']['id']; ?>,
+ 'vari_id': <?php echo $vari['id']; ?>,
'wpsg_reorder': wpsg_reorder
},
success: function(data) {
if (data != '1') alert(data);
+
wpsg_vp_ajaxloading_hide();
}
} );
}
- } ).disableSelection();
+ } ).disableSelection();
} );
- /* ]]> */</script>
-
- <?php } ?>
-
- </td>
+ </script>
+
+ </td>
+
</tr>
</tbody>
@@ -245,54 +237,26 @@
<script type="text/javascript">/* <![CDATA[ */
- function wpsg_vp_vari_setPic(htmlElement, var_id, vari_id, pic, pic_index, post_id)
+ function wpsg_vp_vari_setPic(htmlElement, var_id, vari_id, attachment_id, product_id)
{
<?php if (!isset($_REQUEST['wpsg_lang'])) { ?>
wpsg_vp_ajaxloading_show();
- iid = jQuery('#productvariation_iid_' + vari_id).val();
- //alert('iid:' + iid);
-
+
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,
- iid: iid,
- pic_index: pic_index,
- post_id: post_id,
- pic: pic
+ product_id: product_id,
+ attachment_id: attachment_id
},
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');
- }
-
- }
-
+
+ jQuery(htmlElement).toggleClass('mark');
+
wpsg_vp_ajaxloading_hide();
}
diff --git a/views/mods/mod_productvariants/produkt.phtml b/views/mods/mod_productvariants/produkt.phtml
index af883db..bf8ddbd 100644
--- a/views/mods/mod_productvariants/produkt.phtml
+++ b/views/mods/mod_productvariants/produkt.phtml
@@ -7,16 +7,9 @@
?>
<div class="wpsg_mod_productvariants_product_wrap" id="wpsg_mod_productvariants_product_wrap_<?php echo $GLOBALS['wpsg_produkt_index']; ?>" wpsg-productindex="<?php echo $GLOBALS['wpsg_produkt_index']; ?>">
- <?php $vAktiv = false; if (is_array($this->view['data']['vp_data']) && sizeof($this->view['data']['vp_data']) > 0) { ?>
+ <?php $vAktiv = false; if (is_array($this->view['vp_data']) && sizeof($this->view['vp_data']) > 0) { ?>
- <?php $kk = -1;
- foreach ($this->view['data']['vp_data'] as $k => $var) {
-
- $kk++;
- //if ($var['active'] == "1")
- {
-
- $vAktiv = true; ?>
+ <?php $kk = -1; foreach ($this->view['vp_data'] as $k => $var) { $kk ++; ?>
<div class="wpsg_vp_field wpsg_vp_field_<?php echo $this->getProduktId($this->view['data']['id']); ?>">
@@ -31,7 +24,7 @@
<div class="wpsg_vp_field_typ_<?php echo $var['typ']; ?>">
<?php /* SELECT-Box START */ ?>
- <?php if ($var['typ'] == "select") { ?>
+ <?php if ($var['type'] == wpsg_mod_productvariants::TYPE_SELECT) { ?>
<label>
<select name="wpsg_vp[<?php echo $k; ?>]" class="wpsg_vp_update" id="wpsg_vpfield_<?php echo $this->getProduktId($this->view['data']['id']); ?>_<?php echo $k; ?>">
<?php foreach ($var['arVariation'] as $kv => $vari) { $j = -1;
@@ -41,7 +34,7 @@
<?php /* Lagerbestand > 0 */ ?>
<?php if (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0) { ?>
- <option value="<?php echo $kv; ?>" <?php echo ((wpsg_getStr($this->view['wpsg_mod_productvariants']['set'][$k]) == $kv)?'selected="selected"':''); ?>>
+ <option value="<?php echo $kv; ?>" <?php echo ((wpsg_getStr($this->view['vp_info'][$k]['vari_id']) == $kv)?'selected="selected"':''); ?>>
<?php echo $vari['name']; ?>
<?php /* Abfrage Preisanzeige nur für eingeloggte Benutzer START */?>
@@ -99,7 +92,7 @@
<?php } /* SELECT-Box ENDE */ ?>
<?php /* IMAGE START */ ?>
- <?php if ($var['typ'] == 'image' && $this->hasMod('wpsg_mod_produktbilder')) { ?>
+ <?php if ($var['type'] == wpsg_mod_productvariants::TYPE_IMAGE && $this->hasMod('wpsg_mod_produktbilder')) { ?>
<div class="wpsg_mod_productvariants_imageselect wpsg_mod_productvariants_imageselect_<?php echo $k; ?>">
<span>
<input type="hidden" name="wpsg_vp[<?php echo $k; ?>]" id="wpsg_vp_<?php echo $k; ?>" value="<?php echo wpsg_getStr($this->view['wpsg_mod_productvariants']['set'][$k]); ?>" />
@@ -121,7 +114,7 @@
<?php } /* IMAGE ENDE */ ?>
<?php /* Radio-Buttons START */ ?>
- <?php if ($var['typ'] == "radio") { ?>
+ <?php if ($var['type'] == wpsg_mod_productvariants::TYPE_RADIO) { ?>
<?php $j = 0; foreach ($var['arVariation'] as $kv => $vari) { if ($vari['active'] == "1") { $j ++; ?>
<?php if (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0 || $this->get_option('wpsg_mod_vp_showProduct') === '1') { ?>
<label>
@@ -179,8 +172,7 @@
</div>
</div>
- <?php } /* $var['active'] == "1" */ ?>
- <?php } /* foreach ($this->view['data']['vp_data'] as $k => $var) */ ?>
+ <?php } /* foreach ($this->view['vp_data'] as $k => $var) */ ?>
<?php } /* $vAktiv = false; ENDE */ ?>
<script type="text/javascript">/* <![CDATA[ */
diff --git a/views/mods/mod_produktbilder/dummy.jpg b/views/mods/mod_produktbilder/dummy.jpg
deleted file mode 100644
index 0e4c0e4..0000000
--- a/views/mods/mod_produktbilder/dummy.jpg
+++ /dev/null
Binary files differ
diff --git a/views/mods/mod_produktbilder/produkt_addedit_content.phtml b/views/mods/mod_produktbilder/produkt_addedit_content.phtml
deleted file mode 100644
index 68c7f1a..0000000
--- a/views/mods/mod_produktbilder/produkt_addedit_content.phtml
+++ /dev/null
@@ -1,364 +0,0 @@
-<?php
-
- /**
- * Template für die Integration der Produktbilder in das Backend der Produktverwaltung
- * wird von Template /views/Produkt/addedit.phtml eingebunden
- */
-
-?>
-
-<!-- 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">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
- <h4 class="modal-title" id="myModalLabel"><?php echo __('FTP Pfad für Bilderupload', 'wpsg'); ?></h4>
- </div>
- <div class="modal-body">
- <?php echo wpsg_hspc($this->callMod('wpsg_mod_produktbilder', 'getPicPath', array($this->view['data']['id']))); ?>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Schließen', 'wpsg'); ?></button>
- </div>
- </div>
- </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">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
- <h4 class="modal-title"><?php echo __('Produktbild löschen', 'wpsg'); ?></h4>
- </div>
- <div class="modal-body">
-
- <?php echo wpsg_drawForm_Checkbox('dialog_produktbilder_delmt', __('Auch in der Mediathek löschen', 'wpsg'), false, array()); ?>
-
- </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_bild_MT_OK();"><?php echo __('Löschen', 'wpsg'); ?></button>
- </div>
- </div>
- </div>
-</div>
-
-
-<div class="panel panel-default">
- <div class="panel-heading clearfix">
- <h3 class="panel-title"><?php echo __('Produktbilder', 'wpsg'); ?></h3>
- </div>
- <div class="panel-body">
-
- <?php if ($this->view['data']['id'] > 0) { ?>
-
- <?php if (get_option("wpsg_classicupload") == "1") { ?>
-
- <div class="wpsg_clear"></div><br />
- <div><?php echo __("Um ein Bild zu löschen klicken Sie einfach auf das Bild.", "wpsg"); ?></div>
- <div class="wpsg_clear"></div><br />
-
- <input type="file" multiple="multiple" name="wpsg_mod_produktbilder_file[]" />
-
- <?php } else { ?>
-
- <!-- Mediathek -->
-
- <div class="ui-sortable" id="produktbilder_target_MT"><?php echo $this->view['ProduktList_MT']; ?></div>
-
- <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><?php echo __("Die Reihenfolge kann mittels Drag&Drop verändert werden.", "wpsg"); ?></div>
- <div class="wpsg_clear"></div><br />
-
- <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() {
-
- jQuery('#produktbilder_target_MT').sortable( {
- items: 'a',
- helper : 'clone',
- update: function(event, ui) {
-
- //wpsg_vp_ajaxloading_show();
-
- var wpsg_reorder = jQuery(this).sortable('toArray');
-
- jQuery.ajax( {
- url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_produktbilder&cmd=wpsg_setImageOrder&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>',
- async: false,
- data: {
- 'p_id': <?php echo '1'; ?>,
- 'wpsg_reorder': wpsg_reorder
- },
- success: function(data) {
-
- data = data.replace(/\n|\r/g, '');
- if (data != '1') alert(data);
- //wpsg_vp_ajaxloading_hide();
-
- }
- } );
-
- }
- } ).disableSelection();
-
-
- });
-
- /*
- jQuery(document).ready(function() {
-
- new AjaxUpload(
- "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_target_MT').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
- },
- onComplete: function(file, response) {
-
- //alert('onComplete=' + response);
- if (response == '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_target_MT').html(data);
- //if (typeof wpsg_vp_refresh == "function") wpsg_vp_refresh();
-
- }
- else
- {
- alert(response);
- }
-
- }
- }
- );
- });
- */
-
- var post_id;
-
- /**
- * Wird beim löschen eines Bilds (anklicken) aufgerufen
- */
- function wpsg_remove_bild_MT(pid) {
-
- post_id = pid;
- //jQuery('#wpsg_produktbilder_remove').show();
- jQuery('#wpsg_produktbilder_remove').modal( { } );
- //jQuery('#wpsg_produktbilder_remove').modal('hide');
-
- }
-
- 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_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=removemt&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>',
- async: true,
- data: {
- del: del,
- delmt: delmt,
- pid: post_id
- },
- success: function(data) {
-
- jQuery('#produktbilder_target_MT').html(data);
-
- //if (typeof wpsg_vp_refresh == "function") wpsg_vp_refresh();
-
- }
- } );
-
- return false;
-
- }
-
- jQuery(document).ready(function() {
-
- // Set all variables to be used in scope
- var wpframe,
- metaBox = jQuery('#meta-box-id.postbox'), // Your meta box id here
- addImgLink = metaBox.find('.upload-custom-img'),
- delImgLink = metaBox.find( '.delete-custom-img'),
- imgContainer = metaBox.find( '.custom-img-container'),
- imgIdInput = metaBox.find( '.custom-img-id' );
-
- // ADD IMAGE LINK
- jQuery("#btnAddImgLink").click(function (event) {
-
- event.preventDefault();
-
- // If the media frame already exists, reopen it.
- if ( wpframe ) {
- wpframe.open();
- return;
- }
-
- // Create a new media frame
- wpframe = wp.media.frames.file_frame = wp.media({
- title: "<?php echo __('Auswählen oder Hochladen von Medien', 'wpsg'); ?>",
- button: { text: "<?php echo __('Medien benutzen', 'wpsg'); ?>" },
- multiple: true // Set to true to allow multiple files to be selected
- });
-
- // When an image is selected in the media frame...
- wpframe.on( 'select', function() {
-
- var attachments = wpframe.state().get('selection').map(
- function( attachment ) {
-
- attachment.toJSON();
- return attachment;
- });
-
- //loop through the array and do things with each attachment
- var i, attachment;
- for (i = 0; i < attachments.length; ++i) {
-
- attachment = attachments[i];
- imgContainer.append( '<img src="'+attachment.url+'" alt="" style="max-width:100%;"/>' );
-
- attachment = attachment.toJSON();
- jQuery.ajax( {
- url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_produktbilder&cmd=uploadmt&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>',
- async: true,
- data: {
- post: attachment
- },
- success: function(data) {
-
- jQuery('#produktbilder_target_MT').html(data);
-
- }
- } );
-
-
- }
-
- /*
- // Get media attachment details from the frame state
- var attachment = wpframe.state().get('selection').first().toJSON();
- // Send the attachment URL to our custom image input field.
- imgContainer.append( '<img src="'+attachment.url+'" alt="" style="max-width:100%;"/>' );
- // Send the attachment id to our hidden input
- imgIdInput.val( attachment.id );
- // Hide the add image link
- addImgLink.addClass( 'hidden' );
- // Unhide the remove image link
- delImgLink.removeClass( 'hidden' );
-
- //URL -->
- //Titel --> attachment.title --> wp_posts.post_title
- //Beschriftung --> attachment.caption --> wp_posts.post_excerpt
- //Alternativtext --> attachment.title --> wp_postmeta._wp_attachment_image_alt
- //Beschreibung --> attachment.desription --> wp_posts.post_content
-
- jQuery.ajax( {
- url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_produktbilder&cmd=uploadmt&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>',
- async: true,
- data: {
- post: attachment
- },
- success: function(data) {
-
- jQuery('#produktbilder_target_MT').html(data);
-
- }
- } );
- */
-
- }); // wpframe.on( 'select', function())
-
- // Finally, open the modal on click
- wpframe.open();
- }); // jQuery("#btnAddImgLink").click(function (event))
-
- }); // jQuery(document).ready(function())
-
- /* ]]> */</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.phtml b/views/mods/mod_produktbilder/produkt_edit_list.phtml
deleted file mode 100644
index d0aaf12..0000000
--- a/views/mods/mod_produktbilder/produkt_edit_list.phtml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-
- /**
- * Template für die Liste der Bilder eines Produkts
- */
-
-?>
-<?php if (sizeof($this->view['ProduktBilder']) > 0) { ?>
-
- <?php foreach ($this->view['ProduktBilder'] as $b) { ?>
-
- <div class="wpsg_mod_produktbilder_admin_bild">
- <a onclick="return wpsg_remove_bild('<?php echo $b; ?>');" href="#" title="<?php echo __('Dieses Bild löschen.', 'wpsg'); ?>">
- <img src="<?php echo $this->view['modul']->makeTn($this->view['data']['id'], $b, 75, 75, 'c'); ?>" alt="<?php echo wpsg_hspc($b); ?>" />
- <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_produktbilder/produkt_edit_list2.phtml b/views/mods/mod_produktbilder/produkt_edit_list2.phtml
deleted file mode 100644
index 07ca110..0000000
--- a/views/mods/mod_produktbilder/produkt_edit_list2.phtml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
- /**
- * Template für die Liste der Bilder eines Produkts
- */
-
-?>
-
- <?php if (isset($this->view['ProduktBilder2']) && (sizeof($this->view['ProduktBilder2']) > 0)) { ?>
-
- <?php foreach ($this->view['ProduktBilder2'] as $b) { ?>
-
- <div class="wpsg_mod_produktbilder_admin_bild">
-
- <a onclick="return wpsg_remove_bild2('<?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_produktbilder/produkt_edit_list_MT.phtml b/views/mods/mod_produktbilder/produkt_edit_list_MT.phtml
deleted file mode 100644
index 3589f68..0000000
--- a/views/mods/mod_produktbilder/produkt_edit_list_MT.phtml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?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 id="produktbild_div_<?php echo $b['pid']; ?>" class="wpsg_mod_produktbilder_admin_bild">
-
- <a id="produktbild_<?php echo $b['pid']; ?>" 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_produktbilder/settings_edit.phtml b/views/mods/mod_produktbilder/settings_edit.phtml
deleted file mode 100644
index b34edc6..0000000
--- a/views/mods/mod_produktbilder/settings_edit.phtml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-
- /**
- * Template für die Einstellungsseite des Produktbilder Moduls
- */
-
-?>