Change alert to be floating notifications popup on the top right of the screen. (Nota: i disabled the last error staying open until manually closed by personal taste that it is nicer like that)
This commit is contained in:
parent
12f161a158
commit
238caa94be
|
@ -21,18 +21,17 @@ input[type=checkbox], input[type=radio] {
|
||||||
|
|
||||||
.alerts {
|
.alerts {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 1em;
|
_position: absolute;
|
||||||
right: 1em;
|
right: 6px;
|
||||||
bottom: 1em;
|
|
||||||
z-index: 900;
|
z-index: 900;
|
||||||
margin: 0;
|
width: 40%;
|
||||||
padding: 0;
|
|
||||||
background: white;
|
|
||||||
background: rgba(255,255,255,0.7);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert {
|
.alert {
|
||||||
margin: 1em;
|
float: right;
|
||||||
border-width: 0.5ex;
|
clear: right;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fix modal overflow on low resolutions */
|
/* fix modal overflow on low resolutions */
|
||||||
|
|
|
@ -219,8 +219,8 @@
|
||||||
<!-- {{{ alerts -->
|
<!-- {{{ alerts -->
|
||||||
<div ng-controller="AlertCtrl" class="row-fluid alerts">
|
<div ng-controller="AlertCtrl" class="row-fluid alerts">
|
||||||
<div class="alert alert-{{alert.type}}" ng-repeat="alert in pendingAlerts">
|
<div class="alert alert-{{alert.type}}" ng-repeat="alert in pendingAlerts">
|
||||||
<span ng-bind-html="alert.msg"></span>
|
|
||||||
<button type="button" class="close" ng-click="removeAlert($index)">x</button>
|
<button type="button" class="close" ng-click="removeAlert($index)">x</button>
|
||||||
|
<span ng-bind-html="alert.msg"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- }}} -->
|
<!-- }}} -->
|
||||||
|
|
|
@ -23,10 +23,10 @@ angular.module('webui.ctrls.alert', [
|
||||||
scope.pendingAlerts[ind].expired = true;
|
scope.pendingAlerts[ind].expired = true;
|
||||||
|
|
||||||
// only remove if more notifications are pending in the pipeline
|
// only remove if more notifications are pending in the pipeline
|
||||||
if (scope.pendingAlerts.length > 1)
|
if (scope.pendingAlerts.length > 0)
|
||||||
scope.removeAlert(ind);
|
scope.removeAlert(ind);
|
||||||
}
|
}
|
||||||
}, type == "error" ? 10000 : 3000);
|
}, type == "error" ? 15000 : 5000);
|
||||||
|
|
||||||
scope.$digest();
|
scope.$digest();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user