Merge pull request #568 from bergware/master

Dashboard: adjusted table positioning
This commit is contained in:
tom mortensen
2020-01-06 13:09:29 -08:00
committed by GitHub
7 changed files with 38 additions and 39 deletions

View File

@@ -182,7 +182,6 @@ SSH port:
> Enter the SSH port, default port is 22.
<?if (file_exists('/var/log/plugins/dynamix.wireguard.plg')):?>
Use UPnP:
: <select name="USE_UPNP" size="1">
<?=mk_option($var['USE_UPNP'], "yes", "Yes")?>
@@ -191,7 +190,6 @@ Use UPnP:
> Enable (default) or disable the UPnP function on the server. This function allows automatic forwarding of ports on the router, only applicable when UPnP is enabled on the router itself.
<?endif;?>
Use SSL/TLS:
: <select name="USE_SSL" size="1" onchange="updateSSL(this.form)">
<?=mk_option($var['USE_SSL'], "auto", "Auto")?>

View File

@@ -122,16 +122,15 @@ $(function(){
<form markdown="1" name="user_edit" method="POST" action="/update.htm" target="progressFrame" onsubmit="return checkUsername(this)">
User name:
: <input type="text" name="userName" maxlength="32" onKeyUp="this.form.cmdUserEdit.disabled=(this.form.userName.value=='')">
: <input type="text" name="userName" maxlength="32" onKeyUp="this.form.cmdUserEdit.disabled=(this.form.userName.value=='')" pattern="^[a-z_][a-z0-9_-]*[$]?$">
> Usernames may be up to 32 characters long and must start with a **lower case letter** or an underscore,
> followed by **lower case letters**, digits, underscores, or dashes. They can end with a dollar sign.
> In regular expression terms: `[a-z_][a-z0-9_-]*[$]?`
Description:
: <input type="text" name="userDesc" maxlength="64">
: <input type="text" name="userDesc" maxlength="64" pattern='[^&:"]*'>
> Up to 64 characters.
> Up to 64 characters. The characters ampersand (&amp;) quote (&quot;) and colon (:) are not allowed.
Custom image:
: <span id="dropbox"><?=$void?></span><em>Drag-n-drop a PNG file or click the image at the left.</em><input type="file" id="drop" accept=".png" style="display:none">

View File

@@ -131,9 +131,9 @@ User name:
: <?=htmlspecialchars($name)?>
Description:
: <input type="text" name="userDesc" maxlength="64" value="<?=htmlspecialchars($users[$name]['desc'])?>">
: <input type="text" name="userDesc" maxlength="64" value="<?=htmlspecialchars($users[$name]['desc'])?>" pattern='[^&:"]*'>
> Up to 64 characters.
> Up to 64 characters. The characters ampersand (&amp;) quote (&quot;) and colon (:) are not allowed.
Custom image:
: <span id="dropbox">
@@ -184,12 +184,12 @@ foreach ($users as $user) {
}
foreach ($shares as $share => $data) {
echo "security[\"$share\"]=\"{$sec[$share]['security']}\";\n";
echo "readList[\"$share\"]=\",{$sec[$share]['readList']},\";\n";
echo "writeList[\"$share\"]=\",{$sec[$share]['writeList']},\";\n";
echo "readList[\"$share\"]=\"{$sec[$share]['readList']}\";\n";
echo "writeList[\"$share\"]=\"{$sec[$share]['writeList']}\";\n";
}
?>
function updateAccess(form,data,n,i) {
var name = ",<?=$name?>,";
var name = "<?=$name?>";
if (data) {
if (n<i) {
$.post('/update.htm',data[n], function(){setTimeout(function(){updateAccess(form,data,++n,i);},3000);});
@@ -203,6 +203,8 @@ function updateAccess(form,data,n,i) {
$(form).find('select').each(function(){
if ($(this).prop('id')) {
var share = decodeURI($(this).prop('id'));
var read = readList[share].split(',');
var write = writeList[share].split(',');
var access = '';
data[i] = {};
data[i]['shareName'] = share;
@@ -214,12 +216,12 @@ function updateAccess(form,data,n,i) {
access = '<?=$rw?>';
break;
case 'secure':
if (','+user+',' == name) access = $(this).val();
else access = writeList[share].indexOf(name)!==-1 ? '<?=$rw?>' : '<?=$ro?>';
if (user == name) access = $(this).val();
else access = write.includes(user) ? '<?=$rw?>' : '<?=$ro?>';
break;
case 'private':
if (','+user+',' == name) access = $(this).val();
else access = writeList[share].indexOf(name)!==-1 ? '<?=$rw?>' : (readList[share].indexOf(name)!==-1 ? '<?=$ro?>' : '<?=$no?>');
if (user == name) access = $(this).val();
else access = write.includes(user) ? '<?=$rw?>' : (read.includes(user) ? '<?=$ro?>' : '<?=$no?>');
break;
}
data[i]['userAccess.'+idx] = access;

View File

@@ -225,14 +225,14 @@ table.share_status.dashboard.box3 tr td:nth-child(4){min-width:11%}
table.share_status.dashboard.box3 tr td:nth-child(5){min-width:11%}
table.share_status.dashboard.box3 tr td[colspan="4"]{min-width:93%}
@media (max-width:1680px){
table.share_status.dashboard.box1{width:44%}
table.share_status.dashboard.box2{width:52%;float:right}
table.share_status.dashboard.box3{width:52%;float:right}
table.share_status.dashboard.box1{width:45.4%;margin-left:0;margin-right:0;float:left}
table.share_status.dashboard.box2{width:53.4%;margin-left:0;margin-right:0;float:right}
table.share_status.dashboard.box3{width:53.4%;margin-left:0;margin-right:0;float:right}
}
@media (min-width:1681px){
table.share_status.dashboard.box1{width:28%}
table.share_status.dashboard.box2{width:34%;float:right}
table.share_status.dashboard.box3{width:34%;margin-left:20px}
table.share_status.dashboard.box1{width:28.6%;margin-left:0;margin-right:0;float:left}
table.share_status.dashboard.box2{width:34.6%;margin-left:0;margin-right:0;float:right}
table.share_status.dashboard.box3{width:34.6%;margin-left:20px;margin-right:0}
}
tr.alert{color:#f0000c;background-color:#ff9e9e}
tr.warn{color:#e68a00;background-color:#feefb3}

View File

@@ -215,14 +215,14 @@ table.share_status.dashboard.box3 tr td:nth-child(4){min-width:11%}
table.share_status.dashboard.box3 tr td:nth-child(5){min-width:11%}
table.share_status.dashboard.box3 tr td[colspan="4"]{min-width:93%}
@media (max-width:1680px){
table.share_status.dashboard.box1{width:44%}
table.share_status.dashboard.box2{width:52%;float:right}
table.share_status.dashboard.box3{width:52%;float:right}
table.share_status.dashboard.box1{width:45.4%;margin-left:0;margin-right:0;float:left}
table.share_status.dashboard.box2{width:53.4%;margin-left:0;margin-right:0;float:right}
table.share_status.dashboard.box3{width:53.4%;margin-left:0;margin-right:0;float:right}
}
@media (min-width:1681px){
table.share_status.dashboard.box1{width:28%}
table.share_status.dashboard.box2{width:34%;float:right}
table.share_status.dashboard.box3{width:34%;margin-left:20px}
table.share_status.dashboard.box1{width:28.6%;margin-left:0;margin-right:0;float:left}
table.share_status.dashboard.box2{width:34.6%;margin-left:0;margin-right:0;float:right}
table.share_status.dashboard.box3{width:34.6%;margin-left:22px;margin-right:0}
}
[name=arrayOps]{margin-top:12px}
span.error{color:#f0000c;background-color:#ff9e9e;display:block;width:100%}

View File

@@ -225,14 +225,14 @@ table.share_status.dashboard.box3 tr td:nth-child(4){min-width:11%}
table.share_status.dashboard.box3 tr td:nth-child(5){min-width:11%}
table.share_status.dashboard.box3 tr td[colspan="4"]{min-width:93%}
@media (max-width:1680px){
table.share_status.dashboard.box1{width:44%}
table.share_status.dashboard.box2{width:52%;float:right}
table.share_status.dashboard.box3{width:52%;float:right}
table.share_status.dashboard.box1{width:45.4%;margin-left:0;margin-right:0;float:left}
table.share_status.dashboard.box2{width:53.4%;margin-left:0;margin-right:0;float:right}
table.share_status.dashboard.box3{width:53.4%;margin-left:0;margin-right:0;float:right}
}
@media (min-width:1681px){
table.share_status.dashboard.box1{width:28%}
table.share_status.dashboard.box2{width:34%;float:right}
table.share_status.dashboard.box3{width:34%;margin-left:20px}
table.share_status.dashboard.box1{width:28.6%;margin-left:0;margin-right:0;float:left}
table.share_status.dashboard.box2{width:34.6%;margin-left:0;margin-right:0;float:right}
table.share_status.dashboard.box3{width:34.6%;margin-left:20px;margin-right:0}
}
tr.alert{color:#f0000c;background-color:#ff9e9e}
tr.warn{color:#e68a00;background-color:#feefb3}

View File

@@ -215,14 +215,14 @@ table.share_status.dashboard.box3 tr td:nth-child(4){min-width:11%}
table.share_status.dashboard.box3 tr td:nth-child(5){min-width:11%}
table.share_status.dashboard.box3 tr td[colspan="4"]{min-width:93%}
@media (max-width:1680px){
table.share_status.dashboard.box1{width:44%}
table.share_status.dashboard.box2{width:52%;float:right}
table.share_status.dashboard.box3{width:52%;float:right}
table.share_status.dashboard.box1{width:45.4%;margin-left:0;margin-right:0;float:left}
table.share_status.dashboard.box2{width:53.4%;margin-left:0;margin-right:0;float:right}
table.share_status.dashboard.box3{width:53.4%;margin-left:0;margin-right:0;float:right}
}
@media (min-width:1681px){
table.share_status.dashboard.box1{width:28%}
table.share_status.dashboard.box2{width:34%;float:right}
table.share_status.dashboard.box3{width:34%;margin-left:20px}
table.share_status.dashboard.box1{width:28.6%;margin-left:0;margin-right:0;float:left}
table.share_status.dashboard.box2{width:34.6%;margin-left:0;margin-right:0;float:right}
table.share_status.dashboard.box3{width:34.6%;margin-left:22px;margin-right:0}
}
[name=arrayOps]{margin-top:12px}
span.error{color:#f0000c;background-color:#ff9e9e;display:block;width:100%}