admin: replace notifications with bootstrap toast
This commit is contained in:
parent
3bc8d7064b
commit
45069d4fbb
3 changed files with 133 additions and 160 deletions
|
@ -111,20 +111,12 @@ const indextpl = `<!DOCTYPE html>
|
|||
<div class="progress-bar bg-secondary" role="progressbar" style="width: {{ "{{timeProgression * 100}}" }}%"></div>
|
||||
</div>
|
||||
|
||||
<div class="container" ng-controller="DIWEBoxController" style="position:fixed;z-index:10;width:50vw;left:25vw;bottom:0;" ng-cloak>
|
||||
<div ng-repeat="box in boxes" class="alert alert-dismissible alert-{{"{{ box.kind }}"}}" ng-cloak>
|
||||
<button type="button" class="close" aria-label="Close" ng-click="box.cancel()"><span aria-hidden="true">×</span></button>
|
||||
<strong ng-if="box.title" ng-bind="box.title"></strong> <span ng-bind-html="box.msg"></span>
|
||||
<ul ng-if="box.list">
|
||||
<li ng-repeat="i in box.list" ng-bind="i"></li>
|
||||
</ul>
|
||||
<button type="button" class="ml-2 btn btn-sm btn-success" ng-if="box.yes || box.no" ng-click="box.yes()">Yes</button>
|
||||
<button type="button" class="btn btn-sm btn-danger" ng-if="box.yes || box.no" ng-click="box.no()">No</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container mt-1" ng-view></div>
|
||||
|
||||
<div style="position: fixed; top: 60px; right: 0; z-index: 10; min-width: 30vw;">
|
||||
<toast ng-repeat="toast in toasts" yes-no="toast.yesFunc || toast.noFunc" onyes="toast.yesFunc" onno="toast.noFunc" date="toast.date" msg="toast.msg" timeout="toast.timeout" title="toast.title" variant="toast.variant"></toast>
|
||||
</div>
|
||||
|
||||
<script src="/js/jquery.min.js"></script>
|
||||
<script src="js/popper.min.js"></script>
|
||||
<script src="/js/bootstrap.min.js"></script>
|
||||
|
|
Reference in a new issue