update gradient
This commit is contained in:
52
public/assets/gradient-append-2.php
Normal file
52
public/assets/gradient-append-2.php
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<?php
|
||||||
|
// for actual template.
|
||||||
|
$gradientFor = $_POST['gradientFor'];
|
||||||
|
// $gradientPrefix = $_POST['gradientPrefix'];
|
||||||
|
$TrimCcount = $_POST['trimCount'];
|
||||||
|
|
||||||
|
$stop_color_1 = $_POST['stop_color_1'];
|
||||||
|
$stop_color_2 = $_POST['stop_color_2'];
|
||||||
|
$offset_1 = $_POST['offset_1'];
|
||||||
|
$offset_2 = $_POST['offset_2'];
|
||||||
|
|
||||||
|
if($gradientFor == "Body"){
|
||||||
|
?>
|
||||||
|
<linearGradient id="Body_Gradient" gradientUnits="userSpaceOnUse" x1="0%" y1="100%" x2="0%" y2="0%">
|
||||||
|
<stop id="Body_Gradient_Color2" offset="<?php echo $offset_2 ?>" stop-color="<?php echo $stop_color_2 ?>" />
|
||||||
|
<stop id="Body_Gradient_Color1" offset="<?php echo $offset_1 ?>" stop-color="<?php echo $stop_color_1 ?>" />
|
||||||
|
</linearGradient>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
}
|
||||||
|
if($gradientFor == "Body_Pattern"){
|
||||||
|
?>
|
||||||
|
<linearGradient id="Body_Pattern_Gradient" gradientUnits="userSpaceOnUse" x1="0%" y1="100%" x2="0%" y2="0%">
|
||||||
|
<stop id="Body_Pattern_Gradient_Color2" offset="<?php echo $offset_2 ?>" stop-color="<?php echo $stop_color_2 ?>" />
|
||||||
|
<stop id="Body_Pattern_Gradient_Color1" offset="<?php echo $offset_1 ?>" stop-color="<?php echo $stop_color_1 ?>" />
|
||||||
|
</linearGradient>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
if($gradientFor == "Trim"){
|
||||||
|
?>
|
||||||
|
<linearGradient id="<?php echo 'Trim_'.$TrimCcount.'_Gradient' ; ?>" gradientUnits="userSpaceOnUse" x1="0%" y1="100%" x2="0%" y2="0%">
|
||||||
|
<stop id="<?php echo 'Trim_'.$TrimCcount.'_Gradient_Color2' ; ?>" offset="<?php echo $offset_2 ?>" stop-color="<?php echo $stop_color_2 ?>" />
|
||||||
|
<stop id="<?php echo 'Trim_'.$TrimCcount.'_Gradient_Color1' ; ?>" offset="<?php echo $offset_1 ?>" stop-color="<?php echo $stop_color_1 ?>" />
|
||||||
|
</linearGradient>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
if($gradientFor == "Trim_Pattern"){
|
||||||
|
?>
|
||||||
|
<linearGradient id="<?php echo 'Trim_'.$TrimCcount.'_Pattern_Gradient' ; ?>" gradientUnits="userSpaceOnUse" x1="0%" y1="100%" x2="0%" y2="0%">
|
||||||
|
<stop id="<?php echo 'Trim_'.$TrimCcount.'_Pattern_Gradient_Color2' ; ?>" offset="<?php echo $offset_2 ?>" stop-color="<?php echo $stop_color_2 ?>" />
|
||||||
|
<stop id="<?php echo 'Trim_'.$TrimCcount.'_Pattern_Gradient_Color1' ; ?>" offset="<?php echo $offset_1 ?>" stop-color="<?php echo $stop_color_1 ?>" />
|
||||||
|
</linearGradient>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -624,6 +624,25 @@
|
|||||||
},2000);
|
},2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function loadGradientTemplate(gradientFor, gradientIds, gradientColor1, gradientColor2, gradientColorOffset1, gradientColorOffset2, trimCount){
|
||||||
|
var url = "{{ asset('/assets/gradient-append-2.php') }}";
|
||||||
|
$.post(url, {
|
||||||
|
gradientFor : gradientFor,
|
||||||
|
stop_color_1 : gradientColor1,
|
||||||
|
stop_color_2 : gradientColor2,
|
||||||
|
offset_1 : gradientColorOffset1,
|
||||||
|
offset_2 : gradientColorOffset2,
|
||||||
|
trimCount : trimCount
|
||||||
|
})
|
||||||
|
.done(function( data ) {
|
||||||
|
var g = document.getElementById(gradientIds);
|
||||||
|
var prevData = $(g).html();
|
||||||
|
$(g).html(prevData+data);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user