mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-31 04:46:11 +01:00
Fix schedules formatting
This commit is contained in:
parent
6da9cbca54
commit
99df19347b
@ -30946,4 +30946,17 @@ body.invoice-page.invoice-2 table tr td {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Hide scrollbar for Chrome, Safari and Opera */
|
||||||
|
.no-scroll::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Hide scrollbar for IE, Edge and Firefox */
|
||||||
|
.no-scroll {
|
||||||
|
-ms-overflow-style: none;
|
||||||
|
/* IE and Edge */
|
||||||
|
scrollbar-width: none;
|
||||||
|
/* Firefox */
|
||||||
|
}
|
||||||
|
|
||||||
/*# sourceMappingURL=style.css.map */
|
/*# sourceMappingURL=style.css.map */
|
@ -105,7 +105,7 @@
|
|||||||
data['lang']) }}</option>
|
data['lang']) }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div id="ifDays d-block">
|
<div id="ifDays" class="d-block">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="time">{{ translate('serverScheduleConfig', 'time' , data['lang']) }} <small class="text-muted ml-1"> - {{ translate('serverScheduleConfig', 'time-explain' ,
|
<label for="time">{{ translate('serverScheduleConfig', 'time' , data['lang']) }} <small class="text-muted ml-1"> - {{ translate('serverScheduleConfig', 'time-explain' ,
|
||||||
data['lang']) }}</small> </label>
|
data['lang']) }}</small> </label>
|
||||||
@ -113,21 +113,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="ifYes d-none">
|
<div id="ifYes" class="d-none">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="command">{{ translate('serverScheduleConfig', 'command' , data['lang']) }} <small class="text-muted ml-1"> - {{ translate('serverScheduleConfig', 'command-explain' ,
|
<label for="command">{{ translate('serverScheduleConfig', 'command' , data['lang']) }} <small class="text-muted ml-1"> - {{ translate('serverScheduleConfig', 'command-explain' ,
|
||||||
data['lang']) }}</small> </label>
|
data['lang']) }}</small> </label>
|
||||||
<input type="input" class="form-control" name="command" id="command_input" value="{{ data['schedule']['command'] }}" placeholder="Command" required>
|
<input type="input" class="form-control" name="command" id="command_input" value="{{ data['schedule']['command'] }}" placeholder="Command" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="ifAdvanced d-none">
|
<div id="ifAdvanced" class="d-none">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="cron">{{ translate('serverScheduleConfig', 'cron' , data['lang']) }} <small class="text-muted ml-1"> - {{ translate('serverScheduleConfig', 'cron-explain' , data['lang'])
|
<label for="cron">{{ translate('serverScheduleConfig', 'cron' , data['lang']) }} <small class="text-muted ml-1"> - {{ translate('serverScheduleConfig', 'cron-explain' , data['lang'])
|
||||||
}}</small> </label>
|
}}</small> </label>
|
||||||
<input type="input" class="form-control" name="cron_string" id="cron" value="{{ data['schedule']['cron_string'] }}" placeholder="* * * * *">
|
<input type="input" class="form-control" name="cron_string" id="cron" value="{{ data['schedule']['cron_string'] }}" placeholder="* * * * *">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="ifReaction d-none">
|
<div id="ifReaction" class="d-none">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="delay">{{ translate('serverScheduleConfig', 'offset' , data['lang']) }} <small class="text-muted ml-1"> - {{ translate('serverScheduleConfig', 'offset-explain' ,
|
<label for="delay">{{ translate('serverScheduleConfig', 'offset' , data['lang']) }} <small class="text-muted ml-1"> - {{ translate('serverScheduleConfig', 'offset-explain' ,
|
||||||
data['lang']) }}</small> </label>
|
data['lang']) }}</small> </label>
|
||||||
@ -349,10 +349,12 @@
|
|||||||
|
|
||||||
function yesnoCheck() {
|
function yesnoCheck() {
|
||||||
if (document.getElementById('action').value == "command") {
|
if (document.getElementById('action').value == "command") {
|
||||||
document.getElementById("ifYes").style.display = "block";
|
document.getElementById("ifYes").classList.add("d-block");
|
||||||
|
document.getElementById("ifYes").classList.remove("d-none");
|
||||||
document.getElementById("command_input").required = true;
|
document.getElementById("command_input").required = true;
|
||||||
} else {
|
} else {
|
||||||
document.getElementById("ifYes").style.display = "none";
|
document.getElementById("ifYes").classList.add("d-none");
|
||||||
|
document.getElementById("ifYes").classList.remove("d-block");
|
||||||
document.getElementById("command_input").required = false;
|
document.getElementById("command_input").required = false;
|
||||||
}
|
}
|
||||||
if (document.getElementById('action').value == "backup") {
|
if (document.getElementById('action').value == "backup") {
|
||||||
@ -368,40 +370,56 @@
|
|||||||
}
|
}
|
||||||
function basicAdvanced() {
|
function basicAdvanced() {
|
||||||
if (document.getElementById('difficulty').value == "advanced") {
|
if (document.getElementById('difficulty').value == "advanced") {
|
||||||
document.getElementById("ifAdvanced").style.display = "block";
|
document.getElementById("ifAdvanced").classList.add("d-block");
|
||||||
document.getElementById("ifReaction").style.display = "none";
|
document.getElementById("ifReaction").classList.add("d-none");
|
||||||
document.getElementById("ifBasic").style.display = "none";
|
document.getElementById("ifBasic").classList.add("d-none");
|
||||||
|
document.getElementById("ifAdvanced").classList.remove("d-none");
|
||||||
|
document.getElementById("ifReaction").classList.remove("d-block");
|
||||||
|
document.getElementById("ifBasic").classList.remove("d-block");
|
||||||
document.getElementById("delay").required = false;
|
document.getElementById("delay").required = false;
|
||||||
document.getElementById("parent").required = false;
|
document.getElementById("parent").required = false;
|
||||||
document.getElementById("interval").required = false;
|
document.getElementById("interval").required = false;
|
||||||
document.getElementById("time").required = false;
|
document.getElementById("time").required = false;
|
||||||
|
document.getElementById("ifDays").classList.add("d-none");
|
||||||
|
document.getElementById("ifDays").classList.remove("d-block");
|
||||||
} else if (document.getElementById('difficulty').value == "reaction") {
|
} else if (document.getElementById('difficulty').value == "reaction") {
|
||||||
document.getElementById("ifReaction").style.display = "block";
|
document.getElementById("ifReaction").classList.add("d-block");
|
||||||
document.getElementById("ifBasic").style.display = "none";
|
document.getElementById("ifBasic").classList.add("d-none");
|
||||||
document.getElementById("ifAdvanced").style.display = "none";
|
document.getElementById("ifAdvanced").classList.add("d-none");
|
||||||
|
document.getElementById("ifReaction").classList.remove("d-none");
|
||||||
|
document.getElementById("ifBasic").classList.remove("d-block");
|
||||||
|
document.getElementById("ifAdvanced").classList.remove("d-block");
|
||||||
document.getElementById("delay").required = true;
|
document.getElementById("delay").required = true;
|
||||||
document.getElementById("parent").required = true;
|
document.getElementById("parent").required = true;
|
||||||
document.getElementById("interval").required = false;
|
document.getElementById("interval").required = false;
|
||||||
document.getElementById("time").required = false;
|
document.getElementById("time").required = false;
|
||||||
|
document.getElementById("ifDays").classList.add("d-none");
|
||||||
|
document.getElementById("ifDays").classList.remove("d-block");
|
||||||
$("#cron").val("");
|
$("#cron").val("");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
document.getElementById("ifAdvanced").style.display = "none";
|
document.getElementById("ifAdvanced").classList.add("d-none");
|
||||||
document.getElementById("ifReaction").style.display = "none";
|
document.getElementById("ifReaction").classList.add("d-none");
|
||||||
document.getElementById("ifBasic").style.display = "block";
|
document.getElementById("ifAdvanced").classList.remove("d-block");
|
||||||
|
document.getElementById("ifReaction").classList.remove("d-block");
|
||||||
|
document.getElementById("ifBasic").classList.add("d-block");
|
||||||
|
document.getElementById("ifBasic").classList.remove("d-none");
|
||||||
document.getElementById("delay").required = false;
|
document.getElementById("delay").required = false;
|
||||||
document.getElementById("parent").required = false;
|
document.getElementById("parent").required = false;
|
||||||
document.getElementById("interval").required = true;
|
document.getElementById("interval").required = true;
|
||||||
document.getElementById("time").required = true;
|
document.getElementById("time").required = true;
|
||||||
|
ifDays();
|
||||||
$("#cron").val("");
|
$("#cron").val("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function ifDays() {
|
function ifDays() {
|
||||||
if (document.getElementById('interval_type').value == "days") {
|
if (document.getElementById('interval_type').value == "days") {
|
||||||
document.getElementById("ifDays").style.display = "block";
|
document.getElementById("ifDays").classList.add("d-block");
|
||||||
|
document.getElementById("ifDays").classList.remove("d-none");
|
||||||
document.getElementById("time").required = true;
|
document.getElementById("time").required = true;
|
||||||
} else {
|
} else {
|
||||||
document.getElementById("ifDays").style.display = "none";
|
document.getElementById("ifDays").classList.add("d-none");
|
||||||
|
document.getElementById("ifDays").classList.remove("d-block");
|
||||||
document.getElementById("time").required = false;
|
document.getElementById("time").required = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
{% end %}
|
{% end %}
|
||||||
{% if len(data['schedules']) > 0 %}
|
{% if len(data['schedules']) > 0 %}
|
||||||
<div class="d-none d-lg-block">
|
<div class="d-none d-lg-block">
|
||||||
<table class="table table-hover table-responsive" id="schedule_table" style="table-layout:fixed;" aria-describedby="Schedule List">
|
<table class="table table-hover table-responsive no-scroll" id="schedule_table" style="table-layout:fixed;" aria-describedby="Schedule List">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="rounded">
|
<tr class="rounded">
|
||||||
<th style="width: 5%; min-width: 64px;">{{ translate('serverSchedules', 'enabled',
|
<th style="width: 5%; min-width: 64px;">{{ translate('serverSchedules', 'enabled',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user