From 43bbaa69a22b8b8e9facca916da62010fea06eaa Mon Sep 17 00:00:00 2001 From: Daniel Schmitzer Date: Thu, 9 Aug 2018 04:34:16 +0000 Subject: - Bei Auswahl aus Mediathek nur ID übergeben MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7091 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/produkt/images.phtml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'views') 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('')) return false; jQuery('#produktbilder_target').html('<?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( '' ); attachment = attachment.toJSON(); + + console.log(attachment); + jQuery.ajax( { url: 'wp-admin/admin.php?page=wpsg-Produkt&action=ajax&cmd=upload&noheader=1&edit_id=view['data']['id']; ?>', async: true, data: { - post: attachment + post_id: attachment.id }, success: function(data) { -- cgit v1.2.3