diff options
| author | hartmut <noreply@maennchen1.de> | 2017-03-08 07:34:56 +0000 |
|---|---|---|
| committer | hartmut <noreply@maennchen1.de> | 2017-03-08 07:34:56 +0000 |
| commit | bd56b6eb31cc1625d830dda84c8d2e28ff5c4ebd (patch) | |
| tree | d5efff789793e81e97b81c505cd32e9f4823e56e /views/mods/mod_productvariants | |
| parent | 4088aa3cabf3ccf35389576282dcb349bcc5d2ea (diff) | |
Adressteilung und Produktbilder mit Mediathek
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6094 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods/mod_productvariants')
| -rw-r--r-- | views/mods/mod_productvariants/admin_edit.phtml | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/views/mods/mod_productvariants/admin_edit.phtml b/views/mods/mod_productvariants/admin_edit.phtml index 11a8825..4a1f691 100644 --- a/views/mods/mod_productvariants/admin_edit.phtml +++ b/views/mods/mod_productvariants/admin_edit.phtml @@ -132,6 +132,24 @@ <td class="col_id"> </td>
<td class="col_image" colspan="<?php echo $colspan; ?>">
TODO: Bilder
+ <?php
+ $pbArr = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($this->view['product_id']));
+ $k = $this->view['variant']['id'];
+ $kv = $vari['id'];
+ $temp = $this->callMod('wpsg_mod_productvariants', 'getVariImages', array($this->view['product_id'], $k, $kv));
+ ?>
+ <?php $j = 0; foreach ($pbArr as $b) { $j ++; ?>
+ <?php // $this->view['variant']['id'] $vari $var $kv $_REQUEST['pic']
+ $file = $b['basename'];
+ $href = wp_get_attachment_image_src($b['post_id'], Array(25, 25));
+ ?>
+ <a class="<?php //echo ((in_array($file, explode(",", $vari['pic'])))?'mark':''); ?> pic" id="<?php echo $file; ?>"
+ onclick="return wpsg_vp_vari_setPic(this, <?php echo $k; ?>, <?php echo $kv; ?>, '<?php echo $file; ?>', <?php echo $j; ?>);" href="">
+ <img src="<?php echo $href[0]; ?>" alt="" width="25px" height="25px"/>
+ </a>
+ <?php } ?>
+
+
</td>
</tr>
@@ -142,6 +160,79 @@ <script type="text/javascript">/* <![CDATA[ */
+ function wpsg_vp_vari_setPic(htmlElement, var_id, vari_id, pic, pic_index)
+ {
+
+ <?php if (!isset($_REQUEST['wpsg_lang'])) { ?>
+
+ wpsg_vp_ajaxloading_show();
+
+ jQuery.ajax( {
+ url: "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_productvariants&cmd=wpsg_vp_vari_setPic&noheader=1&edit_id=<?php echo $this->view['product_id']; ?>",
+ async: false,
+ data: {
+ var_id: var_id,
+ vari_id: vari_id,
+ pic: pic
+ },
+ success: function(data) {
+ if (vari_id >= 0)
+ {
+
+ if (jQuery(htmlElement).hasClass('mark'))
+ {
+ jQuery(htmlElement).removeClass('mark');
+ }
+ else
+ {
+ jQuery(htmlElement).addClass('mark');
+ }
+
+ }
+ else
+ {
+
+ if (jQuery(htmlElement).hasClass('mark'))
+ {
+ jQuery(htmlElement).removeClass('mark');
+ }
+ else
+ {
+ jQuery(htmlElement).addClass('mark');
+ }
+
+ }
+
+ wpsg_vp_ajaxloading_hide();
+
+ }
+ } );
+
+ <?php } ?>
+
+ return false;
+
+ }
+
+ function wpsg_vp_ajaxloading_show()
+ {
+
+ jQuery('.wpsg_mod_varianten_ajaxloading').show();
+
+ }
+
+ function wpsg_vp_ajaxloading_hide()
+ {
+
+ jQuery('.wpsg_mod_varianten_ajaxloading').hide();
+
+ }
+
+
+ <?php
+ $p1 = wpsg_getInt($this->view['product_id']);
+ $p2 = ($this->view['variant']['product_id']);
+ ?>
<?php if (!wpsg_isSizedInt($this->view['product_id']) || wpsg_isSizedInt($this->view['variant']['product_id'])) { ?>
jQuery('.wpsg_mod_productvariants_table_variation').sortable( {
|
