admin: improve notify with HTML, margins, ...

This commit is contained in:
nemunaire 2018-12-05 06:20:57 +01:00
parent b2e639697f
commit 4dba8dc882
2 changed files with 8 additions and 8 deletions

View File

@ -68,14 +68,14 @@ 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;">
<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">&times;</span></button>
<strong ng-if="box.title">{{"{{ box.title }}"}}</strong> {{"{{ box.msg }}"}}
<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">{{"{{ i }}"}}</li>
<li ng-repeat="i in box.list" ng-bind="i"></li>
</ul>
<button type="button" class="btn btn-sm btn-success" ng-if="box.yes || box.no" ng-click="box.yes()">Yes</button>
<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>

View File

@ -66,14 +66,14 @@
<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;">
<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">&times;</span></button>
<strong ng-if="box.title">{{ box.title }}</strong> {{ box.msg }}
<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">{{ i }}</li>
<li ng-repeat="i in box.list" ng-bind="i"></li>
</ul>
<button type="button" class="btn btn-sm btn-success" ng-if="box.yes || box.no" ng-click="box.yes()">Yes</button>
<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>