summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorDaniel Schmitzer <noreply@maennchen1.de>2023-11-20 13:13:34 +0000
committerDaniel Schmitzer <noreply@maennchen1.de>2023-11-20 13:13:34 +0000
commit3c9964cf95542f526cb21c5eafda3a867a53f17f (patch)
treec7d368733fd86273048272a4e60ff481fe7e4108 /views
parent6c9c0be8d8509800c04310e92b83f087f98c96ae (diff)
- Bugfix: Alternative Produktansicht mit Produktkombinationen
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@8383 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views')
-rw-r--r--views/mods/mod_productvariants/produkt_addedit_content.phtml20
-rw-r--r--views/produkt/addedit_productcodes.phtml18
2 files changed, 15 insertions, 23 deletions
diff --git a/views/mods/mod_productvariants/produkt_addedit_content.phtml b/views/mods/mod_productvariants/produkt_addedit_content.phtml
index 657cd21..415ad76 100644
--- a/views/mods/mod_productvariants/produkt_addedit_content.phtml
+++ b/views/mods/mod_productvariants/produkt_addedit_content.phtml
@@ -148,19 +148,13 @@
</div>
</div>
- <?php $GLOBALS['wpsg_vue_3.2.47_loaded'] = ($GLOBALS['wpsg_vue_3.2.47_loaded']??0) + 1; if ($GLOBALS['wpsg_vue_3.2.47_loaded'] <= 1) { ?>
- <script src="<?php echo WPSG_URL_CONTENT.'plugins/'.WPSG_FOLDERNAME.'/views/js/vue-3.2.47.global.min.js'; ?>"></script>
- <?php } ?>
-
- <script>
+ <script type="module">
- (() => {
-
- const ref = Vue.ref;
- const computed = Vue.computed;
- const onMounted = Vue.onMounted;
-
- const app = Vue.createApp({
+ import { ref, createApp, onMounted, computed } from '/wp-content/plugins/wpsg_ticket/assets/js/vue.esm-browser.js';
+
+ document.addEventListener('DOMContentLoaded', () => {
+
+ const app = createApp({
setup() {
const product_id = ref(<?php echo $oProduct->getId(); ?>);
@@ -418,7 +412,7 @@
});
- })();
+ });
</script>
diff --git a/views/produkt/addedit_productcodes.phtml b/views/produkt/addedit_productcodes.phtml
index 065eb86..ca81d51 100644
--- a/views/produkt/addedit_productcodes.phtml
+++ b/views/produkt/addedit_productcodes.phtml
@@ -75,19 +75,17 @@
</div>
- <?php $GLOBALS['wpsg_vue_3.2.47_loaded'] = ($GLOBALS['wpsg_vue_3.2.47_loaded']??0) + 1; if ($GLOBALS['wpsg_vue_3.2.47_loaded'] <= 1) { ?>
- <script src="<?php echo WPSG_URL_CONTENT.'plugins/'.WPSG_FOLDERNAME.'/views/js/vue-3.2.47.global.min.js'; ?>"></script>
- <?php } ?>
-
<script>
+
+ import { ref, createApp, onMounted, computed } from '/wp-content/plugins/wpsg_ticket/assets/js/vue.esm-browser.js';
- (() => {
+ document.addEventListener('DOMContentLoaded', function() {
- const ref = Vue.ref;
- const computed = Vue.computed;
- const onMounted = Vue.onMounted;
+ const ref = ref;
+ const computed = computed;
+ const onMounted = onMounted;
- const app = Vue.createApp({
+ const app = createApp({
setup() {
const data = ref(<?php echo json_encode($arData); ?>);
@@ -131,7 +129,7 @@
}
}).mount('#wpsg_mod_productcodes_app');
- })();
+ });
</script>