[Web] Remove sidebars from admin
parent
a37b4c1b1c
commit
c93b320be6
|
@ -13,11 +13,27 @@ if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CAC
|
|||
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="active"><a href="#tab-access" aria-controls="tab-access" role="tab" data-toggle="tab"><?=$lang['admin']['access'];?></a></li>
|
||||
<li role="presentation"><a href="#tab-config" aria-controls="tab-config" role="tab" data-toggle="tab"><?=$lang['admin']['configuration'];?></a></li>
|
||||
<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['admin']['configuration'];?>
|
||||
<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li role="presentation"><a href="#tab-config-dkim" aria-controls="tab-config-dkim" role="tab" data-toggle="tab"><?=$lang['admin']['dkim_keys'];?></a></li>
|
||||
<li role="presentation"><a href="#tab-config-fwdhosts" aria-controls="tab-config-fwdhosts" role="tab" data-toggle="tab"><?=$lang['admin']['forwarding_hosts'];?></a></li>
|
||||
<li role="presentation"><a href="#tab-config-f2b" aria-controls="tab-config-f2b" role="tab" data-toggle="tab"><?=$lang['admin']['f2b_parameters'];?></a></li>
|
||||
<li role="presentation"><a href="#tab-config-quarantine" aria-controls="tab-config-quarantine" role="tab" data-toggle="tab"><?=$lang['admin']['quarantine'];?></a></li>
|
||||
<li role="presentation"><a href="#tab-config-quota" aria-controls="tab-config-quota" role="tab" data-toggle="tab"><?=$lang['admin']['quota_notifications'];?></a></li>
|
||||
<li role="presentation"><a href="#tab-config-rsettings" aria-controls="tab-config-rsettings" role="tab" data-toggle="tab"><?=$lang['admin']['rspamd_settings_map'];?></a></li>
|
||||
<li role="presentation"><a href="#tab-config-customize" aria-controls="tab-config-customize" role="tab" data-toggle="tab"><?=$lang['admin']['customize'];?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li role="presentation"><a href="#tab-routing" aria-controls="tab-routing" role="tab" data-toggle="tab"><?=$lang['admin']['routing'];?></a></li>
|
||||
<li role="presentation"><a href="#tab-sys-mails" aria-controls="tab-sys-mails" role="tab" data-toggle="tab"><?=$lang['admin']['sys_mails'];?></a></li>
|
||||
<li role="presentation"><a href="#tab-mailq" aria-controls="tab-mailq" role="tab" data-toggle="tab"><?=$lang['admin']['queue_manager'];?></a></li>
|
||||
<li role="presentation"><a href="#tab-rspamdmaps" aria-controls="tab-rspamdmaps" role="tab" data-toggle="tab"><?=$lang['admin']['rspamd_global_filters'];?></a></li>
|
||||
<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['admin']['rspamd_global_filters'];?>
|
||||
<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li role="presentation"><a href="#tab-globalfilter-regex" aria-controls="tab-globalfilter-regex" role="tab" data-toggle="tab">Regex maps</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="row">
|
||||
|
@ -413,22 +429,7 @@ if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CAC
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div role="tabpanel" class="tab-pane" id="tab-config">
|
||||
<div class="row">
|
||||
<div id="sidebar-admin-config" class="col-sm-3 hidden-xs">
|
||||
<div id="scrollbox-config" class="list-group">
|
||||
<a href="#dkim" class="list-group-item"><?=$lang['admin']['dkim_keys'];?></a>
|
||||
<a href="#fwdhosts" class="list-group-item"><?=$lang['admin']['forwarding_hosts'];?></a>
|
||||
<a href="#f2bparams" class="list-group-item"><?=$lang['admin']['f2b_parameters'];?></a>
|
||||
<a href="#quarantine" class="list-group-item"><?=$lang['admin']['quarantine'];?></a>
|
||||
<a href="#quota" class="list-group-item"><?=$lang['admin']['quota_notifications'];?></a>
|
||||
<a href="#rsettings" class="list-group-item"><?=$lang['admin']['rspamd_settings_map'];?></a>
|
||||
<a href="#customize" class="list-group-item"><?=$lang['admin']['customize'];?></a>
|
||||
<a href="#top" class="list-group-item" style="border-top:1px dashed #dadada">↸ <?=$lang['admin']['to_top'];?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<span class="anchor" id="dkim"></span>
|
||||
<div role="tabpanel" class="tab-pane" id="tab-config-dkim">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><?=$lang['admin']['dkim_keys'];?></div>
|
||||
<div class="panel-body">
|
||||
|
@ -620,11 +621,11 @@ if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CAC
|
|||
<button class="btn btn-sm btn-default" data-action="add_item" data-id="dkim_duplicate" data-api-url='add/dkim_duplicate' data-api-attr='{}' href="#"><span class="glyphicon glyphicon-duplicate"></span> <?=$lang['admin']['duplicate'];?></button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span class="anchor" id="fwdhosts"></span>
|
||||
<div role="tabpanel" class="tab-pane" id="tab-config-fwdhosts">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><?=$lang['admin']['forwarding_hosts'];?></div>
|
||||
<div class="panel-body">
|
||||
|
@ -661,8 +662,9 @@ if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CAC
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span class="anchor" id="f2bparams"></span>
|
||||
<div role="tabpanel" class="tab-pane" id="tab-config-f2b">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><?=$lang['admin']['f2b_parameters'];?></div>
|
||||
<div class="panel-body">
|
||||
|
@ -752,8 +754,9 @@ if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CAC
|
|||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span class="anchor" id="quarantine"></span>
|
||||
<div role="tabpanel" class="tab-pane" id="tab-config-quarantine">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><?=$lang['admin']['quarantine'];?></div>
|
||||
<div class="panel-body">
|
||||
|
@ -847,8 +850,9 @@ if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CAC
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span class="anchor" id="quota"></span>
|
||||
<div role="tabpanel" class="tab-pane" id="tab-config-quota">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><?=$lang['admin']['quota_notifications'];?></div>
|
||||
<div class="panel-body">
|
||||
|
@ -895,8 +899,9 @@ if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CAC
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span class="anchor" id="rsettings"></span>
|
||||
<div role="tabpanel" class="tab-pane" id="tab-config-rsettings">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><?=$lang['admin']['rspamd_settings_map'];?></div>
|
||||
<div class="panel-body">
|
||||
|
@ -982,8 +987,9 @@ if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CAC
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span class="anchor" id="customize"></span>
|
||||
<div role="tabpanel" class="tab-pane" id="tab-config-customize">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><?=$lang['admin']['customize'];?></div>
|
||||
<div class="panel-body">
|
||||
|
@ -996,7 +1002,7 @@ if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CAC
|
|||
</p>
|
||||
</form>
|
||||
<?php
|
||||
if ($main_logo = customize('get', 'main_logo')):
|
||||
if ($main_logo = customize('get', 'main_logo')) {
|
||||
$specs = customize('get', 'main_logo_specs');
|
||||
?>
|
||||
<div class="row">
|
||||
|
@ -1015,9 +1021,7 @@ if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CAC
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<?php } ?>
|
||||
<legend><?=$lang['admin']['app_links'];?></legend>
|
||||
<p class="help-block"><?=$lang['admin']['merged_vars_hint'];?></p>
|
||||
<form class="form-inline" data-id="app_links" role="form" method="post">
|
||||
|
@ -1030,7 +1034,7 @@ if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CAC
|
|||
<?php
|
||||
$app_links = customize('get', 'app_links');
|
||||
foreach ($app_links as $row) {
|
||||
foreach ($row as $key => $val):
|
||||
foreach ($row as $key => $val) {
|
||||
?>
|
||||
<tr>
|
||||
<td><input class="input-sm form-control" data-id="app_links" type="text" name="app" required value="<?=$key;?>"></td>
|
||||
|
@ -1038,18 +1042,16 @@ if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CAC
|
|||
<td><a href="#" role="button" class="btn btn-xs btn-default" type="button"><?=$lang['admin']['remove_row'];?></a></td>
|
||||
</tr>
|
||||
<?php
|
||||
endforeach;
|
||||
}
|
||||
foreach ($MAILCOW_APPS as $app):
|
||||
}
|
||||
foreach ($MAILCOW_APPS as $app) {
|
||||
?>
|
||||
<tr>
|
||||
<td><input class="input-sm form-control" value="<?=htmlspecialchars($app['name']);?>" disabled></td>
|
||||
<td><input class="input-sm form-control" value="<?=htmlspecialchars($app['link']);?>" disabled></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
<?php } ?>
|
||||
</table>
|
||||
<p><div class="btn-group">
|
||||
<button class="btn btn-sm btn-success" data-action="edit_selected" data-item="admin" data-id="app_links" data-reload="no" data-api-url='edit/app_links' data-api-attr='{}' href="#"><span class="glyphicon glyphicon-check"></span> <?=$lang['admin']['save'];?></button>
|
||||
|
@ -1099,8 +1101,6 @@ if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CAC
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div role="tabpanel" class="tab-pane" id="tab-sys-mails">
|
||||
<div class="panel panel-default">
|
||||
|
@ -1138,11 +1138,11 @@ if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CAC
|
|||
<select id="mass_exclude" name="mass_exclude[]" data-live-search="true" data-width="100%" size="30" multiple>
|
||||
<?php
|
||||
if (!empty($mailboxes)) {
|
||||
foreach (array_filter($mailboxes) as $mailbox):
|
||||
foreach (array_filter($mailboxes) as $mailbox) {
|
||||
?>
|
||||
<option><?=htmlspecialchars($mailbox);?></option>
|
||||
<?php
|
||||
endforeach;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
@ -1152,11 +1152,11 @@ if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CAC
|
|||
<select id="mass_include" name="mass_include[]" data-live-search="true" data-width="100%" size="30" multiple>
|
||||
<?php
|
||||
if (!empty($mailboxes)) {
|
||||
foreach (array_filter($mailboxes) as $mailbox):
|
||||
foreach (array_filter($mailboxes) as $mailbox) {
|
||||
?>
|
||||
<option><?=htmlspecialchars($mailbox);?></option>
|
||||
<?php
|
||||
endforeach;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
@ -1229,16 +1229,7 @@ if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CAC
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div role="tabpanel" class="tab-pane" id="tab-rspamdmaps">
|
||||
<div class="row">
|
||||
<div id="sidebar-admin-maps" class="col-sm-2 hidden-xs">
|
||||
<div id="scrollbox-maps" class="list-group">
|
||||
<a href="#regexmaps" class="list-group-item">Regex maps</a>
|
||||
<!-- <a href="#standardmaps" class="list-group-item">Standard maps</a> -->
|
||||
<a href="#top" class="list-group-item" style="border-top:1px dashed #dadada">↸ <?=$lang['admin']['to_top'];?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<div role="tabpanel" class="tab-pane" id="tab-globalfilter-regex">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<?=$lang['admin']['rspamd_global_filters'];?>
|
||||
|
@ -1294,7 +1285,6 @@ if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CAC
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- /tab-content -->
|
||||
</div> <!-- /col-md-12 -->
|
||||
|
|
|
@ -53,11 +53,6 @@ body.modal-open {
|
|||
margin-top: -65px;
|
||||
visibility: hidden;
|
||||
}
|
||||
.scrollboxFixed {
|
||||
position: fixed;
|
||||
top: 65px;
|
||||
z-index: 1;
|
||||
}
|
||||
.thumbnail img {
|
||||
min-height:100px;
|
||||
height:100px;
|
||||
|
|
|
@ -456,48 +456,4 @@ jQuery(function($){
|
|||
add_table_row($('#app_link_table'));
|
||||
});
|
||||
});
|
||||
$(window).load(function(){
|
||||
$('.sidebar').affix({
|
||||
offset: {
|
||||
top: 0
|
||||
}
|
||||
}).on('affix.bs.affix',function(){
|
||||
setAffixContainerSize();
|
||||
});
|
||||
|
||||
/*Setting the width of the sidebar (I took 10px of its value which is the margin between cols in my Bootstrap CSS*/
|
||||
function setAffixContainerSize(){
|
||||
$('.sidebar').width($('.sidebar').parent().innerWidth()-10);
|
||||
}
|
||||
|
||||
$(window).resize(function(){
|
||||
setAffixContainerSize();
|
||||
});
|
||||
initial_width_config = $("#sidebar-admin-config").width();
|
||||
initial_width_maps = $("#sidebar-admin-maps").width();
|
||||
$("#scrollbox-config").css("width", initial_width_config);
|
||||
$("#scrollbox-maps").css("width", initial_width_maps);
|
||||
if (sessionStorage.scrollTop > 70) {
|
||||
$('#scrollbox-config').addClass('scrollboxFixed');
|
||||
$('#scrollbox-maps').addClass('scrollboxFixed');
|
||||
}
|
||||
$(window).bind('scroll', function() {
|
||||
if ($(window).scrollTop() > 70) {
|
||||
$('#scrollbox-config').addClass('scrollboxFixed');
|
||||
$('#scrollbox-maps').addClass('scrollboxFixed');
|
||||
} else {
|
||||
$('#scrollbox-config').removeClass('scrollboxFixed');
|
||||
$('#scrollbox-maps').removeClass('scrollboxFixed');
|
||||
}
|
||||
});
|
||||
});
|
||||
function resizeScrollbox() {
|
||||
on_resize_width_config = $("#sidebar-admin-config").width();
|
||||
on_resize_width_maps = $("#sidebar-admin-maps").width();
|
||||
$("#scrollbox-config").removeAttr("style");
|
||||
$("#scrollbox-config").css("width", on_resize_width_config);
|
||||
$("#scrollbox-maps").removeAttr("style");
|
||||
$("#scrollbox-maps").css("width", on_resize_width_maps);
|
||||
}
|
||||
$(window).on('resize', resizeScrollbox);
|
||||
$('a[data-toggle="tab"]').on('shown.bs.tab', resizeScrollbox);
|
||||
|
|
Loading…
Reference in New Issue