mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-26 17:08:33 +01:00
domain rules style updates
This commit is contained in:
parent
cdc06a2b49
commit
6825967cb9
@ -54,7 +54,8 @@ angular
|
||||
|
||||
// Append dropdown menus to body
|
||||
var bodyScrollbarWidth,
|
||||
bodyDropdownMenu;
|
||||
bodyDropdownMenu,
|
||||
bodyDropdownMenuParent;
|
||||
var dropdownHelpers = {
|
||||
scrollbarWidth: function () {
|
||||
if (!bodyScrollbarWidth) {
|
||||
@ -76,7 +77,7 @@ angular
|
||||
};
|
||||
|
||||
$(window).on('show.bs.dropdown', function (e) {
|
||||
var target = $(e.target);
|
||||
var target = bodyDropdownMenuParent = $(e.target);
|
||||
if (!target.hasClass('dropdown-to-body')) {
|
||||
return true;
|
||||
}
|
||||
@ -110,12 +111,24 @@ angular
|
||||
});
|
||||
|
||||
$(window).on('hide.bs.dropdown', function (e) {
|
||||
var target = $(e.target);
|
||||
if (!target.hasClass('dropdown-to-body')) {
|
||||
if (!bodyDropdownMenu) {
|
||||
return true;
|
||||
}
|
||||
|
||||
target.append(bodyDropdownMenu.detach());
|
||||
$(e.target).append(bodyDropdownMenu.detach());
|
||||
bodyDropdownMenu.hide();
|
||||
bodyDropdownMenu = null;
|
||||
bodyDropdownMenuParent = null;
|
||||
});
|
||||
|
||||
$scope.$on('removeBodyDropdownMenu', function (event, args) {
|
||||
if (!bodyDropdownMenu && !bodyDropdownMenuParent) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bodyDropdownMenuParent.append(bodyDropdownMenu.detach());
|
||||
bodyDropdownMenu.hide();
|
||||
bodyDropdownMenu = null;
|
||||
bodyDropdownMenuParent = null;
|
||||
});
|
||||
});
|
||||
|
@ -35,6 +35,7 @@
|
||||
|
||||
$scope.delete = function (i) {
|
||||
$scope.equivalentDomains.splice(i, 1);
|
||||
$scope.$emit('removeBodyDropdownMenu');
|
||||
};
|
||||
|
||||
$scope.addEdit = function (i) {
|
||||
|
@ -9,28 +9,36 @@
|
||||
<form name="customForm" ng-submit="customForm.$valid && saveCustom()" api-form="customPromise">
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Custom Equivalent Domains</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" ng-click="addEdit(null)">
|
||||
<i class="fa fa-plus-circle"></i> Add New
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse" title="Collapse/Expand">
|
||||
<i class="fa fa-minus"></i>
|
||||
<h3 class="box-title">Custom <span class="hidden-xs">Equivalent Domains</span></h3>
|
||||
<div class="box-tools">
|
||||
<button type="button" class="btn btn-primary btn-sm btn-flat" ng-click="addEdit(null)">
|
||||
<i class="fa fa-fw fa-plus-circle"></i> New Domain
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<table class="table table-striped table-hover table-vmiddle">
|
||||
<tbody ng-if="equivalentDomains.length">
|
||||
<tr ng-repeat="customDomain in equivalentDomains track by $index">
|
||||
<td style="width: 80px; min-width: 80px;">
|
||||
<button type="button" class="btn btn-link btn-table" title="Edit" ng-click="addEdit($index)">
|
||||
<i class="fa fa-lg fa-pencil"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-link btn-table" title="Delete" ng-click="delete($index)">
|
||||
<i class="fa fa-lg fa-trash"></i>
|
||||
</button>
|
||||
<td style="width: 70px;">
|
||||
<div class="btn-group dropdown-to-body">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-cog"></i> <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="javascript:void(0)" ng-click="addEdit($index)">
|
||||
<i class="fa fa-fw fa-pencil"></i> Edit
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0)" ng-click="delete($index)" class="text-red">
|
||||
<i class="fa fa-fw fa-trash"></i> Delete
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td>{{customDomain}}</td>
|
||||
</tr>
|
||||
@ -54,33 +62,40 @@
|
||||
<form name="globalForm" ng-submit="globalForm.$valid && saveGlobal()" api-form="globalPromise">
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Global Equivalent Domains</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse" title="Collapse/Expand">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
</div>
|
||||
<h3 class="box-title">Global <span class="hidden-xs">Equivalent Domains</span></h3>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<table class="table table-striped table-hover table-vmiddle">
|
||||
<tbody ng-if="globalEquivalentDomains.length">
|
||||
<tr ng-repeat="globalDomain in globalEquivalentDomains">
|
||||
<td style="width: 80px; min-width: 80px;">
|
||||
<button type="button" class="btn btn-link btn-table" title="Exclude"
|
||||
ng-if="!globalDomain.excluded" ng-click="toggleExclude(globalDomain)">
|
||||
<i class="fa fa-lg fa-ban"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-link btn-table" title="Include"
|
||||
ng-if="globalDomain.excluded" ng-click="toggleExclude(globalDomain)">
|
||||
<i class="fa fa-lg fa-plus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-link btn-table" title="Customize"
|
||||
ng-click="customize(globalDomain)">
|
||||
<i class="fa fa-lg fa-cut"></i>
|
||||
</button>
|
||||
<td style="width: 70px;">
|
||||
<div class="btn-group dropdown-to-body">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-cog"></i> <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="javascript:void(0)" ng-if="!globalDomain.excluded"
|
||||
ng-click="toggleExclude(globalDomain)">
|
||||
<i class="fa fa-fw fa-remove"></i> Exclude
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0)" ng-if="globalDomain.excluded"
|
||||
ng-click="toggleExclude(globalDomain)">
|
||||
<i class="fa fa-fw fa-plus"></i> Include
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0)" ng-click="customize(globalDomain)">
|
||||
<i class="fa fa-fw fa-cut"></i> Customize
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td ng-class="{strike: globalDomain.excluded}">{{globalDomain.domains}}</td>
|
||||
<td ng-class="{strike: globalDomain.excluded}">{{::globalDomain.domains}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody ng-if="!globalEquivalentDomains.length">
|
||||
|
Loading…
Reference in New Issue
Block a user