summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--views/produkt/images.phtml8
1 files changed, 6 insertions, 2 deletions
diff --git a/views/produkt/images.phtml b/views/produkt/images.phtml
index e556915..247b9f9 100644
--- a/views/produkt/images.phtml
+++ b/views/produkt/images.phtml
@@ -98,7 +98,7 @@
*/
function wpsg_remove_bild(strBild)
{
-alert(3);
+
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'); ?>" />');
@@ -188,17 +188,21 @@ alert(3);
//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();
+
+ console.log(attachment);
+
jQuery.ajax( {
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&cmd=upload&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>',
async: true,
data: {
- post: attachment
+ post_id: attachment.id
},
success: function(data) {