Moved the Agents into their own repo. Kept the agent.pl just for reference
This commit is contained in:
parent
22381be29a
commit
8680a02b13
18132 changed files with 0 additions and 2569420 deletions
|
|
@ -1,4 +0,0 @@
|
|||
#clearLink,
|
||||
img[src$="spacer.png"] {
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('link[href="modules/TS3Admin/webinterface.css"]').remove();
|
||||
$('#loadingImage').remove();
|
||||
|
||||
$('.main a[href$="changevServer"]').prepend('<i class="fas fa-exchange-alt mr-1"></i>').addClass('btn-secondary mb-2 ');
|
||||
$('.main > form > br').remove();
|
||||
|
||||
$('.main span').each(function()
|
||||
{
|
||||
if($(this).attr('style'))
|
||||
{
|
||||
$(this).removeAttr('style');
|
||||
}
|
||||
});
|
||||
|
||||
$('.main [name="startvServer"]').addClass('btn-success');
|
||||
$('.main [name="stopvServer"]').addClass('btn-danger');
|
||||
|
||||
$('.main #clearLink').parent('div').addClass('text-muted mb-1');
|
||||
|
||||
$('.main > .infoBox').wrapAll('<div class="row"></div>');
|
||||
$('.main > .row > .infoBox').each(function()
|
||||
{
|
||||
$(this).wrapAll('<div class="col-12 col-md-6"><div class="card"><div class="card-body"></div></div></div>');
|
||||
});
|
||||
|
||||
$('.edit').each(function()
|
||||
{
|
||||
var imgURL = $(this).find('img').attr('src');
|
||||
|
||||
$(this).addClass('btn btn-sm btn-primary').find('img').remove();
|
||||
|
||||
if (imgURL.toLowerCase().indexOf("edit.png") >= 0)
|
||||
{
|
||||
$(this).addClass('btn-secondary').html('<i class="fas fa-edit"></i>');
|
||||
}
|
||||
else if (imgURL.toLowerCase().indexOf("refresh.png") >= 0)
|
||||
{
|
||||
$(this).html('<i class="fas fa-sync"></i>');
|
||||
}
|
||||
});
|
||||
|
||||
$('#serverstatus.online').addClass('badge bg-success');
|
||||
$('#serverstatus.offline').addClass('badge bg-danger');
|
||||
|
||||
$('#jsMsg + div a').each(function()
|
||||
{
|
||||
|
||||
});
|
||||
});
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('.main').addClass('main-content').parent().attr('id', 'content');
|
||||
$('.main [type="submit"]').last().removeClass('btn-primary').addClass('btn-secondary');
|
||||
});
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('.main input[name="remove"]').removeClass('btn-primary').addClass('btn-danger');
|
||||
$('.main input[name="show_all"]').removeClass('btn-primary').addClass('btn-warning float-right');
|
||||
});
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
.main [href*="&addon_type="]
|
||||
{
|
||||
width: 150px;
|
||||
height: 110px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.main [href*="&addon_type="] span {
|
||||
line-height: 14px;
|
||||
max-height: 28px;
|
||||
}
|
||||
|
||||
.main .addons {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.main .addons a {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.main .addons a + a {
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
|
||||
.main .addons a > .badge {
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
right: -5px;
|
||||
width: 25px;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.main .addons a[href*="&addon_type="]:before
|
||||
{
|
||||
display: block;
|
||||
font-size: 40px;
|
||||
font-family: 'Font Awesome 5 Free';
|
||||
font-weight: 900;
|
||||
content: "\f1b2";
|
||||
}
|
||||
.main .addons a[href*="&addon_type=plugin"]:before {
|
||||
content: "\f12e";
|
||||
}
|
||||
.main .addons a[href*="&addon_type=config"]:before {
|
||||
content: "\f11b";
|
||||
}
|
||||
.main .addons a[href*="&addon_type=mappack"]:before {
|
||||
content: "\f279";
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('.main > table').before('<div class="addons d-flex mb-1"></div>');
|
||||
$('.main td').contents().appendTo('.addons');
|
||||
$('.main > table').remove();
|
||||
|
||||
$('.main [type="submit"]').removeClass('btn-primary').addClass('btn-secondary');
|
||||
|
||||
$('.main [href*="&addon_type="]').each(function()
|
||||
{
|
||||
$(this).addClass('btn btn-primary d-flex flex-column justify-content-center align-items-center').wrapInner('<span>');
|
||||
|
||||
var btnTextSplit = $(this).find('span').text().split('(');
|
||||
var btnText = btnTextSplit[0];
|
||||
var btnMods = btnTextSplit[1].split(')')[0];
|
||||
|
||||
$(this).find('span').text(btnText);
|
||||
$(this).prepend('<span class="badge bg-secondary">' + btnMods + '</span>');
|
||||
});
|
||||
});
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
.admin-buttons {
|
||||
width: 150px;
|
||||
height: 110px;
|
||||
margin: 0px 5px 5px 0px !important;
|
||||
}
|
||||
.admin-buttons > span {
|
||||
font-size: 0.9rem;
|
||||
display: block;
|
||||
}
|
||||
.admin-buttons:before {
|
||||
font-size: 40px;
|
||||
line-height: 40px;
|
||||
display: block;
|
||||
font-family: "Font Awesome 5 Free";
|
||||
font-weight: 900;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.admin-buttons > img,
|
||||
.admin-buttons > br {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.table tr:first-of-type td {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.main > h2 {
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
var adminButtonTable = $('.main table.administration-table').first();
|
||||
|
||||
$('<div class="administration-table d-flex flex-wrap justify-content-start"></div>').insertAfter(adminButtonTable);
|
||||
|
||||
$(adminButtonTable).parent('.card-body').addClass('pb-3');
|
||||
|
||||
$(adminButtonTable).find('a.administration-buttons').each(function()
|
||||
{
|
||||
$('div.administration-table').append('<a class="admin-buttons btn btn-primary d-flex flex-column justify-content-center align-items-center" href="' + $(this).attr('href') + '"><span>' + $(this).find('div').text() + '</span></a>');
|
||||
});
|
||||
|
||||
$(adminButtonTable).remove();
|
||||
|
||||
// better remove link buttons
|
||||
$('.remove-button').each(function()
|
||||
{
|
||||
$(this).replaceWith('<button class="btn btn-sm btn-danger"><i class="fas fa-trash mr-1"></i>'+langConsts['OGP_LANG_delete']+'</button>')
|
||||
});
|
||||
});
|
||||
|
||||
$(window).load(function()
|
||||
{
|
||||
$('.main [name="download"]').prepend('<i class="fas fa-download mr-1"></i>').addClass('btn-secondary');
|
||||
$('.main [name="restore"]').prepend('<i class="fas fa-upload mr-1"></i>').addClass('btn-warning');
|
||||
$('.main .custom-file').removeAttr('style');
|
||||
|
||||
// better links
|
||||
if($('img[src$="link.png"]').length>0)
|
||||
{
|
||||
var parentTable = $('img[src$="link.png"]').closest('.table-responsive');
|
||||
$(parentTable).after('<div class="administration-table externalLinks d-flex flex-wrap justify-content-start p-1"></div>');
|
||||
$(parentTable).find('td').each(function()
|
||||
{
|
||||
$('.externalLinks').append('<div class="elink">'+$(this).html()+'</div>');
|
||||
});
|
||||
$(parentTable).remove();
|
||||
|
||||
$('.main .elink > a').each(function()
|
||||
{
|
||||
$(this).addClass('admin-buttons btn btn-primary d-flex flex-column justify-content-center align-items-center');
|
||||
|
||||
// since that iframe shizzle isnt modern conform, i reset all links to external links
|
||||
$(this).attr('href', $(this).attr('href').replace('?m=administration&p=iframe&external_link=', '')).attr('target', '_blank');
|
||||
});
|
||||
}
|
||||
|
||||
// remove empty tables
|
||||
$('.main table').each(function()
|
||||
{
|
||||
if($(this).text().trim().length==0)
|
||||
{
|
||||
$(this).parent('.table-responsive').remove();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
.ql-editor,
|
||||
.ql-toolbar.ql-snow,
|
||||
.ql-snow .ql-picker,
|
||||
.ql-formats,
|
||||
.ql-picker-options {
|
||||
color: #fff !important;
|
||||
background-color: rgba(26, 28, 34, 0.4);
|
||||
}
|
||||
.ql-picker-options {
|
||||
background-color: rgba(26, 28, 34, 0.8) !important;
|
||||
}
|
||||
|
||||
.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label:hover,
|
||||
.ql-snow.ql-toolbar button:hover,
|
||||
.ql-snow .ql-toolbar button:hover {
|
||||
border: 1px solid rgba(255, 255, 255, 0.6) !important;
|
||||
}
|
||||
|
||||
.ql-snow .ql-stroke {
|
||||
stroke: rgba(255, 255, 255, 1) !important;
|
||||
}
|
||||
|
||||
.ql-snow.ql-toolbar button:hover,
|
||||
.ql-snow .ql-toolbar button:hover,
|
||||
.ql-snow.ql-toolbar button:focus,
|
||||
.ql-snow .ql-toolbar button:focus,
|
||||
.ql-snow.ql-toolbar button.ql-active,
|
||||
.ql-snow .ql-toolbar button.ql-active,
|
||||
.ql-snow.ql-toolbar .ql-picker-label:hover,
|
||||
.ql-snow .ql-toolbar .ql-picker-label:hover,
|
||||
.ql-snow.ql-toolbar .ql-picker-label.ql-active,
|
||||
.ql-snow .ql-toolbar .ql-picker-label.ql-active,
|
||||
.ql-snow.ql-toolbar .ql-picker-item:hover,
|
||||
.ql-snow .ql-toolbar .ql-picker-item:hover,
|
||||
.ql-snow.ql-toolbar .ql-picker-item.ql-selected,
|
||||
.ql-snow .ql-toolbar .ql-picker-item.ql-selected {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.ql-editor h1,
|
||||
.ql-editor h2,
|
||||
.ql-editor h3 {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.ql-toolbar.ql-snow,
|
||||
.ql-container.ql-snow {
|
||||
border: 1px solid #22252f !important;
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
// $('.main table').wrap('<div class="table-responsive"></div>');
|
||||
|
||||
$('[href$="&delete"]').addClass('btn btn-sm btn-danger');
|
||||
|
||||
if(window.location.href.indexOf("home.php?m=config_games&xml_config_creator=Create+XML+Configs") != -1 )
|
||||
{
|
||||
$('iframe').attr('id', 'xcc_iframe');
|
||||
$('iframe').load(function()
|
||||
{
|
||||
$(this).contents().find("body").addClass('xcc_iframe');
|
||||
var main_css = '<link rel="stylesheet" type="text/css" href="../../themes/SimpleBootstrap/css/main.css">';
|
||||
var bs = '<link rel="stylesheet" href="../../themes/SimpleBootstrap/css/bootstrap.min.css">';
|
||||
var bs_t = '<link rel="stylesheet" href="../../themes/SimpleBootstrap/css/bootstrap-theme.min.css">';
|
||||
var js = '<link rel="stylesheet" href="../../themes/SimpleBootstrap/js/main.js">';
|
||||
var xml_css = '<link rel="stylesheet" type="text/css" href="../../themes/SimpleBootstrap/modules/config_games/main.css">';
|
||||
$(this).contents().find("head").append(bs);
|
||||
$(this).contents().find("head").append(bs_t);
|
||||
$(this).contents().find("head").append(js);
|
||||
$(this).contents().find("head").append(main_css);
|
||||
$(this).contents().find("head").append(xml_css);
|
||||
|
||||
$(this).contents().find("table").removeAttr("style").removeAttr("colspan").addClass('table table-sm table-striped');
|
||||
$(this).contents().find('button, input[type=button], [type=submit], input[type=reset], .swfuploadbtn').addClass('btn btn-sm btn-primary');
|
||||
$(this).contents().find('textarea, select, input[type=text]').addClass('form-control').removeAttr('style');
|
||||
$(this).contents().find('form').addClass('form-group');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
html,
|
||||
body {
|
||||
background: transparent !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
td {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
.content-wrapper .log .table:first-of-type {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.content-wrapper .log b table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.content-wrapper .log b table td:not(:last-of-type){
|
||||
width: 60px !important;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.content-wrapper input.form-control:not([name="command"]) {
|
||||
width: 46px;
|
||||
min-width: 46px;
|
||||
}
|
||||
|
||||
.content-wrapper [id^="refreshed"] td:not(:last-of-type) {
|
||||
width: 58px;
|
||||
min-width: 58px;
|
||||
}
|
||||
|
||||
.content-wrapper select[name="action"] {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.content-wrapper .log {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.content-wrapper .center td:not(:nth-last-child(1)):not(:nth-last-child(2)) {
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
/* table responsive */
|
||||
.content-wrapper [id^="refreshed"] {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.content-wrapper select[name="homeid_ip_port"],
|
||||
.content-wrapper input[name="command"] {
|
||||
min-width: 200px;
|
||||
}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('.content-wrapper [href="?m=administration&p=main"], .main [href="javascript:history.go(-1)"], .main [href="home.php?m=cron&p=cron"], .main a[href="home.php?m=cron&p=user_cron"]').addClass('btn btn-sm btn-primary');
|
||||
$('.content-wrapper input[name="removeJob"]').removeClass('btn-primary').addClass('btn-danger');
|
||||
$('.content-wrapper a[href="home.php?m=cron&p=user_cron"]').removeClass('btn-primary').addClass('btn-secondary').prepend('<i class="fas fa-angle-double-left mr-1"></i>');
|
||||
|
||||
$('.content-wrapper .hundred td[colspan="6"]').attr('colspan',8);
|
||||
$('.content-wrapper th:last-child').attr('colspan', 2);
|
||||
});
|
||||
|
||||
$(window).load(function()
|
||||
{
|
||||
// check if cron is the updateserverstats cron
|
||||
$('.content-wrapper input[name="command"]').each(function()
|
||||
{
|
||||
if($(this).val().toLowerCase().indexOf('adminlte/dist/php/settings.php')>=0)
|
||||
{
|
||||
// wrap theme cron input into input-group
|
||||
$(this).wrap('\
|
||||
<div class="input-group mb-2 mr-sm-2">\
|
||||
<div class="input-group-prepend">\
|
||||
<div class="input-group-text border-danger">Theme Cron</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
');
|
||||
|
||||
// colorize all fields
|
||||
$(this).closest('tr').find('.form-control').addClass('border-danger');
|
||||
}
|
||||
});
|
||||
|
||||
// wrap scheduled jobs into separate card
|
||||
var doWrap = false;
|
||||
$('.main > *').each(function(index)
|
||||
{
|
||||
if($(this).is('h2'))
|
||||
{
|
||||
doWrap = true;
|
||||
$('.content .row > div').append('<div class="card"><div class="card-header"><h3 class="card-title">'+$(this).text()+'</h3></div><div class="card-body"></div></div>');
|
||||
$(this).remove();
|
||||
}else
|
||||
{
|
||||
if(doWrap)
|
||||
{
|
||||
$('.content .card-body:not(.main)').append($(this));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
.content-wrapper .log .table:first-of-type {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.content-wrapper .log b table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.content-wrapper .log b table td:not(:last-of-type){
|
||||
width: 60px !important;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.content-wrapper input.form-control:not([name="command"]) {
|
||||
width: 46px;
|
||||
min-width: 46px;
|
||||
}
|
||||
|
||||
.content-wrapper [id^="refreshed"] td:not(:last-of-type) {
|
||||
width: 58px;
|
||||
min-width: 58px;
|
||||
}
|
||||
|
||||
.content-wrapper select[name="action"] {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.content-wrapper .log {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.content-wrapper .center td:not(:nth-last-child(1)):not(:nth-last-child(2)) {
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
/* table responsive */
|
||||
.content-wrapper [id^="refreshed"] {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.content-wrapper select[name="homeid_ip_port"],
|
||||
.content-wrapper input[name="command"] {
|
||||
min-width: 200px;
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('.content-wrapper [href="home.php?m=cron&p=cron"]').addClass('btn btn-sm btn-warning').prepend('<i class="fas fa-crown mr-1"></i>');
|
||||
$('.content-wrapper [href="?m=administration&p=main"], .main [href="javascript:history.go(-1)"]').addClass('btn btn-sm btn-primary');
|
||||
$('.content-wrapper input[name="removeJob"]').removeClass('btn-primary').addClass('btn-danger');
|
||||
|
||||
$('.content-wrapper th:last-child').attr('colspan', 2);
|
||||
});
|
||||
|
||||
$(window).load(function()
|
||||
{
|
||||
var doWrap = false;
|
||||
$('.main > *').each(function(index)
|
||||
{
|
||||
if($(this).is('h2'))
|
||||
{
|
||||
doWrap = true;
|
||||
$('.content .row > div').append('<div class="card"><div class="card-header"><h3 class="card-title">'+$(this).text()+'</h3></div><div class="card-body"></div></div>');
|
||||
$(this).remove();
|
||||
}else
|
||||
{
|
||||
if(doWrap)
|
||||
{
|
||||
$('.content .card-body:not(.main)').append($(this));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -1,95 +0,0 @@
|
|||
[id^=refreshed] br {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.vertical-progress {
|
||||
transform: rotate(-90deg);
|
||||
max-width: 100px;
|
||||
}
|
||||
|
||||
.online_servers {
|
||||
width: 100%;
|
||||
}
|
||||
.online_servers .name img {
|
||||
margin-right: 4px;
|
||||
}
|
||||
.online_servers td {
|
||||
padding: 3px 10px !important;
|
||||
}
|
||||
.online_servers a
|
||||
{
|
||||
color: #fff;
|
||||
}
|
||||
.online_servers a:hover
|
||||
{
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
.online_servers [id^=refreshed]
|
||||
{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.online_servers [id^=refreshed] div
|
||||
{
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.online_servers .name,
|
||||
.online_servers #gamelink {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
@media (max-width: 500px) {
|
||||
.serverstatus .info-box-icon,
|
||||
.serverstatus .playerChart {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.serverstatus .server-infos > div {
|
||||
line-height: 1.2rem;
|
||||
}
|
||||
|
||||
.serverstatus .server-name {
|
||||
font-weight: bold;
|
||||
margin-bottom: 0.3rem;
|
||||
max-width: 260px;
|
||||
}
|
||||
|
||||
.serverstatus[data-status="online"] {
|
||||
border-left: 4px solid;
|
||||
border-color: var(--success);
|
||||
}
|
||||
|
||||
.serverstatus[data-status="unknown"] {
|
||||
border-left: 4px solid;
|
||||
border-color: var(--warning);
|
||||
}
|
||||
|
||||
.serverstatus:last-of-type {
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
.serverstatus .playerChart {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.serverstatus .chart-container {
|
||||
margin-left: auto;
|
||||
margin-right: 0;
|
||||
max-width: 320px;
|
||||
}
|
||||
|
||||
#chartjs-tooltip {
|
||||
background-color: rgb(18 19 20 / 80%);
|
||||
border-radius: 4px;
|
||||
color: #fff;
|
||||
padding: 2px 10px;
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
|
||||
#chartjs-tooltip {
|
||||
transition: opacity 200ms linear;
|
||||
}
|
||||
|
|
@ -1,646 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
// remove old js
|
||||
$('script[src="js/modules/dashboard.js"]').remove();
|
||||
|
||||
// image replacements
|
||||
$('img[src$="game_monitor.png"]').replaceWith('<h2 class="d-inline float-right m-2"><i class="fas fa-desktop"></i></h2>');
|
||||
$('img[src$="support.png"]').replaceWith('<h2 class="d-inline float-right m-2"><i class="fas fa-hands-helping"></i></h2>');
|
||||
|
||||
// head sections
|
||||
$('.column').each(function()
|
||||
{
|
||||
if(!$(this).parent('div').hasClass('row'))
|
||||
{
|
||||
$(this).parent('div').addClass('row').removeAttr('style');
|
||||
}
|
||||
|
||||
var columnContent = $(this).html();
|
||||
|
||||
if($(this).hasClass('one_two'))
|
||||
{
|
||||
$(this).replaceWith("<section class='col-12 col-md-6 connectedSortable' id='"+$(this).attr('id')+"'>" + columnContent + "</section>");
|
||||
}
|
||||
else if($(this).hasClass('one_fourth'))
|
||||
{
|
||||
$(this).replaceWith("<section class='col-12 col-md-6 col-lg-3 connectedSortable' id='"+$(this).attr('id')+"'>" + columnContent + "</section>");
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this).replaceWith("<section class='col-12 connectedSortable' id='"+$(this).attr('id')+"'>" + columnContent + "</section>");
|
||||
}
|
||||
});
|
||||
|
||||
// dragbox / bloc to card conversion
|
||||
$('.dragbox, .bloc').each(function()
|
||||
{
|
||||
var isCollapsed = false
|
||||
var collapseBtn = 'fa-minus';
|
||||
var thisContent = $(this).find('.dragbox-content');
|
||||
if($(thisContent).length > 0)
|
||||
{
|
||||
// check if dragbox has attribute "style"
|
||||
if(typeof $(thisContent).attr('style') !== 'undefined' && $(thisContent).attr('style') !== false)
|
||||
{
|
||||
// check if dragbox has style "display:none"
|
||||
if($(thisContent).attr('style').indexOf("display:none") >= 0)
|
||||
{
|
||||
isCollapsed = true
|
||||
var collapseBtn = 'fa-plus';
|
||||
}
|
||||
}
|
||||
$(thisContent).removeClass('dragbox-content').addClass('card-body').removeAttr('style');
|
||||
|
||||
// check if dragbox is a link
|
||||
if(typeof $(thisContent).attr('onclick') !== 'undefined' && $(thisContent).attr('onclick') !== false)
|
||||
{
|
||||
// add cursor pointer style
|
||||
$(thisContent).css('cursor', 'pointer');
|
||||
|
||||
// check if link is external to change event to window.open (new window)
|
||||
var thisURL = $(thisContent).attr('onclick').replace("location.href='", "").replace("'", "");
|
||||
if(thisURL.includes("://"))
|
||||
{
|
||||
$(thisContent).attr("onclick", "window.open('"+thisURL+"')");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(isCollapsed)
|
||||
{
|
||||
$(this).attr('class', '').addClass('card collapsed-card');
|
||||
}else
|
||||
{
|
||||
$(this).attr('class', '').addClass('card');
|
||||
}
|
||||
|
||||
var boxTitle = $(this).find('h4').text();
|
||||
$(this).find('h4').replaceWith("\
|
||||
<div class='card-header ui-sortable-handle' style='cursor: move;'>\
|
||||
<h3 class='card-title'>" + boxTitle + "</h3>\
|
||||
<div class='card-tools'>\
|
||||
<button type='button' class='btn btn-tool' data-card-widget='collapse'>\
|
||||
<i class='fas " + collapseBtn + "'></i>\
|
||||
</button>\
|
||||
</div>\
|
||||
</div>");
|
||||
});
|
||||
|
||||
// padding fix
|
||||
$('.online_servers').parent('.card-body').addClass('p-2');
|
||||
|
||||
// remove old refresh elements
|
||||
$('.row > [id^="refreshed-"]').remove();
|
||||
|
||||
// hide elements before data refresh mod
|
||||
$('.main > .row > h0, .main > .row > br, .main > .row > #column4').addClass('d-none');
|
||||
|
||||
/* *** Data Refresh Mod *** */
|
||||
if($('.container-fluid h0').last().length)
|
||||
{
|
||||
// get columnsettings
|
||||
$.get('themes/AdminLTE/dist/php/settings.php?m=dashboard&p=columnsettings',
|
||||
function(columnsettings){
|
||||
// build server status card
|
||||
var serverStatusTitle = $('.container-fluid h0').last().text();
|
||||
var serverSelectTitle = $('.container-fluid #column4 h3').text();
|
||||
var serverSelectForm = $('.container-fluid #column4 center').html();
|
||||
$('.container-fluid h0').last().remove();
|
||||
$('.container-fluid #column4').remove();
|
||||
|
||||
// add new sections
|
||||
$('.content > .container-fluid').append("\
|
||||
<div class='row'>\
|
||||
<section class='col-12 col-md-6 connectedSortable' id='column4'></section>\
|
||||
<section class='col-12 col-md-6 connectedSortable' id='column5'></section>\
|
||||
</div>\
|
||||
<div class='row'>\
|
||||
<section class='col-12 connectedSortable' id='column6'></section>\
|
||||
</div>");
|
||||
|
||||
// add cards to new sections
|
||||
// console.log(columnsettings);
|
||||
Object.keys(columnsettings).forEach(function(key)
|
||||
{
|
||||
item = columnsettings[key]['item']
|
||||
section = columnsettings[key]['section']
|
||||
collapsed = columnsettings[key]['collapsed']
|
||||
|
||||
if(item=='item6')
|
||||
{
|
||||
$('#' + section).append(createCard(item, serverSelectTitle, serverSelectForm, collapsed));
|
||||
}
|
||||
else if(item=='item7')
|
||||
{
|
||||
$('#' + section).append(createCard(item, serverStatusTitle, '', true, collapsed));
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#' + section).append(createCard(item, '', '', true, collapsed));
|
||||
}
|
||||
})
|
||||
|
||||
// define regexes
|
||||
var axrgx = /jQuery\.ajax\(\{(.*?)\}\)\;(.*?)\}\)\;/sg; // get all ajax definitions
|
||||
var urlrgx = /url\: \"(.*?)\"/m; // get url from ajax object
|
||||
var destrgx = /\$\(\'(.*?)\'\)\.html/; // get destination from ajax object
|
||||
|
||||
// get complete js content
|
||||
var embjs = $('.main > script:not([src])').html();
|
||||
$('.main > script:not([src])').remove();
|
||||
|
||||
var refreshDashboardServerInterval;
|
||||
var aradded = [];
|
||||
if(axrgx.test(embjs))
|
||||
{
|
||||
embjs.match(axrgx).forEach((element, index) => {
|
||||
var url = element.match(urlrgx)[1];
|
||||
var dest = element.match(destrgx)[1];
|
||||
|
||||
if(!aradded.includes(url))
|
||||
{
|
||||
if(url.toLowerCase().indexOf("remote_server_id") >= 0)
|
||||
{
|
||||
aradded.push(url);
|
||||
|
||||
function refreshDashboardServerStats()
|
||||
{
|
||||
jQuery.ajax({
|
||||
url: url,
|
||||
cache: false,
|
||||
// beforeSend: function(xhr)
|
||||
// {
|
||||
// $('a').click(function()
|
||||
// {
|
||||
// xhr.abort();
|
||||
// enableCallbacks = false;
|
||||
// });
|
||||
// },
|
||||
success: function(data, textStatus)
|
||||
{
|
||||
// if (!enableCallbacks) return;
|
||||
updateServerStats(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (!refreshDashboardServerInterval)
|
||||
{
|
||||
refreshDashboardServerStats();
|
||||
|
||||
var refreshDashboardServerInterval = setInterval(function()
|
||||
{
|
||||
refreshDashboardServerStats();
|
||||
}, 10000);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// clear intervals on link follow
|
||||
$('a:not([data-widget="control-sidebar"]):not([data-widget="pushmenu"])').click(function()
|
||||
{
|
||||
if(typeof refreshServerInterval !== 'undefined')
|
||||
{
|
||||
clearInterval(refreshServerInterval);
|
||||
refreshServerInterval = null;
|
||||
}
|
||||
});
|
||||
|
||||
// Make the dashboard widgets sortable Using jquery UI
|
||||
var topItems = ['item1','item2','item3','item4','item5'];
|
||||
$('.connectedSortable').sortable(
|
||||
{
|
||||
placeholder: 'sort-highlight',
|
||||
connectWith: '.connectedSortable',
|
||||
handle: '.card-header',
|
||||
forcePlaceholderSize: true,
|
||||
zIndex: 999999,
|
||||
stop: function(event, ui){
|
||||
// check if element is on a valid location
|
||||
if(topItems.includes($(ui['item'][0]).attr('id')))
|
||||
{
|
||||
// item is in top row - check if its in .main card
|
||||
if($(ui['item'][0]).parents('.main').length==1)
|
||||
{
|
||||
updateNewWidgetData();
|
||||
}else
|
||||
{
|
||||
toastr.warning('Top Elements only in Top Region allowed', 'Warning');
|
||||
event.preventDefault();
|
||||
}
|
||||
}else
|
||||
{
|
||||
if($(ui['item'][0]).parents('.main').length==0)
|
||||
{
|
||||
updateNewWidgetData();
|
||||
}else
|
||||
{
|
||||
toastr.warning('Bottom Elements only in Bottom Region allowed', 'Warning');
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
$('.connectedSortable .card-header').css('cursor', 'move');
|
||||
|
||||
// update widget data when collapsing card
|
||||
$('[data-card-widget="collapse"]').click(function()
|
||||
{
|
||||
setTimeout(function()
|
||||
{
|
||||
updateNewWidgetData();
|
||||
}, 1000);
|
||||
})
|
||||
|
||||
// loading
|
||||
var loading = '\
|
||||
<div class="d-flex justify-content-center w-100 m-1">\
|
||||
<div class="spinner-grow spinner-grow-sm" role="status">\
|
||||
<span class="sr-only">Loading...</span>\
|
||||
</div>\
|
||||
</div>';
|
||||
$('[id^=refreshed]').html(loading);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// initial load (load faster on startup)
|
||||
animateProgressBars();
|
||||
});
|
||||
|
||||
|
||||
$(window).load(function ()
|
||||
{
|
||||
//welcome title
|
||||
if($(".main > div:not(.row)").length)
|
||||
{
|
||||
$(".main > div:not(.row)").addClass('card-body').wrap('<div class="card welcome-card"></div>');
|
||||
$(".main .welcome-card").prependTo('section.content > .container-fluid');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// $.fn.inlineStyle = function(prop)
|
||||
// {
|
||||
// var thisProb = this.prop("style")[$.camelCase(prop)];
|
||||
// if(thisProb !== undefined || thisProb!='')
|
||||
// {
|
||||
// return thisProb;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// };
|
||||
|
||||
|
||||
function updateNewWidgetData()
|
||||
{
|
||||
var items = [];
|
||||
$('section.connectedSortable').each(function()
|
||||
{
|
||||
var columnId = $(this).attr('id');
|
||||
$(this).find('.card').each(function(order)
|
||||
{
|
||||
var collapsed = 0;
|
||||
if($(this).hasClass('collapsed-card'))
|
||||
{
|
||||
collapsed = 1;
|
||||
}
|
||||
|
||||
//Create Item object for current panel
|
||||
var item = {
|
||||
id: $(this).attr('id'),
|
||||
collapsed: collapsed,
|
||||
order : order,
|
||||
column: columnId
|
||||
};
|
||||
|
||||
//Push item object into items array
|
||||
items.push(item);
|
||||
});
|
||||
});
|
||||
|
||||
//Assign items array to sortorder JSON variable
|
||||
var sortorder = {items: items};
|
||||
var successOrderChange = true;
|
||||
|
||||
//Pass sortorder variable to server using ajax to save state (OGP sections)
|
||||
$.post('home.php?m=dashboard&p=updateWidgets', 'data='+$.toJSON(sortorder), function(response)
|
||||
{
|
||||
var checkRespone = $(response).filter('section.content');
|
||||
|
||||
if(response.indexOf("success") < 0)
|
||||
{
|
||||
successOrderChange = false;
|
||||
// toastr.error('Failed to update widget order');
|
||||
}else
|
||||
{
|
||||
// toastr.success('Successfully update widget order');
|
||||
}
|
||||
});
|
||||
|
||||
//Pass sortorder variable to server using ajax to save state (Theme sections)
|
||||
$.post('themes/AdminLTE/dist/php/settings.php?m=dashboard&p=updatecolumnsettings', 'data='+$.toJSON(sortorder), function(response)
|
||||
{
|
||||
var checkRespone = $(response).filter('section.content');
|
||||
|
||||
if(response.indexOf("success") < 0)
|
||||
{
|
||||
successOrderChange = false;
|
||||
// toastr.error('Failed to update widget order');
|
||||
}else
|
||||
{
|
||||
// toastr.success('Successfully update widget order');
|
||||
}
|
||||
});
|
||||
|
||||
if(successOrderChange)
|
||||
{
|
||||
toastr.success('Successfully update widget order');
|
||||
}else
|
||||
{
|
||||
toastr.error('Failed to update widget order');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function createCard(id, title, body, refresh = false, collapsed = 0)
|
||||
{
|
||||
var addBody = ''
|
||||
var collapsedClass = ''
|
||||
var maximize = ''
|
||||
|
||||
if(refresh)
|
||||
{
|
||||
addBody = " id='refreshed'"
|
||||
}
|
||||
|
||||
if(collapsed==1)
|
||||
{
|
||||
collapsedClass = ' collapsed-card'
|
||||
}
|
||||
|
||||
//add maximize button
|
||||
if(id=='item8')
|
||||
{
|
||||
maximize = '<button type="button" class="btn btn-tool" data-card-widget="maximize"><i class="fas fa-expand"></i></button>';
|
||||
}
|
||||
|
||||
return "\
|
||||
<div class='card " + collapsedClass + "' id='" + id + "'>\
|
||||
<div class='card-header'>\
|
||||
<h3 class='card-title'>" + title + "</h3>\
|
||||
<div class='card-tools'>\
|
||||
" + maximize + "\
|
||||
<button type='button' class='btn btn-tool' data-card-widget='collapse'>\
|
||||
<i class='fas fa-minus'></i>\
|
||||
</button>\
|
||||
</div>\
|
||||
</div>\
|
||||
<div class='card-body'" + addBody + ">\
|
||||
" + body + "\
|
||||
</div>\
|
||||
</div>\
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
function updateServerStats(html)
|
||||
{
|
||||
var dataOut = '';
|
||||
var brExp = /<br\s*\/?>/i;
|
||||
|
||||
// System Uptime
|
||||
var data = clone(html);
|
||||
var sysUptime = $(data).filter('#column4:nth-child(1)');
|
||||
if($(sysUptime).length > 0)
|
||||
{
|
||||
var sysUptimeTitle = $(sysUptime).find('h4').html();
|
||||
var sysUptimeContent = '';
|
||||
var sysUptimeSplit = $(sysUptime).find('b').html().split(brExp);
|
||||
$.each(sysUptimeSplit, function(i, element)
|
||||
{
|
||||
sysUptimeContent += '<p class="mb-0">'+element.trim()+'</p>';
|
||||
});
|
||||
|
||||
$('#item9 .card-title').text(sysUptimeTitle);
|
||||
$('#item9 .card-body').html(sysUptimeContent);
|
||||
}
|
||||
|
||||
// CPU Usage
|
||||
var data = clone(html);
|
||||
var cpu = $(data).filter('#column4:nth-child(2)');
|
||||
if($(cpu).length > 0)
|
||||
{
|
||||
var progressCPU = '';
|
||||
var cpuTitle = $(cpu).find('h4').text();
|
||||
|
||||
$(cpu).find('.dragbox-content').children('b').each(function()
|
||||
{
|
||||
var cpuName = $(this).text().split(':')[0].trim();
|
||||
var cpuLoad = $(this).text().split(':')[1].trim().split(' ')[0].trim();
|
||||
var cpuLoad = $(this).text().split(':')[1].trim().split(' ')[0].trim();
|
||||
|
||||
progressCPU += '\
|
||||
<div class="progress-group">\
|
||||
'+cpuName+'\
|
||||
<span class="float-right"><b>'+cpuLoad+' %</b> / 100 %</span>\
|
||||
<div class="progress progress-sm">\
|
||||
<div class="progress-bar bg-primary" style="width: '+cpuLoad+'%"></div>\
|
||||
</div>\
|
||||
</div>\
|
||||
';
|
||||
});
|
||||
|
||||
dataOut += progressCPU
|
||||
}
|
||||
|
||||
// RAM Usage
|
||||
var data = clone(html);
|
||||
var ram = $(data).filter('#column4:nth-child(3)');
|
||||
if($(ram).length > 0)
|
||||
{
|
||||
var ramTitle = $(ram).find('h4').text();
|
||||
var ram = $(ram).find('.dragbox-content').html();
|
||||
|
||||
var ramUsageSplit = ram.split(':')[1].split(' ');
|
||||
var ramUsage = ramUsageSplit[1] + ' ' + ramUsageSplit[2];
|
||||
var ramTotal = ramUsageSplit[4] + ' ' + ramUsageSplit[5].split('<')[0];
|
||||
var ramPerc = $(ram).find('.progress-bar').attr('data');
|
||||
|
||||
var progressRam = '\
|
||||
<div class="progress-group">\
|
||||
'+ramTitle+'\
|
||||
<span class="float-right"><b>'+ramUsage+'</b> / '+ramTotal+'</span>\
|
||||
<div class="progress progress-sm">\
|
||||
<div class="progress-bar bg-primary" style="width: '+ramPerc+'%"></div>\
|
||||
</div>\
|
||||
</div>\
|
||||
';
|
||||
|
||||
dataOut += progressRam
|
||||
}
|
||||
|
||||
// Storage Space
|
||||
var data = clone(html);
|
||||
var storage = $(data).filter('#column4:nth-child(4)');
|
||||
if($(storage).length > 0)
|
||||
{
|
||||
var spaceTitle = $(storage).find('h4').text();
|
||||
var storage = $(storage).find('.dragbox-content').html();
|
||||
var storagelines = storage.split(brExp);
|
||||
|
||||
var spaceTotal = storagelines[0].split(':')[1].trim();
|
||||
var spaceUsed = storagelines[1].split(':')[1].trim().split('(')[0].trim();
|
||||
var spaceUsedPerc = storagelines[1].match(/\((.*?)\)/)[1];
|
||||
var spaceFree = storagelines[2].split(':')[2].trim().split('<')[0].trim();
|
||||
|
||||
var progressStorage = '\
|
||||
<div class="progress-group">\
|
||||
'+spaceTitle+'\
|
||||
<span class="float-right"><b>'+spaceUsed+'</b> / '+spaceTotal+'</span>\
|
||||
<div class="progress progress-sm">\
|
||||
<div class="progress-bar bg-primary" style="width: '+spaceUsedPerc+'"></div>\
|
||||
</div>\
|
||||
</div>\
|
||||
';
|
||||
|
||||
dataOut += progressStorage
|
||||
}
|
||||
|
||||
// put all informations into card
|
||||
$('#item7 .card-body').html(dataOut);
|
||||
|
||||
// Process Monitor
|
||||
var procMonTitle = $(data).filter('#column4:nth-child(5)').find('h4').text();
|
||||
var procMonContent = $(data).filter('#column4:nth-child(5)').find('.dragbox-content').html();
|
||||
$('#item8 .card-title').text(procMonTitle);
|
||||
$('#item8 .card-body').html(procMonContent);
|
||||
}
|
||||
|
||||
|
||||
function clone(obj)
|
||||
{
|
||||
if (null == obj || "object" != typeof obj) return obj;
|
||||
var copy = obj.constructor();
|
||||
for (var attr in obj)
|
||||
{
|
||||
if (obj.hasOwnProperty(attr)) copy[attr] = obj[attr];
|
||||
}
|
||||
return copy;
|
||||
}
|
||||
|
||||
|
||||
function animateProgressBars()
|
||||
{
|
||||
// image replacement
|
||||
$('img[src$="magnifglass.png"]').replaceWith('<i class="fas fa-search mr-2"></i>');
|
||||
|
||||
// online servers
|
||||
$('#item2 .card-body > br').remove();
|
||||
$('#item2 .card-body > center br').replaceWith(' ');
|
||||
$('.currently-online').addClass('table table-striped table-sm');
|
||||
$('.currently-online td').removeAttr('style');
|
||||
$('.currently-online > tbody > tr:first-of-type > td').replaceWith('<th>'+$('.currently-online > tbody > tr:first-of-type td').text()+'</th>');
|
||||
|
||||
if(localStorage.getItem('themeServerstats')=='remove')
|
||||
{
|
||||
$('.online_servers [id^=refreshed]').each(function()
|
||||
{
|
||||
var thisLink = $(this).find('.name').find('a').attr('href');
|
||||
$(this).addClass('btn btn-sm btn-primary').attr('onclick', 'location.href=\''+thisLink+'\'');
|
||||
});
|
||||
}else
|
||||
{
|
||||
if($('#item2 .card-body').length>0)
|
||||
{
|
||||
if(!$('#item2 .card-body').hasClass('onlineServers'))
|
||||
{
|
||||
$('#item2 .card-body').addClass('onlineServers p-2');
|
||||
}
|
||||
|
||||
// get server satistics, update title and remove statistics
|
||||
if($('#item2 .card-body').find('center').length>0)
|
||||
{
|
||||
var serverStats = $('#item2 .card-body').find('center').text();
|
||||
|
||||
const serversRegex = / (\d*?)\/(\d*?) /m;
|
||||
if(serversRegex.test(serverStats))
|
||||
{
|
||||
$('#item2 .card-title').append(' (' + serverStats.match(serversRegex)[1] + '/' + serverStats.match(serversRegex)[2] + ' ' + langConsts['OGP_LANG_server'] + ')');
|
||||
$('#item2 .card-body').find('center').remove();
|
||||
}
|
||||
}
|
||||
|
||||
if($('.onlineServers').data('init')===undefined)
|
||||
{
|
||||
$('.onlineServers').attr('data-init', 'load');
|
||||
|
||||
if($('#item2 .onlineServers > p').length>0)
|
||||
{
|
||||
$('#item2 .onlineServers > p').addClass('px-2');
|
||||
}
|
||||
|
||||
var loading = '\
|
||||
<div class="listServers">\
|
||||
<div class="d-flex justify-content-center w-100 m-1 serverLoading">\
|
||||
<div class="spinner-grow spinner-grow-sm" role="status">\
|
||||
<span class="sr-only">Loading...</span>\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>';
|
||||
|
||||
// add loader
|
||||
if($('#item2 .onlineServers > b').length>0)
|
||||
{
|
||||
$('#item2 .onlineServers > b').replaceWith(loading);
|
||||
}else
|
||||
{
|
||||
$('.onlineServers').prepend(loading);
|
||||
}
|
||||
|
||||
if(localStorage.getItem('themeServerstats')=='activate')
|
||||
{
|
||||
// initial load serverlist
|
||||
loadServerList();
|
||||
|
||||
// setInterval for ServerList Refresh
|
||||
setInterval(function()
|
||||
{
|
||||
loadServerList();
|
||||
}, 60000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($('table.online_servers').length>0)
|
||||
{
|
||||
// remove old table
|
||||
$('table.online_servers').remove();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function loadServerList()
|
||||
{
|
||||
// initial load serverlist
|
||||
$.ajax({
|
||||
cache: false,
|
||||
async: true,
|
||||
type: 'GET',
|
||||
url: 'themes/AdminLTE/dist/php/settings.php?m=dashboard&p=listservers',
|
||||
success: function(html)
|
||||
{
|
||||
// update server boxes
|
||||
$('.listServers').html(html);
|
||||
|
||||
// init tooltips
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('p[style^="color:"]').each(function()
|
||||
{
|
||||
var thisClass = '';
|
||||
if($(this).css('color')=='rgb(0, 128, 0)')
|
||||
{
|
||||
thisClass = 'success';
|
||||
}
|
||||
else
|
||||
{
|
||||
thisClass = 'error';
|
||||
}
|
||||
$(this).replaceWith('<div class="callout callout-'+thisClass+' mt-2"><p>'+$(this).html()+'</p></div>');
|
||||
});
|
||||
});
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
td {
|
||||
padding: 5px !important;
|
||||
}
|
||||
|
||||
button {
|
||||
margin-bottom: 0.1rem;
|
||||
}
|
||||
|
||||
input.form-control {
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
margin-bottom: 0.1rem;
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('.main br').remove();
|
||||
$('.main input:not([type="SUBMIT"]), .main select').addClass('form-control');
|
||||
$('.main button, .main [type="SUBMIT"]').addClass('btn btn-sm btn-primary');
|
||||
$('.main table').addClass('table table-striped table-sm');
|
||||
});
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
$(document).ready(function(){
|
||||
$('.main [href^="?m=gamemanager&p=game_monitor"], .main [href^="?m=editconfigfiles"]').addClass('btn').addClass('btn-primary').addClass('btn-xs');
|
||||
});
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
$(document).ready(function(){
|
||||
$('.main [href^="?m=editconfigfiles"]').addClass('btn').addClass('btn-primary').addClass('btn-xs');
|
||||
});
|
||||
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
.main .btn:not([name="update"]),
|
||||
.main .loading {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.main .btn,
|
||||
.main .badge {
|
||||
margin: 0px 5px !important;
|
||||
text-wrap: nowrap !important;
|
||||
}
|
||||
|
||||
.main .uninstall,
|
||||
.main .install,
|
||||
.main .remove,
|
||||
.main .badge {
|
||||
min-width: 75px;
|
||||
}
|
||||
|
||||
.main .badge {
|
||||
font-weight: normal !important;
|
||||
}
|
||||
|
||||
.main .card.extra .table {
|
||||
min-width: 500px;
|
||||
}
|
||||
|
||||
.main .card.extra label {
|
||||
font-size: 0.8rem;
|
||||
line-height: 1.4rem;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
|
@ -1,121 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
//remove main card
|
||||
$('.main').removeClass('card-body').parent('.card').removeClass('card');
|
||||
|
||||
// add new row
|
||||
$('.main').append('<div class="row"></div>');
|
||||
|
||||
// remove all minus
|
||||
$('.main .dragbox-content').html(function(index, text)
|
||||
{
|
||||
return text.replace(/\ - /g, '');
|
||||
});
|
||||
|
||||
$('.main [href^="#uninstall_"]').addClass('btn btn-danger btn-xs order-9').removeAttr('style').prepend('<i class="fas fa-upload mr-1"></i>');
|
||||
$('.main [href^="#remove_"]').addClass('btn btn-danger btn-xs order-9').removeAttr('style').prepend('<i class="fas fa-trash-alt mr-1"></i>');
|
||||
$('.main [href^="#install_"]').addClass('btn btn-success btn-xs order-9').removeAttr('style').removeAttr('href').prepend('<i class="fas fa-download mr-1"></i>');
|
||||
$('.main [href^="?m=extras&searchForUpdates="]').addClass('btn btn-primary btn-xs order-9').removeAttr('style').prepend('<i class="fas fa-search mr-1"></i>');
|
||||
|
||||
$('.main .dragbox-content').each(function()
|
||||
{
|
||||
var form_selector = $(this);
|
||||
$(form_selector).prepend('<br>');
|
||||
$(form_selector.find('br')).each(function()
|
||||
{
|
||||
var $set = $();
|
||||
var nxt = this.nextSibling;
|
||||
while(nxt) {
|
||||
if(!$(nxt).is('br')) {
|
||||
$set.push(nxt);
|
||||
nxt = nxt.nextSibling;
|
||||
} else break;
|
||||
}
|
||||
$set.wrapAll('<tr><td class="d-flex"></td></tr>');
|
||||
});
|
||||
$(form_selector.find('br')).remove();
|
||||
$(form_selector.find('tr')).wrapAll('<table class="table table-sm table-striped mb-1" />');
|
||||
});
|
||||
|
||||
$('.main b[style*="green"]').addClass('badge badge-success').prepend('<i class="fas fa-check-circle mr-1"></i>');
|
||||
$('.main b[style*="red"]').addClass('badge badge-secondary');
|
||||
$('.main b[style*="orange"]').addClass('badge badge-warning').prepend('<i class="fas fa-exclamation-circle mr-1"></i>');
|
||||
$('.main b[style]').removeAttr('style').wrap('<span class="order-1" />');
|
||||
|
||||
$('.main .search').click(function(){
|
||||
$(this).replaceWith('<a class="search btn btn-primary btn-xs" href="'+$(this).attr('href')+'" disabled>'+$(this).text()+' <i class="fa fa-refresh fa-spin fa-fw" aria-hidden="true"></i></a>');
|
||||
});
|
||||
|
||||
$('.main .dragbox').each(function()
|
||||
{
|
||||
var boxTitle = $(this).find('h4').text();
|
||||
var boxContent = $(this).find('.dragbox-content').html();
|
||||
|
||||
$('.main > .row').append("\
|
||||
<div class='col-md-6 col-12'>\
|
||||
<div class='card extra'>\
|
||||
<div class='card-header'>\
|
||||
<h3 class='card-title'>" + boxTitle + "</h3>\
|
||||
</div>\
|
||||
<div class='card-body p-0'>\
|
||||
" + boxContent + "\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
");
|
||||
});
|
||||
|
||||
|
||||
// add buttons below each table
|
||||
var btnText = $('button[name="update"]').text();
|
||||
$('.main .card-body').each(function()
|
||||
{
|
||||
$(this).append("\
|
||||
<div id='updateButton' class='ml-3 mb-3 mt-1'>\
|
||||
<button name='update' class='btn btn-sm btn-primary'><i class='fas fa-download mr-1'></i>" + btnText + "</button>\
|
||||
</div>\
|
||||
");
|
||||
});
|
||||
|
||||
$('.main > table').remove();
|
||||
|
||||
// replace checkboxes
|
||||
$('.main [type="checkbox"]').each(function()
|
||||
{
|
||||
var checkboxName = $(this).attr('name');
|
||||
var checkboxValue = $(this).attr('value');
|
||||
var checkboxDisabled = $(this).attr('disabled');
|
||||
var checkboxText = $(this).next('b').text();
|
||||
|
||||
// remove old text
|
||||
$(this).next('b').remove();
|
||||
|
||||
var disabledAttr = '';
|
||||
if($(this).is(':disabled'))
|
||||
{
|
||||
disabledAttr = ' disabled="disabled"'
|
||||
}
|
||||
|
||||
$(this).replaceWith('\
|
||||
<div class="custom-control custom-checkbox d-inline-block mr-auto">\
|
||||
<input class="custom-control-input" type="checkbox" id="' + checkboxName + '_' + checkboxValue + '" name="' + checkboxName + '" value="' + checkboxValue + '"' + disabledAttr + '>\
|
||||
<label for="' + checkboxName + '_' + checkboxValue + '" class="custom-control-label">' + checkboxText + '</label>\
|
||||
</div>\
|
||||
');
|
||||
});
|
||||
|
||||
// wrap all links/buttons
|
||||
$('.main .extra a').each(function()
|
||||
{
|
||||
$(this).wrap('<span class="order-2" />');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(window).load(function()
|
||||
{
|
||||
$('[name="update"]').click(function()
|
||||
{
|
||||
$('body').append('<div class="loading-overlay"><img src="themes/AdminLTE/dist/img/dual_ring.svg"></div>');
|
||||
});
|
||||
});
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
.main li.faqblock {
|
||||
list-style: none;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.main #count + #count {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main .maincategory,
|
||||
.main .category {
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
|
||||
.main .category {
|
||||
margin-top: 2rem;
|
||||
}
|
||||
.main #accordion > .card {
|
||||
margin-left: 1rem;
|
||||
}
|
||||
.main #accordion > .card > a {
|
||||
color: inherit !important;
|
||||
}
|
||||
|
||||
.main input#search {
|
||||
max-width: 250px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.main .footer {
|
||||
margin-top: 3rem;
|
||||
font-size: 0.8rem;
|
||||
color: var(--secondary);
|
||||
}
|
||||
|
||||
.main .faqanswer > br:last-of-type,
|
||||
.main .faqanswer > br:first-of-type {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main .faqanswer > .table-responsive {
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
//icon replacement
|
||||
$('img[src="modules/faq/faq.png"]').replaceWith('<small><i class="fas fa-list-alt mr-1"></i></small>');
|
||||
$('img[src="modules/faq/faqlower.png"]').replaceWith('<small><i class="fas fa-question-circle mr-1"></i></small>');
|
||||
|
||||
$('li.faqblock > a').addClass('btn btn-sm btn-primary mr-1');
|
||||
|
||||
//accordions
|
||||
var allAccs = 1
|
||||
$('.accordion-toggle').each(function()
|
||||
{
|
||||
var accTitle = $(this).html();
|
||||
var accContent = $(this).next('.accordion-content').html();
|
||||
|
||||
$(this).next('.accordion-content').remove();
|
||||
|
||||
var newAcc = '\
|
||||
<div class="card card-faq">\
|
||||
<a class="d-block w-100 collapsed" data-toggle="collapse" href="#faqacc'+allAccs+'" aria-expanded="false">\
|
||||
<div class="card-header">\
|
||||
<h4 class="card-title">'+accTitle+'</h4>\
|
||||
<div class="card-tools">\
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse"> \
|
||||
<i class="fas fa-plus"></i>\
|
||||
</button>\
|
||||
</div>\
|
||||
</div>\
|
||||
</a>\
|
||||
<div id="faqacc'+allAccs+'" class="collapse" data-parent="#accordion" style="">\
|
||||
<div class="card-body">'+accContent+'</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
';
|
||||
|
||||
$(this).replaceWith(newAcc);
|
||||
|
||||
allAccs++;
|
||||
});
|
||||
|
||||
//new search
|
||||
$('#search').jcOnPageFilter({
|
||||
animateHideNShow: false,
|
||||
focusOnLoad: true,
|
||||
highlightColor: "yellow",
|
||||
textColorForHighlights: "#000000",
|
||||
caseSensitive: false,
|
||||
hideNegatives: true,
|
||||
parentLookupClass: "card-faq",
|
||||
childBlockClass: "collapse"
|
||||
});
|
||||
|
||||
// show all elements if search is empty
|
||||
$('#search').on("keyup input", function()
|
||||
{
|
||||
var inputVal = $(this).val();
|
||||
if(inputVal.length==0)
|
||||
{
|
||||
$('.card-faq').removeAttr('style');
|
||||
}
|
||||
});
|
||||
|
||||
// pull footer to right
|
||||
$('.main .footer').addClass('text-right');
|
||||
|
||||
// search num badge
|
||||
$('.main #count').addClass('badge badge-secondary font-weight-normal');
|
||||
});
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
$(document).ready(function() {
|
||||
$('.main [href^="?m=fast_download"]').addClass('btn').addClass('btn-sm').addClass('btn-primary');
|
||||
$('input[name="delete"], input[name="stop_fastdl"]').removeClass('btn-primary').addClass('btn-danger');
|
||||
|
||||
|
||||
var form_selector = $('.main > form:nth-child(5)');
|
||||
$(form_selector).prepend('<br>');
|
||||
$(form_selector.find('br')).each(function(){
|
||||
var $set = $();
|
||||
var nxt = this.nextSibling;
|
||||
while(nxt) {
|
||||
if(!$(nxt).is('br')) {
|
||||
$set.push(nxt);
|
||||
nxt = nxt.nextSibling;
|
||||
} else break;
|
||||
}
|
||||
$set.wrapAll('<tr><td></td></tr>');
|
||||
});
|
||||
$(form_selector.find('br')).remove();
|
||||
$(form_selector.find('tr')).wrapAll('<table class="table table-sm table-striped" />');
|
||||
|
||||
|
||||
});
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
form > b
|
||||
{
|
||||
padding: 2px 10px !important;
|
||||
margin-bottom: 5px;
|
||||
display: inline-block;
|
||||
background-color: rgba(67, 72, 87, 0.5) !important;
|
||||
color: #fff !important;
|
||||
border-radius: 3px;
|
||||
border: none !important;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
$(document).ready(function() {
|
||||
$('b').removeAttr('style');
|
||||
$('input[name="delete"]').removeClass('btn-primary').addClass('btn-danger');
|
||||
});
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
iframe {
|
||||
border: none !important;
|
||||
background: transparent !important;
|
||||
}
|
||||
.ftp_iframe {
|
||||
background: transparent !important;
|
||||
}
|
||||
.ftp_iframe #LoginForm div {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.ftp_iframe #LoginForm > div > div:first-child {
|
||||
padding: 6px 10px 0px;
|
||||
color: #fff;
|
||||
margin: 0 auto;
|
||||
height: 31px;
|
||||
background: #4875B3;
|
||||
padding-top: 10px;
|
||||
text-align: center;
|
||||
font-family: Roboto;
|
||||
font-weight: 300;
|
||||
font-size: 15px;
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
}
|
||||
|
||||
.ftp_iframe #LoginForm > div > div:nth-child(2) {
|
||||
padding: 6px 6px 0px;
|
||||
}
|
||||
|
||||
.ftp_iframe .page table {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ftp_iframe .page table table {
|
||||
width: 400px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.ftp_iframe #wrapper {
|
||||
border-left: none;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.ftp_iframe #header,
|
||||
.ftp_iframe #page-title
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
select[name="home_id"] {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
if(window.location.href.indexOf("home.php?m=ftp") != -1 )
|
||||
{
|
||||
$('iframe').attr('id', 'ftp_iframe').css('background-color', '');
|
||||
$('iframe').load(function()
|
||||
{
|
||||
$(this).contents().find("tr").removeAttr("onmouseover").removeAttr("onmouseout");
|
||||
$(this).contents().find("body").addClass('ftp_iframe dark-mode');
|
||||
$(this).contents().find("div, input").removeAttr("style");
|
||||
$(this).contents().find("table").removeAttr("style").removeAttr("colspan").addClass('table table-sm table-striped');
|
||||
$(this).contents().find(".page > table > tbody > tr:nth-child(3)").remove();
|
||||
$(this).contents().find('b[style="color:red;"]').removeAttr('style').addClass('alert alert-danger');
|
||||
$(this).contents().find('.table .table').addClass('inner-table');
|
||||
|
||||
$(this).contents().find('link').remove();
|
||||
|
||||
var main_css = '<link rel="stylesheet" type="text/css" href="../../themes/AdminLTE/dist/css/main.css">';
|
||||
var ftp_css = '<link rel="stylesheet" type="text/css" href="../../themes/AdminLTE/modules/ftp/main.css">';
|
||||
var fa_css = '<link rel="stylesheet" type="text/css" href="../../themes/AdminLTE/plugins/fontawesome-free/css/all.min.css">';
|
||||
var bs = '<link rel="stylesheet" href="../../themes/AdminLTE/dist/css/adminlte.css">';
|
||||
var js = '<link rel="stylesheet" href="../../themes/AdminLTE/dist/js/main.js">';
|
||||
|
||||
$(this).contents().find("head").append(bs);
|
||||
$(this).contents().find("head").append(js);
|
||||
$(this).contents().find("head").append(main_css);
|
||||
$(this).contents().find("head").append(ftp_css);
|
||||
$(this).contents().find("head").append(fa_css);
|
||||
|
||||
$(this).contents().find('button, input[type=button], [type=submit], input[type=reset], .swfuploadbtn').addClass('btn btn-sm btn-primary mb-1');
|
||||
$(this).contents().find('textarea, select, input[type=text]').addClass('form-control').removeAttr('style');
|
||||
$(this).contents().find('form').addClass('form-group');
|
||||
|
||||
$(this).contents().find('.browse_rows_heading a').removeAttr('style').addClass('btn btn-xs btn-primary');
|
||||
$(this).contents().find('[href^="javascript:submitBrowseForm(\'%2F\'"]').addClass('btn btn-xs btn-primary').prepend('<i class="fa fa-arrow-up"></i> ');
|
||||
$(this).contents().find('[href^="javascript:submitBrowseForm"]:not(.btn)').addClass('badge badge-default');
|
||||
$(this).contents().find('[onclick*="view"] > a').addClass('btn btn-xs btn-success');
|
||||
$(this).contents().find('[onclick*="edit"] > a').addClass('btn btn-xs btn-warning');
|
||||
$(this).contents().find('[href^="javascript:toggleElement(\'upload\')"]').addClass('btn btn-xs btn-danger');
|
||||
|
||||
$(this).contents().find('img[src$="folder.png"]').replaceWith('<i class="fa fa-folder-open"></i>');
|
||||
$(this).contents().find('img[src$="txt.png"]').replaceWith('<i class="fa fa-pencil-square"></i>');
|
||||
$(this).contents().find('img[src$="mime.png"], img[src$="exec.png"]').replaceWith('<i class="fa fa-cog"></i>');
|
||||
$(this).contents().find('img[src$="bookmark.png"]').replaceWith('<i class="fa fa-bookmark"></i>');
|
||||
$(this).contents().find('img[src$="info.png"]').replaceWith('<i class="fa fa-info-circle"></i>');
|
||||
$(this).contents().find('img[src$="exit.png"]').replaceWith('<i class="fas fa-sign-out-alt"></i>');
|
||||
$(this).contents().find('img[src$="view_tree.png"]').replaceWith('<i class="fa fa-list-alt"></i>');
|
||||
$(this).contents().find('img[src$="mime.png"]').replaceWith('<i class="fas fa-file"></i>');
|
||||
$(this).contents().find('img[src$="tgz.png"]').replaceWith('<i class="fas fa-file-archive"></i>');
|
||||
$(this).contents().find('img[src$="document.png"]').replaceWith('<i class="fas fa-file-alt"></i>');
|
||||
$(this).contents().find('img[src$="terminal.png"]').replaceWith('<i class="fa fa-terminal"></i>');
|
||||
$(this).contents().find('img[src$="colors.png"]').replaceWith('<i class="fa fa-file-image"></i>');
|
||||
$(this).contents().find('img[src$="misc.png"]').remove();
|
||||
$(this).contents().find('img[src$="back.png"]').replaceWith('<i class="fa fa-arrow-circle-left"></i>');
|
||||
|
||||
$(this).contents().find('[accesskey="h"]').addClass('btn btn-warning');
|
||||
$(this).contents().find('[accesskey="i"]:not(input)').addClass('btn btn-info');
|
||||
$(this).contents().find('[accesskey="l"]').addClass('btn btn-danger');
|
||||
$(this).contents().find('[accesskey="b"]').addClass('btn btn-primary');
|
||||
|
||||
$('iframe').contents().find('table h1').each(function(){
|
||||
$(this).parent('td').replaceWith('<th>'+$(this).parent('td').html()+'</th>');
|
||||
});
|
||||
|
||||
$('iframe').contents().find("body").css('display', 'block');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
// ftp account table to div conversion
|
||||
$('.main > form').prepend('<div class="row addacc mb-2"></div>');
|
||||
$('.main > form > table tr:first-child > td').each(function()
|
||||
{
|
||||
$('.main .addacc').append('<div class="col-12 col-lg-3 col-md-6">'+$(this).html()+'</div>');
|
||||
});
|
||||
$('.main .addacc').append('<div class="col-12 mt-1">'+$('.main > form > table tr:last-child > td').html()+'</div>');
|
||||
$('.main > form > table').remove();
|
||||
|
||||
$('.main b').removeAttr('style');
|
||||
});
|
||||
|
||||
$(window).load(function()
|
||||
{
|
||||
$('.tablesorter-hasChildRow td.collapsed').html('<i class="fa fa-plus-square"</i>');
|
||||
|
||||
$('.tablesorter-hasChildRow td.collapsible').click(function()
|
||||
{
|
||||
if($(this).hasClass('collapsed'))
|
||||
{
|
||||
$(this).html('<i class="fa fa-plus-square"></i>');
|
||||
}else
|
||||
{
|
||||
$(this).html('<i class="fa fa-minus-square"</i>');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
html,
|
||||
body,
|
||||
.dark-mode {
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
#StatusbarForm {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
i.fa.fa-folder-open {
|
||||
color: #ffe699;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.8rem;
|
||||
}
|
||||
|
|
@ -1,281 +0,0 @@
|
|||
@media only screen and (min-width: 500px) {
|
||||
.main > form[action="home.php"] {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.main > form[action="home.php"] .form-control {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.main select.form-control {
|
||||
width: auto;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.main > form[action="home.php"] .form-control,
|
||||
.main > form[method="GET"] .form-control {
|
||||
width: auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 499px) {
|
||||
.main > form[method="GET"]:not(form[method="GET"]:last-of-type) {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.main > form:last-of-type,
|
||||
.main > form .btn,
|
||||
.serverIdToggle {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.serverIdToggle,
|
||||
.main > form[action="home.php"] {
|
||||
margin-bottom: 0.5rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.form-control {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.monitorbutton,
|
||||
#server_icon
|
||||
{
|
||||
width: 150px;
|
||||
border-radius: 4px;
|
||||
margin: 2px;
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
}
|
||||
.expand-child #server_icon {
|
||||
width: auto;
|
||||
}
|
||||
.monitorbutton {
|
||||
height: 90px;
|
||||
text-align: center;
|
||||
}
|
||||
.monitorbutton:before {
|
||||
display: block;
|
||||
font-size: 36px;
|
||||
line-height: 40px;
|
||||
}
|
||||
.monitorbutton > span {
|
||||
font-size: 0.8rem;
|
||||
line-height: 1rem;
|
||||
display: block;
|
||||
}
|
||||
.monitorbutton:last-of-type {
|
||||
margin-bottom: 20px !important;
|
||||
}
|
||||
.monitorbutton.size {
|
||||
font-size: 0.8rem !important;
|
||||
}
|
||||
.monitorbutton:hover,
|
||||
#server_icon:hover
|
||||
{
|
||||
cursor: pointer !important;
|
||||
}
|
||||
.monitorbutton:hover {
|
||||
background-position: 0 -90px !important;
|
||||
}
|
||||
.monitorbutton img {
|
||||
display: none;
|
||||
}
|
||||
.monitorButtonContainer form {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#server_icon {
|
||||
line-height: 22px;
|
||||
padding: 0px 5px;
|
||||
}
|
||||
#server_icon div {
|
||||
display: inline-block;
|
||||
}
|
||||
#server_icon input {
|
||||
vertical-align: middle;
|
||||
margin-top: 0px;
|
||||
margin-right: 2px;
|
||||
margin-top: -4px;
|
||||
}
|
||||
#server_icon img {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dark-mode table.srvctrl {
|
||||
background-color: var(--gray-dark);
|
||||
}
|
||||
.dark-mode #servermonitor .monitor-2 .srvctrl a {
|
||||
color: #fff;
|
||||
}
|
||||
.light-mode table.srvctrl {
|
||||
background-color: var(--light);
|
||||
}
|
||||
.light-mode #servermonitor .monitor-2 .srvctrl a {
|
||||
color: var(--gray-dark);
|
||||
}
|
||||
|
||||
.srvctrl td {
|
||||
padding: 5px 0px;
|
||||
}
|
||||
.srvctrl a:before {
|
||||
display: block;
|
||||
font-size: 64px;
|
||||
margin-bottom: -10px;
|
||||
margin-top: -10px;
|
||||
}
|
||||
.srvctrl b {
|
||||
font-weight: normal !important;
|
||||
}
|
||||
|
||||
.map-icon {
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
.server-info {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
#servermonitor .monitor-2 .srvctrl {
|
||||
width: auto;
|
||||
border-radius: 5px;
|
||||
}
|
||||
#servermonitor .monitor-2 .srvctrl td:first-of-type {
|
||||
border-top-left-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
}
|
||||
#servermonitor .monitor-2 .srvctrl td:last-of-type {
|
||||
border-top-right-radius: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
}
|
||||
#servermonitor .monitor-3 table {
|
||||
width: 100%;
|
||||
}
|
||||
#servermonitor .monitor-3 {
|
||||
width: 100%;
|
||||
margin-top: 0.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
#servermonitor .monitor-3 > div {
|
||||
padding: 10px 0px;
|
||||
border: 1px solid var(--grey) !important;
|
||||
}
|
||||
|
||||
|
||||
.dark-mode #servermonitor .monitor-3 > div {
|
||||
background-color: var(--dark-1) !important;
|
||||
}
|
||||
.light-mode #servermonitor .monitor-3 > div {
|
||||
background-color: var(--light) !important;
|
||||
}
|
||||
.mapicon {
|
||||
border-radius: 4px;
|
||||
margin-bottom: 5px;
|
||||
padding: 0px;
|
||||
}
|
||||
.upload-image {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.owner .form-control {
|
||||
width: auto !important;
|
||||
}
|
||||
|
||||
#servermonitor .monitor-2 .srvctrl img,
|
||||
#servermonitor .monitor-2 .srvctrl br {
|
||||
display: none;
|
||||
}
|
||||
#servermonitor .monitor-2 .srvctrl a {
|
||||
display: inline-block;
|
||||
}
|
||||
#servermonitor .monitor-2 .srvctrl tr,
|
||||
.ts3_viewer tr {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
#servermonitor .monitor-2 .srvctrl td {
|
||||
width: 100px;
|
||||
}
|
||||
#servermonitor .monitor-2 .srvctrl td:first-of-type a:before {
|
||||
content: "\f144";
|
||||
}
|
||||
#servermonitor .monitor-2 .srvctrl td:last-of-type a:before {
|
||||
content: "\f28d";
|
||||
}
|
||||
|
||||
#servermonitor .monitor-2 .srvctrl td:first-of-type a:hover:before {
|
||||
color: var(--success);
|
||||
}
|
||||
#servermonitor .monitor-2 .srvctrl td:last-of-type a:hover:before {
|
||||
color: var(--danger);
|
||||
}
|
||||
|
||||
.ts3_viewer b {
|
||||
font-weight: normal;
|
||||
}
|
||||
.ts3_viewer {
|
||||
border: 0px !important;
|
||||
background: transparent;
|
||||
margin: 0px 10px !important;
|
||||
width: auto !important;
|
||||
}
|
||||
|
||||
tr.maintr td:last-child {
|
||||
padding: 3px 8px 3px;
|
||||
}
|
||||
@media screen and (min-width: 767px){
|
||||
tr.maintr td:last-child {
|
||||
width: 330px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media screen and (max-width: 766px){
|
||||
.table-responsive>.table {
|
||||
max-width: 800px;
|
||||
}
|
||||
}
|
||||
|
||||
.header > #action-start {
|
||||
color: #5cb85c;
|
||||
}
|
||||
.header > #action-stop {
|
||||
color: #d9534f;
|
||||
}
|
||||
.header > #action-restart {
|
||||
color: #f0ad4e;
|
||||
}
|
||||
.header > .fa:hover {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.table-responsive {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
@media (max-width: 992px) {
|
||||
#servermonitor .monitor-1,
|
||||
#servermonitor .monitor-1 > div,
|
||||
#servermonitor .monitor-2
|
||||
{
|
||||
float: none !important;
|
||||
}
|
||||
#servermonitor td:nth-child(4) b {
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
.ts3_viewer img {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-left: 2px;
|
||||
}
|
||||
.ts3_viewer td, .ts3_viewer th {
|
||||
border: none !important;
|
||||
padding: 0px !important;
|
||||
font-size: 0.9rem !important;
|
||||
}
|
||||
|
||||
[id^="ui-id"] [class^="status"] {
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -1,152 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
// add additional classes to main for ogp scripts
|
||||
$('.main').addClass('main-content game-monitor');
|
||||
|
||||
// responsive table
|
||||
$('#servermonitor').wrap('<div class="table-responsive"></div>');
|
||||
|
||||
// add loading class on size click
|
||||
$('.monitorbutton.size').click(function()
|
||||
{
|
||||
$(this).addClass('loading');
|
||||
$(this).bind("DOMSubtreeModified",function()
|
||||
{
|
||||
$(this).removeClass('loading');
|
||||
});
|
||||
});
|
||||
|
||||
// table header icons
|
||||
$('img[id="action-stop"]').replaceWith('<i class="fas fa-stop-circle text-danger text-sm" id="action-stop"></i>');
|
||||
$('img[id="action-restart"]').replaceWith('<i class="fas fa-arrow-alt-circle-left text-warning text-sm" id="action-restart"></i>');
|
||||
$('img[id="action-start"]').replaceWith('<i class="fas fa-play-circle text-success text-sm" id="action-start"></i>');
|
||||
|
||||
// bulk update buttons
|
||||
$('#server_icon[class^="action-start"]').addClass('btn btn-sm btn-success');
|
||||
$('#server_icon[class^="action-stop"]').addClass('btn btn-sm btn-danger');
|
||||
$('#server_icon[class^="action-restart"]').addClass('btn btn-sm btn-warning');
|
||||
$('.main .tablesorter-header-inner > [id^="action-"]').click(function()
|
||||
{
|
||||
$('div[class^="' + $(this).attr('id') + '"]').trigger('click');
|
||||
});
|
||||
|
||||
// style monitorbuttons
|
||||
$('.main .monitorbutton').addClass('btn btn-primary d-flex flex-column justify-content-center align-items-center');
|
||||
|
||||
// ip's add badge
|
||||
$('.main .serverIPAddress[data-status="online"] > a').addClass('badge badge-success');
|
||||
$('.main .serverIPAddress[data-status="offline"]').each(function()
|
||||
{
|
||||
$(this).html('<span class="badge badge-danger">' + $(this).text() + '</span>');
|
||||
});
|
||||
|
||||
$('[id^="refreshed"]').addClass('row');
|
||||
$('[id^="refreshed"] .monitor-1').addClass('col-md-10 d-flex');
|
||||
$('[id^="refreshed"] .monitor-2').addClass('col-md-2');
|
||||
|
||||
$('.main form > input[value="'+langConsts['OGP_LANG_show_all']+'"]').parent('form').addClass('d-inline-block my-2');
|
||||
|
||||
// all server images
|
||||
$('[id^="refreshed"]').each(function()
|
||||
{
|
||||
var thisRefresh = $(this);
|
||||
let thisVar = document.getElementById($(thisRefresh).attr('id'))
|
||||
|
||||
observerMapIcon = new MutationObserver(mCallback);
|
||||
function mCallback(mutations)
|
||||
{
|
||||
for (let mutation of mutations)
|
||||
{
|
||||
if (mutation.type === 'childList')
|
||||
{
|
||||
// add timestamp to image for reload
|
||||
var timestamp = new Date().getTime();
|
||||
$('img.mapicon').each(function()
|
||||
{
|
||||
$(this).attr('src', $(this).attr('src') + '?t=' + timestamp);
|
||||
});
|
||||
|
||||
$('.upload-image').addClass('btn btn-sm btn-primary');
|
||||
$('#' + $(thisRefresh).attr('id') + ' .monitor-1').addClass('col-md-10 d-flex');
|
||||
$('#' + $(thisRefresh).attr('id') + ' .monitor-2').addClass('col-md-2');
|
||||
}
|
||||
}
|
||||
}
|
||||
observerMapIcon.observe(thisVar, { childList: true });
|
||||
});
|
||||
|
||||
// server image upload form
|
||||
const observerUploadForm = new MutationObserver(function(mutations_list)
|
||||
{
|
||||
mutations_list.forEach(function(mutation)
|
||||
{
|
||||
mutation.addedNodes.forEach(function(node)
|
||||
{
|
||||
// check if modified node has classes
|
||||
if(node.classList)
|
||||
{
|
||||
var nodeClasses = node.classList.value;
|
||||
if(nodeClasses.startsWith('status'))
|
||||
{
|
||||
var statusText = $('.'+nodeClasses).text();$
|
||||
if(statusText.length > 0)
|
||||
{
|
||||
if(statusText.toLowerCase().indexOf("success") >= 0)
|
||||
{
|
||||
toastr.success(statusText);
|
||||
|
||||
// add timestamp to image for reload
|
||||
var timestamp = new Date().getTime();
|
||||
$('img.mapicon').attr('src', $('img.mapicon').attr('src') + '?t=' + timestamp);
|
||||
|
||||
// close all ui dialogs
|
||||
$('[class^="dialog-form"]').dialog("close");
|
||||
|
||||
// reload page after 2 seconds
|
||||
setTimeout(function () {
|
||||
location.reload(true);
|
||||
}, 2000);
|
||||
}
|
||||
else
|
||||
{
|
||||
toastr.warning(statusText);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
observerUploadForm.observe(document.querySelector('body'), { subtree: true, childList: true });
|
||||
});
|
||||
|
||||
$(window).load(function()
|
||||
{
|
||||
// add loader icon to collapsed servers
|
||||
$('.main .serverIPAddress[data-status="online"]').parent('tr').next('.expand-child').find('td').each(function()
|
||||
{
|
||||
if($(this).css('display')=='none')
|
||||
{
|
||||
$(this).find('[id^="refreshed-"]').html('\
|
||||
<div class="spinner-grow spinner-grow-sm m-3" role="status">\
|
||||
<span class="sr-only">Loading...</span>\
|
||||
</div>\
|
||||
');
|
||||
}
|
||||
});
|
||||
|
||||
// loading fix when click on ServerID (nothing is loading then)
|
||||
$('.serverId').click(function()
|
||||
{
|
||||
$(this).parent('tr').find('.serverName').trigger('click');
|
||||
});
|
||||
|
||||
// global buttons radio fix
|
||||
$('#server_icon.btn').click(function()
|
||||
{
|
||||
$(this).find('[type="radio"]').prop("checked", true);
|
||||
});
|
||||
|
||||
// remvoe foot style
|
||||
$('tfoot').removeAttr('style');
|
||||
});
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
.main td {
|
||||
vertical-align: middle !important;
|
||||
}
|
||||
.main .form-group {
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
.main .form-control:not(.rcon) {
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('.main [href^="?m=gamemanager&p=game_monitor&home_id-mod_id-ip-port="]').addClass('btn btn-sm btn-primary');
|
||||
$('.main [name="size"]').addClass('float-right');
|
||||
});
|
||||
|
||||
$(window).load(function()
|
||||
{
|
||||
$('.main [name="remote_send_rcon_command"]').removeClass('btn-sm');
|
||||
});
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('.main [href^="?m=gamemanager&p=game_monitor&home_id="]').addClass('btn btn-sm btn-primary');
|
||||
$('[name="del_rcon_preset"]').removeClass('btn-primary').addClass('btn-danger');
|
||||
});
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('.main [href="http://www.greycube.com"], .main [href="http://cgx24.com/"]').attr('target', '_blank').addClass('mt-2 d-inline-block');
|
||||
$('.main br').remove();
|
||||
$('.main [href="?m=lgsl_with_img_mod&p=lgsl"]').addClass('btn btn-sm btn-primary');
|
||||
|
||||
$('.main img[src$="icon_details.gif"]').replaceWith('<i class="fas fa-search"></i>');
|
||||
$('.main [href^="?m=lgsl_with_img_mod&p=lgsl&s="]').addClass('btn btn-xs btn-primary');
|
||||
|
||||
$('.main [title="GAME LINK"] > a').addClass('badge badge-primary badge-size');
|
||||
});
|
||||
|
||||
$(window).load(function()
|
||||
{
|
||||
$('.main input').addClass('form-control');
|
||||
$('.main table').addClass('table table-striped table-sm');
|
||||
});
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
$(document).ready(function() {
|
||||
$('.main [href="http://www.greycube.com/help/readme/lgsl/"]').attr('target', '_blank').addClass('btn').addClass('btn-sm').addClass('btn-primary');
|
||||
$('.main [href^="?m=lgsl_with_img_mod&p=lgsl&s="]').addClass('btn').addClass('btn-xs').addClass('btn-warning');
|
||||
|
||||
var first_table = $('.main > form > div > table:nth-child(1)');
|
||||
$(first_table).prepend('<thead>').find('tr:first-of-type').appendTo($(first_table).find('thead'));
|
||||
$(first_table).find('thead td').each(function(){
|
||||
$(this).html($(this).html().replace('[ ','').replace(' ]','')).replaceWith('<th>'+$(this).html()+'</th>');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
a:before {
|
||||
display: none;
|
||||
}
|
||||
.form-group {
|
||||
width: 100%;
|
||||
}
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
.viewitem {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
.file-operations {
|
||||
display: inline-block;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.operations-button
|
||||
{
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.operations-button:before {
|
||||
font-family: "Font Awesome 5 Free";
|
||||
font-weight: 900;
|
||||
display: inline-block;
|
||||
margin-right: 2px;
|
||||
}
|
||||
.operations-button img {
|
||||
display: none;
|
||||
}
|
||||
.operations-button div {
|
||||
display: inline-block;
|
||||
}
|
||||
a[href^="?m=litefm&home_id="] {
|
||||
margin-right: 5px;
|
||||
}
|
||||
i.fas.fa-folder-open {
|
||||
color: #ffe699;
|
||||
}
|
||||
/* .light-mode table i.fas:not(.fa-folder-open) { */
|
||||
/* color: var(--dark); */
|
||||
/* } */
|
||||
#remove:before {
|
||||
content: "\f2ed";
|
||||
}
|
||||
#rename:before {
|
||||
content: "\f044";
|
||||
}
|
||||
#move:before {
|
||||
content: "\f31e";
|
||||
}
|
||||
#copy:before {
|
||||
content: "\f0c5";
|
||||
}
|
||||
#compress:before {
|
||||
content: "\f1c6";
|
||||
}
|
||||
#uncompress:before {
|
||||
content: "\f1c6";
|
||||
}
|
||||
#create_file:before {
|
||||
content: "\f044";
|
||||
}
|
||||
#create_folder:before {
|
||||
content: "\f07b";
|
||||
}
|
||||
#upload:not(form):before {
|
||||
content: "\f574";
|
||||
}
|
||||
|
||||
|
||||
.progress {
|
||||
height: auto !important;
|
||||
}
|
||||
#upload [name="upload"] {
|
||||
padding: 5px 10px;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
border-radius: 3px;
|
||||
border: 1px solid transparent;
|
||||
background-image: -webkit-linear-gradient(top, #1997c6 0, #126e90 100%);
|
||||
background-image: -o-linear-gradient(top, #1997c6 0, #126e90 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #1997c6), to(#126e90));
|
||||
background-image: linear-gradient(to bottom, #1997c6 0, #126e90 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff1997c6', endColorstr='#ff126e90', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #116787;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.ui-dialog-titlebar-close {
|
||||
border-radius: 3px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
[id^="fileid"] {
|
||||
position: relative;
|
||||
}
|
||||
[id^="progress"] {
|
||||
height: 5px !important;
|
||||
border: none !important;
|
||||
border-radius: 2px;
|
||||
width: 96% !important;
|
||||
}
|
||||
[id^="progress"] > div {
|
||||
background: #1997c6 !important;
|
||||
height: 5px !important;
|
||||
border-radius: 2px !important;
|
||||
-webkit-transition: width 0.2s ease-in-out;
|
||||
-moz-transition: width 0.2s ease-in-out;
|
||||
-o-transition: width 0.2s ease-in-out;
|
||||
transition: width 0.2s ease-in-out;
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('.main .operations-button').addClass('btn btn-xs btn-primary');
|
||||
$('.main .operations-button#remove').addClass('btn-danger');
|
||||
|
||||
$('.main [href^="?m=gamemanager&p=game_monitor&home_id="]').addClass('btn btn-primary btn-sm');
|
||||
|
||||
$('.main img[src="images/folder.png"]').replaceWith('<i class="fas fa-folder-open"></i>');
|
||||
$('.main img[src="images/txt.png"]').remove();
|
||||
$('.main img[src="images/exec.png"]').replaceWith('<i class="fas fa-cogs"></i>');
|
||||
|
||||
$('.main .unlocked').children('span').addClass('btn btn-xs btn-danger').css('min-width','90px').prepend('<i class="fas fa-lock text-light mr-1"></i>');
|
||||
$('.main .locked').children('span').addClass('btn btn-xs btn-success').css('min-width','90px').prepend('<i class="fas fa-unlock text-light mr-1"></i>');
|
||||
|
||||
$('.main a[href^="javascript:downloadFile"], a[href$="&type=directory"]').addClass('text-dark');
|
||||
$('.main a[href*="&p=read_file"]').addClass('btn btn-xs btn-primary').prepend('<i class="fas fa-edit text-light mr-1"></i>');
|
||||
|
||||
$('.main [href*="&item="], [href^="javascript:downloadFile"]').addClass('badge badge-default');
|
||||
$('.main [href$="&p=read_file"]').removeClass('badge').removeClass('badge-default').addClass('btn btn-primary btn-xs');
|
||||
|
||||
$('.main a[href$="&back"]').each(function()
|
||||
{
|
||||
$(this).addClass('btn btn-xs btn-secondary').text('.. ' + langConsts['OGP_LANG_level_up'].replace(/\^/g, '')).prepend('<i class="fas fa-level-up-alt mr-1"></i>');
|
||||
});
|
||||
|
||||
/* *** Long Name Fix *** */
|
||||
$('.main td > h3').each(function()
|
||||
{
|
||||
$(this).parent('td').attr('style', 'max-width:400px');
|
||||
$(this).attr('title', $(this).text()).attr('style', 'overflow:hidden;text-overflow:ellipsis;display:inline-block;white-space:nowrap;max-width:100%;');
|
||||
});
|
||||
});
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
.card-body > h3 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('[href^="?m=modulemanager&p=del"]').addClass('btn btn-danger btn-xs').prepend('<i class="fas fa-trash-alt mr-1"></i>');
|
||||
$('[href^="?m=modulemanager&p=add"]').addClass('btn btn-success btn-xs').prepend('<i class="fas fa-plus mr-1"></i>');
|
||||
});
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('.main [href="?m=mysql&p=mysql_admin"]').addClass('btn btn-sm btn-primary');
|
||||
$('.main [id="mysql_root_passwd"], .main [id="db_passwd"]').attr('type', 'password');
|
||||
|
||||
// reveal pass on focus, hide on leave
|
||||
$('.main [id="mysql_root_passwd"], .main [id="db_passwd"]').on("focus", function()
|
||||
{
|
||||
$(this).attr('type', 'text');
|
||||
}).on("focusout", function()
|
||||
{
|
||||
$(this).attr('type', 'password');
|
||||
});
|
||||
});
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
.main .pass {
|
||||
transition: all 0.3s ease-in-out;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.dark-mode .main .pass {
|
||||
text-shadow: 0 0 8px var(--white);
|
||||
}
|
||||
|
||||
.light-mode .main .pass {
|
||||
text-shadow: 0 0 8px var(--dark);
|
||||
}
|
||||
|
||||
.main .pass:hover {
|
||||
text-shadow: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('#servermonitor [href$="&delete"], #servermonitor [href$="&remove_db').addClass('btn btn-xs btn-danger').prepend('<i class="fas fa-trash-alt mr-1"></i>');;
|
||||
$('#servermonitor [href$="&edit"], #servermonitor [href$="&edit_db_settings"]').addClass('btn btn-xs btn-primary');
|
||||
|
||||
$('#servermonitor [href$="&edit"], #servermonitor [href$="&edit_db_settings"]').prepend('<i class="fas fa-cogs mr-1"></i>');
|
||||
$('#servermonitor [href$="&assign"]').addClass('btn btn-xs btn-success').prepend('<i class="fas fa-user-check mr-1"></i>');
|
||||
|
||||
$('#servermonitor .success').addClass('badge badge-success').removeClass('success');
|
||||
$('#servermonitor .failure').addClass('badge badge-danger').removeClass('failure');
|
||||
|
||||
$('.main [id="mysql_root_passwd"]').attr('type', 'password');
|
||||
|
||||
// reveal pass on focus, hide on leave
|
||||
$('.main [id="mysql_root_passwd"]').on("focus", function()
|
||||
{
|
||||
$(this).attr('type', 'text');
|
||||
}).on("focusout", function()
|
||||
{
|
||||
$(this).attr('type', 'password');
|
||||
});
|
||||
|
||||
// hide plaintext passwords
|
||||
$('#servermonitor .expand-child').each(function()
|
||||
{
|
||||
var regex = new RegExp(`(\s*)<b>${langConsts['OGP_LANG_mysql_root_passwd']}:<\/b> (.*?)<br>`, "m");
|
||||
var dbInfos = $(this).find('td:first-of-type');
|
||||
|
||||
var pass = dbInfos.html().match(regex)[2];
|
||||
|
||||
if(pass)
|
||||
{
|
||||
$(dbInfos).html(function(index,html)
|
||||
{
|
||||
return html.replace(regex, '<b>' + langConsts['OGP_LANG_mysql_root_passwd'] + '</b>: <span class="pass">'+pass+'</span><br>');
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
.pull-right {
|
||||
float: right;
|
||||
}
|
||||
.pull-left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.fixed-height {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.news-row {
|
||||
margin-bottom: 0.1rem;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.eight-tenth {
|
||||
width: 83%;
|
||||
}
|
||||
.one-quarter {
|
||||
width: 25%;
|
||||
margin-left:10px;
|
||||
}
|
||||
.one-sixth {
|
||||
width: 16%;
|
||||
}
|
||||
.news-form-control-mce {
|
||||
min-height: 250px;
|
||||
}
|
||||
|
||||
input[type="file"]:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.admin-preview-thumbnail {
|
||||
max-width: 50px;
|
||||
max-height: 50px;
|
||||
}
|
||||
|
||||
.mce-content-body {
|
||||
overflow: scroll;
|
||||
}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
$(document).ready(function() {
|
||||
$('.table-wrap').removeClass('table-wrap');
|
||||
$('.news-btn, [href="?m=news&p=admin_news&page=permissions"], .underline-link').addClass('btn btn-primary btn-sm');
|
||||
$('#description').addClass('form-control');
|
||||
|
||||
$(window).load(function () {
|
||||
$('.nicEdit-main').css('outline', 'none').parent('div').addClass('form-control autoheight').css('padding', '2px');
|
||||
});
|
||||
|
||||
create_button('.news-row [href$="&page=permissions"]', 'btn-danger');
|
||||
create_button('.news-row [href$="&page=settings"]', 'btn-warning');
|
||||
create_button('.news-row [href$="&page=add"]', 'btn-success');
|
||||
|
||||
/* *** Replace UL / LI with Table *** */
|
||||
var ul = $(".main ol");
|
||||
$(ul).each(function(){
|
||||
var li = $(this).find("li");
|
||||
var tul = $(this);
|
||||
$(li).each(function(){
|
||||
$(this).replaceWith('<tr><td>'+$(this).html()+'</td></tr>');
|
||||
});
|
||||
$(tul).replaceWith('<table>'+$(tul).html()+'</table>');
|
||||
});
|
||||
|
||||
$('[href^="home.php?m=news&p=admin_news&page=edit&id="]').each(function(){
|
||||
$(this).replaceWith('<a href="'+$(this).attr('href')+'"><i class="fas fa-edit"></i></a>');
|
||||
});
|
||||
|
||||
$('img[src="modules/news/images/cancel.gif"]').parent('a').each(function(){
|
||||
$(this).replaceWith('<a href="'+$(this).attr('href')+'" class="btn btn-sm btn-danger pull-right">'+$(this).find('img').attr('alt')+'</a>');
|
||||
});
|
||||
|
||||
$('.success').removeClass('success').addClass('label').addClass('label-success');
|
||||
$('.failure').removeClass('failure').addClass('label').addClass('label-danger');
|
||||
|
||||
$('.nicEdit-main').addClass('form-control');
|
||||
|
||||
$('.main [href^="home.php?m=news&p=admin_news&page=edit&id="]').addClass('btn').addClass('btn-sm').addClass('btn-primary');
|
||||
});
|
||||
|
||||
|
||||
function create_button(elem, clss)
|
||||
{
|
||||
$(elem).each(function()
|
||||
{
|
||||
$(this).replaceWith('<a href="'+$(this).attr('href')+'" class="btn btn-sm '+clss+' pull-right ml-1">'+$(this).text()+'</a>');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
.card-body p:last-of-type
|
||||
{
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.pull-right {
|
||||
float: right;
|
||||
}
|
||||
.pull-left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.news-img {
|
||||
margin: 0px 10px 10px;
|
||||
}
|
||||
|
||||
.news-img img,
|
||||
[rel="prettyPhoto[ad_gal]"] img {
|
||||
max-width: 75px;
|
||||
max-height: 75px;
|
||||
}
|
||||
|
||||
.card-title a {
|
||||
color: inherit;
|
||||
}
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
$(document).ready(function() {
|
||||
$('.news-btn').addClass('btn btn-primary btn-sm');
|
||||
|
||||
$('.pagination b').parent('a').parent('li').addClass('active');
|
||||
|
||||
$('h3 > .failure').parent('h3').each(function(){
|
||||
var thtml = $(this).html();
|
||||
$(thtml).appendTo('.main');
|
||||
$(this).remove();
|
||||
});
|
||||
|
||||
//remove main card
|
||||
$('.main').removeClass('card-body').parent('.card').removeClass('card');
|
||||
$('.main > br, .main > .clearfix').remove();
|
||||
|
||||
$('.news-half > br').first().remove();
|
||||
$('.news-half').first().attr('class', 'ml-auto');
|
||||
$('.news-half').last().attr('class', 'mr-auto');
|
||||
|
||||
// news list
|
||||
if($('.main > .news-container').length > 0)
|
||||
{
|
||||
$('.news-container > .panel').each(function()
|
||||
{
|
||||
$(this).addClass('card');
|
||||
|
||||
$(this).find('.panel-heading').addClass('card-header');
|
||||
$(this).find('.panel-heading').addClass('card-header');
|
||||
$(this).find('.panel-title').addClass('card-title');
|
||||
|
||||
$(this).find('.news-auto').replaceWith($(this).find('.news-auto').html());
|
||||
|
||||
var newsBody = $(this).find('.panel-body').find('.news-row').first().html();
|
||||
var newsFooter = $(this).find('.panel-body').find('.news-row').last().html();
|
||||
|
||||
$(this).find('.panel-body').addClass('card-body').html(newsBody);
|
||||
$(this).append('<div class="card-footer d-flex flex-row-reverse">' + newsFooter + '</div>');
|
||||
});
|
||||
}
|
||||
|
||||
// single news
|
||||
if($('.main > .news-row').length > 0)
|
||||
{
|
||||
$('.main > .news-row > .news-row > br').first().remove();
|
||||
|
||||
var newsContent = $('.main > .news-row > .news-row').html();
|
||||
var newsFooter = $('.main > .news-row').last().html();
|
||||
|
||||
$('.main').append('\
|
||||
<div class="card">\
|
||||
<div class="card-body">\
|
||||
' + newsContent + '\
|
||||
</div>\
|
||||
<div class="card-footer d-flex flex-row-reverse">\
|
||||
' + newsFooter + '\
|
||||
</div>\
|
||||
</div>\
|
||||
');
|
||||
|
||||
$('.main > .news-row').remove();
|
||||
|
||||
$('#go_back_button').prepend('<i class="fas fa-angle-double-left mr-1"></i>');
|
||||
}
|
||||
});
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
.main > form > table:first-of-type {
|
||||
margin-bottom: 0px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('.main [href="?m=server"]').replaceWith('<button onclick="history.back()" class="btn btn-sm btn-primary"><i class="fas fa-angle-double-left mr-1"></i>' + langConsts['OGP_LANG_back'] + '</button>');
|
||||
});
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
[name="home_cfg_id"] {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
$(document).ready(function() {
|
||||
$('.card-body [href^="?m=server&p=edit&rhost_id"]').addClass('btn btn-sm btn-primary');
|
||||
|
||||
$('[name="delete_range"]').removeClass('btn-primary').addClass('btn-danger');
|
||||
});
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
$(document).ready(function() {
|
||||
$('.main [href="?m=server"]').addClass('btn btn-sm btn-primary');
|
||||
$('.main [href$="&delete&y=y"]').addClass('btn btn-sm btn-danger');
|
||||
$('.main input[name="ip"]').addClass('mb-1');
|
||||
|
||||
$('.main [name="remove_ip"]').removeClass('btn-primary').addClass('btn-danger');
|
||||
|
||||
$('.main .info').each(function()
|
||||
{
|
||||
$(this).replaceWith('\
|
||||
<div class="callout callout-info">\
|
||||
<p class="mb-0">' + $(this).html() + '</p>\
|
||||
</div>\
|
||||
');
|
||||
});
|
||||
});
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('.main [href="?m=server"]').addClass('btn btn-sm btn-primary');
|
||||
$('.main input[name="reset_firewall"]').removeClass('btn-primary').addClass('btn-danger');
|
||||
|
||||
$('.main [href$="ch_fw_status=disable"]').addClass('btn btn-sm btn-danger my-2').prepend('<i class="fas fa-stop-circle mr-1"></i>');
|
||||
$('.main [href$="ch_fw_status=enable"]').addClass('btn btn-sm btn-success my-2').prepend('<i class="fas fa-play-circle mr-1"></i>');
|
||||
});
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('.main textarea[name="file_content"]').addClass('mb-2');
|
||||
$('.main input[name="save_file"]').addClass('btn-secondary');
|
||||
$('.main [href="?m=server"]').addClass('btn btn-sm btn-primary');
|
||||
});
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('#servermonitor [href$="&delete"]').addClass('btn btn-xs btn-danger').prepend('<i class="fas fa-trash-alt mr-1"></i>');
|
||||
$('#servermonitor [href$="&edit"]').addClass('btn btn-xs btn-primary').prepend('<i class="fas fa-cogs mr-1"></i>');
|
||||
$('#servermonitor [href^="?m=server&p=reboot"]').addClass('btn btn-xs btn-warning').prepend('<i class="fas fa-sync-alt mr-1"></i>');
|
||||
$('#servermonitor [href^="?m=server&p=restart"]').addClass('btn btn-xs btn-warning').prepend('<i class="fas fa-user-astronaut mr-1"></i>');
|
||||
$('#servermonitor [href^="?m=server&p=log"]').addClass('btn btn-xs btn-primary').prepend('<i class="fas fa-search mr-1"></i>');
|
||||
$('#servermonitor [href^="?m=server&p=firewall"]').addClass('btn btn-xs btn-primary').prepend('<i class="fas fa-shield-alt mr-1"></i>');
|
||||
|
||||
|
||||
$('#servermonitor .success').addClass('badge badge-success').removeClass('success');
|
||||
$('#servermonitor .failure').addClass('badge badge-danger').removeClass('failure');
|
||||
|
||||
$('#servermonitor img[src="images/magnifglass.png"]').each(function(){
|
||||
$(this).replaceWith('<span data-toggle="tooltip" class="image-tooltip" title="<img src=\''+$(this).attr('data-url')+'\' />"><i class="fa fa-search" aria-hidden="true"></i></span>');
|
||||
});
|
||||
});
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
|
||||
});
|
||||
|
|
@ -1,354 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('.main > br').remove();
|
||||
|
||||
// remove original logo link
|
||||
$('#logo_link').parents('tr').remove();
|
||||
|
||||
// remove original background wrapper
|
||||
$('#bg_wrapper').parents('tr').remove();
|
||||
|
||||
// add multiform attribute for image upload
|
||||
$('form[action="?m=settings&p=themes"]').attr('enctype','multipart/form-data');
|
||||
|
||||
// add theme width option
|
||||
$('.main #theme').parents('tr').after('\
|
||||
<tr>\
|
||||
<td align="right">\
|
||||
<label for="themeNavWidth" class="mb-0">'+langConsts['OGP_LANG_theme']+' Nav Width:</label>\
|
||||
<small class="currentNavWidth text-muted d-block"></small>\
|
||||
</td>\
|
||||
<td align="left">\
|
||||
<div class="form-group mb-0">\
|
||||
<input type="range" class="form-control-range" min="250" max="350" value="'+localStorage.getItem('themeNavWidth')+'" id="themeNavWidth" name="themeNavWidth">\
|
||||
</div>\
|
||||
</td>\
|
||||
<td>\
|
||||
<div class="image-tip" data-toggle="tooltip" data-html="true" title="Sets '+langConsts['OGP_LANG_theme']+' Navigation Width for all Users"><i class="far fa-question-circle"></i></div>\
|
||||
</td>\
|
||||
</tr>\
|
||||
');
|
||||
|
||||
// add logo upload form
|
||||
$('.main #theme').parents('tr').after('\
|
||||
<tr>\
|
||||
<td align="right">\
|
||||
<label for="themeLogo">'+langConsts['OGP_LANG_theme']+' Logo:</label>\
|
||||
</td>\
|
||||
<td align="left">\
|
||||
<div class="form-group mb-0">\
|
||||
<div class="input-group">\
|
||||
<div class="custom-file">\
|
||||
<input type="file" class="custom-file-input" name="themeLogo" id="themeLogo">\
|
||||
<label class="custom-file-label" for="themeLogo">Choose Image</label>\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
</td>\
|
||||
<td>\
|
||||
<div class="image-tip" data-toggle="tooltip" data-html="true" title="'+langConsts['OGP_LANG_theme']+' Logo - Max Size: '+(localStorage.getItem('themeNavWidth')-32)+'x50px"><i class="far fa-question-circle"></i></div>\
|
||||
</td>\
|
||||
</tr>\
|
||||
');
|
||||
|
||||
// add themeLogo removal if set
|
||||
$.ajax({
|
||||
cache: false,
|
||||
async: true,
|
||||
type: 'GET',
|
||||
url: 'themes/AdminLTE/dist/php/settings.php?m=global&p=themeLogo',
|
||||
dataType: 'json',
|
||||
success: function(themeLogo)
|
||||
{
|
||||
if(themeLogo)
|
||||
{
|
||||
// add themeRemoval
|
||||
addThemeRemoval(themeLogo);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// add theme serverstats option
|
||||
var themeServerstatsOptions = {'remove' : langConsts['OGP_LANG_off'], 'activate' : langConsts['OGP_LANG_on']}
|
||||
var themeServerstatsOptionsOut = ''
|
||||
for(var key in themeServerstatsOptions)
|
||||
{
|
||||
if(key==localStorage.getItem('themeServerstats'))
|
||||
{
|
||||
themeServerstatsOptionsOut += '<option value="'+key+'" selected>'+themeServerstatsOptions[key]+'</option>';
|
||||
}else
|
||||
{
|
||||
themeServerstatsOptionsOut += '<option value="'+key+'">'+themeServerstatsOptions[key]+'</option>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(localStorage.getItem('themeServerstats')=='activate')
|
||||
{
|
||||
// load themeServerstatsNum settings from db
|
||||
var themeServerstatsNum = 10;
|
||||
$.ajax({
|
||||
cache: false,
|
||||
async: false,
|
||||
type: 'GET',
|
||||
url: 'themes/AdminLTE/dist/php/settings.php?m=global&p=themeServerstats&v=displayNum',
|
||||
success: function(data)
|
||||
{
|
||||
themeServerstatsNum = data;
|
||||
}
|
||||
});
|
||||
|
||||
var themeServerstatsDisplayNum = '\
|
||||
<tr>\
|
||||
<td align="right">\
|
||||
<label for="themeServerstatsNum" class="mb-0">Server Player Stats Num:</label>\
|
||||
<small class="text-muted d-block">Displays last <span id="themeServerstatsNumber">'+themeServerstatsNum+'</span> measurements</small>\
|
||||
</td>\
|
||||
<td align="left">\
|
||||
<div class="form-group mb-0">\
|
||||
<input type="range" class="form-control-range" min="1" max="20" value="'+themeServerstatsNum+'" id="themeServerstatsNum" name="themeServerstatsNum">\
|
||||
</div>\
|
||||
</td>\
|
||||
<td>\
|
||||
<div class="image-tip" data-toggle="tooltip" data-html="true" title="Displays last n measurements in Playercharts on Dashboard"><i class="far fa-question-circle"></i></div>\
|
||||
</td>\
|
||||
</tr>\
|
||||
'
|
||||
}
|
||||
|
||||
$('.main #theme').parents('tr').after('\
|
||||
<tr>\
|
||||
<td align="right">\
|
||||
<label for="themeServerstats" class="mb-0">Server Player Stats:</label>\
|
||||
<small class="text-muted d-block">Displays custom Server Boxes on Dashboard</small>\
|
||||
</td>\
|
||||
<td align="left">\
|
||||
<div class="form-group mb-0">\
|
||||
<select id="themeServerstats" name="themeServerstats" class="form-control">\
|
||||
' + themeServerstatsOptionsOut + '\
|
||||
</select>\
|
||||
</div>\
|
||||
</td>\
|
||||
<td>\
|
||||
<div class="image-tip" data-toggle="tooltip" data-html="true" title="Activates user stats for each server, also installs a running cronjob on first server (1/5min check each server)"><i class="far fa-question-circle"></i></div>\
|
||||
</td>\
|
||||
</tr>\
|
||||
' + themeServerstatsDisplayNum + '\
|
||||
');
|
||||
|
||||
|
||||
// display current themeNavWidth
|
||||
$('.currentNavWidth').text('Current Width: '+localStorage.getItem('themeNavWidth')+'px');
|
||||
|
||||
// themeNavWidth slide
|
||||
$(document).on('input', '#themeNavWidth', function()
|
||||
{
|
||||
// call setNavWidth function from main.js
|
||||
setNavWidth($(this).val());
|
||||
|
||||
// change currentNavWidth text
|
||||
$('.currentNavWidth').text('Current Width: ' + $(this).val() + 'px');
|
||||
});
|
||||
|
||||
// themeNavWidth change
|
||||
$('#themeNavWidth').change(function()
|
||||
{
|
||||
$.ajax({
|
||||
cache: false,
|
||||
async: true,
|
||||
type: 'GET',
|
||||
url: 'themes/AdminLTE/dist/php/settings.php?m=settings&p=themeNavWidth&v='+$(this).val(),
|
||||
start: function()
|
||||
{
|
||||
toastr.info(langConsts['OGP_LANG_theme']+' Nav Width change initiated');
|
||||
},
|
||||
success: function(themeNavWidth)
|
||||
{
|
||||
// reseset themeNavWidth cache
|
||||
localStorage.setItem('themeNavWidth', themeNavWidth);
|
||||
|
||||
// call setNavWidth function from main.js
|
||||
setNavWidth(themeNavWidth);
|
||||
|
||||
// display current themeNavWidth
|
||||
$('.currentNavWidth').text('Current Width: '+themeNavWidth+'px');
|
||||
|
||||
// reset themeLogo tooltip message
|
||||
$('#themeLogo').closest('tr').find('.image-tip').attr('title', langConsts['OGP_LANG_theme']+' Logo - Max Size: '+(themeNavWidth-32)+' x 33px');
|
||||
|
||||
toastr.success('Successfully changed '+langConsts['OGP_LANG_theme']+' Nav Width to ' + themeNavWidth + 'px');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// themeServerstats change
|
||||
$('#themeServerstats').change(function()
|
||||
{
|
||||
// disable form button
|
||||
$('[name="update_settings"]').attr('disabled', 'disabled');
|
||||
|
||||
// message
|
||||
toastr.info('themeServerstats change initiated');
|
||||
|
||||
var themeServerstatsVal = $(this).val();
|
||||
|
||||
$.ajax({
|
||||
cache: false,
|
||||
async: true,
|
||||
type: 'GET',
|
||||
url: 'themes/AdminLTE/dist/php/settings.php?m=settings&p=themeServerstats&v=' + themeServerstatsVal,
|
||||
success: function(html)
|
||||
{
|
||||
// message
|
||||
toastr.success('Successfully ' + themeServerstatsVal + 'd themeServerstats');
|
||||
|
||||
// set localStorage cache
|
||||
localStorage.setItem('themeServerstats', themeServerstatsVal);
|
||||
},
|
||||
error: function(error)
|
||||
{
|
||||
toastr.error('Error: ' + error);
|
||||
}
|
||||
}).done(function()
|
||||
{
|
||||
// enable form button
|
||||
$('[name="update_settings"]').removeAttr('disabled');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// themeServerstatsNum slide
|
||||
$(document).on('input', '#themeServerstatsNum', function()
|
||||
{
|
||||
// change themeServerstatsNumber text
|
||||
$('#themeServerstatsNumber').text($(this).val());
|
||||
});
|
||||
|
||||
// themeServerstatsNum change
|
||||
$('#themeServerstatsNum').change(function()
|
||||
{
|
||||
// disable form button
|
||||
$('[name="update_settings"]').attr('disabled', 'disabled');
|
||||
|
||||
// message
|
||||
toastr.info('themeServerstatsNum change initiated');
|
||||
|
||||
var themeServerstatsNumVal = $(this).val();
|
||||
|
||||
$.ajax({
|
||||
cache: false,
|
||||
async: true,
|
||||
type: 'GET',
|
||||
url: 'themes/AdminLTE/dist/php/settings.php?m=settings&p=themeServerstats&v=setNum&num=' + themeServerstatsNumVal,
|
||||
success: function(html)
|
||||
{
|
||||
// message
|
||||
toastr.success('Successfully set themeServerstatsNum');
|
||||
},
|
||||
error: function(error)
|
||||
{
|
||||
toastr.error('Error: ' + error);
|
||||
}
|
||||
}).done(function()
|
||||
{
|
||||
// enable form button
|
||||
$('[name="update_settings"]').removeAttr('disabled');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(window).load(function()
|
||||
{
|
||||
// themeLogo upload
|
||||
$('input[type=file]#themeLogo').change(function()
|
||||
{
|
||||
$(this).simpleUpload('themes/AdminLTE/dist/php/settings.php?m=settings&p=fileUpload', {
|
||||
allowedExts: ["jpg", "jpeg", "jpe", "jif", "jfif", "jfi", "png", "gif", "svg"],
|
||||
allowedTypes: ["image/pjpeg", "image/jpeg", "image/png", "image/x-png", "image/gif", "image/x-gif", "image/svg", "image/svg+xml"],
|
||||
maxFileSize: 5242880, // 5mb in bytes
|
||||
limit: 1,
|
||||
start: function()
|
||||
{
|
||||
toastr.info(langConsts['OGP_LANG_theme']+' Logo Upload initiated');
|
||||
},
|
||||
success: function(data)
|
||||
{
|
||||
var jsonData = $.parseJSON(data);
|
||||
|
||||
if(jsonData['code']=="success")
|
||||
{
|
||||
$.ajax({
|
||||
url: jsonData['data'],
|
||||
type: 'HEAD',
|
||||
error: function()
|
||||
{
|
||||
toastr.error('Error: Uploaded File not found');
|
||||
},
|
||||
success: function()
|
||||
{
|
||||
var d = new Date();
|
||||
|
||||
// overwrite themeLogo cache
|
||||
localStorage.setItem('themeLogo', jsonData['data']);
|
||||
|
||||
// set themeLogo
|
||||
$('img.brand-image').attr('src', jsonData['data'] + "?t=" + d.getTime());
|
||||
|
||||
if($('.themeLogoRemoval').length==0)
|
||||
{
|
||||
// add themeRemoval
|
||||
addThemeRemoval(jsonData['data']);
|
||||
}
|
||||
|
||||
toastr.success('Successfully uploaded new '+langConsts['OGP_LANG_theme']+' Logo');
|
||||
}
|
||||
});
|
||||
}else
|
||||
{
|
||||
toastr.error(jsonData['data']);
|
||||
}
|
||||
},
|
||||
error: function(error)
|
||||
{
|
||||
toastr.error('Error: ' + error);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function addThemeRemoval(themeLogo)
|
||||
{
|
||||
var d = new Date();
|
||||
$('.main #themeLogo').parents('.form-group').after('\
|
||||
<div class="themeLogoRemoval my-2">\
|
||||
<img src="' + themeLogo + '?t=' + d.getTime() + '" class="brand-image">\
|
||||
<a class="btn btn-xs btn-danger m-1" id="removeThemeLogo">\
|
||||
<i class="fas fa-trash-alt mr-1"></i>Remove ' + langConsts['OGP_LANG_theme'] + ' Logo\
|
||||
</a>\
|
||||
</div>\
|
||||
');
|
||||
|
||||
$('#removeThemeLogo').click(function()
|
||||
{
|
||||
$.ajax({
|
||||
async: true,
|
||||
type: 'GET',
|
||||
url: 'themes/AdminLTE/dist/php/settings.php?m=settings&p=themeLogo&v=remove',
|
||||
success: function(data)
|
||||
{
|
||||
// remove themeLogoRemoval div
|
||||
$('.themeLogoRemoval').remove();
|
||||
|
||||
// remove themeLogo from localStorage
|
||||
localStorage.removeItem('themeLogo');
|
||||
|
||||
// change theme for image updates
|
||||
themeChanger(localStorage.getItem('theme'));
|
||||
|
||||
toastr.success('Successfully removed '+langConsts['OGP_LANG_theme']+' Logo');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
.main .img-circle {
|
||||
width: 2.1rem;
|
||||
height: 2.1rem;
|
||||
}
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
var d = new Date();
|
||||
|
||||
$('.main').addClass('simple-billing');
|
||||
$('.main > style').remove();
|
||||
$('.main > h4').each(function()
|
||||
{
|
||||
$(this).replaceWith('<div class="callout callout-info">'+$(this).text()+'</div>');
|
||||
});
|
||||
|
||||
$('input[name="remove"]').addClass('btn-danger');
|
||||
|
||||
$('.main table').removeAttr('style');
|
||||
|
||||
$('.main [href^="?m=user_admin"]').each(function()
|
||||
{
|
||||
var thisUserProfileLink = $(this).attr('href');
|
||||
var thisUserId = new URLSearchParams(thisUserProfileLink).get('user_id');
|
||||
var setThisUserAvatar = 'themes/AdminLTE/dist/img/default-avatar.png';
|
||||
|
||||
$(this).parent('td').prepend('<img src="'+setThisUserAvatar+'" class="img-circle elevation-2 mr-2" alt="User Image">');
|
||||
|
||||
var thisUserImage = $(this).parent('td').find('img');
|
||||
|
||||
if(thisUserId)
|
||||
{
|
||||
if(!localStorage.getItem('avatar_' + thisUserId))
|
||||
{
|
||||
// set loading avatar
|
||||
$(thisUserImage).attr('src', 'themes/AdminLTE/dist/img/spinner.gif?'+ d.getTime()).removeClass('elevation-2');
|
||||
|
||||
// load avatar from db
|
||||
$.ajax({
|
||||
cache: false,
|
||||
async: true,
|
||||
type: 'GET',
|
||||
url: 'themes/AdminLTE/dist/php/settings.php?m=user&p=getavatar&userid=' + thisUserId,
|
||||
success: function(avatar)
|
||||
{
|
||||
// set avatar cache
|
||||
localStorage.setItem('avatar_' + thisUserId, avatar);
|
||||
|
||||
// set user avatar
|
||||
$(thisUserImage).attr('src', avatar + "?" + d.getTime()).addClass('elevation-2');
|
||||
}
|
||||
});
|
||||
}else
|
||||
{
|
||||
// set user avatar variable
|
||||
setThisUserAvatar = localStorage.getItem('avatar_' + thisUserId);
|
||||
}
|
||||
}
|
||||
|
||||
$(thisUserImage).attr('src', setThisUserAvatar + "?" + d.getTime());
|
||||
});
|
||||
});
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
select[name="service_id"] {
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
margin-right: 0.25rem;
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('.main').addClass('services');
|
||||
$('.main input[value="'+langConsts['OGP_LANG_remove_service']+'"]').removeClass('btn-primary').addClass('btn-danger');
|
||||
});
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
.main [href="?m=simple-billing&p=cart"] > img {
|
||||
display: none;
|
||||
}
|
||||
.main [href="?m=simple-billing&p=cart"] .fa {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.shop-item:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.widget-user .widget-user-image {
|
||||
position: absolute;
|
||||
top: 25% !important;
|
||||
margin-left: auto !important;
|
||||
margin-right: auto !important;
|
||||
left: 0 !important;
|
||||
right: 0 !important;
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.widget-user .widget-user-image > img {
|
||||
width: 200px !important;
|
||||
-webkit-transition: all 0.4s;
|
||||
transition: all 0.4s;
|
||||
}
|
||||
|
||||
.shop-item:hover .widget-user-image img {
|
||||
width: 210px !important;
|
||||
}
|
||||
|
||||
.widget-user .widget-user-username {
|
||||
line-height: 0.9;
|
||||
}
|
||||
|
||||
.main > div:not(.shop-items) > div {
|
||||
text-align: center;
|
||||
}
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('.main [href="?m=simple-billing&p=cart"]').addClass('btn btn-sm btn-primary').prepend('<i class="fa fa-shopping-cart" aria-hidden="true"></i>');
|
||||
$('.main > table').addClass('mb-2');
|
||||
|
||||
$('.main').append('<div class="shop-items d-flex flex-wrap"></div>');
|
||||
|
||||
if($('form[action^="?m=simple-billing&p=add_to_cart"]').length==0)
|
||||
{
|
||||
$('.main > div:not(.shop-items) > div').each(function()
|
||||
{
|
||||
if($(this).find('[type="image"]').length > 0)
|
||||
{
|
||||
var serviceImage = $(this).find('[type="image"]');
|
||||
}else
|
||||
{
|
||||
var serviceImage = $(this).find('img');
|
||||
}
|
||||
|
||||
var serviceId = $(this).find('[name="service_id"]').val();
|
||||
var serviceTitle = $(this).find('center').first().text();
|
||||
var serviceCost = $(this).find('center').last().find('em').html();
|
||||
var serviceImageSrc = $(serviceImage).attr('src');
|
||||
var serviceImageAlt = $(serviceImage).attr('alt');
|
||||
var serviceImageVal = $(serviceImage).val();
|
||||
|
||||
var newItem = '\
|
||||
<div class="col-xl-3 col-lg-4 col-md-6 col-sm-6 col-12">\
|
||||
<form action="" method="POST">\
|
||||
<input name="service_id" type="hidden" value="'+serviceId+'" class="form-control">\
|
||||
<div class="card card-widget widget-user shadow shop-item">\
|
||||
<div class="widget-user-header bg-secondary">\
|
||||
<h3 class="widget-user-username">'+serviceTitle+'</h3>\
|
||||
</div>\
|
||||
<div class="widget-user-image">\
|
||||
<img class="elevation-2" src="'+serviceImageSrc+'" alt="'+serviceImageAlt+'">\
|
||||
</div>\
|
||||
<div class="card-footer">\
|
||||
<div class="d-flex justify-content-around flex-row flex-wrap">\
|
||||
<div class="description-block d-inline-block mx-2">\
|
||||
<h5 class="description-header">'+langConsts['OGP_LANG_starting_on']+'</h5>\
|
||||
<span class="description-text">'+serviceCost.split(' ')[2]+'</span>\
|
||||
</div>\
|
||||
<div class="description-block d-inline-block mx-2">\
|
||||
<h5 class="description-header">'+serviceCost.split('(')[1].split(')')[0].split(' ')[0]+'</h5>\
|
||||
<span class="description-text">'+serviceCost.split('(')[1].split(')')[0].split(' ')[1]+'</span>\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
</form>\
|
||||
</div>\
|
||||
';
|
||||
|
||||
$('.main .shop-items').append(newItem);
|
||||
});
|
||||
|
||||
$('.main > div:not(.shop-items)').remove();
|
||||
}
|
||||
});
|
||||
|
||||
$(window).load(function()
|
||||
{
|
||||
$('.shop-items form').click(function()
|
||||
{
|
||||
$(this).submit();
|
||||
});
|
||||
});
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
.main [href="?m=simple-billing&p=cart"] > img {
|
||||
display: none;
|
||||
}
|
||||
.main [href="?m=simple-billing&p=cart"] .fa {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.widget-user .widget-user-image {
|
||||
position: absolute;
|
||||
top: 25% !important;
|
||||
margin-left: auto !important;
|
||||
margin-right: auto !important;
|
||||
left: 0 !important;
|
||||
right: 0 !important;
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.widget-user .widget-user-image > img {
|
||||
width: 200px !important;
|
||||
-webkit-transition: all 0.4s;
|
||||
transition: all 0.4s;
|
||||
}
|
||||
|
||||
.shop-item:hover .widget-user-image img {
|
||||
width: 210px !important;
|
||||
}
|
||||
|
||||
.widget-user .widget-user-username {
|
||||
line-height: 0.9;
|
||||
}
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
/* *** Invalid Image replacement *** */
|
||||
$('.main img, .main input[type="image"]').error(function()
|
||||
{
|
||||
$(this).unbind("error").attr("src", "themes/AdminLTE/dist/img/image_not_found.png").attr("style", "max-width:250px;").removeAttr('height');
|
||||
});
|
||||
|
||||
$('.main > p:first-of-type').css("background-color", "").css("color", "");
|
||||
$('p > [href="?m=register&p=form"], p > [href="index.php"]').addClass('btn').addClass('btn-xs').addClass('btn-primary');
|
||||
});
|
||||
|
||||
$(window).load(function()
|
||||
{
|
||||
$('.main [href="?m=simple-billing&p=cart"]').addClass('btn btn-sm btn-primary').prepend('<i class="fa fa-shopping-cart" aria-hidden="true"></i>');
|
||||
$('.main > table').addClass('mb-2');
|
||||
|
||||
$('.main .card-body').append('<div class="shop-items row d-flex flex-wrap"></div>');
|
||||
|
||||
$('.main .card-body > div > div').each(function()
|
||||
{
|
||||
if($(this).find('[type="image"]').length > 0)
|
||||
{
|
||||
var serviceImage = $(this).find('[type="image"]');
|
||||
}else
|
||||
{
|
||||
var serviceImage = $(this).find('img');
|
||||
}
|
||||
|
||||
var serviceId = $(this).find('[name="service_id"]').val();
|
||||
var serviceTitle = $(this).find('center').first().text();
|
||||
var serviceCost = $(this).find('center').last().find('em').html();
|
||||
var serviceImageSrc = $(serviceImage).attr('src');
|
||||
var serviceImageAlt = $(serviceImage).attr('alt');
|
||||
var serviceImageVal = $(serviceImage).val();
|
||||
|
||||
var newItem = '\
|
||||
<div class="col-xl-4 col-lg-6 col-md-6 col-sm-6 col-12">\
|
||||
<div class="card card-widget widget-user shadow shop-item">\
|
||||
<div class="widget-user-header bg-secondary">\
|
||||
<h3 class="widget-user-username">'+serviceTitle+'</h3>\
|
||||
</div>\
|
||||
<div class="widget-user-image">\
|
||||
<img class="elevation-2" src="'+serviceImageSrc+'" alt="'+serviceImageAlt+'">\
|
||||
</div>\
|
||||
<div class="card-footer">\
|
||||
<div class="d-flex justify-content-around flex-row flex-wrap">\
|
||||
<div class="description-block d-inline-block mx-2">\
|
||||
<h5 class="description-header">'+langConsts['OGP_LANG_starting_on']+'</h5>\
|
||||
<span class="description-text">'+serviceCost.split(' ')[2]+'</span>\
|
||||
</div>\
|
||||
<div class="description-block d-inline-block mx-2">\
|
||||
<h5 class="description-header">'+serviceCost.split('(')[1].split(')')[0].split(' ')[0]+'</h5>\
|
||||
<span class="description-text">'+serviceCost.split('(')[1].split(')')[0].split(' ')[1]+'</span>\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
';
|
||||
|
||||
$('.main .card-body .shop-items').append(newItem);
|
||||
});
|
||||
|
||||
$('.main .card-body > div:not(.shop-items)').remove();
|
||||
|
||||
$('.shop-item form').click(function()
|
||||
{
|
||||
$(this).submit();
|
||||
});
|
||||
});
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
$(document).ready(function() {
|
||||
$('.main > style:nth-child(2)').remove();
|
||||
});
|
||||
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
#scrolling_checkbox,
|
||||
#uninstall_scrolling_checkbox
|
||||
{
|
||||
min-height: 120px;
|
||||
overflow-y: scroll;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
padding: 0px;
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('.main [href^="?m=steam_workshop&p=uninstall"]').addClass('btn btn-sm btn-danger').prepend('<i class="fas fa-puzzle-piece mr-1"></i>');
|
||||
$('.main [href="?m=steam_workshop&p=main"]').addClass('btn btn-sm btn-success');
|
||||
$('.main [name="install"]').removeClass('btn-primary').addClass('btn-success');
|
||||
$('.main [name="remove_mods"], .main [name="uninstall"]').removeClass('btn-primary').addClass('btn-danger').prepend('<i class="fas fa-trash-alt mr-1"></i>');
|
||||
$('.main [href^="?m=steam_workshop&p=main&home_id-mod_id-ip-port="]').addClass('btn btn-sm btn-primary').prepend('<i class="fas fa-puzzle-piece mr-1"></i>');
|
||||
|
||||
$('.main [href^="?m=gamemanager"]').each(function()
|
||||
{
|
||||
if($(this).text()==langConsts['OGP_LANG_back'])
|
||||
{
|
||||
$(this).addClass('btn btn-sm btn-primary mt-1').prepend('<i class="fas fa-angle-double-left mr-1"></i>');
|
||||
}
|
||||
});
|
||||
|
||||
$('.main [href^="?m=steam_workshop"]').each(function()
|
||||
{
|
||||
if($(this).text()==langConsts['OGP_LANG_install_mod'])
|
||||
{
|
||||
$(this).addClass('btn-sm').prepend('<i class="fas fa-puzzle-piece mr-1"></i>');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
$(document).ready(function() {
|
||||
$('.main [href="?m=subusers&p=add"]').addClass('btn').addClass('btn-sm').addClass('btn-primary');
|
||||
$('.main [href="?m=subusers&p=del"]').addClass('btn').addClass('btn-sm').addClass('btn-danger');
|
||||
});
|
||||
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
// content to table translation
|
||||
$('.main .contactForm').each(function()
|
||||
{
|
||||
var form_selector = $(this);
|
||||
$(form_selector).prepend('<br>');
|
||||
$(form_selector.find('br')).each(function()
|
||||
{
|
||||
// skip if this br is in head paragraph
|
||||
if($(this).parent('p').length==0)
|
||||
{
|
||||
var $set = $();
|
||||
var nxt = this.nextSibling;
|
||||
while(nxt) {
|
||||
if(!$(nxt).is('br'))
|
||||
{
|
||||
$set.push(nxt);
|
||||
nxt = nxt.nextSibling;
|
||||
} else break;
|
||||
}
|
||||
$set.wrapAll('<tr><td></td></tr>');
|
||||
|
||||
// remove this br after wrap
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
$(form_selector.find('tr')).wrapAll('<table class="table table-sm table-striped" />');
|
||||
});
|
||||
|
||||
// remove main br
|
||||
$('.main > br').remove();
|
||||
|
||||
// remove empty rows
|
||||
$('.main .contactForm td').each(function()
|
||||
{
|
||||
if($(this).html().trim()=="")
|
||||
{
|
||||
$(this).parent('tr').remove();
|
||||
}
|
||||
});
|
||||
|
||||
// remove style attr from submit button
|
||||
$('.main .contactForm input[type="submit"]').removeAttr('style');
|
||||
|
||||
// remove style attribute from paragraphs
|
||||
$('.main p').removeAttr('style');
|
||||
});
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
.attachment_add {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.attachment_inputs > .custom-file {
|
||||
margin-right: 0.4rem;
|
||||
}
|
||||
|
||||
.attachment_info {
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('#add_file_attachment').addClass('btn-secondary').prepend('<i class="fas fa-plus-circle mr-1"></i>');
|
||||
// $('#submit').addClass('mt-2');
|
||||
});
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
.ticketOptionLinks {
|
||||
border-bottom: none;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.ticketRow a {
|
||||
color: inherit;
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('[href="?m=tickets&p=submitticket"]').addClass('btn btn-primary btn-sm').prepend('<i class="fas fa-comment mr-1"></i>');
|
||||
|
||||
$('.main .ticket_closed').addClass('text-muted');
|
||||
$('.main .ticket_closed td:nth-child(2)').html('<span class="badge badge-danger"><i class="fas fa-times-circle mr-1"></i>'+$('.main .ticket_closed td:nth-child(2)').html()+'</span>');
|
||||
|
||||
// check if current user is admin for correct response color
|
||||
$.ajax({
|
||||
cache: false,
|
||||
async: true,
|
||||
type: 'GET',
|
||||
url: 'themes/AdminLTE/dist/php/settings.php?m=global&p=check&v=isadmin',
|
||||
success: function(isadmin)
|
||||
{
|
||||
if(isadmin==1)
|
||||
{
|
||||
$('.main .ticket_admin_response td:nth-child(2)').html('<span class="badge badge-secondary"><i class="fas fa-comment-dots mr-1"></i>'+$('.main .ticket_admin_response td:nth-child(2)').html()+'</span>');
|
||||
$('.main .ticket_customer_response td:nth-child(2)').html('<span class="badge badge-warning"><i class="fas fa-exclamation-triangle mr-1"></i>'+$('.main .ticket_customer_response td:nth-child(2)').html()+'</span>');
|
||||
}else
|
||||
{
|
||||
$('.main .ticket_admin_response td:nth-child(2)').html('<span class="badge badge-warning"><i class="fas fa-exclamation-triangle mr-1"></i>'+$('.main .ticket_admin_response td:nth-child(2)').html()+'</span>');
|
||||
$('.main .ticket_customer_response td:nth-child(2)').html('<span class="badge badge-secondary"><i class="fas fa-comment-dots mr-1"></i>'+$('.main .ticket_customer_response td:nth-child(2)').html()+'</span>');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('.main .ticketRow a').prepend('<i class="fas fa-angle-double-right mr-1 text-sm"></i>');
|
||||
});
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
input.star {
|
||||
display: none;
|
||||
}
|
||||
|
||||
label.star {
|
||||
float: right;
|
||||
transition: all .2s;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
input.star:checked ~ label.star:before {
|
||||
content: '\2605';
|
||||
color: #FD4;
|
||||
transition: all .25s;
|
||||
}
|
||||
|
||||
input.star-1:checked ~ label.star:before {
|
||||
color: #F62;
|
||||
}
|
||||
|
||||
label.star:hover {
|
||||
transform: rotate(-15deg) scale(1.3);
|
||||
}
|
||||
|
||||
label.star:before {
|
||||
content: '\2605';
|
||||
}
|
||||
|
||||
|
||||
.attachment_add {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.attachment_inputs > .custom-file {
|
||||
margin-right: 0.4rem;
|
||||
}
|
||||
|
||||
.attachment_info {
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
.direct-chat {
|
||||
max-height: calc(100% - 1rem);
|
||||
overflow: scroll;
|
||||
}
|
||||
.direct-chat-messages
|
||||
{
|
||||
max-height: 600px;
|
||||
height: auto !important;
|
||||
}
|
||||
.direct-chat-footer
|
||||
{
|
||||
font-size: 0.8rem;
|
||||
opacity: 0.8;
|
||||
}
|
||||
.direct-chat-msg.right .direct-chat-footer
|
||||
{
|
||||
padding-right: 55px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
.direct-chat-msg:not(.right) .direct-chat-footer
|
||||
{
|
||||
padding-left: 55px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
.footer_row:not(.attachmentContainer) .left,
|
||||
.footer_row:not(.attachmentContainer) .right
|
||||
{
|
||||
display: inline-block;
|
||||
}
|
||||
.direct-chat-footer .footer_row:not(.attachmentContainer) .right
|
||||
{
|
||||
float: right;
|
||||
}
|
||||
|
|
@ -1,191 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
//prepare main row for side by side layout
|
||||
$('section.content > .container-fluid > .row > .col-12').addClass('col-md-6');
|
||||
|
||||
//replace css table with real table
|
||||
$('.divTableCell').each(function()
|
||||
{
|
||||
$(this).replaceWith('<td>'+$(this).html()+'</td>');
|
||||
});
|
||||
$('.divTableRow').each(function()
|
||||
{
|
||||
$(this).replaceWith('<tr>'+$(this).html()+'</tr>');
|
||||
});
|
||||
$('.divTableBody').each(function()
|
||||
{
|
||||
$(this).replaceWith('<tbody>'+$(this).html()+'</tbody>');
|
||||
});
|
||||
$('.divTable').each(function()
|
||||
{
|
||||
$(this).replaceWith('<table>'+$(this).html()+'</table>');
|
||||
});
|
||||
|
||||
//buttons
|
||||
$('#add_file_attachment').addClass('btn-secondary');
|
||||
$('[name="ticket_close"]').addClass('btn-danger');
|
||||
|
||||
if($('.ticket_closed').length>0)
|
||||
{
|
||||
$('.ticket_closed').wrap('<div class="callout callout-danger mt-2"><p></p></div>');
|
||||
|
||||
var newReplyBox = '\
|
||||
<div class="card collapsed-card">\
|
||||
<div class="card-header" data-card-widget="collapse" role="button">\
|
||||
<h3 class="card-title">'+$('#toggleNoticeMessage').text()+'\</h3>\
|
||||
<div class="card-tools">\
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse"> \
|
||||
<i class="fas fa-plus"></i>\
|
||||
</button>\
|
||||
</div>\
|
||||
</div>\
|
||||
<div class="card-body" style="display: none;">\
|
||||
'+$('.ticket_ReplyBox').html()+'\
|
||||
</div>\
|
||||
</div>\
|
||||
';
|
||||
|
||||
$('.ticket_reply_notice').remove();
|
||||
$('.ticket_ReplyBox').replaceWith(newReplyBox);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(window).load(function()
|
||||
{
|
||||
//replace direct chat
|
||||
var username = $('.user-panel > .info > a').text();
|
||||
var allChats = [];
|
||||
$('.ticket_reply').each(function()
|
||||
{
|
||||
if($(this).hasClass('admin'))
|
||||
{
|
||||
var isAdmin = true
|
||||
}else
|
||||
{
|
||||
var isAdmin = false
|
||||
}
|
||||
|
||||
if($(this).find('.name').find('a').text()==username)
|
||||
{
|
||||
var direction = 'left'
|
||||
}else
|
||||
{
|
||||
var direction = 'right'
|
||||
}
|
||||
|
||||
// add text-dark class to userlink
|
||||
$(this).find('.name').find('a').addClass('text-dark');
|
||||
|
||||
var date = $(this).find('.date').text().replace(/\s+/g, ' ').trim();
|
||||
var user = $(this).find('.name').html().replace(/\s+/g, ' ').trim();
|
||||
var message = $(this).find('.message').html().trim();
|
||||
var footer = $(this).find('.ticket_footer').html().trim();
|
||||
|
||||
//Create chatItem object for current reply
|
||||
var chatItem = {
|
||||
direction: direction,
|
||||
isAdmin: isAdmin,
|
||||
date: date,
|
||||
user: user,
|
||||
message: message,
|
||||
footer: footer
|
||||
};
|
||||
|
||||
//Push chatItem object into allChats array
|
||||
allChats.push(chatItem);
|
||||
});
|
||||
|
||||
//remove .replyContainer
|
||||
$('.replyContainer').remove();
|
||||
|
||||
var newReplyContainer = '\
|
||||
<div class="col-12 col-md-6">\
|
||||
<div class="card card-primary direct-chat direct-chat-primary">\
|
||||
<div class="card-body p-2">\
|
||||
<div class="direct-chat-messages">\
|
||||
';
|
||||
|
||||
Object.keys(allChats).forEach(function(key)
|
||||
{
|
||||
var isAdmin = '';
|
||||
if(allChats[key]['isAdmin'])
|
||||
{
|
||||
isAdmin = '<span class="badge badge-danger mx-1">Admin</span>';
|
||||
}
|
||||
|
||||
var avatarUrl = 'themes/AdminLTE/dist/img/default-avatar.png';
|
||||
var avatarUserId = new URLSearchParams($($.parseHTML(allChats[key]['user'])).filter('a').attr('href')).get('user_id');
|
||||
if(!localStorage.getItem('avatar_' + avatarUserId))
|
||||
{
|
||||
// load avatar from db
|
||||
$.ajax({
|
||||
cache: false,
|
||||
async: false,
|
||||
type: 'GET',
|
||||
url: 'themes/AdminLTE/dist/php/settings.php?m=user&p=getavatar&userid=' + avatarUserId,
|
||||
success: function(avatar)
|
||||
{
|
||||
// create avatar cookie
|
||||
localStorage.setItem('avatar_' + avatarUserId, avatar);
|
||||
|
||||
// set user avatar
|
||||
avatarUrl = avatar;
|
||||
}
|
||||
});
|
||||
}else
|
||||
{
|
||||
// read user avatar cookie value
|
||||
avatarUrl = localStorage.getItem('avatar_' + avatarUserId);
|
||||
}
|
||||
|
||||
if(allChats[key]['direction']=='left')
|
||||
{
|
||||
newReplyContainer += '\
|
||||
<div class="direct-chat-msg">\
|
||||
<div class="direct-chat-infos clearfix">\
|
||||
<span class="direct-chat-name float-left font-weight-bold">' + allChats[key]['user'] + isAdmin + '</span>\
|
||||
<span class="direct-chat-timestamp float-right">' + allChats[key]['date'] + '</span>\
|
||||
</div>\
|
||||
<img class="direct-chat-img" src="' + avatarUrl + '" data-userid="' + avatarUserId + '" alt="message user image">\
|
||||
<div class="direct-chat-text">\
|
||||
' + allChats[key]['message'] + '\
|
||||
</div>\
|
||||
<div class="direct-chat-footer">\
|
||||
' + allChats[key]['footer'] + '\
|
||||
</div>\
|
||||
</div>\
|
||||
';
|
||||
}else
|
||||
{
|
||||
newReplyContainer += '\
|
||||
<div class="direct-chat-msg right">\
|
||||
<div class="direct-chat-infos clearfix">\
|
||||
<span class="direct-chat-name float-right font-weight-bold">' + isAdmin + allChats[key]['user'] + '</span>\
|
||||
<span class="direct-chat-timestamp float-left">' + allChats[key]['date'] + '</span>\
|
||||
</div>\
|
||||
<img class="direct-chat-img" src="' + avatarUrl + '" data-userid="' + avatarUserId + '" alt="message user image">\
|
||||
<div class="direct-chat-text">\
|
||||
' + allChats[key]['message'] + '\
|
||||
</div>\
|
||||
<div class="direct-chat-footer">\
|
||||
' + allChats[key]['footer'] + '\
|
||||
</div>\
|
||||
</div>\
|
||||
';
|
||||
}
|
||||
});
|
||||
|
||||
newReplyContainer += '\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
';
|
||||
|
||||
$('section.content > .container-fluid > .row').append(newReplyContainer);
|
||||
$('.downloadAttachmentLink').addClass('btn btn-primary btn-sm')
|
||||
|
||||
// reload body scripts after dom modify
|
||||
reloadBodyScripts();
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
.main i.fa.fa-folder-open {
|
||||
color: #ffe699;
|
||||
}
|
||||
|
||||
.main .table tr > td:first-of-type {
|
||||
width: 3rem;
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('.main [href="?m=update"]').addClass('btn btn-xs btn-primary');
|
||||
|
||||
$('.main img[src^="images"]').each(function()
|
||||
{
|
||||
if($(this).attr('src')=='images/folder.png')
|
||||
{
|
||||
var icon = '<i class="fa fa-folder-open mr-1"></i>';
|
||||
}else
|
||||
{
|
||||
var icon = '<i class="fas fa-pencil-alt mr-1"></i>'
|
||||
}
|
||||
|
||||
if($(this).next('a').length>0)
|
||||
{
|
||||
var content = '<a href="' + $(this).next('a').attr('href') + '" class="text-dark badge">' + $(this).next('a').text() + '</a>';
|
||||
}else
|
||||
{
|
||||
var content = '<span class="text-dark badge">' + $(this).parent('td').text() + '</span>';
|
||||
}
|
||||
|
||||
$(this).parent('td').html(icon + content);
|
||||
});
|
||||
|
||||
$('.main a[href$="&back"]').each(function()
|
||||
{
|
||||
$(this).addClass('btn btn-xs btn-secondary').text('.. ' + langConsts['OGP_LANG_level_up'].replace(/\^/g, '')).prepend('<i class="fas fa-level-up-alt mr-1"></i>');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
.badge.badge-primary {
|
||||
font-size: 94%;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
$(document).ready(function() {
|
||||
$('.card-body [href="?m=update&p=blacklist"], .card-body [href*="commits"]').addClass('btn btn-sm btn-primary');
|
||||
$('.card-body [href*="commit"]:not([href*="commits"])').addClass('label label-primary');
|
||||
|
||||
$('.card-body ul > br').remove();
|
||||
$('.card-body ul').addClass('list-group');
|
||||
$('.card-body li').addClass('list-group-item');
|
||||
});
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
$(document).ready(function() {
|
||||
$('.main p:first-of-type').addClass('alert').addClass('alert-danger');
|
||||
$('.main [href$="&y=y"]').addClass('btn').addClass('btn-sm').addClass('btn-danger');
|
||||
$('.main [href="?m=user_admin"]').addClass('btn').addClass('btn-sm').addClass('btn-primary');
|
||||
});
|
||||
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
select[name="days"],
|
||||
select[name="month"],
|
||||
select[name="years"],
|
||||
select[name="hours"],
|
||||
select[name="minutes"]
|
||||
{
|
||||
max-width: 70px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
.main li,
|
||||
.main ul
|
||||
{
|
||||
list-style: none;
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
.left {
|
||||
text-align: left;
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
$(document).ready(function() {
|
||||
$('[href^="?m=user_games&p=assign&group_id="]').addClass('btn').addClass('btn-xs').addClass('btn-primary');
|
||||
$('[href^="?m=user_admin&p=del_group&group_id="]').addClass('btn').addClass('btn-xs').addClass('btn-danger');
|
||||
|
||||
$('[href^="?m=user_admin&p=del_from_group&group_id="]').addClass('btn').addClass('btn-xs').addClass('btn-danger');
|
||||
|
||||
/* *** Replace UL / LI with Table *** */
|
||||
var ul = $(".main ul");
|
||||
$(ul).each(function(){
|
||||
var li = $(this).find("li");
|
||||
var tul = $(this);
|
||||
$(li).each(function(){
|
||||
$(this).replaceWith('<tr><td>'+$(this).html()+'</td></tr>');
|
||||
});
|
||||
$(tul).replaceWith('<table>'+$(tul).html()+'</table>');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
.subusersShowHide:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
.subuser td {
|
||||
border-top: 1px solid rgba(34, 37, 47, 1) !important;
|
||||
}
|
||||
.subuser > td:first-of-type,
|
||||
.subuser > td:last-of-type {
|
||||
padding: 8px 20px;
|
||||
}
|
||||
|
||||
.tr0 {
|
||||
background-color: rgba(26, 28, 34, 0.2) !important;
|
||||
}
|
||||
.tr1 {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
input[name="search"] {
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.main .img-circle {
|
||||
width: 2.1rem;
|
||||
height: 2.1rem;
|
||||
}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
var d = new Date();
|
||||
|
||||
$('.main [href="?m=user_admin&p=add"]').addClass('btn btn-sm btn-primary').prepend('<i class="fas fa-user-plus mr-1"></i>');
|
||||
$('.main [href^="?m=user_admin&p=edit_user&user_id="]').addClass('btn btn-xs btn-primary').prepend('<i class="fas fa-user-edit mr-1"></i>');
|
||||
$('.main [href^="?m=user_games&p=assign&user_id="]').addClass('btn btn-xs btn-success').prepend('<i class="fas fa-plus-square mr-1"></i>');
|
||||
$('.main [href^="?m=user_admin&p=del&user_id="]').addClass('btn btn-xs btn-danger').prepend('<i class="fas fa-trash-alt mr-1"></i>');
|
||||
|
||||
$('.main style').remove();
|
||||
$('.main .userListTable .actions > br').remove();
|
||||
|
||||
$('.main .userListTable tr').each(function()
|
||||
{
|
||||
if($(this).find('td:nth-child(3)').text().toLowerCase()==langConsts['OGP_LANG_user'].toLowerCase())
|
||||
{
|
||||
$(this).find('td:nth-child(3)').html('<span class="badge badge-info">'+langConsts['OGP_LANG_user']+'</span>');
|
||||
}
|
||||
else if($(this).find('td:nth-child(3)').text().toLowerCase()==langConsts['OGP_LANG_admin'].toLowerCase())
|
||||
{
|
||||
$(this).find('td:nth-child(3)').html('<span class="badge badge-danger">'+langConsts['OGP_LANG_admin']+'</span>');
|
||||
}
|
||||
|
||||
var thisUserId = $(this).attr('uid');
|
||||
var setThisUserAvatar = 'themes/AdminLTE/dist/img/default-avatar.png';
|
||||
|
||||
$(this).find('td:nth-child(2)').prepend('<img src="'+setThisUserAvatar+'" class="img-circle elevation-2 mr-2" alt="User Image">');
|
||||
|
||||
var thisUserImage = $(this).find('td:nth-child(2)').find('img');
|
||||
|
||||
if(thisUserId)
|
||||
{
|
||||
if(!localStorage.getItem('avatar_' + thisUserId))
|
||||
{
|
||||
// set loading avatar
|
||||
$(thisUserImage).attr('src', 'themes/AdminLTE/dist/img/spinner.gif?'+ d.getTime()).removeClass('elevation-2');
|
||||
|
||||
// load avatar from db
|
||||
$.ajax({
|
||||
cache: false,
|
||||
async: true,
|
||||
type: 'GET',
|
||||
url: 'themes/AdminLTE/dist/php/settings.php?m=user&p=getavatar&userid=' + thisUserId,
|
||||
success: function(avatar)
|
||||
{
|
||||
// set avatar cache
|
||||
localStorage.setItem('avatar_' + thisUserId, avatar);
|
||||
|
||||
// set user avatar
|
||||
$(thisUserImage).attr('src', avatar + "?" + d.getTime()).addClass('elevation-2');
|
||||
}
|
||||
});
|
||||
}else
|
||||
{
|
||||
// set user avatar variable
|
||||
setThisUserAvatar = localStorage.getItem('avatar_' + thisUserId);
|
||||
}
|
||||
}
|
||||
|
||||
$(thisUserImage).attr('src', setThisUserAvatar + "?" + d.getTime());
|
||||
});
|
||||
});
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('.main [href="?m=user_games"]').addClass('btn btn-primary btn-xs');
|
||||
});
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('.main [href="?m=user_admin&p=show_groups"], .main [href="?m=user_admin"]').addClass('btn btn-sm btn-primary');
|
||||
|
||||
$('input[name="unassign"]').removeClass('btn-primary').addClass('btn-danger');
|
||||
});
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
$(document).ready(function() {
|
||||
$('.main [href="?m=user_games"]').addClass('btn').addClass('btn-primary').addClass('btn-sm');
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
$(document).ready(function() {
|
||||
$('p > a').addClass('btn').addClass('btn-primary').addClass('btn-sm');
|
||||
|
||||
});
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
#deleteLink {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
$('.main > p:nth-child(1)').replaceWith('\
|
||||
<div class="row">\
|
||||
<div class="col-12">\
|
||||
<div class="callout callout-warning">\
|
||||
<p>'+$('.main > p:nth-child(1)').html()+'</p>\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
');
|
||||
|
||||
|
||||
$('.main > p:nth-child(2)').replaceWith('<table class="table table-sm table-striped"><tr><td>'+$('.main > p:nth-child(2)').html()+'</td></table>');
|
||||
$('.main td').each(function()
|
||||
{
|
||||
$(this).html($(this).html().replace('|',''));
|
||||
});
|
||||
|
||||
$('.main [href$="&files=y"]').addClass('btn btn-sm btn-danger').prepend('<i class="fas fa-trash-alt mr-1"></i>');
|
||||
$('.main [href^="?m=user_games&p=del&y=y&home_id="]').addClass('btn btn-sm btn-danger');
|
||||
$('.main [href="?m=user_games"]').addClass('btn btn-sm btn-primary');
|
||||
});
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
select[name="ip"],
|
||||
input[name="port"]
|
||||
{
|
||||
max-width: 200px;
|
||||
display: inline-block;
|
||||
margin: 0px 10px;
|
||||
}
|
||||
|
||||
#cpu_select span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
td.left select,
|
||||
td.left input {
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
td.right {
|
||||
font-weight: bold;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue