33
templates/Froxlor/assets/js/app.js
Normal file
33
templates/Froxlor/assets/js/app.js
Normal file
@@ -0,0 +1,33 @@
|
||||
import '@fortawesome/fontawesome-free';
|
||||
|
||||
import jQuery from 'jquery';
|
||||
window.$ = jQuery;
|
||||
|
||||
import 'jquery-validation';
|
||||
import 'bootstrap';
|
||||
import 'chart.js/auto';
|
||||
|
||||
// Axios
|
||||
import axios from 'axios';
|
||||
window.axios = axios;
|
||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||
|
||||
// Vue
|
||||
import { createApp } from 'vue';
|
||||
const app = createApp({});
|
||||
|
||||
// import ExampleComponent from './components/ExampleComponent.vue';
|
||||
// app.component('example-component', ExampleComponent);
|
||||
//
|
||||
// or
|
||||
//
|
||||
// Object.entries(import.meta.glob('./**/*.vue', { eager: true })).forEach(([path, definition]) => {
|
||||
// app.component(path.split('/').pop().replace(/\.\w+$/, ''), definition.default);
|
||||
// });
|
||||
|
||||
app.mount('#app');
|
||||
|
||||
// Load jquery components
|
||||
Object.entries(import.meta.glob('./jquery/*.js', { eager: true })).forEach(([path, definition]) => {
|
||||
definition.default();
|
||||
});
|
||||
0
templates/Froxlor/assets/js/bootstrap.js
vendored
Normal file
0
templates/Froxlor/assets/js/bootstrap.js
vendored
Normal file
0
templates/Froxlor/assets/js/index.html
Normal file
0
templates/Froxlor/assets/js/index.html
Normal file
60
templates/Froxlor/assets/js/jquery/apikeys.js
vendored
Normal file
60
templates/Froxlor/assets/js/jquery/apikeys.js
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
export default function() {
|
||||
|
||||
var timer, delay = 500;
|
||||
$('div[data-action="apikeys"] #allowed_from').on('keyup change', function () {
|
||||
var _this = $(this);
|
||||
clearTimeout(timer);
|
||||
timer = setTimeout(function () {
|
||||
var akid = _this.closest('div[data-action="apikeys"]').data('entry');
|
||||
$.ajax({
|
||||
url: "lib/ajax.php?action=editapikey",
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
data: { id: akid, allowed_from: _this.val(), valid_until: $('div[data-entry="' + akid + '"] #valid_until').val() },
|
||||
success: function (data) {
|
||||
if (data.message) {
|
||||
_this.removeClass('is-valid');
|
||||
_this.addClass('is-invalid');
|
||||
} else {
|
||||
_this.removeClass('is-invalid');
|
||||
_this.addClass('is-valid');
|
||||
_this.val(data.allowed_from);
|
||||
}
|
||||
},
|
||||
error: function (request, status, error) {
|
||||
_this.removeClass('is-valid');
|
||||
_this.addClass('is-invalid');
|
||||
}
|
||||
});
|
||||
}, delay);
|
||||
});
|
||||
|
||||
$('div[data-action="apikeys"] #valid_until').on('keyup change', function () {
|
||||
var _this = $(this);
|
||||
clearTimeout(timer);
|
||||
timer = setTimeout(function () {
|
||||
var akid = _this.closest('div[data-action="apikeys"]').data('entry');
|
||||
$.ajax({
|
||||
url: "lib/ajax.php?action=editapikey",
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
data: { id: akid, valid_until: _this.val(), allowed_from: $('div[data-entry="' + akid + '"] #allowed_from').val() },
|
||||
success: function (data) {
|
||||
if (data.message) {
|
||||
_this.removeClass('is-valid');
|
||||
_this.addClass('is-invalid');
|
||||
} else {
|
||||
_this.removeClass('is-invalid');
|
||||
_this.addClass('is-valid');
|
||||
_this.val(data.valid_until);
|
||||
}
|
||||
},
|
||||
error: function (request, status, error) {
|
||||
_this.removeClass('is-valid');
|
||||
_this.addClass('is-invalid');
|
||||
}
|
||||
});
|
||||
}, delay);
|
||||
});
|
||||
|
||||
}
|
||||
52
templates/Froxlor/assets/js/jquery/configfiles.js
vendored
Normal file
52
templates/Froxlor/assets/js/jquery/configfiles.js
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
export default function() {
|
||||
/*
|
||||
* config files - select all recommended
|
||||
*/
|
||||
$('#selectRecommendedConfig').on('click', function () {
|
||||
$('input[data-recommended]').each(function () {
|
||||
if ($(this).data('recommended') == 1) {
|
||||
$(this).prop('checked', true);
|
||||
} else {
|
||||
$(this).prop('checked', false);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
/*
|
||||
* export/download JSON file (e.g. for usage with config-services)
|
||||
*/
|
||||
$('#downloadSelectionAsJson').on('click', function () {
|
||||
var formData = $(this).closest('form').serialize();
|
||||
window.location = "lib/ajax.php?action=getConfigJsonExport&" + formData;
|
||||
});
|
||||
|
||||
/*
|
||||
* open modal window to show selected config-commands/files
|
||||
* for selected daemon
|
||||
*/
|
||||
$('.show-config').on('click', function () {
|
||||
var distro = $(this).data('dist');
|
||||
var section = $(this).data('section');
|
||||
var daemon = $(this).data('daemon');
|
||||
|
||||
$.ajax({
|
||||
url: "lib/ajax.php?action=getConfigDetails",
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
data: { distro: distro, section: section, daemon: daemon },
|
||||
success: function (data) {
|
||||
$('#configTplShowLabel').html(data.title);
|
||||
$('#configTplShow .modal-body').html(data.content);
|
||||
var myModal = new bootstrap.Modal(document.getElementById('configTplShow'));
|
||||
myModal.show();
|
||||
},
|
||||
error: function (request, status, error) {
|
||||
$('#configTplShowLabel').html('Error');
|
||||
$('#configTplShow .modal-body').html('<div class="alert alert-danger" role="alert">' + request.responseJSON.message + '</div>');
|
||||
var myModal = new bootstrap.Modal(document.getElementById('configTplShow'));
|
||||
myModal.show();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
76
templates/Froxlor/assets/js/jquery/customer.js
vendored
Normal file
76
templates/Froxlor/assets/js/jquery/customer.js
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
export default function() {
|
||||
|
||||
// Make inputs with enabled unlimited checked disabled
|
||||
$("input[name$='_ul']").each(function () {
|
||||
var fieldname = $(this).attr("name").substring(0, $(this).attr("name").length - 3);
|
||||
$("input[name='" + fieldname + "']").prop({
|
||||
readonly: $(this).is(":checked"),
|
||||
required: !$(this).is(":checked")
|
||||
});
|
||||
});
|
||||
// change state when unlimited checkboxes are clicked
|
||||
$("input[name$='_ul']").on('change', function () {
|
||||
var fieldname = $(this).attr("name").substring(0, $(this).attr("name").length - 3);
|
||||
$("input[name='" + fieldname + "']").prop({
|
||||
readonly: $(this).is(":checked"),
|
||||
required: !$(this).is(":checked")
|
||||
});
|
||||
if (!$(this).is(":checked")) {
|
||||
$("input[name='" + fieldname + "']").focus()
|
||||
}
|
||||
});
|
||||
|
||||
// set values from hosting plan when adding/editing a customer according to the plan's values
|
||||
$('#use_plan').on('change', function () {
|
||||
var pid = $(this).val();
|
||||
if (pid > 0) {
|
||||
$.ajax({
|
||||
url: "admin_plans.php?page=overview&action=jqGetPlanValues",
|
||||
type: "POST",
|
||||
data: {
|
||||
planid: pid
|
||||
},
|
||||
dataType: "json",
|
||||
success: function (json) {
|
||||
for (var i in json) {
|
||||
if (i == 'email_imap' || i == 'email_pop3' || i == 'perlenabled' || i == 'phpenabled' || i == 'dnsenabled' || i == 'logviewenabled') {
|
||||
/** handle checkboxes **/
|
||||
if (json[i] == 1) {
|
||||
$("input[name='" + i + "']").prop('checked', true);
|
||||
} else {
|
||||
$("input[name='" + i + "']").prop('checked', false);
|
||||
}
|
||||
} else if (i == 'allowed_phpconfigs') {
|
||||
/** handle array of values **/
|
||||
$("input[name='allowed_phpconfigs[]']").each(function (index) {
|
||||
$(this).prop('checked', false);
|
||||
for (var j in json[i]) {
|
||||
if ($(this).val() == json[i][j]) {
|
||||
$(this).prop('checked', true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (json[i] == -1) {
|
||||
/** handle unlimited checkboxes **/
|
||||
$("input[name='" + i + "_ul']").attr('checked', 'checked');
|
||||
$("input[name='" + i + "']").prop({
|
||||
readonly: true
|
||||
});
|
||||
} else {
|
||||
/** handle normal value **/
|
||||
$("input[name='" + i + "']").val(json[i]);
|
||||
$("input[name='" + i + "']").prop({
|
||||
readonly: false
|
||||
});
|
||||
$("input[name='" + i + "_ul']").prop('checked', false);
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (a, b) {
|
||||
console.log(a, b);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
19
templates/Froxlor/assets/js/jquery/dnseditor.js
vendored
Normal file
19
templates/Froxlor/assets/js/jquery/dnseditor.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
export default function() {
|
||||
|
||||
// Display helptext to content box according to dns-record type selected
|
||||
$("select[name='dns_type']").on('change', function () {
|
||||
var selVal = $(this).val();
|
||||
$.ajax({
|
||||
url: "lib/ajax.php?action=loadLanguageString",
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
data: { langid: 'dnseditor.notes.' + selVal },
|
||||
success: function (data) {
|
||||
$("#dns_content").next().html(data);
|
||||
},
|
||||
error: function (request, status, error) {
|
||||
console.log(request, status, error)
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
109
templates/Froxlor/assets/js/jquery/domains.js
vendored
Normal file
109
templates/Froxlor/assets/js/jquery/domains.js
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
export default function() {
|
||||
/*
|
||||
* domains
|
||||
*/
|
||||
// disable unusable php-configuration by customer settings
|
||||
$('#customerid').on('change', function () {
|
||||
var cid = $(this).val();
|
||||
$.ajax({
|
||||
url: "admin_domains.php?page=domains&action=jqGetCustomerPHPConfigs",
|
||||
type: "POST",
|
||||
data: {
|
||||
customerid: cid
|
||||
},
|
||||
dataType: "json",
|
||||
success: function (json) {
|
||||
if (json.length > 0) {
|
||||
$('#phpsettingid option').each(function () {
|
||||
var pid = $(this).val();
|
||||
$(this).attr("disabled", "disabled");
|
||||
for (var i in json) {
|
||||
if (pid == json[i]) {
|
||||
$(this).removeAttr("disabled");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function (a, b) {
|
||||
console.log(a, b);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// show warning if speciallogfile option is toggled
|
||||
if ($('input[name=speciallogverified]')) {
|
||||
$('input[name=speciallogfile]').on('click', function () {
|
||||
$('#speciallogfilenote').remove();
|
||||
$('#speciallogfile').removeClass('is-invalid');
|
||||
$('#speciallogverified').val(0);
|
||||
$.ajax({
|
||||
url: window.location.pathname.substring(1) + "?page=overview&action=jqSpeciallogfileNote",
|
||||
type: "POST",
|
||||
data: {
|
||||
id: $('input[name=id]').val(), newval: +$('#speciallogfile').is(':checked')
|
||||
},
|
||||
dataType: "json",
|
||||
success: function (json) {
|
||||
if (json.changed) {
|
||||
$('#speciallogfile').addClass('is-invalid');
|
||||
$('#speciallogfile').parent().append(json.info);
|
||||
$('#speciallogverified').val(1);
|
||||
}
|
||||
},
|
||||
error: function (a, b) {
|
||||
console.log(a, b);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* email only domain - hide unnecessary/unused sections
|
||||
*/
|
||||
if ($('#id') && $('#email_only').is(':checked')) {
|
||||
$('#section_b').hide();
|
||||
$('#section_bssl').hide();
|
||||
$('#section_c').hide();
|
||||
$('#section_d').hide();
|
||||
}
|
||||
|
||||
/**
|
||||
* toggle show/hide of sections in case of email only flag
|
||||
*/
|
||||
$('#email_only').on('click', function () {
|
||||
if ($(this).is(':checked')) {
|
||||
// hide unnecessary sections
|
||||
$('#section_b').hide();
|
||||
$('#section_bssl').hide();
|
||||
$('#section_c').hide();
|
||||
$('#section_d').hide();
|
||||
} else {
|
||||
// show sections
|
||||
$('#section_b').show();
|
||||
$('#section_bssl').show();
|
||||
$('#section_c').show();
|
||||
$('#section_d').show();
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* ssl enabled domain - hide unnecessary/unused sections
|
||||
*/
|
||||
if ($('#id') && !$('#sslenabled').is(':checked')) {
|
||||
$('#section_bssl>.formfields>.row').not(":first").addClass("d-none");
|
||||
}
|
||||
|
||||
/**
|
||||
* toggle show/hide of sections in case of ssl enabled flag
|
||||
*/
|
||||
$('#sslenabled').on('click', function () {
|
||||
if ($(this).is(':checked')) {
|
||||
// show sections
|
||||
$('#section_bssl>.formfields>.row').removeClass("d-none");
|
||||
} else {
|
||||
// hide unnecessary sections
|
||||
$('#section_bssl>.formfields>.row').not(":first").addClass("d-none");
|
||||
}
|
||||
})
|
||||
}
|
||||
14
templates/Froxlor/assets/js/jquery/global.js
vendored
Normal file
14
templates/Froxlor/assets/js/jquery/global.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
export default function() {
|
||||
/*
|
||||
* global
|
||||
*/
|
||||
$('#historyback').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
history.back(1);
|
||||
})
|
||||
|
||||
$('#copySysInfo').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
navigator.clipboard.writeText($('#ccSysInfo').text().trim());
|
||||
})
|
||||
}
|
||||
0
templates/Froxlor/assets/js/jquery/index.html
Normal file
0
templates/Froxlor/assets/js/jquery/index.html
Normal file
62
templates/Froxlor/assets/js/jquery/install.js
vendored
Normal file
62
templates/Froxlor/assets/js/jquery/install.js
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
export default function() {
|
||||
/*
|
||||
* switch between basic and advanced install mode
|
||||
*/
|
||||
$('#switchInstallMode').on('click', function () {
|
||||
var checked = $(this).prop('checked');
|
||||
window.location = window.location.pathname + replaceQueryParam('extended', +checked, window.location.search);
|
||||
});
|
||||
|
||||
function replaceQueryParam(param, newval, search) {
|
||||
var regex = new RegExp("([?;&])" + param + "[^&;]*[;&]?");
|
||||
if (search.match(regex)) {
|
||||
search = search.replace(regex, "$1").replace(/&$/, '');
|
||||
}
|
||||
return search + '&' + param + '=' + newval;
|
||||
}
|
||||
|
||||
function checkConfigState() {
|
||||
$.ajax({
|
||||
url: window.location.href,
|
||||
type: "GET",
|
||||
success: function (data, textStatus, request) {
|
||||
if (request.status >= 300) {
|
||||
window.location = "http://" + srvName;
|
||||
}
|
||||
},
|
||||
error: function (request, textStatus, errorThrown) {
|
||||
// continue
|
||||
if (request.status >= 300) {
|
||||
window.location = "http://" + srvName;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var cTimer;
|
||||
|
||||
/**
|
||||
* check manual-config switch
|
||||
*/
|
||||
$('#manual_config').on('click', function () {
|
||||
clearInterval(cTimer);
|
||||
var checked = $(this).prop('checked');
|
||||
if (checked) {
|
||||
// button zum login
|
||||
$('#submitAuto').addClass('d-none');
|
||||
$('#submitManual').removeClass('d-none');
|
||||
} else {
|
||||
cTimer = setInterval(checkConfigState, 1000);
|
||||
// spinner fürs warten
|
||||
$('#submitAuto').removeClass('d-none');
|
||||
$('#submitManual').addClass('d-none');
|
||||
}
|
||||
});
|
||||
|
||||
if ($('#manual_config').length > 0) {
|
||||
var srvName = $('#target_servername').val();
|
||||
clearInterval(cTimer);
|
||||
cTimer = setInterval(checkConfigState, 1000);
|
||||
}
|
||||
|
||||
}
|
||||
30
templates/Froxlor/assets/js/jquery/ipsandports.js
vendored
Normal file
30
templates/Froxlor/assets/js/jquery/ipsandports.js
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
export default function() {
|
||||
/*
|
||||
* ipsandports - check for internal ip and output a notice if private-range ip is given
|
||||
*/
|
||||
$('#ip').on('change', function () {
|
||||
var ipval = $(this).val();
|
||||
if (ipval.length > 0) {
|
||||
$('#ipnote').remove();
|
||||
$('#ip').removeClass('is-invalid');
|
||||
$.ajax({
|
||||
url: "admin_ipsandports.php?page=overview&action=jqCheckIP",
|
||||
type: "POST",
|
||||
data: {
|
||||
ip: ipval
|
||||
},
|
||||
dataType: "json",
|
||||
success: function (json) {
|
||||
if (json != 0) {
|
||||
$('#ip').addClass('is-invalid');
|
||||
$('#ip').parent().append(json);
|
||||
}
|
||||
},
|
||||
error: function (a, b) {
|
||||
console.log(a, b);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
24
templates/Froxlor/assets/js/jquery/newsfeed.js
vendored
Normal file
24
templates/Froxlor/assets/js/jquery/newsfeed.js
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
export default function() {
|
||||
/*
|
||||
* newsfeed
|
||||
*/
|
||||
if (document.getElementById('newsfeed')) {
|
||||
let role = "";
|
||||
|
||||
if (typeof $("#newsfeed").data("role") !== "undefined") {
|
||||
role = "&role=" + $("#newsfeed").data("role");
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "lib/ajax.php?action=newsfeed" + role + "&theme=" + window.$theme,
|
||||
type: "GET",
|
||||
success: function (data) {
|
||||
$("#newsfeeditems").html(data);
|
||||
},
|
||||
error: function (request, status, error) {
|
||||
console.log(request, status, error)
|
||||
$("#newsfeeditems").html('<div class="list-group-item text-center"><span class="badge bg-warning" role="alert">Error loading newsfeed</span></div>');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
59
templates/Froxlor/assets/js/jquery/search.js
vendored
Executable file
59
templates/Froxlor/assets/js/jquery/search.js
vendored
Executable file
@@ -0,0 +1,59 @@
|
||||
export default function() {
|
||||
/*
|
||||
* search
|
||||
*/
|
||||
let search = $('#search')
|
||||
|
||||
search.on('submit', function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
search.find('input').on('keyup', function () {
|
||||
let query = $(this).val();
|
||||
let dropdown = $('#search .search-results');
|
||||
// Hide search if query is empty
|
||||
if (!query.length) {
|
||||
dropdown.html('');
|
||||
dropdown.parent().hide();
|
||||
return;
|
||||
}
|
||||
// Show notification for short search query
|
||||
if (query.length && query.length < 3) {
|
||||
dropdown.html('<li class="list-group-item text-body-secondary py-1">Please enter more than 2 characters</li>');
|
||||
dropdown.parent().show();
|
||||
return;
|
||||
}
|
||||
// Search
|
||||
$.ajax({
|
||||
url: "lib/ajax.php?action=searchglobal&theme=" + window.$theme,
|
||||
type: "POST",
|
||||
data: {
|
||||
searchtext: query
|
||||
},
|
||||
dataType: "json",
|
||||
success: data => {
|
||||
// Show notification if we got no results
|
||||
if (Object.keys(data).length === 0) {
|
||||
dropdown.html('<li class="list-group-item text-body-secondary py-1">Nothing found!</li>');
|
||||
dropdown.parent().show();
|
||||
return;
|
||||
}
|
||||
|
||||
// Clear dropdown and show results
|
||||
dropdown.html('');
|
||||
dropdown.parent().show();
|
||||
Object.keys(data).forEach(key => {
|
||||
dropdown.append('<li class="list-group-item text-body-secondary text-capitalize fw-bold py-1 border-bottom">' + key + '</li>');
|
||||
data[key].forEach(item => {
|
||||
dropdown.append('<li class="list-group-item mt-1"><a href="' + item.href + '" tabindex="2" class="text-decoration-none">' + item.title + '</a></li>');
|
||||
});
|
||||
});
|
||||
},
|
||||
error: function (a, b) {
|
||||
console.log(a, b);
|
||||
dropdown.html('<li class="list-group-item text-body-secondary py-1">Whoops we got some errors!</li>');
|
||||
dropdown.parent().show();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
44
templates/Froxlor/assets/js/jquery/tablecolumns.js
vendored
Normal file
44
templates/Froxlor/assets/js/jquery/tablecolumns.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
export default function() {
|
||||
/*
|
||||
* table columns - manage columns modal
|
||||
*/
|
||||
$('.manageColumnsModal form').on('submit', function (event) {
|
||||
$.ajax({
|
||||
url: 'lib/ajax.php?action=updatetablelisting&listing=' + $(this).data('listing') + '&theme=' + window.$theme,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: $(this).serialize(),
|
||||
success: function () {
|
||||
window.location.href = '';
|
||||
},
|
||||
error: function (request) {
|
||||
alert(request.responseJSON.message);
|
||||
}
|
||||
});
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
$('.manageColumnsModal form button[data-action="reset"]').on('click', function () {
|
||||
var form = $(this).parents('form:first');
|
||||
$.ajax({
|
||||
url: 'lib/ajax.php?action=resettablelisting&listing=' + form.data('listing') + '&theme=' + window.$theme,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {},
|
||||
success: function () {
|
||||
window.location.href = '';
|
||||
},
|
||||
error: function (request) {
|
||||
alert(request.responseJSON.message);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('.manageColumnsModal form button[data-action="select-all"]').on('click', function () {
|
||||
$(this).parents('form:first').find('input:checkbox').prop('checked', true);
|
||||
});
|
||||
|
||||
$('.manageColumnsModal form button[data-action="unselect-all"]').on('click', function () {
|
||||
$(this).parents('form:first').find('input:checkbox').prop('checked', false);
|
||||
});
|
||||
}
|
||||
10
templates/Froxlor/assets/js/jquery/traffic.js
vendored
Normal file
10
templates/Froxlor/assets/js/jquery/traffic.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export default function() {
|
||||
/*
|
||||
* traffic - display helptext to content box according to dns-record type selected
|
||||
*/
|
||||
$("select[name='range']").on('change', function () {
|
||||
var selVal = $(this).val();
|
||||
var baseRef = $(this).data('baseref');
|
||||
window.location.href = baseRef + '?range=' + selVal;
|
||||
});
|
||||
}
|
||||
21
templates/Froxlor/assets/js/jquery/updatecheck.js
vendored
Normal file
21
templates/Froxlor/assets/js/jquery/updatecheck.js
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
export default function() {
|
||||
/*
|
||||
* updatecheck
|
||||
*/
|
||||
if (document.getElementById('updatecheck')) {
|
||||
$.ajax({
|
||||
url: "lib/ajax.php?action=updatecheck&theme=" + window.$theme,
|
||||
type: "GET",
|
||||
success: function (data) {
|
||||
$("#updatecheck").html(data);
|
||||
new bootstrap.Popover(document.getElementById('ucheck'));
|
||||
},
|
||||
error: function (request, status, error) {
|
||||
console.log(request, status, error)
|
||||
let message = 'Can\'t check version';
|
||||
$("#updatecheck").html('<span id="ucheck" class="text-decoration-none badge bg-warning mt-2 me-2" data-bs-toggle="tooltip" data-bs-placement="left" title="' + message + '"><i class="fa-solid fa-exclamation-triangle"></i> <span class="d-md-none d-xl-inline">' + message + '</span></span>');
|
||||
new bootstrap.Tooltip(document.getElementById('ucheck'));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
40
templates/Froxlor/assets/js/jquery/validation.js
vendored
Normal file
40
templates/Froxlor/assets/js/jquery/validation.js
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
export default function() {
|
||||
/*
|
||||
* validation
|
||||
*/
|
||||
$('#customer_add,#customer_edit').each(function () {
|
||||
$(this).validate({
|
||||
rules: {
|
||||
'name': {
|
||||
required: function () {
|
||||
return $('#company').val().length === 0 || $('#firstname').val().length > 0;
|
||||
}
|
||||
},
|
||||
'firstname': {
|
||||
required: function () {
|
||||
return $('#company').val().length === 0 || $('#name').val().length > 0;
|
||||
}
|
||||
},
|
||||
'company': {
|
||||
required: function () {
|
||||
return $('#name').val().length === 0
|
||||
&& $('#firstname').val().length === 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
$('#domain_add,#domain_edit').each(function () {
|
||||
$(this).validate({
|
||||
rules: {
|
||||
'ipandport[]': {
|
||||
required: true,
|
||||
minlength: 1
|
||||
}
|
||||
},
|
||||
errorPlacement: function(error, element) {
|
||||
$(error).prependTo($(element).parent().parent());
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
65
templates/Froxlor/assets/scss/_variables-dark.scss
Normal file
65
templates/Froxlor/assets/scss/_variables-dark.scss
Normal file
@@ -0,0 +1,65 @@
|
||||
// Color
|
||||
//$primary: $froxlor-700;
|
||||
//$secondary: $gray-500;
|
||||
//$info: $froxlor-800;
|
||||
|
||||
// Body
|
||||
//$body-bg: $gray-900;
|
||||
//$body-color: $gray-100;
|
||||
|
||||
// Borders
|
||||
//$border-color: $gray-900;
|
||||
//$border-color-translucent: $gray-900;
|
||||
|
||||
// Link
|
||||
//$link-color: $froxlor-500;
|
||||
//$nav-link-color: $body-color;
|
||||
|
||||
// List groups
|
||||
//$list-group-bg: $gray-800;
|
||||
//$list-group-color: $body-color;
|
||||
//$list-group-hover-bg: $gray-700;
|
||||
//$list-group-action-color: $body-color;
|
||||
|
||||
// Navbar
|
||||
//$navbar-bg: $gray-800;
|
||||
//$navbar-bg-mobile: $navbar-bg;
|
||||
//$navbar-light-color: $gray-200;
|
||||
//$navbar-light-hover-color: $gray-500;
|
||||
//$navbar-light-active-color: $gray-500;
|
||||
|
||||
// Sidebar
|
||||
//$sidebar-width: 256px;
|
||||
|
||||
// Card
|
||||
//$card-bg: $gray-800;
|
||||
//$card-border-color: $gray-600;
|
||||
|
||||
// Heading
|
||||
//$heading-bg: $gray-800;
|
||||
//$heading-color: $body-color;
|
||||
//$heading-border-color: rgba(0,0,0,0.15);
|
||||
|
||||
// Dropdown
|
||||
//$dropdown-bg: $gray-800;
|
||||
//$dropdown-color: $gray-100;
|
||||
//$dropdown-link-color: $gray-100;
|
||||
//$dropdown-link-hover-bg: $gray-900;
|
||||
|
||||
// Modal
|
||||
//$modal-content-bg: $gray-800;
|
||||
|
||||
// Form control
|
||||
//$input-bg: $gray-900;
|
||||
//$input-border-color: $black;
|
||||
//$input-group-addon-bg: $gray-800;
|
||||
|
||||
// Progress bar
|
||||
//$progress-bg: $gray-900;
|
||||
|
||||
// Search
|
||||
//$search-bg: $gray-800;
|
||||
|
||||
// Popover
|
||||
//$popover-bg: $gray-800;
|
||||
//$popover-body-color: $gray-100;
|
||||
87
templates/Froxlor/assets/scss/_variables.scss
Normal file
87
templates/Froxlor/assets/scss/_variables.scss
Normal file
@@ -0,0 +1,87 @@
|
||||
// CI
|
||||
$froxlor-50: #e1f4fa;
|
||||
$froxlor-100: #b3e3f1;
|
||||
$froxlor-200: #84d0e9;
|
||||
$froxlor-300: #5abde0;
|
||||
$froxlor-400: #3eb0db;
|
||||
$froxlor-500: #29a2d6;
|
||||
$froxlor-600: #2395c8;
|
||||
$froxlor-700: #1a83b6;
|
||||
$froxlor-800: #1872a2;
|
||||
$froxlor-900: #0e5380;
|
||||
|
||||
// Gray
|
||||
$white: #fff;
|
||||
$gray-100: #f8f9fa;
|
||||
$gray-200: #e9ecef;
|
||||
$gray-300: #dee2e6;
|
||||
$gray-400: #ced4da;
|
||||
$gray-500: #adb5bd;
|
||||
$gray-600: #6c757d;
|
||||
$gray-700: #495057;
|
||||
$gray-800: #343a40;
|
||||
$gray-900: #212529;
|
||||
$black: #000;
|
||||
|
||||
// Colors
|
||||
$light: $gray-100;
|
||||
$primary: $froxlor-800;
|
||||
$secondary: $gray-600;
|
||||
$info: $froxlor-900;
|
||||
$warning: #FBBF24;
|
||||
$danger: #BE123C;
|
||||
$success: #059669;
|
||||
|
||||
// Body
|
||||
$light-bg: $gray-100;
|
||||
$dark-bg: $gray-800;
|
||||
|
||||
// Typography
|
||||
$light-font-color: $gray-800;
|
||||
$dark-font-color: $gray-100;
|
||||
|
||||
$alert-bg-scale: 0;
|
||||
$alert-color-scale: 0;
|
||||
$alert-border-width: 0;
|
||||
|
||||
$list-group-item-color-scale: 0;
|
||||
$list-group-item-bg-scale: 0;
|
||||
|
||||
$input-bg: lighten($light-bg, 5%);
|
||||
|
||||
$font-size-root: 16px;
|
||||
|
||||
// Spacing
|
||||
$spacer: 1.25rem;
|
||||
$enable-negative-margins: true;
|
||||
|
||||
// Body
|
||||
$body-bg: $light-bg;
|
||||
$body-color: $light-font-color;
|
||||
|
||||
// Borders
|
||||
// $border-radius: 0.5rem;
|
||||
|
||||
// Links
|
||||
$link-color: $froxlor-800;
|
||||
|
||||
// Navbar
|
||||
$navbar-bg: $white;
|
||||
$navbar-bg-mobile: $gray-900;
|
||||
|
||||
// Sidebar
|
||||
$sidebar-width: 256px;
|
||||
|
||||
// Card
|
||||
$card-bg: $white;
|
||||
$card-cap-bg: none;
|
||||
$card-cap-padding-y: $spacer;
|
||||
$card-border-width: 0;
|
||||
|
||||
// Heading
|
||||
$heading-bg: $navbar-bg;
|
||||
$heading-color: $body-color;
|
||||
$heading-border-color: #dee2e6;
|
||||
|
||||
// Search
|
||||
$search-bg: $navbar-bg;
|
||||
18
templates/Froxlor/assets/scss/app.scss
Normal file
18
templates/Froxlor/assets/scss/app.scss
Normal file
@@ -0,0 +1,18 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
// Bootstrap
|
||||
@import "variables";
|
||||
@import "variables-dark";
|
||||
@import "bootstrap/scss/bootstrap";
|
||||
|
||||
// Theme
|
||||
@import "components/generic";
|
||||
@import "components/alert";
|
||||
@import "components/card";
|
||||
@import "components/dropdown";
|
||||
@import "components/footer";
|
||||
@import "components/form";
|
||||
@import "components/heading";
|
||||
@import "components/navbar";
|
||||
@import "components/sidebar";
|
||||
@import "components/search";
|
||||
7
templates/Froxlor/assets/scss/components/_alert.scss
Normal file
7
templates/Froxlor/assets/scss/components/_alert.scss
Normal file
@@ -0,0 +1,7 @@
|
||||
.alert {
|
||||
@extend .shadow-sm;
|
||||
|
||||
p:last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
30
templates/Froxlor/assets/scss/components/_card.scss
Normal file
30
templates/Froxlor/assets/scss/components/_card.scss
Normal file
@@ -0,0 +1,30 @@
|
||||
.card {
|
||||
@extend .shadow-sm;
|
||||
margin-bottom: $spacer * 1.5;
|
||||
|
||||
.card-header {
|
||||
border-bottom: $border-color solid 1px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
p {
|
||||
@extend .card-text;
|
||||
}
|
||||
}
|
||||
|
||||
&.deactivated {
|
||||
@extend .text-body-secondary;
|
||||
background: lighten($light-bg, 3%);
|
||||
|
||||
i {
|
||||
@extend .text-body-secondary;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include color-mode(dark) {
|
||||
.card, .list-group-item {
|
||||
background: $dark-bg;
|
||||
}
|
||||
}
|
||||
12
templates/Froxlor/assets/scss/components/_dropdown.scss
Normal file
12
templates/Froxlor/assets/scss/components/_dropdown.scss
Normal file
@@ -0,0 +1,12 @@
|
||||
.dropdown {
|
||||
.dropdown-menu {
|
||||
.dropdown-item {
|
||||
i {
|
||||
width: 1rem;
|
||||
margin-right: 1rem;
|
||||
text-align: center;
|
||||
color: $body-secondary-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
13
templates/Froxlor/assets/scss/components/_footer.scss
Normal file
13
templates/Froxlor/assets/scss/components/_footer.scss
Normal file
@@ -0,0 +1,13 @@
|
||||
footer {
|
||||
@extend .small;
|
||||
|
||||
a {
|
||||
@extend .text-body-secondary;
|
||||
@extend .text-decoration-none;
|
||||
}
|
||||
|
||||
.footer-link:not(:last-child):after {
|
||||
content: ' •';
|
||||
padding: 0 0.25rem;
|
||||
}
|
||||
}
|
||||
1
templates/Froxlor/assets/scss/components/_form.scss
Normal file
1
templates/Froxlor/assets/scss/components/_form.scss
Normal file
@@ -0,0 +1 @@
|
||||
// wip
|
||||
89
templates/Froxlor/assets/scss/components/_generic.scss
Normal file
89
templates/Froxlor/assets/scss/components/_generic.scss
Normal file
@@ -0,0 +1,89 @@
|
||||
// Fontawesome
|
||||
@import "@fortawesome/fontawesome-free/scss/fontawesome";
|
||||
@import "@fortawesome/fontawesome-free/css/all";
|
||||
|
||||
// Generic
|
||||
.header-logo {
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.form-control-plaintext {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.form-control[readonly] {
|
||||
background: rgba(0, 0, 0, .15);
|
||||
}
|
||||
|
||||
.page-header {
|
||||
margin-bottom: 2rem;
|
||||
|
||||
&:after {
|
||||
margin-top: .5rem;
|
||||
display: block;
|
||||
height: 3px;
|
||||
width: 100px;
|
||||
background: $froxlor-800;
|
||||
border-radius: 3px;
|
||||
content: ' ';
|
||||
}
|
||||
}
|
||||
|
||||
.alert-icon {
|
||||
padding: .5rem;
|
||||
background: rgba(0, 0, 0, .15);
|
||||
text-align: center;
|
||||
border-radius: $border-radius;
|
||||
margin-right: .75rem;
|
||||
}
|
||||
|
||||
.max-w-420 {
|
||||
max-width: 420px;
|
||||
}
|
||||
|
||||
.max-w-xs {
|
||||
max-width: 575.98px;
|
||||
}
|
||||
|
||||
.max-w-lg {
|
||||
max-width: 991.98px;
|
||||
}
|
||||
|
||||
.rounded-tl-bl {
|
||||
border-radius: $border-radius 0 $border-radius 0;
|
||||
}
|
||||
|
||||
.progress-thin {
|
||||
height: .5rem;
|
||||
}
|
||||
|
||||
.logcontent {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.formfield {
|
||||
padding: 1rem $spacer;
|
||||
border-bottom: $border-color solid 1px;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
.focus-none {
|
||||
outline: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.field-image-preview {
|
||||
max-height: 5em;
|
||||
}
|
||||
|
||||
#phpinfotable {
|
||||
table-layout: fixed;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
15
templates/Froxlor/assets/scss/components/_heading.scss
Normal file
15
templates/Froxlor/assets/scss/components/_heading.scss
Normal file
@@ -0,0 +1,15 @@
|
||||
.heading {
|
||||
color: $heading-color;
|
||||
background-color: $heading-bg;
|
||||
border-top: $heading-border-color solid 1px;
|
||||
}
|
||||
|
||||
.heading h5 {
|
||||
color: $heading-color;
|
||||
}
|
||||
|
||||
@include color-mode(dark) {
|
||||
.heading {
|
||||
background: $dark-bg;
|
||||
}
|
||||
}
|
||||
60
templates/Froxlor/assets/scss/components/_navbar.scss
Normal file
60
templates/Froxlor/assets/scss/components/_navbar.scss
Normal file
@@ -0,0 +1,60 @@
|
||||
.navbar {
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(md) {
|
||||
.navbar {
|
||||
background: $navbar-bg;
|
||||
|
||||
.navbar-brand {
|
||||
background: $dark;
|
||||
width: $sidebar-width;
|
||||
margin-right: 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-down(md) {
|
||||
.navbar {
|
||||
background: $navbar-bg-mobile;
|
||||
|
||||
.navbar-nav {
|
||||
flex-direction: row;
|
||||
gap: .75rem;
|
||||
|
||||
.nav-link {
|
||||
color: $white;
|
||||
|
||||
&:hover {
|
||||
color: rgba(255,255,255,.45);
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
|
||||
#collapseSearch {
|
||||
border-top: solid 1px $dark;
|
||||
|
||||
#search {
|
||||
margin-bottom: 1.125rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-light {
|
||||
.navbar-toggler {
|
||||
border-color: transparent;
|
||||
}
|
||||
.navbar-toggler-icon {
|
||||
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
|
||||
}
|
||||
}
|
||||
}
|
||||
34
templates/Froxlor/assets/scss/components/_search.scss
Normal file
34
templates/Froxlor/assets/scss/components/_search.scss
Normal file
@@ -0,0 +1,34 @@
|
||||
#search {
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
i {
|
||||
margin-right: .5rem;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
color: $body-color;
|
||||
outline: none;
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.search-results-box {
|
||||
position: absolute;
|
||||
top: 2.75rem;
|
||||
z-index: 50;
|
||||
width: 70vh;
|
||||
max-height: 50vh;
|
||||
|
||||
background: $search-bg;
|
||||
border: $border-color solid 1px;
|
||||
border-radius: 0 0 $border-radius $border-radius;
|
||||
|
||||
.search-results {
|
||||
width: 100%; /** same as .search-results-box **/
|
||||
max-height: calc(50vh - 1.25em); /** same as .search-results-box - border (top/bottom) **/
|
||||
overflow: auto;
|
||||
border-radius: $border-radius;
|
||||
}
|
||||
}
|
||||
}
|
||||
50
templates/Froxlor/assets/scss/components/_sidebar.scss
Normal file
50
templates/Froxlor/assets/scss/components/_sidebar.scss
Normal file
@@ -0,0 +1,50 @@
|
||||
.sidebar, .sub-sidebar {
|
||||
width: $sidebar-width;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
@extend .shadow;
|
||||
width: $sidebar-width;
|
||||
|
||||
&.collapsing {
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.user-info {
|
||||
background: darken($dark, 2);
|
||||
}
|
||||
|
||||
> .nav {
|
||||
> .nav-item {
|
||||
> .nav-link {
|
||||
i {
|
||||
margin-right: 1rem;
|
||||
width: 1rem;
|
||||
text-align: center;
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
&:not(.collapsed) {
|
||||
background: darken($dark, 4);
|
||||
border-left: $primary solid 3px;
|
||||
padding-left: calc(1rem - 3px);
|
||||
}
|
||||
}
|
||||
|
||||
> .collapse, > .collapsing {
|
||||
background: darken($dark, 2);
|
||||
|
||||
a {
|
||||
opacity: .78;
|
||||
margin-left: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sub-sidebar {
|
||||
@extend .shadow-sm;
|
||||
background: $white;
|
||||
}
|
||||
0
templates/Froxlor/assets/scss/components/index.html
Normal file
0
templates/Froxlor/assets/scss/components/index.html
Normal file
0
templates/Froxlor/assets/scss/index.html
Normal file
0
templates/Froxlor/assets/scss/index.html
Normal file
Reference in New Issue
Block a user