Fixes: notifications
This commit is contained in:
parent
d7b962607f
commit
4c190c1132
4 changed files with 38 additions and 50 deletions
45
css/main.css
45
css/main.css
|
|
@ -511,7 +511,7 @@ input[type=number]::-webkit-outer-spin-button {
|
||||||
}
|
}
|
||||||
|
|
||||||
.dr-notification-container.right {
|
.dr-notification-container.right {
|
||||||
right: 20px;
|
right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dr-notification-container.left {
|
.dr-notification-container.left {
|
||||||
|
|
@ -528,20 +528,15 @@ input[type=number]::-webkit-outer-spin-button {
|
||||||
}
|
}
|
||||||
|
|
||||||
.dr-notification-wrapper {
|
.dr-notification-wrapper {
|
||||||
width: 380px;
|
width: 360px;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dr-notification {
|
.dr-notification {
|
||||||
width: 380px;
|
width: 360px;
|
||||||
clear: both;
|
clear: both;
|
||||||
min-height: 80px;
|
height: 90px;
|
||||||
max-height: 90px;
|
|
||||||
-webkit-border-radius: 5px;
|
|
||||||
-moz-border-radius: 5px;
|
|
||||||
-ms-border-radius: 5px;
|
|
||||||
border-radius: 5px;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -551,20 +546,14 @@ input[type=number]::-webkit-outer-spin-button {
|
||||||
-ms-border-radius: 20px;
|
-ms-border-radius: 20px;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 3px;
|
padding: 5px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: -8px;
|
right: 350px;
|
||||||
top: -8px;
|
top: -8px;
|
||||||
-webkit-transition: all 0.35s cubic-bezier(0.31, 0.39, 0.21, 1.65);
|
|
||||||
-moz-transition: all 0.35s cubic-bezier(0.31, 0.39, 0.21, 1.65);
|
|
||||||
transition: all 0.35s cubic-bezier(0.31, 0.39, 0.21, 1.65);
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
.dr-notification-close-btn i {
|
|
||||||
padding-left: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dr-notification-close-btn:hover {
|
.dr-notification-close-btn:hover {
|
||||||
-webkit-transform: scale3d(1.25, 1.25, 1);
|
-webkit-transform: scale3d(1.25, 1.25, 1);
|
||||||
|
|
@ -575,13 +564,13 @@ input[type=number]::-webkit-outer-spin-button {
|
||||||
|
|
||||||
.dr-notification-image {
|
.dr-notification-image {
|
||||||
width: 80px;
|
width: 80px;
|
||||||
height: 80px;
|
height: 90px;
|
||||||
border-right: 1px solid rgba(4, 94, 123, 0.85);
|
|
||||||
float: left;
|
float: left;
|
||||||
display: block;
|
display: block;
|
||||||
font-size: 40px;
|
font-size: 40px;
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
border-right: 1px dashed #415970;
|
||||||
}
|
}
|
||||||
.dr-notification-image i {
|
.dr-notification-image i {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
@ -603,19 +592,21 @@ input[type=number]::-webkit-outer-spin-button {
|
||||||
.dr-notification-title {
|
.dr-notification-title {
|
||||||
color: white;
|
color: white;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
font-size: 16px;
|
font-size: 18px;
|
||||||
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dr-notification {
|
.dr-notification {
|
||||||
background-color: #2C3E50;
|
background-color: #34495E;
|
||||||
color: #bfe2de;
|
color: #eee;
|
||||||
border: 1px solid rgba(4, 94, 123, 0.85);
|
border: 1px solid #2C3E50;
|
||||||
opacity: 0.9;
|
opacity: 0.9;
|
||||||
|
|
||||||
}
|
}
|
||||||
.dr-notification-close-btn {
|
.dr-notification-close-btn {
|
||||||
background-color: #2C3E50;
|
background-color: #34495E;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border: 1px solid rgba(4, 94, 123, 0.85);
|
border: 1px solid #3C5269;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dr-notification-image.dr-notification-type-info {
|
.dr-notification-image.dr-notification-type-info {
|
||||||
|
|
@ -640,9 +631,9 @@ input[type=number]::-webkit-outer-spin-button {
|
||||||
|
|
||||||
.success {background-color: #1ABC9C !important;}
|
.success {background-color: #1ABC9C !important;}
|
||||||
|
|
||||||
p.dr-notification-text {
|
.dr-notification-text {
|
||||||
margin-top: -5px;
|
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
line-height: 120%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ellipsis {
|
.ellipsis {
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
<div ng-include="'views/includes/sidebar-mobile.html'"></div>
|
<div ng-include="'views/includes/sidebar-mobile.html'"></div>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
<div notifications="middle right"></div>
|
<div notifications="right top"></div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
ng-class="{'sidebar' : $root.wallet && $root.wallet.isReady()}"
|
ng-class="{'sidebar' : $root.wallet && $root.wallet.isReady()}"
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,11 @@ factory('notification', ['$timeout',
|
||||||
enabled: true
|
enabled: true
|
||||||
},
|
},
|
||||||
error: {
|
error: {
|
||||||
duration: 5000,
|
duration: 50000000,
|
||||||
enabled: true
|
enabled: true
|
||||||
},
|
},
|
||||||
success: {
|
success: {
|
||||||
duration: 5000,
|
duration: 50000000,
|
||||||
enabled: true
|
enabled: true
|
||||||
},
|
},
|
||||||
progress: {
|
progress: {
|
||||||
|
|
@ -237,24 +237,6 @@ directive('notifications', function(notification, $compile) {
|
||||||
* Finally, the directive should have its own controller for
|
* Finally, the directive should have its own controller for
|
||||||
* handling all of the notifications from the notification service
|
* handling all of the notifications from the notification service
|
||||||
*/
|
*/
|
||||||
var html =
|
|
||||||
'<div class="dr-notification-wrapper" ng-repeat="noti in queue">' +
|
|
||||||
'<div class="dr-notification-close-btn" ng-click="removeNotification(noti)">' +
|
|
||||||
'<i class="fi-x"></i>' +
|
|
||||||
'</div>' +
|
|
||||||
'<div class="dr-notification">' +
|
|
||||||
'<div class="dr-notification-image dr-notification-type-{{noti.type}}" ng-switch on="noti.image">' +
|
|
||||||
'<i class="fi-{{noti.icon}}" ng-switch-when="false"></i>' +
|
|
||||||
'<img ng-src="{{noti.image}}" ng-switch-default />' +
|
|
||||||
'</div>' +
|
|
||||||
'<div class="dr-notification-content">' +
|
|
||||||
'<h3 class="dr-notification-title">{{noti.title}}</h3>' +
|
|
||||||
'<p class="dr-notification-text">{{noti.content}}</p>' +
|
|
||||||
'</div>' +
|
|
||||||
'</div>' +
|
|
||||||
'</div>';
|
|
||||||
|
|
||||||
|
|
||||||
function link(scope, element, attrs) {
|
function link(scope, element, attrs) {
|
||||||
var position = attrs.notifications;
|
var position = attrs.notifications;
|
||||||
position = position.split(' ');
|
position = position.split(' ');
|
||||||
|
|
@ -264,11 +246,10 @@ directive('notifications', function(notification, $compile) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
restrict: 'A',
|
restrict: 'A',
|
||||||
scope: {},
|
scope: {},
|
||||||
template: html,
|
template: '<div ng-include="\'views/includes/notifications.html\'"></div>',
|
||||||
link: link,
|
link: link,
|
||||||
controller: ['$scope',
|
controller: ['$scope',
|
||||||
function NotificationsCtrl($scope) {
|
function NotificationsCtrl($scope) {
|
||||||
|
|
|
||||||
16
views/includes/notifications.html
Normal file
16
views/includes/notifications.html
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
<div class="dr-notification-wrapper" ng-repeat="noti in queue">
|
||||||
|
<div class="dr-notification-close-btn" ng-click="removeNotification(noti)">
|
||||||
|
<i class="fi-x"></i>
|
||||||
|
</div>
|
||||||
|
<div class="dr-notification">
|
||||||
|
<div class="dr-notification-image dr-notification-type-{{noti.type}}" ng-switch on="noti.image">
|
||||||
|
<i class="fi-{{noti.icon}}" ng-switch-when="false"></i>
|
||||||
|
<img ng-src="{{noti.image}}" ng-switch-default />
|
||||||
|
</div>
|
||||||
|
<div class="dr-notification-content">
|
||||||
|
<h3 class="dr-notification-title">{{noti.title}}</h3>
|
||||||
|
<div class="dr-notification-text">{{noti.content}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue