This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oninit: function () { | |
// set default filter on init | |
var orderStatus = SSIurlModul.getKey('ORDST'); | |
if (!orderStatus) { | |
SSIurlModul.set("ORDST", "15,17,20,21,30,31,35,40,41,42,43"); | |
}; | |
}, | |
oncomplete: function () { | |
// re-init filter to set default values | |
SSI.portal.init(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://ractive.js.org/api/#class-42 | |
<div class-foo="isFoo">Adds "foo" if isFoo is truthy</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* for example get el width */ | |
// template | |
<p ref="appTitleRef">App title</p> | |
// script | |
const appTitleRef = ref(null) | |
onMounted(() => { | |
console.log(`The app title is ${ appTitleRef.value.offsetWidth } px wide`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// script | |
const posts = ref([ | |
{ | |
id: 1, | |
title: 'post 1' | |
}, | |
{ | |
id: 2, | |
title: 'post 2' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Computed properties are properties which are usually generated based on reactive data which are cached and only update when dependencies change. | |
*/ | |
<template> | |
<p>{{ data.number }}</p> | |
<p>This number is {{ oddOrEven }}</p> | |
<button @click="newNumber(5)">Set the number<button/> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<h1>{{ title }}</h1> | |
<p>Edit title: </p> | |
<input v-model="title" type="text"/> | |
</template> | |
<script setup> | |
import { ref } from 'vue' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<p>{{ text }}</p> | |
</template> | |
<script setup> | |
import { ref } from 'vue' | |
const text = ref('juhu') | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#saveNewTasklist').on("click", function () { | |
const nestedQuery = '.nested-sortable'; | |
const identifier = 'taskId'; | |
const root = document.getElementById('tasks'); | |
function serialize(tasks) { | |
var serialized = []; | |
var children = [].slice.call(tasks.children); // children == document property | |
/** | |
* [].slice.call() == Array.prototype.slice.call() | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var overviewPageUrl = '@Model.Content.Url'; | |
var overviewPageUrl = '@Model.Content.Parent.Url'; | |
var detailPageUrl = '@Model.Content.Children.SingleOrDefault(node => node.DocumentTypeAlias == "MDArticleLocalDetailPage").Url'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// place in template | |
do_action( 'tuttner_show_payment_options' ); | |
// place in functions.php | |
add_action( 'tuttner_show_payment_options', 'woocommerce_checkout_payment', 20 ); | |
// this example is for custom placing a payment options |
NewerOlder