summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/mods/mod_productvariants/admin_edit.phtml6
-rw-r--r--views/produkt/select.phtml5
2 files changed, 6 insertions, 5 deletions
diff --git a/views/mods/mod_productvariants/admin_edit.phtml b/views/mods/mod_productvariants/admin_edit.phtml
index 0d78cd9..1c403c1 100644
--- a/views/mods/mod_productvariants/admin_edit.phtml
+++ b/views/mods/mod_productvariants/admin_edit.phtml
@@ -184,7 +184,7 @@
$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; ?>"
+ <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>
@@ -203,9 +203,10 @@
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']; ?>',
@@ -214,6 +215,7 @@
'var_id': <?php echo $k; ?>,
'vari_id': <?php echo $kv; ?>,
'iid': iid,
+ 'wpsg_postids': wpsg_postids,
'wpsg_reorder': wpsg_reorder
},
success: function(data) {
diff --git a/views/produkt/select.phtml b/views/produkt/select.phtml
index 0d2ca13..c57cf97 100644
--- a/views/produkt/select.phtml
+++ b/views/produkt/select.phtml
@@ -132,9 +132,8 @@
insertProdukt();
- //jQuery('#wpsg_mod_relatedproducts_dialog').html('').dialog('close');
- jQuery('#wpsg_mod_relatedproducts_dialog').modal( { } ).modal('hide');
-
+ //jQuery('#wpsg_mod_relatedproducts_dialog').modal( { } ).modal('hide');
+ jQuery("#wpsg_mod_relatedproducts_dialog .close").click()
return false;
} // function insertProduktClose()