diff options
| -rw-r--r-- | views/produkt/images.phtml | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/views/produkt/images.phtml b/views/produkt/images.phtml index 247b9f9..88522b4 100644 --- a/views/produkt/images.phtml +++ b/views/produkt/images.phtml @@ -189,6 +189,8 @@ //loop through the array and do things with each attachment
var i, attachment;
+ var arPostID = [];
+
for (i = 0; i < attachments.length; ++i) {
attachment = attachments[i];
@@ -196,23 +198,22 @@ attachment = attachment.toJSON();
- console.log(attachment);
+ arPostID.push(attachment.id);
- 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_id: attachment.id
- },
- success: function(data) {
-
- jQuery('#produktbilder_target_MT').html(data);
+ }
- }
- } );
+ 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_id: arPostID
+ },
+ success: function(data) {
+ jQuery('#produktbilder_target_MT').html(data);
- }
+ }
+ } );
});
|
