diff options
| author | Daniel Schmitzer <noreply@maennchen1.de> | 2018-08-09 04:34:16 +0000 |
|---|---|---|
| committer | Daniel Schmitzer <noreply@maennchen1.de> | 2018-08-09 04:34:16 +0000 |
| commit | 43bbaa69a22b8b8e9facca916da62010fea06eaa (patch) | |
| tree | 4d1ee248466cfed8960d1e879c5f20d371e1e139 | |
| parent | 9e22468cb9fcd44bc606edc350e4604c146e7bc5 (diff) | |
- Bei Auswahl aus Mediathek nur ID übergeben
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7091 0d5edaf7-2b12-4e95-93f4-047927463d4b
| -rw-r--r-- | views/produkt/images.phtml | 8 |
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) {
|
