improve admin git info card
This commit is contained in:
@@ -971,6 +971,10 @@ html, body {
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
.admin_ajax_gitfield_error {
|
||||
color: #FF0000;
|
||||
}
|
||||
|
||||
/* 400px */
|
||||
#loginform div {
|
||||
display: flex;
|
||||
|
||||
1
www/data/css/styles.min.css
vendored
1
www/data/css/styles.min.css
vendored
@@ -188,6 +188,7 @@ html,body{margin:0;padding:0;height:100%}
|
||||
.boxedcontent.graybox .bc_data{padding-top:2px;padding-bottom:2px}
|
||||
.boxedcontent.successbox{background-color:#168b00;color:#222;border:1px solid #444;font-weight:bold;text-align:center}
|
||||
.boxedcontent.successbox .bc_data{padding-top:2px;padding-bottom:2px}
|
||||
.admin_ajax_gitfield_error{color:red}
|
||||
#loginform div{display:flex;flex-direction:column}
|
||||
#loginform div button{margin:10px 0;padding:0}
|
||||
.loginerror{display:flex;background:#f44;color:#222;border:1px solid #a44;border-radius:2px;font-weight:bold;padding:0 5px;margin:5px 0 20px 0}
|
||||
|
||||
@@ -136,3 +136,7 @@
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.admin_ajax_gitfield_error {
|
||||
color: $COL_ADMIN_ERROR;
|
||||
}
|
||||
@@ -148,8 +148,33 @@ function refreshSingle(apibutton, then)
|
||||
});
|
||||
}
|
||||
|
||||
function queryGitField(dest)
|
||||
{
|
||||
const ddest = $(dest);
|
||||
|
||||
let config =
|
||||
{
|
||||
url: '/api/site::gitinfo?field=' + ddest.attr('data-ajax_gitfield'),
|
||||
type: 'GET',
|
||||
dataType: 'text',
|
||||
cache : false,
|
||||
};
|
||||
|
||||
$.ajax(config)
|
||||
.done((data, status, xhr) =>
|
||||
{
|
||||
ddest.text(data);
|
||||
})
|
||||
.fail((xhr, status, err) =>
|
||||
{
|
||||
ddest.addClass('admin_ajax_gitfield_error');
|
||||
ddest.text('ERROR');
|
||||
});
|
||||
}
|
||||
|
||||
$(function()
|
||||
{
|
||||
for (let apibutton of $('.selftest_sequential').toArray()) setTimeout(() => refreshConsistencyDisplaySequential(0), 200);
|
||||
for (let apibutton of $('.selftest_parallel').toArray()) setTimeout(() => refreshConsistencyDisplayParallel(), 200);
|
||||
for (let elem of $('.selftest_sequential').toArray()) setTimeout(() => refreshConsistencyDisplaySequential(0), 200);
|
||||
for (let elem of $('.selftest_parallel').toArray()) setTimeout(() => refreshConsistencyDisplayParallel(), 200);
|
||||
for (let elem of $('.admin_ajax_gitfield').toArray()) setTimeout(() => queryGitField(elem), 0);
|
||||
});
|
||||
Reference in New Issue
Block a user