This commit is contained in:
jr-k 2024-08-26 15:33:44 +02:00
parent 1f7bd30ddf
commit 6290b79886
2 changed files with 21 additions and 27 deletions

View File

@ -27,7 +27,7 @@ jQuery(document).ready(function ($) {
const $wrapper = $('<marquee>');
$wrapper.attr({
scrollamount: $('#elem-scroll-speed').val(),
direction: $('[name=elem-scroll-direction]:checked').val(),
direction: $('[name=scrollDirection]:checked').val(),
behavior: 'scroll',
loop: -1
});
@ -38,7 +38,7 @@ jQuery(document).ready(function ($) {
$text.append(insideText);
let justifyContent = 'center';
switch($('[name=elem-text-align]:checked').val()) {
switch($('[name=textAlign]:checked').val()) {
case 'left': justifyContent = 'flex-start'; break;
case 'right': justifyContent = 'flex-end'; break;
}
@ -46,7 +46,7 @@ jQuery(document).ready(function ($) {
$text.css({
padding: $('#elem-container-margin').val() + 'px',
color: $('#elem-fg-color').val(),
textAlign: $('[name=elem-text-align]:checked').val(),
textAlign: $('[name=textAlign]:checked').val(),
textDecoration: $('#elem-text-underline').is(':checked') ? 'underline' : 'normal',
fontSize: $('#elem-font-size').val() + 'px',
fontWeight: $('#elem-font-bold').is(':checked') ? 'bold' : 'normal',

View File

@ -120,7 +120,7 @@
<div class="form-group">
<label for="elem-text">Text Label</label>
<div class="widget">
<input type="text" id="elem-text" name="elem-text"
<input type="text" id="elem-text" name="textLabel"
value="Hello World !Hello World !Hello World !Hello World !Hello World !Hello World !Hello World !Hello World !Hello World !Hello World !Hello World !Hello World !Hello World !222">
</div>
</div>
@ -134,7 +134,7 @@
<div class="form-group">
<label for="elem-font-size">Font Size</label>
<div class="widget widget-unit">
<input type="text" id="elem-font-size" name="elem-font-size" maxlength="3"
<input type="text" id="elem-font-size" name="fontSize" maxlength="3"
class="numeric-input chars-3" value="20">
<span>pt</span>
</div>
@ -143,7 +143,7 @@
<div class="form-group">
<label for="elem-fg-color">Text Color</label>
<div class="widget">
<input type="text" id="elem-fg-color" name="elem-fg-color" class="color-picker"
<input type="text" id="elem-fg-color" name="color" class="color-picker"
data-jscolor="{ value: '#FFFFFFFF', backgroundColor: '#333333', shadowColor: '#000000', width: 120, height: 120 }"/>
</div>
</div>
@ -152,7 +152,7 @@
<div class="form-group">
<label for="elem-font-family">Text Font Type</label>
<div class="widget">
<select name="elem-font-family" id="elem-font-family" class="size-m">
<select name="fontFamily" id="elem-font-family" class="size-m">
<option value="Arial">Arial</option>
<option value="Arial Black">Arial Black</option>
<option value="Verdana">Verdana</option>
@ -182,15 +182,15 @@
<label for="elem-fg-color">Text Style</label>
<div class="widget">
<div class="checkbox-group">
<input type="checkbox" id="elem-font-bold" name="elem-font-bold" value="bold">
<input type="checkbox" id="elem-font-bold" name="fontBold" value="bold">
<label for="elem-font-bold" class="btn btn-neutral">
<i class="fa fa-bold"></i>
</label>
<input type="checkbox" id="elem-font-italic" name="elem-font-italic" value="italic">
<input type="checkbox" id="elem-font-italic" name="fontItalic" value="italic">
<label for="elem-font-italic" class="btn btn-neutral">
<i class="fa fa-italic"></i>
</label>
<input type="checkbox" id="elem-text-underline" name="elem-text-underline"
<input type="checkbox" id="elem-text-underline" name="textUnderline"
value="underline">
<label for="elem-text-underline" class="btn btn-neutral">
<i class="fa fa-underline"></i>
@ -202,17 +202,17 @@
<label for="elem-fg-color">Text Alignment</label>
<div class="widget">
<div class="radio-group">
<input type="radio" id="elem-text-align-left" name="elem-text-align" value="left">
<input type="radio" id="elem-text-align-left" name="textAlign" value="left">
<label for="elem-text-align-left" class="btn btn-neutral">
<i class="fa fa-align-left"></i>
</label>
<input type="radio" id="elem-text-align-center" name="elem-text-align"
<input type="radio" id="elem-text-align-center" name="textAlign"
value="center"
checked="checked">
<label for="elem-text-align-center" class="btn btn-neutral">
<i class="fa fa-align-center"></i>
</label>
<input type="radio" id="elem-text-align-right" name="elem-text-align" value="right">
<input type="radio" id="elem-text-align-right" name="textAlign" value="right">
<label for="elem-text-align-right" class="btn btn-neutral">
<i class="fa fa-align-right"></i>
</label>
@ -229,7 +229,7 @@
<div class="form-group">
<label for="elem-bg-color">Background Color</label>
<div class="widget">
<input type="text" id="elem-bg-color" name="elem-bg-color" class="color-picker"
<input type="text" id="elem-bg-color" name="backgroundColor" class="color-picker"
data-jscolor="{ value: '#000000FF', backgroundColor: '#333333', shadowColor: '#000000', width: 120, height: 120 }"/>
</div>
</div>
@ -238,14 +238,12 @@
Scrolling Effect
</h3>
<div class="horizontal">
<div class="form-group">
<label for="elem-scroll-enable">Enable</label>
<div class="widget">
<div class="toggle">
<input type="checkbox" name="elem-scroll-enable" id="elem-scroll-enable" />
<input type="checkbox" name="scrollEnable" id="elem-scroll-enable" />
<label for="elem-scroll-enable"></label>
</div>
</div>
@ -254,11 +252,11 @@
<label for="elem-scroll-direction">Direction</label>
<div class="widget">
<div class="radio-group">
<input type="radio" id="elem-scroll-direction-left" name="elem-scroll-direction" value="left" checked>
<input type="radio" id="elem-scroll-direction-left" name="scrollDirection" value="left" checked>
<label for="elem-scroll-direction-left" class="btn btn-neutral">
<i class="fa fa-arrow-left"></i>
</label>
<input type="radio" id="elem-scroll-direction-right" name="elem-scroll-direction" value="right">
<input type="radio" id="elem-scroll-direction-right" name="scrollDirection" value="right">
<label for="elem-scroll-direction-right" class="btn btn-neutral">
<i class="fa fa-arrow-right"></i>
</label>
@ -268,7 +266,7 @@
<div class="form-group">
<label for="elem-scroll-speed">Speed</label>
<div class="widget widget-unit">
<input type="text" id="elem-scroll-speed" name="elem-scroll-speed" maxlength="3" class="numeric-input chars-3" value="10">
<input type="text" id="elem-scroll-speed" name="scrollSpeed" maxlength="3" class="numeric-input chars-3" value="10">
</div>
</div>
</div>
@ -284,25 +282,21 @@
<label for="elem-single-line">Single Line Only</label>
<div class="widget">
<div class="toggle">
<input type="checkbox" name="elem-single-line" id="elem-single-line" />
<input type="checkbox" name="singleLine" id="elem-single-line" />
<label for="elem-single-line"></label>
</div>
</div>
</div>
<div class="form-group">
<label for="elem-container-margin">Container Margin</label>
<div class="widget widget-unit">
<input type="text" id="elem-container-margin" name="elem-container-margin" maxlength="3"
<input type="text" id="elem-container-margin" name="margin" maxlength="3"
class="numeric-input chars-3" value="0">
<span>pt</span>
</div>
</div>
</div>
</form>
</div>
</div>