Media
This commit is contained in:
parent
9f7ad503ef
commit
5ce737a749
@ -28,4 +28,8 @@ const theModel = computed({
|
||||
<Input v-model="theModel!.name"/>
|
||||
<Checkbox v-model="theModel!.required"/>
|
||||
<label class="form-check-label" for="flexSwitchCheckDefault">Required</label>
|
||||
<label>Min</label>
|
||||
<Input v-model="theModel!.minValue"/>
|
||||
<label>Max</label>
|
||||
<Input v-model="theModel!.maxValue"/>
|
||||
</template>
|
||||
|
||||
@ -6,6 +6,8 @@ export default class InputElement extends BaseElement {
|
||||
required: boolean = false
|
||||
name: string = ""
|
||||
xmlType: string = "input"
|
||||
minValue: int = 0
|
||||
maxValue: int = 0
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
@ -19,6 +21,8 @@ export default class InputElement extends BaseElement {
|
||||
'placeHolder': this.placeholder,
|
||||
'default': this.default,
|
||||
'name': this.name,
|
||||
'minValue': this.minValue,
|
||||
'maxValue': this.maxValue,
|
||||
'required': this.required
|
||||
})
|
||||
}
|
||||
@ -29,5 +33,7 @@ export default class InputElement extends BaseElement {
|
||||
this.default = obj.default
|
||||
this.required = obj.required
|
||||
this.placeHolder = obj.placeHolder
|
||||
this.minValue = obj.minValue
|
||||
this.maxValue = obj.maxValue
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
import BaseElement from "./BaseElement";
|
||||
|
||||
export default class MediaElement extends BaseElement {
|
||||
default: string = ""
|
||||
name: string = ""
|
||||
xmlType: string = "img"
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.type = 8
|
||||
}
|
||||
|
||||
public toJSON() {
|
||||
return Object.assign(
|
||||
super.toJSON(),
|
||||
{
|
||||
'default': this.default,
|
||||
'name': this.name,
|
||||
})
|
||||
}
|
||||
|
||||
fromJSON(obj) {
|
||||
super.fromJSON(obj)
|
||||
this.name = obj.name
|
||||
this.default = obj.default
|
||||
}
|
||||
}
|
||||
@ -15,30 +15,30 @@
|
||||
}
|
||||
echo '$("#upload_mode").val("' . TP_Basket::getBasket()->getTempProduct($this->article->uuid)->getUploadMode() . '");';
|
||||
}
|
||||
if($this->layouterSession) {
|
||||
echo '$("#upload_mode").val("' . $this->layouterSession->layouter_modus . '");';
|
||||
}
|
||||
if($this->layouterSession) {
|
||||
echo '$("#upload_mode").val("' . $this->layouterSession->layouter_modus . '");';
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
window.onload = function() {
|
||||
<?php
|
||||
|
||||
if ($this->load || $this->rebuy) {
|
||||
echo '$("#upload_mode").val("' . TP_Basket::getBasket()->getTempProduct($this->article->uuid)->getUploadMode() . '");';
|
||||
}
|
||||
if($this->layouterSession) {
|
||||
echo '$("#upload_mode").val("' . $this->layouterSession->layouter_modus . '");';
|
||||
}
|
||||
if ($this->load || $this->rebuy) {
|
||||
echo '$("#upload_mode").val("' . TP_Basket::getBasket()->getTempProduct($this->article->uuid)->getUploadMode() . '");';
|
||||
}
|
||||
if($this->layouterSession) {
|
||||
echo '$("#upload_mode").val("' . $this->layouterSession->layouter_modus . '");';
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
$('#in_basket').removeClass('disabled');
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="md:flex">
|
||||
<form id="CALCFORM" class="m-2 basis-2/3"></form>
|
||||
<div class="basis-1/3 m-2">
|
||||
<form id="CALCFORM" class="basis-2/3"></form>
|
||||
<div class="basis-1/3"
|
||||
<h2 class="text-lg font-lenzFont font-medium">Summe</h2>
|
||||
<table class="table-auto w-full">
|
||||
<tbody>
|
||||
|
||||
@ -66,7 +66,8 @@ $(function(){
|
||||
method: 'post',
|
||||
data: JSON.stringify({productUUId: productUUId, values: formArray, count: 1, uploadMode: $('#upload_mode').val(), deliveryDate: delivery_date, deliveryInfo: delivery_info, xmlProduct: xmlProduct }),
|
||||
success: function(result){
|
||||
document.location="/basket";
|
||||
parent.postMessage({action: 'setBasketCount', data: 0}, '*');
|
||||
parent.postMessage({action: 'redirectBasket'}, '*');
|
||||
}
|
||||
});
|
||||
return false;
|
||||
@ -78,7 +79,8 @@ $(function(){
|
||||
method: 'post',
|
||||
data: JSON.stringify({productUUId: productUUId, values: formArray, count: 1, uploadMode: $('#upload_mode').val(), deliveryDate: delivery_date, deliveryInfo: delivery_info, xmlProduct: xmlProduct }),
|
||||
success: function(result){
|
||||
document.location="/basket";
|
||||
parent.postMessage({action: 'setBasketCount', data: 0}, '*');
|
||||
parent.postMessage({action: 'redirectBasket'}, '*');
|
||||
}
|
||||
});
|
||||
return false;
|
||||
@ -435,13 +437,13 @@ function buildForm(elements, display_group = "", validElements = []) {
|
||||
}
|
||||
|
||||
$element = $('<div>').addClass("form-controls");
|
||||
$inputGroup = $('<div class="input-group input-group-sm">');
|
||||
$inputGroup = $('<div class="flex flex-row gap-1">');
|
||||
$inputGroup.appendTo($element);
|
||||
$obj.appendTo($inputGroup);
|
||||
|
||||
addOrReplaceFormElement(previousId, element.id, $container, $element, $label, element.valid, display_group);
|
||||
if(element.helpLink) {
|
||||
$obj.after('<div class="input-group-append"><a class="btn btn-outline-primary btn-circle" onclick="modalopen(\'' + element.helpLink + '\');return false;" target="_blank" href="' + element.helpLink + '">?</a></div>');
|
||||
$obj.after('<div class="input-group-append"><a class="block w-full transition ease-in-out duration-300 delay-150 hover:bg-white hover:text-black border-slate-200 border bg-highlight text-black p-3 bg-slate-100 " onclick="modalopen(\'' + element.helpLink + '\');return false;" target="_blank" href="' + element.helpLink + '">?</a></div>');
|
||||
}
|
||||
|
||||
previousId = element.id;
|
||||
@ -482,6 +484,5 @@ function addOrReplaceFormElement(previousId, id, $container, $element, $label, v
|
||||
}
|
||||
}
|
||||
function modalopen(href) {
|
||||
$('.help-modal').load(href,function(){
|
||||
$('#myModal').modal({show:true});});
|
||||
window.open(href);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user