mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-13 19:51:37 +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
|
// Append dropdown menus to body
|
||||||
var bodyScrollbarWidth,
|
var bodyScrollbarWidth,
|
||||||
bodyDropdownMenu;
|
bodyDropdownMenu,
|
||||||
|
bodyDropdownMenuParent;
|
||||||
var dropdownHelpers = {
|
var dropdownHelpers = {
|
||||||
scrollbarWidth: function () {
|
scrollbarWidth: function () {
|
||||||
if (!bodyScrollbarWidth) {
|
if (!bodyScrollbarWidth) {
|
||||||
@ -76,7 +77,7 @@ angular
|
|||||||
};
|
};
|
||||||
|
|
||||||
$(window).on('show.bs.dropdown', function (e) {
|
$(window).on('show.bs.dropdown', function (e) {
|
||||||
var target = $(e.target);
|
var target = bodyDropdownMenuParent = $(e.target);
|
||||||
if (!target.hasClass('dropdown-to-body')) {
|
if (!target.hasClass('dropdown-to-body')) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -110,12 +111,24 @@ angular
|
|||||||
});
|
});
|
||||||
|
|
||||||
$(window).on('hide.bs.dropdown', function (e) {
|
$(window).on('hide.bs.dropdown', function (e) {
|
||||||
var target = $(e.target);
|
if (!bodyDropdownMenu) {
|
||||||
if (!target.hasClass('dropdown-to-body')) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
target.append(bodyDropdownMenu.detach());
|
$(e.target).append(bodyDropdownMenu.detach());
|
||||||
bodyDropdownMenu.hide();
|
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.delete = function (i) {
|
||||||
$scope.equivalentDomains.splice(i, 1);
|
$scope.equivalentDomains.splice(i, 1);
|
||||||
|
$scope.$emit('removeBodyDropdownMenu');
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.addEdit = function (i) {
|
$scope.addEdit = function (i) {
|
||||||
|
@ -9,28 +9,36 @@
|
|||||||
<form name="customForm" ng-submit="customForm.$valid && saveCustom()" api-form="customPromise">
|
<form name="customForm" ng-submit="customForm.$valid && saveCustom()" api-form="customPromise">
|
||||||
<div class="box box-default">
|
<div class="box box-default">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title">Custom Equivalent Domains</h3>
|
<h3 class="box-title">Custom <span class="hidden-xs">Equivalent Domains</span></h3>
|
||||||
<div class="box-tools pull-right">
|
<div class="box-tools">
|
||||||
<button type="button" class="btn btn-box-tool" ng-click="addEdit(null)">
|
<button type="button" class="btn btn-primary btn-sm btn-flat" ng-click="addEdit(null)">
|
||||||
<i class="fa fa-plus-circle"></i> Add New
|
<i class="fa fa-fw fa-plus-circle"></i> New Domain
|
||||||
</button>
|
|
||||||
<button type="button" class="btn btn-box-tool" data-widget="collapse" title="Collapse/Expand">
|
|
||||||
<i class="fa fa-minus"></i>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-body no-padding">
|
<div class="box-body no-padding">
|
||||||
<div class="table-responsive">
|
<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">
|
<tbody ng-if="equivalentDomains.length">
|
||||||
<tr ng-repeat="customDomain in equivalentDomains track by $index">
|
<tr ng-repeat="customDomain in equivalentDomains track by $index">
|
||||||
<td style="width: 80px; min-width: 80px;">
|
<td style="width: 70px;">
|
||||||
<button type="button" class="btn btn-link btn-table" title="Edit" ng-click="addEdit($index)">
|
<div class="btn-group dropdown-to-body">
|
||||||
<i class="fa fa-lg fa-pencil"></i>
|
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||||
</button>
|
<i class="fa fa-cog"></i> <span class="caret"></span>
|
||||||
<button type="button" class="btn btn-link btn-table" title="Delete" ng-click="delete($index)">
|
|
||||||
<i class="fa fa-lg fa-trash"></i>
|
|
||||||
</button>
|
</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>
|
||||||
<td>{{customDomain}}</td>
|
<td>{{customDomain}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -54,33 +62,40 @@
|
|||||||
<form name="globalForm" ng-submit="globalForm.$valid && saveGlobal()" api-form="globalPromise">
|
<form name="globalForm" ng-submit="globalForm.$valid && saveGlobal()" api-form="globalPromise">
|
||||||
<div class="box box-default">
|
<div class="box box-default">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title">Global Equivalent Domains</h3>
|
<h3 class="box-title">Global <span class="hidden-xs">Equivalent Domains</span></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>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="box-body no-padding">
|
<div class="box-body no-padding">
|
||||||
<div class="table-responsive">
|
<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">
|
<tbody ng-if="globalEquivalentDomains.length">
|
||||||
<tr ng-repeat="globalDomain in globalEquivalentDomains">
|
<tr ng-repeat="globalDomain in globalEquivalentDomains">
|
||||||
<td style="width: 80px; min-width: 80px;">
|
<td style="width: 70px;">
|
||||||
<button type="button" class="btn btn-link btn-table" title="Exclude"
|
<div class="btn-group dropdown-to-body">
|
||||||
ng-if="!globalDomain.excluded" ng-click="toggleExclude(globalDomain)">
|
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||||
<i class="fa fa-lg fa-ban"></i>
|
<i class="fa fa-cog"></i> <span class="caret"></span>
|
||||||
</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>
|
</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>
|
||||||
<td ng-class="{strike: globalDomain.excluded}">{{globalDomain.domains}}</td>
|
<td ng-class="{strike: globalDomain.excluded}">{{::globalDomain.domains}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
<tbody ng-if="!globalEquivalentDomains.length">
|
<tbody ng-if="!globalEquivalentDomains.length">
|
||||||
|
Loading…
Reference in New Issue
Block a user