diff options
| author | Daniel Schmitzer <noreply@maennchen1.de> | 2016-06-23 10:48:25 +0000 |
|---|---|---|
| committer | Daniel Schmitzer <noreply@maennchen1.de> | 2016-06-23 10:48:25 +0000 |
| commit | d2455bd1afef1ca606348b6ac18c7e98ae41c87e (patch) | |
| tree | 7eac4a0b6f5a3017cc22fe14b0fa9deabeaf9490 /views | |
| parent | cafab04199ce6283141cf58d16b6fd851dd8c36f (diff) | |
- Varianten erweitert
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5583 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views')
| -rw-r--r-- | views/mods/mod_productvariants/admin_edit.phtml | 36 | ||||
| -rw-r--r-- | views/mods/mod_productvariants/admin_html.phtml | 33 | ||||
| -rw-r--r-- | views/mods/mod_productvariants/frontend.js | 0 |
3 files changed, 45 insertions, 24 deletions
diff --git a/views/mods/mod_productvariants/admin_edit.phtml b/views/mods/mod_productvariants/admin_edit.phtml index d491b74..b307c4e 100644 --- a/views/mods/mod_productvariants/admin_edit.phtml +++ b/views/mods/mod_productvariants/admin_edit.phtml @@ -27,9 +27,11 @@ <th class="col_artnr"><?php echo __('Artikelnummer', 'wpsg'); ?></th>
<th class="col_price"><?php echo __('Preis', 'wpsg'); ?></th>
<th class="col_stock"><?php echo __('Lagerbestand', 'wpsg'); ?></th>
- <?php } else { $colspan ++; ?>
- <th class="col_action"></th>
<?php } ?>
+
+ <?php if (!wpsg_isSizedInt($this->view['product_id']) || wpsg_isSizedInt($this->view['variant']['product_id'])) { $colspan ++; ?>
+ <th class="col_action"></th>
+ <?php } ?>
</tr>
</thead>
@@ -47,7 +49,7 @@ <?php echo $vari['id']; ?>
<script type="text/javascript">/* <![CDATA[ */
- <?php if (!wpsg_isSizedInt($this->view['product_id'])) { ?>
+ <?php if (!wpsg_isSizedInt($this->view['product_id']) || wpsg_isSizedInt($this->view['variant']['product_id'])) { ?>
jQuery('#productvariation_name_<?php echo $vari['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
submitdata: {
field: 'vari_name',
@@ -60,8 +62,8 @@ field: 'vari_shortname',
field_id: '<?php echo $vari['id']; ?>'
}
- });
- <?php } else { ?>
+ });
+ <?php } ?>
jQuery('#productvariation_active_<?php echo $vari['id']; ?>').bind('change', function() {
@@ -103,7 +105,7 @@ field_id: '<?php echo $vari['id']; ?>'
}
});
- <?php } ?>
+
/* ]]> */</script>
</td>
@@ -114,13 +116,15 @@ <td class="col_artnr"><span class="wpsg_editable" id="productvariation_anr_<?php echo $vari['id']; ?>"><?php echo wpsg_hspc($vari['anr']); ?></span></td>
<td class="col_price"><span class="wpsg_editable" id="productvariation_price_<?php echo $vari['id']; ?>"><?php echo wpsg_hspc(wpsg_ff($vari['price'], $this->get_option('wpsg_currency'))); ?></span></td>
<td class="col_stock"><span class="wpsg_editable" id="productvariation_stock_<?php echo $vari['id']; ?>"><?php echo wpsg_hspc($vari['stock']); ?></span></td>
- <?php } else { ?>
- <td class="col_action">
+ <?php } ?>
+
+ <?php if (!wpsg_isSizedInt($this->view['product_id']) || wpsg_isSizedInt($this->view['variant']['product_id'])) { ?>
+ <td class="col_action">
<a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Variation löschen', 'wpsg'); ?>" onclick="return wpsg_mod_productvariation_del(<?php echo $vari['id']; ?>);"><span class="glyphicon glyphicon-trash"></span></a>
</td>
- <?php } ?>
+ <?php } ?>
</tr>
@@ -176,5 +180,17 @@ <?php } ?>
<?php } else { ?>
-<?php echo __('Bisher keine Variationen der Variante angelegt.', 'wpsg'); ?>
+
+ <?php echo __('Bisher keine Variationen der Variante angelegt.', 'wpsg'); ?>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ <?php if (wpsg_isSizedInt($this->view['variant']['product_id']) || !wpsg_isSizedInt($this->view['product_id'])) { ?>
+ jQuery('.wpsg_mod_productvariants_variation_add_button').show();
+ <?php } else { ?>
+ jQuery('.wpsg_mod_productvariants_variation_add_button').hide();
+ <?php } ?>
+
+ /* ]]> */</script>
+
<?php } ?>
\ No newline at end of file diff --git a/views/mods/mod_productvariants/admin_html.phtml b/views/mods/mod_productvariants/admin_html.phtml index dda39e7..5f07b73 100644 --- a/views/mods/mod_productvariants/admin_html.phtml +++ b/views/mods/mod_productvariants/admin_html.phtml @@ -9,15 +9,18 @@ <div id="wpsg_mod_productvariants_dialog" class="wpsg_mod_productvariants_dialog_noDialog">
- <div class="modal-body">
+ <div class="modal-body">
- </div>
- <div class="modal-footer">
-
- <button type="button" class="btn-sm wpsg_mod_productvariants_variants btn btn-default" onclick="return wpsg_mod_productvariants_add();"><span class="glyphicon glyphicon-plus"></span> <?php echo __('Neue Produktvariante', 'wpsg'); ?></button>
- <button type="button" class="btn-sm wpsg_mod_productvariants_variants_vari btn btn-default" id="wpsg_mod_productvariants_variation_add_button" style="display:none;" onclick="return wpsg_mod_productvariants_variation_add();"><span class="glyphicon glyphicon-plus"></span> <?php echo __('Neue Variation', 'wpsg'); ?></button>
+ </div>
+ <div class="modal-footer">
+
+ <button type="button" class="btn-sm wpsg_mod_productvariants_variants btn btn-default" onclick="return wpsg_mod_productvariants_add();"><span class="glyphicon glyphicon-plus"></span> <?php
+
+ echo ((wpsg_isSizedInt($_REQUEST['edit_id'])?__('Neue Produktvariante', 'wpsg'):__('Neue Variante', 'wpsg')));
+
+ ?></button>
- </div>
+ </div>
</div>
@@ -33,14 +36,14 @@ </div>
<div class="modal-footer">
- <button type="button" class="btn-sm wpsg_mod_productvariants_variants_vari btn btn-default" id="wpsg_mod_productvariants_variation_add_button" style="display:none;" onclick="return wpsg_mod_productvariants_variation_add();"><span class="glyphicon glyphicon-plus"></span> <?php echo __('Neue Variation', 'wpsg'); ?></button>
- <button type="button" class="btn-sm wpsg_mod_productvariants_variants_vari btn btn-default" style="display:none;" onclick="return wpsg_mod_productvariants_back();"><span class="glyphicon glyphicon-chevron-left"></span> <?php echo __('Schließen', 'wpsg'); ?></button>
+ <button type="button" class="btn-sm wpsg_mod_productvariants_variation_add_button btn btn-default" id="wpsg_mod_productvariants_variation_add_button" style="display:none;" onclick="return wpsg_mod_productvariants_variation_add();"><span class="glyphicon glyphicon-plus"></span> <?php echo __('Neue Variation', 'wpsg'); ?></button>
+ <button type="button" class="btn-sm wpsg_mod_productvariants_variants_close wpsg_mod_productvariants_variants_vari btn btn-default" style="display:none;" onclick="return wpsg_mod_productvariants_back();"><span class="glyphicon glyphicon-remove"></span> <?php echo __('Schließen', 'wpsg'); ?></button>
</div>
</div>
</div>
</div>
-
+
<script type="text/javascript">/* <